x86/hvm: Drop hvm_set_mode() and associated vmx hooks
PATCH 1/1 x86/hvm: Drop hvm_set_mode() and associated vmx hooks
This is more vestigial rementants of PVHv1.
---
CC: Jan Beulich <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
--- xen/arch/x86/hvm/hvm.c | 23 ----------------------- xen/arch/x86/hvm/vmx/vmx.c | 16 ---------------- xen/include/asm-x86/hvm/hvm.h | 2 -- 3 files changed, 41 deletions(-)
xen/arch/x86/hvm/hvm.c +0 -23
@@ -4848,29 +4848,6 @@ void hvm_toggle_singlestep(struct vcpu *v) v->arch.hvm_vcpu.single_step = !v->arch.hvm_vcpu.single_step; } -int hvm_set_mode (struct vcpu *v,int mode) -{ - -switch ( mode ) - { -case 4 : - v->arch.hvm_vcpu.guest_efer &= ~(EFER_LMA |EFER_LME ); -break ; -case 8 : - v->arch.hvm_vcpu.guest_efer |= (EFER_LMA |EFER_LME ); -break ; -default : -return -EOPNOTSUPP ; - } - -hvm_update_guest_efer (v); - -if ( hvm_funcs.set_mode ) -return hvm_funcs.set_mode (v, mode); - -return 0 ; -} -void hvm_domain_soft_reset (struct domain *d) {hvm_destroy_all_ioreq_servers (d);
xen/arch/x86/hvm/vmx/vmx.c +0 -16
@@ -2277,21 +2277,6 @@ static bool_t vmx_vcpu_emulate_ve(struct vcpu *v)return rc; } -static int vmx_set_mode (struct vcpu *v,int mode) -{ -unsigned long attr; - -ASSERT ((mode ==4 ) || (mode ==8 )); - - attr = (mode ==4 ) ?0xc09b :0xa09b ; - -vmx_vmcs_enter (v); -__vmwrite (GUEST_CS_AR_BYTES , attr); -vmx_vmcs_exit (v); - -return 0 ; -} -static bool vmx_get_pending_event (struct vcpu *v,struct x86_event *info) {unsigned long intr_info, error_code;
@@ -2373,7 +2358,6 @@ static struct hvm_function_table __initdata vmx_function_table = { .nhvm_hap_walk_L1_p2m = nvmx_hap_walk_L1_p2m, .enable_msr_interception = vmx_enable_msr_interception, .is_singlestep_supported = vmx_is_singlestep_supported, - .set_mode = vmx_set_mode, .altp2m_vcpu_update_p2m = vmx_vcpu_update_eptp, .altp2m_vcpu_update_vmfunc_ve = vmx_vcpu_update_vmfunc_ve, .altp2m_vcpu_emulate_ve = vmx_vcpu_emulate_ve,
xen/include/asm-x86/hvm/hvm.h +0 -2
@@ -206,7 +206,6 @@ struct hvm_function_table {void (*enable_msr_interception)(struct domain *d,uint32_t msr);bool_t (*is_singlestep_supported)(void); -int (*set_mode)(struct vcpu *v,int mode);/* Alternate p2m */ void (*altp2m_vcpu_update_p2m)(struct vcpu *v);
@@ -268,7 +267,6 @@ u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc);u64 hvm_scale_tsc (const struct domain *d,u64 tsc);u64 hvm_get_tsc_scaling_ratio (u32 gtsc_khz); -int hvm_set_mode (struct vcpu *v,int mode);void hvm_init_guest_time (struct domain *d);void hvm_set_guest_time (struct vcpu *v,u64 guest_time);u64 hvm_get_guest_time_fixed (struct vcpu *v,u64 at_tsc);
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 3 lines · Andrew Cooper
This is more vestigial rementants of PVHv1.
Signed-off-by Andrew Cooper <[email protected]>
Oh, thanks! It's amazing how many leftovers we are still finding from PVHv1.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 29.01.18 at 17:10, <[email protected]> wrote:
This is more vestigial rementants of PVHv1.
Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>
Quoted 5 lines
--- xen/arch/x86/hvm/hvm.c | 23 ----------------------- xen/arch/x86/hvm/vmx/vmx.c | 16 ---------------- xen/include/asm-x86/hvm/hvm.h | 2 -- 3 files changed, 41 deletions(-)
Very nice.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines
From: Andrew Cooper [mailto:[email protected]]
Sent: Tuesday, January 30, 2018 12:11 AMThis is more vestigial rementants of PVHv1.
Signed-off-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel