From: Mohammed Gamal Subject: [PATCH 2/4] VMX: Add module parameter and emulation flag. Date: Sun, 17 Aug 2008 16:39:48 +0300 Message-ID: <20080817133948.GB9077@mohd-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@qumranet.com, riel@surriel.com, laurent.vivier@bull.net, guillaume.thouvenin@ext.bull.net To: kvm@vger.kernel.org Return-path: Received: from mu-out-0910.google.com ([209.85.134.191]:14241 "EHLO mu-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbYHQNjy (ORCPT ); Sun, 17 Aug 2008 09:39:54 -0400 Received: by mu-out-0910.google.com with SMTP id w8so2706453mue.1 for ; Sun, 17 Aug 2008 06:39:53 -0700 (PDT) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: The patch adds the module parameter required to enable emulating invalid guest state, as well as the emulation_required flag used to drive emulation whenever needed. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/vmx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 0e11d03..c4f1b4a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -49,6 +49,9 @@ module_param(flexpriority_enabled, bool, 0); static int enable_ept = 1; module_param(enable_ept, bool, 0); +static int emulate_invalid_guest_state = 0; +module_param(emulate_invalid_guest_state, bool, 0); + struct vmcs { u32 revision_id; u32 abort; @@ -86,6 +89,7 @@ struct vcpu_vmx { } irq; } rmode; int vpid; + bool emulation_required; }; static inline struct vcpu_vmx *to_vmx(struct kvm_vcpu *vcpu) -- 1.5.4.3