On 05/30/2011 10:40 AM, Ingo Molnar wrote:
* Yang, Wei Y<wei.y.yang@xxxxxxxxx> wrote: > This patch removes SMEP bit from CR4_RESERVED_BITS. I'm wondering, what is the best-practice way for tools/kvm/ to set SMEP for the guest kernel automatically, even if the guest kernel itsef has not requested SMEP? The portion i'm worried about are old KVM versions that have the SMEP bit in CR4_RESERVED_BITS and reject it. So we cannot just unilaterally add SMEP to every cr4 write of the guest.
tools/kvm doesn't see cr4 writes at all. The only way to do this is in kvm itself.
Is there a way to query whether the host KVM version supports SMEP setting in cr4?
KVM_GET_SUPPORTED_CPUID (it returns whether both the host cpu and kvm support smep; if one of them doesn't, you'll see smep disabled).
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html