[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 6d0a2702bd6deb65c78173d2674c9125546aa960 # Parent e1db72ac19292f2b79d5f4c2b09feb13e29e4194 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-unstable changeset: 9935:8761333499ae2874647eb5d67d8cb091fbc5b14b xen-unstable date: Thu May 4 21:24:39 2006 +0100 diff -r e1db72ac1929 -r 6d0a2702bd6d xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Thu May 04 17:08:19 2006 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Thu May 04 21:26:02 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) */ @@ -680,6 +683,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 e1db72ac1929 -r 6d0a2702bd6d xen/arch/x86/hvm/svm/vmcb.c --- a/xen/arch/x86/hvm/svm/vmcb.c Thu May 04 17:08:19 2006 +0100 +++ b/xen/arch/x86/hvm/svm/vmcb.c Thu May 04 21:26:02 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 |