* [PATCH] x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests
@ 2016-04-26 14:39 Jan Beulich
2016-04-26 14:40 ` Paul Durrant
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2016-04-26 14:39 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Paul Durrant, Wei Liu
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Those aren't actual I/O requests (and hence are of no interest here
anyway). Since they don't get copied into struct vcpu, looking at that
copy reads whatever was left there. Use the state of the request to
determine its validity.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -349,6 +349,8 @@ 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 )
+ return 0;
ASSERT(r->type == IOREQ_TYPE_COPY);
if ( r->dir == IOREQ_WRITE && r->size == 4 && !r->data_is_ptr
&& !(r->data & PCI_MSIX_VECTOR_BITMASK) )
[-- Attachment #2: x86-vMSI-X-first-unmask-fix.patch --]
[-- Type: text/plain, Size: 801 bytes --]
x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests
Those aren't actual I/O requests (and hence are of no interest here
anyway). Since they don't get copied into struct vcpu, looking at that
copy reads whatever was left there. Use the state of the request to
determine its validity.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/vmsi.c
+++ b/xen/arch/x86/hvm/vmsi.c
@@ -349,6 +349,8 @@ 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 )
+ return 0;
ASSERT(r->type == IOREQ_TYPE_COPY);
if ( r->dir == IOREQ_WRITE && r->size == 4 && !r->data_is_ptr
&& !(r->data & PCI_MSIX_VECTOR_BITMASK) )
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests
2016-04-26 14:39 [PATCH] x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests Jan Beulich
@ 2016-04-26 14:40 ` Paul Durrant
2016-04-26 14:43 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Paul Durrant @ 2016-04-26 14:40 UTC (permalink / raw)
To: Jan Beulich, xen-devel; +Cc: Andrew Cooper, Wei Liu
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 26 April 2016 15:39
> To: xen-devel
> Cc: Andrew Cooper; Paul Durrant; Wei Liu
> Subject: [PATCH] x86/vMSI-X: write snoops should ignore
> hvm_mmio_internal() requests
>
> Those aren't actual I/O requests (and hence are of no interest here
> anyway). Since they don't get copied into struct vcpu, looking at that
> copy reads whatever was left there. Use the state of the request to
> determine its validity.
>
> 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,6 +349,8 @@ 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 )
> + return 0;
> ASSERT(r->type == IOREQ_TYPE_COPY);
> if ( r->dir == IOREQ_WRITE && r->size == 4 && !r->data_is_ptr
> && !(r->data & PCI_MSIX_VECTOR_BITMASK) )
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests
2016-04-26 14:40 ` Paul Durrant
@ 2016-04-26 14:43 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2016-04-26 14:43 UTC (permalink / raw)
To: Paul Durrant; +Cc: xen-devel, Wei Liu, Jan Beulich, Andrew Cooper
On Tue, Apr 26, 2016 at 03:40:29PM +0100, Paul Durrant wrote:
> > -----Original Message-----
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: 26 April 2016 15:39
> > To: xen-devel
> > Cc: Andrew Cooper; Paul Durrant; Wei Liu
> > Subject: [PATCH] x86/vMSI-X: write snoops should ignore
> > hvm_mmio_internal() requests
> >
> > Those aren't actual I/O requests (and hence are of no interest here
> > anyway). Since they don't get copied into struct vcpu, looking at that
> > copy reads whatever was left there. Use the state of the request to
> > determine its validity.
> >
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-26 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 14:39 [PATCH] x86/vMSI-X: write snoops should ignore hvm_mmio_internal() requests Jan Beulich
2016-04-26 14:40 ` Paul Durrant
2016-04-26 14:43 ` Wei Liu
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).