[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 2/7] s390x/pci: rework PCI STORE
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v4 2/7] s390x/pci: rework PCI STORE |
Date: |
Fri, 1 Dec 2017 11:37:13 +0100 |
On Thu, 30 Nov 2017 13:55:25 +0100
Pierre Morel <address@hidden> wrote:
> Enhance the fault detection, correction of the fault reporting.
>
> Signed-off-by: Pierre Morel <address@hidden>
> Reviewed-by: Yi Min Zhao <address@hidden>
> ---
> hw/s390x/s390-pci-inst.c | 42 +++++++++++++++++++++++++-----------------
> hw/s390x/s390-pci-inst.h | 4 ++++
> 2 files changed, 29 insertions(+), 17 deletions(-)
>
> @@ -493,9 +497,13 @@ int pcistg_service_call(S390CPU *cpu, uint8_t r1,
> uint8_t r2)
> break;
> }
>
> - data = env->regs[r1];
> - if (pcias < 6) {
> - if ((8 - (offset & 0x7)) < len) {
> + switch (pcias) {
> + /* A ZPCI PCI card may use any BAR from BAR 0 to BAR 5 */
> + case ZPCI_IO_BAR_MIN ... ZPCI_IO_BAR_MAX:
Will make this
case ZPCI_IO_BAR_MIN...ZPCI_IO_BAR_MAX:
> + /* Check length:
> + * A length of 0 is invalid and length should not cross a double word
> + */
> + if (!len || (len > (8 - (offset & 0x7)))) {
> program_interrupt(env, PGM_OPERAND, 4);
> return 0;
> }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v4 2/7] s390x/pci: rework PCI STORE,
Cornelia Huck <=