From: Paul Durrant <Paul.Durrant@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [PATCH 1/3] x86/vMSI-X: add further checks to snoop logic
Date: Thu, 28 Apr 2016 10:44:11 +0000 [thread overview]
Message-ID: <bdf9aae1559444b48bfb8552bd5df9c1@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5721F8B102000078000E6B13@prv-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 28 April 2016 10:49
> To: xen-devel
> Cc: Andrew Cooper; Paul Durrant
> Subject: [PATCH 1/3] x86/vMSI-X: add further checks to snoop logic
>
> msixtbl_range(), as any other MMIO ->check() handlers, may get called
> with other than the base address of an access - avoid the snoop logic
> considering those.
>
> Also avoid considering vCPU-s not blocked in the hypervisor in
> msixtbl_pt_register(), just to be on the safe side.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
>
> --- a/xen/arch/x86/hvm/vmsi.c
> +++ b/xen/arch/x86/hvm/vmsi.c
> @@ -349,7 +349,7 @@ static int msixtbl_range(struct vcpu *v,
> {
> const ioreq_t *r = &v->arch.hvm_vcpu.hvm_io.io_req;
>
> - if ( r->state != STATE_IOREQ_READY )
> + if ( r->state != STATE_IOREQ_READY || r->addr != addr )
> return 0;
> ASSERT(r->type == IOREQ_TYPE_COPY);
> if ( r->dir == IOREQ_WRITE && r->size == 4 && !r->data_is_ptr
> @@ -457,7 +457,8 @@ out:
>
> for_each_vcpu ( d, v )
> {
> - if ( v->arch.hvm_vcpu.hvm_io.msix_snoop_address ==
> + if ( (v->pause_flags & VPF_blocked_in_xen) &&
> + v->arch.hvm_vcpu.hvm_io.msix_snoop_address ==
> (gtable + msi_desc->msi_attrib.entry_nr *
> PCI_MSIX_ENTRY_SIZE +
> PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET) )
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-28 10:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 9:35 [PATCH 0/3] x86/vMSI-X: further write snoop improvements Jan Beulich
2016-04-28 9:49 ` [PATCH 1/3] x86/vMSI-X: add further checks to snoop logic Jan Beulich
2016-04-28 10:22 ` Andrew Cooper
2016-04-28 10:44 ` Paul Durrant [this message]
2016-04-28 9:49 ` [PATCH 2/3] x86/vMSI-X: also snoop qword writes Jan Beulich
2016-04-28 10:27 ` Andrew Cooper
2016-04-28 10:52 ` Paul Durrant
2016-04-28 9:50 ` [PATCH 3/3] x86/vMSI-X: also snoop REP MOVS Jan Beulich
2016-04-28 10:34 ` Andrew Cooper
2016-04-28 10:44 ` Jan Beulich
2016-04-28 11:17 ` Paul Durrant
2016-04-28 11:44 ` Jan Beulich
2016-04-28 11:58 ` Paul Durrant
2016-04-28 12:30 ` Jan Beulich
2016-04-28 12:44 ` Paul Durrant
2016-04-28 9:51 ` [PATCH 0/3] x86/vMSI-X: further write snoop improvements Jan Beulich
2016-04-28 10:26 ` Wei Liu
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=bdf9aae1559444b48bfb8552bd5df9c1@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--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).