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@amd.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-05-04 21:24:39 +01:00
1 parent d3997b960e
commit f9caf5ffab
2 files changed
+16

No files matched your search

+14
View File
@@ -61,6 +61,9 @@ static unsigned long trace_values[NR_CPUS][4];
/* 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 vcpu *v)
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)
+2
View File
@@ -428,6 +428,8 @@ void svm_do_launch(struct vcpu *v)
if (svm_dbg_on)
svm_dump_vmcb(__func__, vmcb);
vmcb->tlb_control = 1;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.