aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-pci-bus.h
diff options
context:
space:
mode:
authorYi Min Zhao <zyimin@linux.vnet.ibm.com>2016-05-13 16:16:30 +0800
committerCornelia Huck <cornelia.huck@de.ibm.com>2016-07-11 09:48:05 +0200
commitc188e30315dc44cf428f2008df4ea2a9788ac8df (patch)
tree01dcc582d47e33191a76518aa4690b6b71b0fac4 /hw/s390x/s390-pci-bus.h
parent67aad508decdbbce59faa27072daae0d1d31b1ad (diff)
s390x/pci: unify FH_ macros
Present code uses some macros to structure PCI Function Handle. But their names don't have a uniform format. Let's use FH_MASK_ as the unified prefix. While we're at it, differentiate the SHM bits: use different bits for vfio and emulated devices. Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-pci-bus.h')
-rw-r--r--hw/s390x/s390-pci-bus.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/s390x/s390-pci-bus.h b/hw/s390x/s390-pci-bus.h
index 2c852d47fa..5cf7926135 100644
--- a/hw/s390x/s390-pci-bus.h
+++ b/hw/s390x/s390-pci-bus.h
@@ -21,9 +21,12 @@
#include "hw/s390x/css.h"
#define TYPE_S390_PCI_HOST_BRIDGE "s390-pcihost"
-#define FH_VIRT 0x00ff0000
-#define ENABLE_BIT_OFFSET 31
-#define FH_ENABLED (1 << ENABLE_BIT_OFFSET)
+#define FH_MASK_ENABLE 0x80000000
+#define FH_MASK_INSTANCE 0x7f000000
+#define FH_MASK_SHM 0x00ff0000
+#define FH_MASK_INDEX 0x0000001f
+#define FH_SHM_VFIO 0x00010000
+#define FH_SHM_EMUL 0x00020000
#define S390_PCIPT_ADAPTER 2
#define S390_PCI_HOST_BRIDGE(obj) \