From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
xen-devel <xen-devel@lists.xenproject.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"ehabkost@redhat.com" <ehabkost@redhat.com>,
"marcel@redhat.com" <marcel@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v2] xen-hvm: stop faking I/O to access PCI config space
Date: Fri, 18 May 2018 14:22:18 +0000 [thread overview]
Message-ID: <c2a28c7b574d405787d7e63ec82a67b1@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5AFEE01F02000078001C4100@prv1-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 18 May 2018 15:16
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>; Roger Pau Monne
> <roger.pau@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>; xen-
> devel <xen-devel@lists.xenproject.org>; qemu-devel@nongnu.org;
> ehabkost@redhat.com; marcel@redhat.com; mst@redhat.com; Paolo
> Bonzini <pbonzini@redhat.com>; Richard Henderson <rth@twiddle.net>
> Subject: RE: [Xen-devel] [PATCH v2] xen-hvm: stop faking I/O to access PCI
> config space
>
> >>> On 18.05.18 at 15:51, <Paul.Durrant@citrix.com> wrote:
> >> Sent: 18 May 2018 14:34
> >> To: Paul Durrant <Paul.Durrant@citrix.com>
> >> >>> On 18.05.18 at 15:00, <paul.durrant@citrix.com> wrote:
> >> > + QLIST_FOREACH(xendev, &state->dev_list, entry) {
> >> > + unsigned int i;
> >> > + uint32_t tmp;
> >> > +
> >> > + if (xendev->sbdf != sbdf) {
> >> > + continue;
> >> > + }
> >> > +
> >> > + if (!req->data_is_ptr) {
> >> > + if (req->dir == IOREQ_READ) {
> >> > + for (i = 0; i < req->count; i++) {
> >> > + rw_config_req_item(xendev, req, i, &tmp);
> >> > + req->data = tmp;
> >> > + }
> >> > + } else if (req->dir == IOREQ_WRITE) {
> >> > + for (i = 0; i < req->count; i++) {
> >> > + tmp = req->data;
> >> > + rw_config_req_item(xendev, req, i, &tmp);
> >> > + }
> >> > + }
> >>
> >> Wouldn't it be more sensible to fail req->count != 1 requests here?
> >>
> >
> > I'm wondering whether we'd want to handle count > 1 once we allow
> MMCONFIG
> > accesses though. I guess it would be easier just to defer that.
>
> For the data_is_ptr case - sure. But here? Or wait - are you thinking about
> REP STOS (and the relatively useless REP LODS)?
>
Yes. We'd need to cope with a rep stos if we had memory mapped access, but we don't need to worry about it until then I think.
In the meantime I doubt any well behaved OS is going to do rep ins or rep outs to cfc so just aborting on count > 1 is probably fine.
Paul
> Jan
>
prev parent reply other threads:[~2018-05-18 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 13:00 [Qemu-devel] [PATCH v2] xen-hvm: stop faking I/O to access PCI config space Paul Durrant
2018-05-18 13:33 ` [Qemu-devel] [Xen-devel] " Jan Beulich
2018-05-18 13:51 ` Paul Durrant
2018-05-18 14:15 ` Jan Beulich
2018-05-18 14:22 ` Paul Durrant [this message]
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=c2a28c7b574d405787d7e63ec82a67b1@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=JBeulich@suse.com \
--cc=anthony.perard@citrix.com \
--cc=ehabkost@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=roger.pau@citrix.com \
--cc=rth@twiddle.net \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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).