diff options
author | Yi Min Zhao | 2018-02-05 08:22:58 +0100 |
---|---|---|
committer | Cornelia Huck | 2018-02-09 09:37:13 +0100 |
commit | f9125e3a3163fbc20e1a34f837b2f02b9ac3cd34 (patch) | |
tree | 8367dc38f994e2b896ae2aaae56e10d602bc3166 /hw/s390x/s390-pci-inst.c | |
parent | s390x/pci: fixup global refresh (diff) | |
download | qemu-f9125e3a3163fbc20e1a34f837b2f02b9ac3cd34.tar.gz qemu-f9125e3a3163fbc20e1a34f837b2f02b9ac3cd34.tar.xz qemu-f9125e3a3163fbc20e1a34f837b2f02b9ac3cd34.zip |
s390x/pci: use the right pal and pba in reg_ioat()
When registering ioat, pba should be comprised of leftmost 52 bits and
rightmost 12 binary zeros, and pal should be comprised of leftmost 52
bits and right most 12 binary ones. The lower 12 bits of words 5 and 7
of the FIB are ignored by the facility. Let's fixup this.
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Message-Id: <20180205072258.5968-4-zyimin@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/s390-pci-inst.c')
-rw-r--r-- | hw/s390x/s390-pci-inst.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 997a9cc2e9..3fcc330fe3 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -865,6 +865,8 @@ static int reg_ioat(CPUS390XState *env, S390PCIIOMMU *iommu, ZpciFib fib, uint8_t dt = (g_iota >> 2) & 0x7; uint8_t t = (g_iota >> 11) & 0x1; + pba &= ~0xfff; + pal |= 0xfff; if (pba > pal || pba < ZPCI_SDMA_ADDR || pal > ZPCI_EDMA_ADDR) { s390_program_interrupt(env, PGM_OPERAND, 6, ra); return -EINVAL; |