[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.3] nested vmx: fix I/O port bitmap indexing arithmetic



commit e45bf29ad84a6cb4a0a8f47f5efaaff61a288211
Author:     Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Mon Dec 9 14:31:02 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 9 14:31:02 2013 +0100

    nested vmx: fix I/O port bitmap indexing arithmetic
    
    The I/O port bitmap holds 8 ports per element, and hence the port number
    used when indexing into it should be shifted right by 3 bits, not 4.
    
    Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx>
    Reviewed-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>
    Acked-by: Eddie Dong <eddie.dong@xxxxxxxxx>
    master commit: b80e4583501904297d2ff5b0f905e68f81f8f2c9
    master date: 2013-12-03 09:51:54 +0100
---
 xen/arch/x86/hvm/vmx/vvmx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 5c92ac6..9ce02cf 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2213,7 +2213,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
         {
             port = __vmread(EXIT_QUALIFICATION) >> 16;
             bitmap = nvmx->iobitmap[port >> 15];
-            if ( bitmap[(port & 0x7fff) >> 4] & (1 << (port & 0x7)) )
+            if ( bitmap[(port & 0x7fff) >> 3] & (1 << (port & 0x7)) )
                 nvcpu->nv_vmexit_pending = 1;
             if ( !nvcpu->nv_vmexit_pending )
                gdprintk(XENLOG_WARNING, "L0 PIO %x.\n", port);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.