repository: /home/avi/kvm/linux-2.6
branch: rmap-corruption-fix
commit 154833765b9edde8fbc40cd30b2f0270bd6734d2
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Thu Oct 11 15:08:41 2007 +0200

    KVM: MMU: Fix nx access bit for huge pages
    
    We must set the bit before the shift, otherwise the wrong bit gets set.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index da36e48..e07cb2e 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -382,9 +382,9 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
                        metaphysical = 1;
                        hugepage_access = walker->pte;
                        hugepage_access &= PT_USER_MASK | PT_WRITABLE_MASK;
+                       hugepage_access >>= PT_WRITABLE_SHIFT;
                        if (walker->pte & PT64_NX_MASK)
                                hugepage_access |= (1 << 2);
-                       hugepage_access >>= PT_WRITABLE_SHIFT;
                        table_gfn = (walker->pte & PT_BASE_ADDR_MASK)
                                >> PAGE_SHIFT;
                } else {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to