Hello community,
here is the log from the commit of package xen
checked in at Thu Nov 23 16:52:39 CET 2006.
--------
--- arch/i386/xen/xen.changes 2006-11-17 19:40:45.000000000 +0100
+++ xen/xen.changes 2006-11-22 23:52:49.000000000 +0100
@@ -1,0 +2,8 @@
+Wed Nov 22 11:26:06 MST 2006 - ccoffing@novell.com
+
+- Include Jan's patch, which accounts for selectors in protected
+ mode with a non-zero base. Fixes some HVM crashes. (#214568)
+- Default pae=1, otherwise 64 bit HVM does not work at all.
+ (#217160)
+
+-------------------------------------------------------------------
New:
----
non-flat-pm.patch
xen-hvm-default-pae.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.XkhmVG/_old 2006-11-23 16:51:43.000000000 +0100
+++ /var/tmp/diff_new_pack.XkhmVG/_new 2006-11-23 16:51:43.000000000 +0100
@@ -18,7 +18,7 @@
%define with_pvfb 0
%define xen_build_dir xen-3.0.3-testing
Version: 3.0.3_11774
-Release: 13
+Release: 16
License: GNU General Public License (GPL)
Group: System/Kernel
Autoreqprov: on
@@ -72,6 +72,8 @@
Patch31: xen-hvm-default-bridge.diff
Patch32: xen-hvm-netfront.diff
Patch33: xend-xmlrpc-large-ints.diff
+Patch34: xen-hvm-default-pae.diff
+Patch35: non-flat-pm.patch
## Upstream (or upstream soon):
Patch100: xen-pvfb-2.patch
Patch101: xen-pvfb-3.patch
@@ -513,6 +515,8 @@
%patch31 -p1
%patch32 -p1
%patch33 -p1
+%patch34 -p1
+%patch35 -p1
XEN_EXTRAVERSION=%version-%release
XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}}
sed -i "s/XEN_EXTRAVERSION[ ]*.=.*\$/XEN_EXTRAVERSION = $XEN_EXTRAVERSION/" xen/Makefile
@@ -800,6 +804,11 @@
%{insserv_cleanup}
%changelog -n xen
+* Wed Nov 22 2006 - ccoffing@novell.com
+- Include Jan's patch, which accounts for selectors in protected
+ mode with a non-zero base. Fixes some HVM crashes. (#214568)
+- Default pae=1, otherwise 64 bit HVM does not work at all.
+ (#217160)
* Fri Nov 17 2006 - ccoffing@novell.com
- Backport several HVM fixes. (#176171?)
* Thu Nov 16 2006 - ccoffing@novell.com
++++++ non-flat-pm.patch ++++++
From: Jan Beulich
Bugzilla #214568
Index: xen-3.0.3-testing/xen/arch/x86/hvm/platform.c
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/platform.c
+++ xen-3.0.3-testing/xen/arch/x86/hvm/platform.c
@@ -883,19 +883,14 @@ void handle_mmio(unsigned long va, unsig
memcpy(regs, guest_cpu_user_regs(), HVM_CONTEXT_STACK_BYTES);
hvm_store_cpu_guest_regs(v, regs, NULL);
- inst_len = hvm_instruction_length(regs, hvm_guest_x86_mode(v));
+ inst_addr = hvm_get_segment_base(current, seg_cs) + regs->eip;
+ inst_len = hvm_instruction_length(inst_addr, hvm_guest_x86_mode(v));
if ( inst_len <= 0 )
{
printk("handle_mmio: failed to get instruction length\n");
domain_crash_synchronous();
}
- realmode = hvm_realmode(v);
- if (realmode)
- inst_addr = (regs->cs << 4) + regs->eip;
- else
- inst_addr = regs->eip;
-
memset(inst, 0, MAX_INST_LEN);
ret = inst_copy_from_guest(inst, inst_addr, inst_len);
if (ret != inst_len) {
@@ -904,6 +899,7 @@ void handle_mmio(unsigned long va, unsig
}
init_instruction(&mmio_inst);
+ realmode = hvm_realmode(v);
if (hvm_decode(realmode, inst, &mmio_inst) == DECODE_failure) {
printk("handle_mmio: failed to decode instruction\n");
Index: xen-3.0.3-testing/xen/arch/x86/hvm/svm/svm.c
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/svm/svm.c
+++ xen-3.0.3-testing/xen/arch/x86/hvm/svm/svm.c
@@ -507,6 +507,24 @@ unsigned long svm_get_ctrl_reg(struct vc
return 0; /* dummy */
}
+static unsigned long svm_get_segment_base(struct vcpu *v, enum segment seg)
+{
+ switch ( seg )
+ {
+ case seg_cs: return v->arch.hvm_svm.vmcb->cs.base;
+ case seg_ds: return v->arch.hvm_svm.vmcb->ds.base;
+ case seg_es: return v->arch.hvm_svm.vmcb->es.base;
+ case seg_fs: return v->arch.hvm_svm.vmcb->fs.base;
+ case seg_gs: return v->arch.hvm_svm.vmcb->gs.base;
+ case seg_ss: return v->arch.hvm_svm.vmcb->ss.base;
+ case seg_tr: return v->arch.hvm_svm.vmcb->tr.base;
+ case seg_gdtr: return v->arch.hvm_svm.vmcb->gdtr.base;
+ case seg_idtr: return v->arch.hvm_svm.vmcb->idtr.base;
+ case seg_ldtr: return v->arch.hvm_svm.vmcb->ldtr.base;
+ }
+ BUG();
+ return 0;
+}
/* Make sure that xen intercepts any FP accesses from current */
static void svm_stts(struct vcpu *v)
@@ -887,6 +905,7 @@ int start_svm(void)
hvm_funcs.pae_enabled = svm_pae_enabled;
hvm_funcs.guest_x86_mode = svm_guest_x86_mode;
hvm_funcs.get_guest_ctrl_reg = svm_get_ctrl_reg;
+ hvm_funcs.get_segment_base = svm_get_segment_base;
hvm_funcs.update_host_cr3 = svm_update_host_cr3;
Index: xen-3.0.3-testing/xen/arch/x86/hvm/vmx/vmx.c
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
+++ xen-3.0.3-testing/xen/arch/x86/hvm/vmx/vmx.c
@@ -610,7 +610,27 @@ static unsigned long vmx_get_ctrl_reg(st
return 0; /* dummy */
}
+static unsigned long vmx_get_segment_base(struct vcpu *v, enum segment seg)
+{
+ unsigned long base;
+ BUG_ON(v != current);
+ switch ( seg )
+ {
+ case seg_cs: __vmread(GUEST_CS_BASE, &base); break;
+ case seg_ds: __vmread(GUEST_DS_BASE, &base); break;
+ case seg_es: __vmread(GUEST_ES_BASE, &base); break;
+ case seg_fs: __vmread(GUEST_FS_BASE, &base); break;
+ case seg_gs: __vmread(GUEST_GS_BASE, &base); break;
+ case seg_ss: __vmread(GUEST_SS_BASE, &base); break;
+ case seg_tr: __vmread(GUEST_TR_BASE, &base); break;
+ case seg_gdtr: __vmread(GUEST_GDTR_BASE, &base); break;
+ case seg_idtr: __vmread(GUEST_IDTR_BASE, &base); break;
+ case seg_ldtr: __vmread(GUEST_LDTR_BASE, &base); break;
+ default: BUG(); base = 0; break;
+ }
+ return base;
+}
/* Make sure that xen intercepts any FP accesses from current */
static void vmx_stts(struct vcpu *v)
@@ -753,6 +773,7 @@ static void vmx_setup_hvm_funcs(void)
hvm_funcs.pae_enabled = vmx_pae_enabled;
hvm_funcs.guest_x86_mode = vmx_guest_x86_mode;
hvm_funcs.get_guest_ctrl_reg = vmx_get_ctrl_reg;
+ hvm_funcs.get_segment_base = vmx_get_segment_base;
hvm_funcs.update_host_cr3 = vmx_update_host_cr3;
Index: xen-3.0.3-testing/xen/include/asm-x86/hvm/hvm.h
===================================================================
--- xen-3.0.3-testing.orig/xen/include/asm-x86/hvm/hvm.h
+++ xen-3.0.3-testing/xen/include/asm-x86/hvm/hvm.h
@@ -20,6 +20,19 @@
#ifndef __ASM_X86_HVM_HVM_H__
#define __ASM_X86_HVM_HVM_H__
+enum segment {
+ seg_cs,
+ seg_ss,
+ seg_ds,
+ seg_es,
+ seg_fs,
+ seg_gs,
+ seg_tr,
+ seg_ldtr,
+ seg_gdtr,
+ seg_idtr
+};
+
/*
* The hardware virtual machine (HVM) interface abstracts away from the
* x86/x86_64 CPU virtualization assist specifics. Currently this interface
@@ -52,6 +65,7 @@ struct hvm_function_table {
* 1) determine whether the guest is in real or vm8086 mode,
* 2) determine whether paging is enabled,
* 3) return the current guest control-register value
+ * 4) return the current guest segment descriptor base
*/
int (*realmode)(struct vcpu *v);
int (*paging_enabled)(struct vcpu *v);
@@ -59,6 +73,7 @@ struct hvm_function_table {
int (*pae_enabled)(struct vcpu *v);
int (*guest_x86_mode)(struct vcpu *v);
unsigned long (*get_guest_ctrl_reg)(struct vcpu *v, unsigned int num);
+ unsigned long (*get_segment_base)(struct vcpu *v, enum segment seg);
/*
* Re-set the value of CR3 that Xen runs on when handling VM exits
@@ -157,7 +172,7 @@ hvm_guest_x86_mode(struct vcpu *v)
return hvm_funcs.guest_x86_mode(v);
}
-int hvm_instruction_length(struct cpu_user_regs *regs, int mode);
+int hvm_instruction_length(unsigned long pc, int mode);
static inline void
hvm_update_host_cr3(struct vcpu *v)
@@ -176,6 +191,12 @@ hvm_get_guest_ctrl_reg(struct vcpu *v, u
return 0; /* force to fail */
}
+static inline unsigned long
+hvm_get_segment_base(struct vcpu *v, enum segment seg)
+{
+ return hvm_funcs.get_segment_base(v, seg);
+}
+
void hvm_stts(struct vcpu *v);
void hvm_set_guest_time(struct vcpu *v, u64 gtime);
void hvm_do_resume(struct vcpu *v);
Index: xen-3.0.3-testing/xen/arch/x86/hvm/instrlen.c
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/instrlen.c
+++ xen-3.0.3-testing/xen/arch/x86/hvm/instrlen.c
@@ -20,7 +20,6 @@
#include
participants (1)
-
root@suse.de