diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-01-07 12:55:42 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-01-07 12:55:42 +0100 |
commit | 4e9950dc1bd23d0eb61f25c5355318bfdd33657e (patch) | |
tree | be03bc00088704efd04a9b56bde9bc82b49f58ef /xen/include/xen/lib.h | |
parent | e7e08d86ad2fe984dccbe1a5673c33b3e118f12c (diff) | |
download | xen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.tar.gz xen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.tar.bz2 xen-4e9950dc1bd23d0eb61f25c5355318bfdd33657e.zip |
IOMMU: add phantom function support
Apart from generating device context entries for the base function,
all phantom functions also need context entries to be generated for
them.
In order to distinguish different use cases, a variant of
pci_get_pdev() is being introduced that, even when passed a phantom
function number, would return the underlying actual device.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Diffstat (limited to 'xen/include/xen/lib.h')
-rw-r--r-- | xen/include/xen/lib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 1919ed7d93..f7074cf2ff 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -58,6 +58,9 @@ do { \ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]) + __must_be_array(x)) +#define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m))) +#define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m)) + #define reserve_bootmem(_p,_l) ((void)0) struct domain; |