diff options
author | Yi Min Zhao <zyimin@linux.vnet.ibm.com> | 2015-12-14 16:50:44 +0800 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-01-13 10:53:42 +0100 |
commit | 3be5c2078bcf3ba1084cd90a191e93cb7ade18a2 (patch) | |
tree | 20e51cf528278f812c01fae61fe4d9e96e2abebb /hw/s390x/s390-pci-bus.c | |
parent | 7b3fdbd9a826791bd98e649cf44c0a6129a44179 (diff) | |
download | qemu-3be5c2078bcf3ba1084cd90a191e93cb7ade18a2.zip qemu-3be5c2078bcf3ba1084cd90a191e93cb7ade18a2.tar.gz qemu-3be5c2078bcf3ba1084cd90a191e93cb7ade18a2.tar.bz2 |
s390x/pci: reject some operations to disabled PCI function
According to the s390 architecture, any mpcifc, pcilg, pcistg,
pcistb and rpcit instructions issued to disabled PCI functions
are rejected, and the instruction completes by setting condition
code 3. In addition, any DMA and MSIX interruption operations
are ignored.
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.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, 5 insertions, 1 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 8de35ff..132588b 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -317,7 +317,7 @@ static IOMMUTLBEntry s390_translate_iommu(MemoryRegion *iommu, hwaddr addr, .perm = IOMMU_NONE, }; - if (!pbdev->configured || !pbdev->pdev) { + if (!pbdev->configured || !pbdev->pdev || !(pbdev->fh & FH_ENABLED)) { return ret; } @@ -428,6 +428,10 @@ static void s390_msi_ctrl_write(void *opaque, hwaddr addr, uint64_t data, return; } + if (!(pbdev->fh & FH_ENABLED)) { + return; + } + ind_bit = pbdev->routes.adapter.ind_offset; sum_bit = pbdev->routes.adapter.summary_offset; |