* [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations @ 2019-07-08 12:54 Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some " Cornelia Huck ` (2 more replies) 0 siblings, 3 replies; 16+ messages in thread From: Cornelia Huck @ 2019-07-08 12:54 UTC (permalink / raw) To: Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, Cornelia Huck, qemu-devel I looked through the build log linked to in <591d71a5-5b10-ab22-4751-01da8613d84c@weilnetz.de> and came up with the following patches for s390x. I plan to queue them to my fixes branch for 4.1. Cornelia Huck (2): s390x/pci: add some fallthrough annotations s390x/tcg: move fallthrough annotation hw/s390x/s390-pci-inst.c | 2 ++ target/s390x/translate_vx.inc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-08 12:54 [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck @ 2019-07-08 12:54 ` Cornelia Huck 2019-07-08 13:23 ` Christian Borntraeger 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation Cornelia Huck 2019-07-09 8:39 ` [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck 2 siblings, 1 reply; 16+ messages in thread From: Cornelia Huck @ 2019-07-08 12:54 UTC (permalink / raw) To: Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, Cornelia Huck, qemu-devel According to the comment, the bits are supposed to accumulate. Reported-by: Stefan Weil <sw@weilnetz.de> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") Signed-off-by: Cornelia Huck <cohuck@redhat.com> --- 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 */ case ZPCI_FS_BLOCKED: fib.fc |= 0x40; + /* fallthrough */ case ZPCI_FS_ENABLED: fib.fc |= 0x80; if (pbdev->iommu->enabled) { -- 2.20.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some " Cornelia Huck @ 2019-07-08 13:23 ` Christian Borntraeger 2019-07-09 22:55 ` [Qemu-devel] [qemu-s390x] " Collin Walling 0 siblings, 1 reply; 16+ messages in thread From: Christian Borntraeger @ 2019-07-08 13:23 UTC (permalink / raw) To: Cornelia Huck, Collin Walling, Halil Pasic, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, qemu-devel On 08.07.19 14:54, Cornelia Huck wrote: > According to the comment, the bits are supposed to accumulate. > > Reported-by: Stefan Weil <sw@weilnetz.de> > Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") > Signed-off-by: Cornelia Huck <cohuck@redhat.com> 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) { > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-08 13:23 ` Christian Borntraeger @ 2019-07-09 22:55 ` Collin Walling 2019-07-10 8:20 ` Cornelia Huck 0 siblings, 1 reply; 16+ messages in thread From: Collin Walling @ 2019-07-09 22:55 UTC (permalink / raw) To: Christian Borntraeger, Cornelia Huck, Halil Pasic, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, qemu-devel On 7/8/19 9:23 AM, Christian Borntraeger wrote: > > > On 08.07.19 14:54, Cornelia Huck wrote: >> According to the comment, the bits are supposed to accumulate. >> >> Reported-by: Stefan Weil <sw@weilnetz.de> >> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") >> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > > 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. > Agreed. This is definitely correct based on our architecture. >> case ZPCI_FS_BLOCKED: >> fib.fc |= 0x40; >> + /* fallthrough */ > > I think this is also correct, but it would be good if Collin could verify. > I failed to find anything to support setting the function control enabled bit when the function state is in error / blocked. I'm assuming this might be some QEMU hack to get things working? I'll have to dive further to understand why this was done this way, as it doesn't align with how the s390x architecture is documented. It's confusing. Functionally, this doesn't change anything... so I'll at least give it an ACK for now and investigate this further. >> case ZPCI_FS_ENABLED: >> fib.fc |= 0x80; >> if (pbdev->iommu->enabled) { >> > > Acked-by: Collin Walling <walling@linux.ibm.com> Side note: is there somewhere that I could access this bug report? :) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-09 22:55 ` [Qemu-devel] [qemu-s390x] " Collin Walling @ 2019-07-10 8:20 ` Cornelia Huck 2019-07-16 15:20 ` Cornelia Huck 0 siblings, 1 reply; 16+ messages in thread From: Cornelia Huck @ 2019-07-10 8:20 UTC (permalink / raw) To: Collin Walling Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On Tue, 9 Jul 2019 18:55:34 -0400 Collin Walling <walling@linux.ibm.com> wrote: > On 7/8/19 9:23 AM, Christian Borntraeger wrote: > > > > > > On 08.07.19 14:54, Cornelia Huck wrote: > >> According to the comment, the bits are supposed to accumulate. > >> > >> Reported-by: Stefan Weil <sw@weilnetz.de> > >> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") > >> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > > > > 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. > > > > Agreed. This is definitely correct based on our architecture. > > >> case ZPCI_FS_BLOCKED: > >> fib.fc |= 0x40; > >> + /* fallthrough */ > > > > I think this is also correct, but it would be good if Collin could verify. > > > > I failed to find anything to support setting the function control > enabled bit when the function state is in error / blocked. I'm > assuming this might be some QEMU hack to get things working? I'll have > to dive further to understand why this was done this way, as it doesn't > align with how the s390x architecture is documented. It's confusing. Might this also be a real issue? Not matching the architecture is not a good sign... > > Functionally, this doesn't change anything... so I'll at least give it > an ACK for now and investigate this further. I prefer to hold off on this patch for now, unless we're really sure that the code does not have a problem here. Actually documenting something that might be wrong does not sound like the right thing to do :/ > > >> case ZPCI_FS_ENABLED: > >> fib.fc |= 0x80; > >> if (pbdev->iommu->enabled) { > >> > > > > > > Acked-by: Collin Walling <walling@linux.ibm.com> > > Side note: is there somewhere that I could access this bug report? :) It's the build log with the extra warnings in https://qemu.weilnetz.de/results/build-20190708.txt (referenced in <591d71a5-5b10-ab22-4751-01da8613d84c@weilnetz.de> on qemu-devel). ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-10 8:20 ` Cornelia Huck @ 2019-07-16 15:20 ` Cornelia Huck 2019-07-16 18:34 ` Collin Walling 0 siblings, 1 reply; 16+ messages in thread From: Cornelia Huck @ 2019-07-16 15:20 UTC (permalink / raw) To: Collin Walling Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On Wed, 10 Jul 2019 10:20:41 +0200 Cornelia Huck <cohuck@redhat.com> wrote: > On Tue, 9 Jul 2019 18:55:34 -0400 > Collin Walling <walling@linux.ibm.com> wrote: > > > On 7/8/19 9:23 AM, Christian Borntraeger wrote: > > > > > > > > > On 08.07.19 14:54, Cornelia Huck wrote: > > >> According to the comment, the bits are supposed to accumulate. > > >> > > >> Reported-by: Stefan Weil <sw@weilnetz.de> > > >> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") > > >> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > > > > > > 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. > > > > > > > Agreed. This is definitely correct based on our architecture. > > > > >> case ZPCI_FS_BLOCKED: > > >> fib.fc |= 0x40; > > >> + /* fallthrough */ > > > > > > I think this is also correct, but it would be good if Collin could verify. > > > > > > > I failed to find anything to support setting the function control > > enabled bit when the function state is in error / blocked. I'm > > assuming this might be some QEMU hack to get things working? I'll have > > to dive further to understand why this was done this way, as it doesn't > > align with how the s390x architecture is documented. It's confusing. > > Might this also be a real issue? Not matching the architecture is not a > good sign... Friendly ping. If we still want to have this patch or a fix in 4.1, we need to find out soon... > > > > > Functionally, this doesn't change anything... so I'll at least give it > > an ACK for now and investigate this further. > > I prefer to hold off on this patch for now, unless we're really sure > that the code does not have a problem here. Actually documenting > something that might be wrong does not sound like the right thing to > do :/ > > > > > >> case ZPCI_FS_ENABLED: > > >> fib.fc |= 0x80; > > >> if (pbdev->iommu->enabled) { > > >> > > > > > > > > > > Acked-by: Collin Walling <walling@linux.ibm.com> > > > > Side note: is there somewhere that I could access this bug report? :) > > It's the build log with the extra warnings in > https://qemu.weilnetz.de/results/build-20190708.txt (referenced in > <591d71a5-5b10-ab22-4751-01da8613d84c@weilnetz.de> on qemu-devel). ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-16 15:20 ` Cornelia Huck @ 2019-07-16 18:34 ` Collin Walling 2019-07-17 8:54 ` Cornelia Huck 0 siblings, 1 reply; 16+ messages in thread From: Collin Walling @ 2019-07-16 18:34 UTC (permalink / raw) To: Cornelia Huck Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On 7/16/19 11:20 AM, Cornelia Huck wrote: > On Wed, 10 Jul 2019 10:20:41 +0200 > Cornelia Huck <cohuck@redhat.com> wrote: > >> On Tue, 9 Jul 2019 18:55:34 -0400 >> Collin Walling <walling@linux.ibm.com> wrote: >> >>> On 7/8/19 9:23 AM, Christian Borntraeger wrote: >>>> >>>> >>>> On 08.07.19 14:54, Cornelia Huck wrote: >>>>> According to the comment, the bits are supposed to accumulate. >>>>> >>>>> Reported-by: Stefan Weil <sw@weilnetz.de> >>>>> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") >>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>>> >>>> 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. >>>> >>> >>> Agreed. This is definitely correct based on our architecture. >>> >>>>> case ZPCI_FS_BLOCKED: >>>>> fib.fc |= 0x40; >>>>> + /* fallthrough */ >>>> >>>> I think this is also correct, but it would be good if Collin could verify. >>>> >>> >>> I failed to find anything to support setting the function control >>> enabled bit when the function state is in error / blocked. I'm >>> assuming this might be some QEMU hack to get things working? I'll have >>> to dive further to understand why this was done this way, as it doesn't >>> align with how the s390x architecture is documented. It's confusing. >> >> Might this also be a real issue? Not matching the architecture is not a >> good sign... > > Friendly ping. If we still want to have this patch or a fix in 4.1, we > need to find out soon... > Let's take it for now. Acked-by: Collin Walling <walling@linux.ibm.com> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-16 18:34 ` Collin Walling @ 2019-07-17 8:54 ` Cornelia Huck 2019-07-17 9:27 ` Christian Borntraeger 0 siblings, 1 reply; 16+ messages in thread From: Cornelia Huck @ 2019-07-17 8:54 UTC (permalink / raw) To: Collin Walling Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On Tue, 16 Jul 2019 14:34:22 -0400 Collin Walling <walling@linux.ibm.com> wrote: > On 7/16/19 11:20 AM, Cornelia Huck wrote: > > On Wed, 10 Jul 2019 10:20:41 +0200 > > Cornelia Huck <cohuck@redhat.com> wrote: > > > >> On Tue, 9 Jul 2019 18:55:34 -0400 > >> Collin Walling <walling@linux.ibm.com> wrote: > >> > >>> On 7/8/19 9:23 AM, Christian Borntraeger wrote: > >>>> > >>>> > >>>> On 08.07.19 14:54, Cornelia Huck wrote: > >>>>> According to the comment, the bits are supposed to accumulate. > >>>>> > >>>>> Reported-by: Stefan Weil <sw@weilnetz.de> > >>>>> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") > >>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > >>>> > >>>> 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. > >>>> > >>> > >>> Agreed. This is definitely correct based on our architecture. > >>> > >>>>> case ZPCI_FS_BLOCKED: > >>>>> fib.fc |= 0x40; > >>>>> + /* fallthrough */ > >>>> > >>>> I think this is also correct, but it would be good if Collin could verify. > >>>> > >>> > >>> I failed to find anything to support setting the function control > >>> enabled bit when the function state is in error / blocked. I'm > >>> assuming this might be some QEMU hack to get things working? I'll have > >>> to dive further to understand why this was done this way, as it doesn't > >>> align with how the s390x architecture is documented. It's confusing. > >> > >> Might this also be a real issue? Not matching the architecture is not a > >> good sign... > > > > Friendly ping. If we still want to have this patch or a fix in 4.1, we > > need to find out soon... > > > > Let's take it for now. > > Acked-by: Collin Walling <walling@linux.ibm.com> > Just to be clear: You think that the current code is correct AFAYCS? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-17 8:54 ` Cornelia Huck @ 2019-07-17 9:27 ` Christian Borntraeger 2019-07-17 12:52 ` Collin Walling 0 siblings, 1 reply; 16+ messages in thread From: Christian Borntraeger @ 2019-07-17 9:27 UTC (permalink / raw) To: Cornelia Huck, Collin Walling Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, qemu-s390x, Richard Henderson On 17.07.19 10:54, Cornelia Huck wrote: > On Tue, 16 Jul 2019 14:34:22 -0400 > Collin Walling <walling@linux.ibm.com> wrote: > >> On 7/16/19 11:20 AM, Cornelia Huck wrote: >>> On Wed, 10 Jul 2019 10:20:41 +0200 >>> Cornelia Huck <cohuck@redhat.com> wrote: >>> >>>> On Tue, 9 Jul 2019 18:55:34 -0400 >>>> Collin Walling <walling@linux.ibm.com> wrote: >>>> >>>>> On 7/8/19 9:23 AM, Christian Borntraeger wrote: >>>>>> >>>>>> >>>>>> On 08.07.19 14:54, Cornelia Huck wrote: >>>>>>> According to the comment, the bits are supposed to accumulate. >>>>>>> >>>>>>> Reported-by: Stefan Weil <sw@weilnetz.de> >>>>>>> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") >>>>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>>>>> >>>>>> 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. >>>>>> >>>>> >>>>> Agreed. This is definitely correct based on our architecture. >>>>> >>>>>>> case ZPCI_FS_BLOCKED: >>>>>>> fib.fc |= 0x40; >>>>>>> + /* fallthrough */ >>>>>> >>>>>> I think this is also correct, but it would be good if Collin could verify. >>>>>> >>>>> >>>>> I failed to find anything to support setting the function control >>>>> enabled bit when the function state is in error / blocked. I'm >>>>> assuming this might be some QEMU hack to get things working? I'll have >>>>> to dive further to understand why this was done this way, as it doesn't >>>>> align with how the s390x architecture is documented. It's confusing. >>>> >>>> Might this also be a real issue? Not matching the architecture is not a >>>> good sign... >>> >>> Friendly ping. If we still want to have this patch or a fix in 4.1, we >>> need to find out soon... >>> >> >> Let's take it for now. >> >> Acked-by: Collin Walling <walling@linux.ibm.com> >> > > Just to be clear: You think that the current code is correct AFAYCS? I also looked into this again. There is a possibility to also be in disabled state. From what I can see, it makes sense that blocked and error belong to the enable state so the patch seems correct. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-17 9:27 ` Christian Borntraeger @ 2019-07-17 12:52 ` Collin Walling 2019-07-18 9:41 ` Cornelia Huck 0 siblings, 1 reply; 16+ messages in thread From: Collin Walling @ 2019-07-17 12:52 UTC (permalink / raw) To: Christian Borntraeger, Cornelia Huck Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, qemu-s390x, Richard Henderson On 7/17/19 5:27 AM, Christian Borntraeger wrote: > > > On 17.07.19 10:54, Cornelia Huck wrote: >> On Tue, 16 Jul 2019 14:34:22 -0400 >> Collin Walling <walling@linux.ibm.com> wrote: >> >>> On 7/16/19 11:20 AM, Cornelia Huck wrote: >>>> On Wed, 10 Jul 2019 10:20:41 +0200 >>>> Cornelia Huck <cohuck@redhat.com> wrote: >>>> >>>>> On Tue, 9 Jul 2019 18:55:34 -0400 >>>>> Collin Walling <walling@linux.ibm.com> wrote: >>>>> >>>>>> On 7/8/19 9:23 AM, Christian Borntraeger wrote: >>>>>>> >>>>>>> >>>>>>> On 08.07.19 14:54, Cornelia Huck wrote: >>>>>>>> According to the comment, the bits are supposed to accumulate. >>>>>>>> >>>>>>>> Reported-by: Stefan Weil <sw@weilnetz.de> >>>>>>>> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") >>>>>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>>>>>> >>>>>>> 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. >>>>>>> >>>>>> >>>>>> Agreed. This is definitely correct based on our architecture. >>>>>> >>>>>>>> case ZPCI_FS_BLOCKED: >>>>>>>> fib.fc |= 0x40; >>>>>>>> + /* fallthrough */ >>>>>>> >>>>>>> I think this is also correct, but it would be good if Collin could verify. >>>>>>> >>>>>> >>>>>> I failed to find anything to support setting the function control >>>>>> enabled bit when the function state is in error / blocked. I'm >>>>>> assuming this might be some QEMU hack to get things working? I'll have >>>>>> to dive further to understand why this was done this way, as it doesn't >>>>>> align with how the s390x architecture is documented. It's confusing. >>>>> >>>>> Might this also be a real issue? Not matching the architecture is not a >>>>> good sign... >>>> >>>> Friendly ping. If we still want to have this patch or a fix in 4.1, we >>>> need to find out soon... >>>> >>> >>> Let's take it for now. >>> >>> Acked-by: Collin Walling <walling@linux.ibm.com> >>> >> >> Just to be clear: You think that the current code is correct AFAYCS? > > I also looked into this again. > There is a possibility to also be in disabled state. > From what I can see, it makes sense that blocked and error belong to the enable state > so the patch seems correct. > Yes I agree. The material I referenced required me to look over a few times and ask around a bit. The patch is good. Apologies for my ambiguous response. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations 2019-07-17 12:52 ` Collin Walling @ 2019-07-18 9:41 ` Cornelia Huck 0 siblings, 0 replies; 16+ messages in thread From: Cornelia Huck @ 2019-07-18 9:41 UTC (permalink / raw) To: Collin Walling Cc: David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On Wed, 17 Jul 2019 08:52:54 -0400 Collin Walling <walling@linux.ibm.com> wrote: > On 7/17/19 5:27 AM, Christian Borntraeger wrote: > > > > > > On 17.07.19 10:54, Cornelia Huck wrote: > >> On Tue, 16 Jul 2019 14:34:22 -0400 > >> Collin Walling <walling@linux.ibm.com> wrote: > >> > >>> On 7/16/19 11:20 AM, Cornelia Huck wrote: > >>>> On Wed, 10 Jul 2019 10:20:41 +0200 > >>>> Cornelia Huck <cohuck@redhat.com> wrote: > >>>> > >>>>> On Tue, 9 Jul 2019 18:55:34 -0400 > >>>>> Collin Walling <walling@linux.ibm.com> wrote: > >>>>> > >>>>>> On 7/8/19 9:23 AM, Christian Borntraeger wrote: > >>>>>>> > >>>>>>> > >>>>>>> On 08.07.19 14:54, Cornelia Huck wrote: > >>>>>>>> According to the comment, the bits are supposed to accumulate. > >>>>>>>> > >>>>>>>> Reported-by: Stefan Weil <sw@weilnetz.de> > >>>>>>>> Fixes: 5d1abf234462 ("s390x/pci: enforce zPCI state checking") > >>>>>>>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> > >>>>>>> > >>>>>>> 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. > >>>>>>> > >>>>>> > >>>>>> Agreed. This is definitely correct based on our architecture. > >>>>>> > >>>>>>>> case ZPCI_FS_BLOCKED: > >>>>>>>> fib.fc |= 0x40; > >>>>>>>> + /* fallthrough */ > >>>>>>> > >>>>>>> I think this is also correct, but it would be good if Collin could verify. > >>>>>>> > >>>>>> > >>>>>> I failed to find anything to support setting the function control > >>>>>> enabled bit when the function state is in error / blocked. I'm > >>>>>> assuming this might be some QEMU hack to get things working? I'll have > >>>>>> to dive further to understand why this was done this way, as it doesn't > >>>>>> align with how the s390x architecture is documented. It's confusing. > >>>>> > >>>>> Might this also be a real issue? Not matching the architecture is not a > >>>>> good sign... > >>>> > >>>> Friendly ping. If we still want to have this patch or a fix in 4.1, we > >>>> need to find out soon... > >>>> > >>> > >>> Let's take it for now. > >>> > >>> Acked-by: Collin Walling <walling@linux.ibm.com> > >>> > >> > >> Just to be clear: You think that the current code is correct AFAYCS? > > > > I also looked into this again. > > There is a possibility to also be in disabled state. > > From what I can see, it makes sense that blocked and error belong to the enable state > > so the patch seems correct. > > > > Yes I agree. The material I referenced required me to look over a few > times and ask around a bit. The patch is good. Apologies for my > ambiguous response. > Ok, thanks for the clarification. Queued now. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation 2019-07-08 12:54 [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some " Cornelia Huck @ 2019-07-08 12:54 ` Cornelia Huck 2019-07-08 13:27 ` Stefan Weil 2019-07-16 15:22 ` Philippe Mathieu-Daudé 2019-07-09 8:39 ` [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck 2 siblings, 2 replies; 16+ messages in thread From: Cornelia Huck @ 2019-07-08 12:54 UTC (permalink / raw) To: Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, Cornelia Huck, qemu-devel ...so that the compiler properly recognizes it. Reported-by: Stefan Weil <sw@weilnetz.de> Fixes: f180da83c039 ("s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO") Signed-off-by: Cornelia Huck <cohuck@redhat.com> --- target/s390x/translate_vx.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c index 7b1d31cba5cf..41d5cf869f94 100644 --- a/target/s390x/translate_vx.inc.c +++ b/target/s390x/translate_vx.inc.c @@ -577,8 +577,8 @@ static DisasJumpType op_vllez(DisasContext *s, DisasOps *o) enr = 0; break; } - default: /* fallthrough */ + default: gen_program_exception(s, PGM_SPECIFICATION); return DISAS_NORETURN; } -- 2.20.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation Cornelia Huck @ 2019-07-08 13:27 ` Stefan Weil 2019-07-16 15:22 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 16+ messages in thread From: Stefan Weil @ 2019-07-08 13:27 UTC (permalink / raw) To: Cornelia Huck, Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: qemu-s390x, qemu-devel Am 08.07.2019 um 14:54 schrieb Cornelia Huck: > ...so that the compiler properly recognizes it. > > Reported-by: Stefan Weil <sw@weilnetz.de> > Fixes: f180da83c039 ("s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO") > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > target/s390x/translate_vx.inc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c > index 7b1d31cba5cf..41d5cf869f94 100644 > --- a/target/s390x/translate_vx.inc.c > +++ b/target/s390x/translate_vx.inc.c > @@ -577,8 +577,8 @@ static DisasJumpType op_vllez(DisasContext *s, DisasOps *o) > enr = 0; > break; > } > - default: > /* fallthrough */ > + default: > gen_program_exception(s, PGM_SPECIFICATION); > return DISAS_NORETURN; > } Reviewed-by: Stefan Weil <sw@weilnetz.de> Thanks, Stefan ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation Cornelia Huck 2019-07-08 13:27 ` Stefan Weil @ 2019-07-16 15:22 ` Philippe Mathieu-Daudé 2019-07-16 15:26 ` Cornelia Huck 1 sibling, 1 reply; 16+ messages in thread From: Philippe Mathieu-Daudé @ 2019-07-16 15:22 UTC (permalink / raw) To: Cornelia Huck, Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, qemu-devel On 7/8/19 2:54 PM, Cornelia Huck wrote: > ...so that the compiler properly recognizes it. > > Reported-by: Stefan Weil <sw@weilnetz.de> > Fixes: f180da83c039 ("s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO") > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > target/s390x/translate_vx.inc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c > index 7b1d31cba5cf..41d5cf869f94 100644 > --- a/target/s390x/translate_vx.inc.c > +++ b/target/s390x/translate_vx.inc.c > @@ -577,8 +577,8 @@ static DisasJumpType op_vllez(DisasContext *s, DisasOps *o) > enr = 0; > break; > } > - default: > /* fallthrough */ > + default: Haha :) Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > gen_program_exception(s, PGM_SPECIFICATION); > return DISAS_NORETURN; > } > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation 2019-07-16 15:22 ` Philippe Mathieu-Daudé @ 2019-07-16 15:26 ` Cornelia Huck 0 siblings, 0 replies; 16+ messages in thread From: Cornelia Huck @ 2019-07-16 15:26 UTC (permalink / raw) To: Philippe Mathieu-Daudé Cc: Collin Walling, David Hildenbrand, Stefan Weil, qemu-devel, Halil Pasic, Christian Borntraeger, qemu-s390x, Richard Henderson On Tue, 16 Jul 2019 17:22:59 +0200 Philippe Mathieu-Daudé <philmd@redhat.com> wrote: > On 7/8/19 2:54 PM, Cornelia Huck wrote: > > ...so that the compiler properly recognizes it. > > > > Reported-by: Stefan Weil <sw@weilnetz.de> > > Fixes: f180da83c039 ("s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO") > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > > --- > > target/s390x/translate_vx.inc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c > > index 7b1d31cba5cf..41d5cf869f94 100644 > > --- a/target/s390x/translate_vx.inc.c > > +++ b/target/s390x/translate_vx.inc.c > > @@ -577,8 +577,8 @@ static DisasJumpType op_vllez(DisasContext *s, DisasOps *o) > > enr = 0; > > break; > > } > > - default: > > /* fallthrough */ > > + default: > > Haha :) > > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Thanks, but this is already merged :) > > > gen_program_exception(s, PGM_SPECIFICATION); > > return DISAS_NORETURN; > > } > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations 2019-07-08 12:54 [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some " Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation Cornelia Huck @ 2019-07-09 8:39 ` Cornelia Huck 2 siblings, 0 replies; 16+ messages in thread From: Cornelia Huck @ 2019-07-09 8:39 UTC (permalink / raw) To: Collin Walling, Halil Pasic, Christian Borntraeger, Richard Henderson, David Hildenbrand Cc: Stefan Weil, qemu-s390x, qemu-devel On Mon, 8 Jul 2019 14:54:31 +0200 Cornelia Huck <cohuck@redhat.com> wrote: > I looked through the build log linked to in > <591d71a5-5b10-ab22-4751-01da8613d84c@weilnetz.de> and came up > with the following patches for s390x. I plan to queue them to > my fixes branch for 4.1. Queued patch 2; still waiting for a final ack for patch 1. > > Cornelia Huck (2): > s390x/pci: add some fallthrough annotations > s390x/tcg: move fallthrough annotation > > hw/s390x/s390-pci-inst.c | 2 ++ > target/s390x/translate_vx.inc.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-07-18 9:41 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-08 12:54 [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 1/2] s390x/pci: add some " Cornelia Huck 2019-07-08 13:23 ` Christian Borntraeger 2019-07-09 22:55 ` [Qemu-devel] [qemu-s390x] " Collin Walling 2019-07-10 8:20 ` Cornelia Huck 2019-07-16 15:20 ` Cornelia Huck 2019-07-16 18:34 ` Collin Walling 2019-07-17 8:54 ` Cornelia Huck 2019-07-17 9:27 ` Christian Borntraeger 2019-07-17 12:52 ` Collin Walling 2019-07-18 9:41 ` Cornelia Huck 2019-07-08 12:54 ` [Qemu-devel] [PATCH for-4.1 2/2] s390x/tcg: move fallthrough annotation Cornelia Huck 2019-07-08 13:27 ` Stefan Weil 2019-07-16 15:22 ` Philippe Mathieu-Daudé 2019-07-16 15:26 ` Cornelia Huck 2019-07-09 8:39 ` [Qemu-devel] [PATCH for-4.1 0/2] s390x: fallthrough annotations Cornelia Huck
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.