diff options
author | Yi Min Zhao <zyimin@linux.vnet.ibm.com> | 2016-05-13 16:16:30 +0800 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-07-11 09:48:05 +0200 |
commit | c188e30315dc44cf428f2008df4ea2a9788ac8df (patch) | |
tree | 01dcc582d47e33191a76518aa4690b6b71b0fac4 /hw/s390x/s390-pci-bus.c | |
parent | 67aad508decdbbce59faa27072daae0d1d31b1ad (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.c')
-rw-r--r-- | hw/s390x/s390-pci-bus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index ba637c9a95..7111587a77 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -170,7 +170,7 @@ static uint32_t s390_pci_get_pfid(PCIDevice *pdev) static uint32_t s390_pci_get_pfh(PCIDevice *pdev) { - return PCI_SLOT(pdev->devfn) | FH_VIRT; + return PCI_SLOT(pdev->devfn) | FH_SHM_VFIO; } S390PCIBusDevice *s390_pci_find_dev_by_idx(uint32_t idx) @@ -345,7 +345,7 @@ static IOMMUTLBEntry s390_translate_iommu(MemoryRegion *iommu, hwaddr addr, }; if (!pbdev->configured || !pbdev->pdev || - !(pbdev->fh & FH_ENABLED) || !pbdev->iommu_enabled) { + !(pbdev->fh & FH_MASK_ENABLE) || !pbdev->iommu_enabled) { return ret; } @@ -456,7 +456,7 @@ static void s390_msi_ctrl_write(void *opaque, hwaddr addr, uint64_t data, return; } - if (!(pbdev->fh & FH_ENABLED)) { + if (!(pbdev->fh & FH_MASK_ENABLE)) { return; } |