mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
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>
This commit is contained in:
parent
b3f05d8c7f
commit
f9125e3a31
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user