[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvm: Merge MSR_EFER handling.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1284395703 -3600 # Node ID f0a1229cb0a6505f3240ac59a3bb6ade2acfa1a2 # Parent f61504f8d6e51499b554dc06b672dc2d9786f88c hvm: Merge MSR_EFER handling. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> --- xen/arch/x86/hvm/hvm.c | 9 +++++++++ xen/arch/x86/hvm/svm/svm.c | 9 --------- xen/arch/x86/hvm/vmx/vmx.c | 37 ++----------------------------------- 3 files changed, 11 insertions(+), 44 deletions(-) diff -r f61504f8d6e5 -r f0a1229cb0a6 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Mon Sep 13 17:31:19 2010 +0100 +++ b/xen/arch/x86/hvm/hvm.c Mon Sep 13 17:35:03 2010 +0100 @@ -2039,6 +2039,10 @@ int hvm_msr_read_intercept(unsigned int switch ( msr ) { + case MSR_EFER: + *msr_content = v->arch.hvm_vcpu.guest_efer; + break; + case MSR_IA32_TSC: *msr_content = hvm_get_guest_tsc(v); break; @@ -2138,6 +2142,11 @@ int hvm_msr_write_intercept(unsigned int switch ( msr ) { + case MSR_EFER: + if ( hvm_set_efer(msr_content) ) + return X86EMUL_EXCEPTION; + break; + case MSR_IA32_TSC: hvm_set_guest_tsc(v, msr_content); break; diff -r f61504f8d6e5 -r f0a1229cb0a6 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Mon Sep 13 17:31:19 2010 +0100 +++ b/xen/arch/x86/hvm/svm/svm.c Mon Sep 13 17:35:03 2010 +0100 @@ -116,11 +116,6 @@ long_mode_do_msr_write(unsigned int msr, switch ( msr ) { - case MSR_EFER: - if ( hvm_set_efer(msr_content) ) - return HNDL_exception_raised; - break; - case MSR_IA32_MC4_MISC: /* Threshold register */ case MSR_F10_MC4_MISC1 ... MSR_F10_MC4_MISC3: /* @@ -1042,10 +1037,6 @@ static int svm_msr_read_intercept(unsign switch ( msr ) { - case MSR_EFER: - *msr_content = v->arch.hvm_vcpu.guest_efer; - break; - case MSR_IA32_SYSENTER_CS: *msr_content = v->arch.hvm_svm.guest_sysenter_cs; break; diff -r f61504f8d6e5 -r f0a1229cb0a6 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Mon Sep 13 17:31:19 2010 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Mon Sep 13 17:35:03 2010 +0100 @@ -172,10 +172,6 @@ long_mode_do_msr_read(unsigned int msr, switch ( msr ) { - case MSR_EFER: - *msr_content = v->arch.hvm_vcpu.guest_efer; - break; - case MSR_FS_BASE: *msr_content = __vmread(GUEST_FS_BASE); break; @@ -224,11 +220,6 @@ long_mode_do_msr_write(unsigned int msr, switch ( msr ) { - case MSR_EFER: - if ( hvm_set_efer(msr_content) ) - goto exception_raised; - break; - case MSR_FS_BASE: case MSR_GS_BASE: case MSR_SHADOW_GS_BASE: @@ -270,7 +261,6 @@ long_mode_do_msr_write(unsigned int msr, uncanonical_address: HVM_DBG_LOG(DBG_LEVEL_0, "Not cano address of msr write %x", msr); vmx_inject_hw_exception(TRAP_gp_fault, 0); - exception_raised: return HNDL_exception_raised; } @@ -351,36 +341,13 @@ static enum handler_return static enum handler_return long_mode_do_msr_read(unsigned int msr, uint64_t *msr_content) { - struct vcpu *v = current; - - switch ( msr ) - { - case MSR_EFER: - *msr_content = v->arch.hvm_vcpu.guest_efer; - break; - - default: - return HNDL_unhandled; - } - - return HNDL_done; + return HNDL_unhandled; } static enum handler_return long_mode_do_msr_write(unsigned int msr, uint64_t msr_content) { - switch ( msr ) - { - case MSR_EFER: - if ( hvm_set_efer(msr_content) ) - return HNDL_exception_raised; - break; - - default: - return HNDL_unhandled; - } - - return HNDL_done; + return HNDL_unhandled; } #endif /* __i386__ */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |