# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 8468860cc8de5637da023f5066eeefc2eec66a48
# Parent fd6d12935b568b26fe4dfd127d668d90b606e94e
[HVM][VMX] expose PSE feature to HVM guests if PAE is turned on in
config file, with this change, RHEL4 IA32 SMP guest can boot.
But because we don't support 4Mbytes PSE pages, so x86_32 HVM guest
can NOT use PSE feature. However user may have "pae=1" in config file,
which causes PSE feature seen by x86_32 HVM guest, and it will then use
4Mbytes PSE pages. In this case, we will have to crash x86_32 HVM.
So when running x86_32 HVM guest, user need pay attention not to have
"pae=1" in config file.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
Signed-off-by: Xiaohui Xin <xiaohui.xin@xxxxxxxxx>
---
xen/arch/x86/hvm/vmx/vmx.c | 10 +++++++---
xen/arch/x86/shadow.c | 6 ++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff -r fd6d12935b56 -r 8468860cc8de xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Mon Jul 03 16:07:20 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Jul 05 10:32:08 2006 +0100
@@ -857,10 +857,14 @@ static void vmx_vmexit_do_cpuid(struct c
#else
if ( v->domain->arch.ops->guest_paging_levels == PAGING_L2 )
{
- if ( !v->domain->arch.hvm_domain.pae_enabled )
+ if ( v->domain->arch.hvm_domain.pae_enabled )
+ clear_bit(X86_FEATURE_PSE36, &edx);
+ else
+ {
clear_bit(X86_FEATURE_PAE, &edx);
- clear_bit(X86_FEATURE_PSE, &edx);
- clear_bit(X86_FEATURE_PSE36, &edx);
+ clear_bit(X86_FEATURE_PSE, &edx);
+ clear_bit(X86_FEATURE_PSE36, &edx);
+ }
}
#endif
diff -r fd6d12935b56 -r 8468860cc8de xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c Mon Jul 03 16:07:20 2006 +0100
+++ b/xen/arch/x86/shadow.c Wed Jul 05 10:32:08 2006 +0100
@@ -3724,7 +3724,13 @@ static inline int guest_page_fault(
}
if ( guest_l2e_get_flags(*gpl2e) & _PAGE_PSE )
+ {
+ printk("None-PAE HVM guests can NOT use PSE, "
+ "because we don't support 4MBytes PSE pages.\n");
+ printk("remove pae=1 from your config file.\n");
+ domain_crash_synchronous();
return 0;
+ }
__guest_get_l1e(v, va, gpl1e);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|