qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough ann


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations
Date: Mon, 8 Jul 2019 15:23:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2


On 08.07.19 14:54, Cornelia Huck wrote:
> According to the comment, the bits are supposed to accumulate.
> 
> Reported-by: Stefan Weil <address@hidden>
> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking")
> Signed-off-by: Cornelia Huck <address@hidden>

This patch does not change behaviour, so it is certainly not wrong.

So lets have a look at if the bug report was actually a real bug or
just a missing annotation.

> ---
>  hw/s390x/s390-pci-inst.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
> index 61f30b8e55d2..00235148bed7 100644
> --- a/hw/s390x/s390-pci-inst.c
> +++ b/hw/s390x/s390-pci-inst.c
> @@ -1209,8 +1209,10 @@ int stpcifc_service_call(S390CPU *cpu, uint8_t r1, 
> uint64_t fiba, uint8_t ar,
>       * FH Enabled bit is set to one in states of ENABLED, BLOCKED or ERROR. 
> */
>      case ZPCI_FS_ERROR:
>          fib.fc |= 0x20;
> +        /* fallthrough */

This is correct, in case of an error we are also blocked.

>      case ZPCI_FS_BLOCKED:
>          fib.fc |= 0x40;
> +        /* fallthrough */

I think this is also correct, but  it would be good if Collin could verify.

>      case ZPCI_FS_ENABLED:
>          fib.fc |= 0x80;
>          if (pbdev->iommu->enabled) {
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]