qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Collin Walling <walling@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
	Stefan Weil <sw@weilnetz.de>,
	qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH for-4.1 1/2] s390x/pci: add some fallthrough annotations
Date: Tue, 16 Jul 2019 17:20:02 +0200	[thread overview]
Message-ID: <20190716172002.77863317.cohuck@redhat.com> (raw)
In-Reply-To: <20190710102041.6be31940.cohuck@redhat.com>

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).



  reply	other threads:[~2019-07-16 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190716172002.77863317.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.de \
    --cc=walling@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).