[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] SVM patch for 64bit hv, to reset the ss, es, ds host selectors to NULL
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 8761333499ae2874647eb5d67d8cb091fbc5b14b # Parent ad5b833122a8d88be39629751e1ee5c1d8629f96 SVM patch for 64bit hv, to reset the ss, es, ds host selectors to NULL during a context switch to the SVM domain's vcpu. This patch also initializes the tlb_control to 1 for the initial do_launch(). Signed-off-by: Tom Woller <thomas.woller@xxxxxxx> --- xen/arch/x86/hvm/svm/svm.c | 14 ++++++++++++++ xen/arch/x86/hvm/svm/vmcb.c | 2 ++ 2 files changed, 16 insertions(+) diff -r ad5b833122a8 -r 8761333499ae xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Thu May 04 17:44:14 2006 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Thu May 04 21:24:39 2006 +0100 @@ -61,6 +61,9 @@ static unsigned long trace_values[NR_CPU /* Useful define */ #define MAX_INST_SIZE 15 +#define set_segment_register(name, value) \ + __asm__ __volatile__ ( "movw %%ax ,%%" STR(name) "" : : "a" (value) ) + /* * External functions, etc. We should move these to some suitable header file(s) */ @@ -681,6 +684,17 @@ static void svm_ctxt_switch_from(struct static void svm_ctxt_switch_to(struct vcpu *v) { +#if __x86_64__ + /* + * This is required, because VMRUN does consistency check + * and some of the DOM0 selectors are pointing to + * invalid GDT locations, and cause AMD processors + * to shutdown. + */ + set_segment_register(ds, 0); + set_segment_register(es, 0); + set_segment_register(ss, 0); +#endif } void svm_final_setup_guest(struct vcpu *v) diff -r ad5b833122a8 -r 8761333499ae xen/arch/x86/hvm/svm/vmcb.c --- a/xen/arch/x86/hvm/svm/vmcb.c Thu May 04 17:44:14 2006 +0100 +++ b/xen/arch/x86/hvm/svm/vmcb.c Thu May 04 21:24:39 2006 +0100 @@ -428,6 +428,8 @@ void svm_do_launch(struct vcpu *v) if (svm_dbg_on) svm_dump_vmcb(__func__, vmcb); + + vmcb->tlb_control = 1; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |