[PATCH] Prevent setting CPU_BASED_TPR_SHADOW on i386 host

Yang, Sheng
2007-09-12T10:15:41Z

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

Though tpr shadow feature can be used on i386 host, but it needs support
from
virtual apic access feature which hasn't been implemented yet, otherwise
it
will cause trouble on i386 machine which supports this feature.

This patch disables tpr shadow feature for i386 host now.

Signed-off-by: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Qing He <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/kvm/vmx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 49ac609..c44c9ac 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -902,7 +902,11 @@ static __init int setup_vmcs_config(struct
vmcs_config *vmcs_conf)
CPU_BASED_USE_IO_BITMAPS |
CPU_BASED_MOV_DR_EXITING |
CPU_BASED_USE_TSC_OFFSETING;
+#ifdef CONFIG_X86_64
opt = CPU_BASED_TPR_SHADOW;
+#else
+ opt = 0;
+#endif
if (adjust_vmx_controls(min, opt, MSR_IA32_VMX_PROCBASED_CTLS,
&_cpu_based_exec_control) < 0)
return -EIO;
--
1.5.2

[-- Attachment #2: 0001-Prevent-setting-CPU_BASED_TPR_SHADOW-on-i386-host.patch --]
[-- Type: application/octet-stream, Size: 1203 bytes --]

From 28a4029712f99d4707f8712e5b26ee0f14b13502 Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Wed, 12 Sep 2007 18:03:11 +0800
Subject: [PATCH] Prevent setting CPU_BASED_TPR_SHADOW on i386 host

Though tpr shadow feature can be used on i386 host, but it needs support from
virtual apic access feature which hasn't been implemented yet, otherwise it
will cause trouble on i386 machine which supports this feature.

This patch disables tpr shadow feature for i386 host now.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
---
drivers/kvm/vmx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 49ac609..c44c9ac 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -902,7 +902,11 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
CPU_BASED_USE_IO_BITMAPS |
CPU_BASED_MOV_DR_EXITING |
CPU_BASED_USE_TSC_OFFSETING;
+#ifdef CONFIG_X86_64
opt = CPU_BASED_TPR_SHADOW;
+#else
+ opt = 0;
+#endif
if (adjust_vmx_controls(min, opt, MSR_IA32_VMX_PROCBASED_CTLS,
&_cpu_based_exec_control) < 0)
return -EIO;
--
1.5.2

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org