qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: thuth@redhat.com, Matthew Rosato <mjrosato@linux.ibm.com>,
	david@redhat.com, richard.henderson@linaro.org,
	qemu-devel@nongnu.org, pasic@linux.ibm.com,
	borntraeger@de.ibm.com, qemu-s390x@nongnu.org
Subject: Re: [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call
Date: Mon, 21 Dec 2020 11:21:54 +0100	[thread overview]
Message-ID: <20201221112154.4dbdc876.cohuck@redhat.com> (raw)
In-Reply-To: <79611b57-f88d-00d0-a13b-a9acc1100781@linux.ibm.com>

On Mon, 21 Dec 2020 09:50:23 +0100
Pierre Morel <pmorel@linux.ibm.com> wrote:

> On 12/18/20 6:05 PM, Pierre Morel wrote:
> > 
> > 
> > On 12/18/20 5:51 PM, Cornelia Huck wrote:  
> >> On Fri, 18 Dec 2020 17:40:50 +0100
> >> Pierre Morel <pmorel@linux.ibm.com> wrote:
> >>  
> >>> On 12/18/20 4:32 PM, Cornelia Huck wrote:  
> >>>> On Fri, 18 Dec 2020 15:32:08 +0100
> >>>> Pierre Morel <pmorel@linux.ibm.com> wrote:  
> >>>>> On 12/18/20 12:04 PM, Cornelia Huck wrote:  
> >>>>>> On Fri, 18 Dec 2020 10:37:38 +0100
> >>>>>> Pierre Morel <pmorel@linux.ibm.com> wrote:  
> >>>>>>> On 12/17/20 11:16 PM, Matthew Rosato wrote:  
> >>>>>>>> In pcistb_service_handler, a call is made to validate that the 
> >>>>>>>> memory
> >>>>>>>> region can be accessed.  However, the call is made using the 
> >>>>>>>> entire length
> >>>>>>>> of the pcistb operation, which can be larger than the allowed 
> >>>>>>>> memory
> >>>>>>>> access size (8).  Since we already know that the provided buffer 
> >>>>>>>> is a
> >>>>>>>> multiple of 8, fix the call to memory_region_access_valid to 
> >>>>>>>> iterate
> >>>>>>>> over the memory region in the same way as the subsequent call to
> >>>>>>>> memory_region_dispatch_write.
> >>>>>>>>
> >>>>>>>> Fixes: 863f6f52b7 ("s390: implement pci instructions")
> >>>>>>>> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> >>>>>>>> ---  
> 
> ...snip...
> 
> >>>>  
> >>>
> >>> The ops already exist, I thought adding a dedicated callback for s390 on
> >>> every regions used by vfio_pci instead of the default.
> >>> But it does not add a lot, just looks cleaner to me.  
> >>
> >> But we end up here for every pci device, not just for vfio devices,
> >> don't we?
> >>
> >>  
> > 
> > Yes, but isn't what is done here?
> >   
> 
> It was not my intention to slow the integration process.
> We can start with this fix and eventually move the code to the callback 
> in another series when/if we all agree.

Yeah, I also fear that we might have been talking past each other. It's
late in the year :)

> 
> Acked-by: Pierre Morel <pmorel@linux.ibm.com>

Thanks!



  reply	other threads:[~2020-12-21 10:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 22:16 [PATCH v2 0/2] s390x/pci: some pcistb fixes Matthew Rosato
2020-12-17 22:16 ` [PATCH v2 1/2] s390x/pci: fix pcistb length Matthew Rosato
2020-12-18  9:22   ` Christian Borntraeger
2020-12-17 22:16 ` [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call Matthew Rosato
2020-12-18  6:10   ` Thomas Huth
2020-12-18  9:37   ` Pierre Morel
2020-12-18 11:04     ` Cornelia Huck
2020-12-18 14:32       ` Pierre Morel
2020-12-18 15:32         ` Cornelia Huck
2020-12-18 16:40           ` Pierre Morel
2020-12-18 16:51             ` Cornelia Huck
2020-12-18 17:05               ` Pierre Morel
2020-12-21  8:50                 ` Pierre Morel
2020-12-21 10:21                   ` Cornelia Huck [this message]
2020-12-21 12:22 ` [PATCH v2 0/2] s390x/pci: some pcistb fixes 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=20201221112154.4dbdc876.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.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).