Re: [PATCH 24/29] KVM: MMU: Track NX state in struct kvm_mmu

From: Avi Kivity
Date: Sun Sep 12 2010 - 04:06:25 EST


On 09/10/2010 06:31 PM, Joerg Roedel wrote:
With Nested Paging emulation the NX state between the two
MMU contexts may differ. To make sure that always the right
fault error code is recorded this patch moves the NX state
into struct kvm_mmu so that the code can distinguish between
L1 and L2 NX state.

--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -259,6 +259,8 @@ struct kvm_mmu {
u64 *lm_root;
u64 rsvd_bits_mask[2][4];

+ bool nx;
+
u64 pdptrs[4]; /* pae */
};

This is redundant with mmu->base_role.nx. Please post a follow on patch to use that instead.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/