From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] x86/vMSI-X: fix qword write covering vector control field Date: Fri, 01 Apr 2016 03:14:05 -0600 Message-ID: <56FE57FD02000078000E1F06@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part360193CD.1__=" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alv9i-0001vF-8C for xen-devel@lists.xenproject.org; Fri, 01 Apr 2016 09:14:14 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Andrew Cooper , Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part360193CD.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Along with using the upper 32 bits of the written value, the address also needs advancing, so that msix_write_completion() will use the correct address for re-invocation of msixtbl_write(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/vmsi.c +++ b/xen/arch/x86/hvm/vmsi.c @@ -295,6 +295,7 @@ static int msixtbl_write(struct vcpu *v, if ( len !=3D 8 || !index ) goto out; val >>=3D 32; + address +=3D 4; } =20 /* Exit to device model when unmasking and address/data got modified. = */ --=__Part360193CD.1__= Content-Type: text/plain; name="x86-vMSI-X-qword-mask-write.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-vMSI-X-qword-mask-write.patch" x86/vMSI-X: fix qword write covering vector control field=0A=0AAlong with = using the upper 32 bits of the written value, the address=0Aalso needs = advancing, so that msix_write_completion() will use the=0Acorrect address = for re-invocation of msixtbl_write().=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/arch/x86/hvm/vmsi.c=0A+++ b/xen/arch/x86= /hvm/vmsi.c=0A@@ -295,6 +295,7 @@ static int msixtbl_write(struct vcpu = *v,=0A if ( len !=3D 8 || !index )=0A goto out;=0A = val >>=3D 32;=0A+ address +=3D 4;=0A }=0A =0A /* Exit = to device model when unmasking and address/data got modified. */=0A --=__Part360193CD.1__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --=__Part360193CD.1__=--