[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/vmx: Rename arch_vmx_struct to vmx_vcpu
commit 5f3d3a880b74a67f283281e493be87871ca4f555 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Aug 28 15:53:06 2018 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Aug 31 15:40:38 2018 +0100 x86/vmx: Rename arch_vmx_struct to vmx_vcpu The suffix and prefix are redundant, and the name is curiously odd. Rename it to vmx_vcpu to be consistent with all the other similar structures. In addition, rename local arch_vmx local variables to vmx for further consistency. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> Some of the local pointers are named arch_vmx. I'm open to renaming them to just vmx (like all the other local pointers) if people are happy with the additional patch delta. --- xen/arch/x86/hvm/vmx/vmcs.c | 44 +++++++++++++++++++------------------- xen/arch/x86/hvm/vmx/vmx.c | 4 ++-- xen/include/asm-x86/hvm/vcpu.h | 2 +- xen/include/asm-x86/hvm/vmx/vmcs.h | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index b39e571c8f..a847f37186 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -518,23 +518,23 @@ static void vmx_free_vmcs(paddr_t pa) static void __vmx_clear_vmcs(void *info) { struct vcpu *v = info; - struct arch_vmx_struct *arch_vmx = &v->arch.hvm_vmx; + struct vmx_vcpu *vmx = &v->arch.hvm_vmx; /* Otherwise we can nest (vmx_cpu_down() vs. vmx_clear_vmcs()). */ ASSERT(!local_irq_is_enabled()); - if ( arch_vmx->active_cpu == smp_processor_id() ) + if ( vmx->active_cpu == smp_processor_id() ) { - __vmpclear(arch_vmx->vmcs_pa); - if ( arch_vmx->vmcs_shadow_maddr ) - __vmpclear(arch_vmx->vmcs_shadow_maddr); + __vmpclear(vmx->vmcs_pa); + if ( vmx->vmcs_shadow_maddr ) + __vmpclear(vmx->vmcs_shadow_maddr); - arch_vmx->active_cpu = -1; - arch_vmx->launched = 0; + vmx->active_cpu = -1; + vmx->launched = 0; - list_del(&arch_vmx->active_list); + list_del(&vmx->active_list); - if ( arch_vmx->vmcs_pa == this_cpu(current_vmcs) ) + if ( vmx->vmcs_pa == this_cpu(current_vmcs) ) this_cpu(current_vmcs) = 0; } } @@ -901,7 +901,7 @@ bool vmx_msr_is_intercepted(struct vmx_msr_bitmap *msr_bitmap, */ void vmx_vmcs_switch(paddr_t from, paddr_t to) { - struct arch_vmx_struct *vmx = ¤t->arch.hvm_vmx; + struct vmx_vcpu *vmx = ¤t->arch.hvm_vmx; spin_lock(&vmx->vmcs_lock); __vmpclear(from); @@ -1308,7 +1308,7 @@ static struct vmx_msr_entry *locate_msr_entry( struct vmx_msr_entry *vmx_find_msr(const struct vcpu *v, uint32_t msr, enum vmx_msr_list_type type) { - const struct arch_vmx_struct *vmx = &v->arch.hvm_vmx; + const struct vmx_vcpu *vmx = &v->arch.hvm_vmx; struct vmx_msr_entry *start = NULL, *ent, *end; unsigned int substart = 0, subend = vmx->msr_save_count; unsigned int total = vmx->msr_load_count; @@ -1349,7 +1349,7 @@ struct vmx_msr_entry *vmx_find_msr(const struct vcpu *v, uint32_t msr, int vmx_add_msr(struct vcpu *v, uint32_t msr, uint64_t val, enum vmx_msr_list_type type) { - struct arch_vmx_struct *vmx = &v->arch.hvm_vmx; + struct vmx_vcpu *vmx = &v->arch.hvm_vmx; struct vmx_msr_entry **ptr, *start = NULL, *ent, *end; unsigned int substart, subend, total; int rc; @@ -1460,7 +1460,7 @@ int vmx_add_msr(struct vcpu *v, uint32_t msr, uint64_t val, int vmx_del_msr(struct vcpu *v, uint32_t msr, enum vmx_msr_list_type type) { - struct arch_vmx_struct *vmx = &v->arch.hvm_vmx; + struct vmx_vcpu *vmx = &v->arch.hvm_vmx; struct vmx_msr_entry *start = NULL, *ent, *end; unsigned int substart = 0, subend = vmx->msr_save_count; unsigned int total = vmx->msr_load_count; @@ -1743,20 +1743,20 @@ void vmx_domain_update_eptp(struct domain *d) int vmx_create_vmcs(struct vcpu *v) { - struct arch_vmx_struct *arch_vmx = &v->arch.hvm_vmx; + struct vmx_vcpu *vmx = &v->arch.hvm_vmx; int rc; - if ( (arch_vmx->vmcs_pa = vmx_alloc_vmcs()) == 0 ) + if ( (vmx->vmcs_pa = vmx_alloc_vmcs()) == 0 ) return -ENOMEM; - INIT_LIST_HEAD(&arch_vmx->active_list); - __vmpclear(arch_vmx->vmcs_pa); - arch_vmx->active_cpu = -1; - arch_vmx->launched = 0; + INIT_LIST_HEAD(&vmx->active_list); + __vmpclear(vmx->vmcs_pa); + vmx->active_cpu = -1; + vmx->launched = 0; if ( (rc = construct_vmcs(v)) != 0 ) { - vmx_free_vmcs(arch_vmx->vmcs_pa); + vmx_free_vmcs(vmx->vmcs_pa); return rc; } @@ -1765,11 +1765,11 @@ int vmx_create_vmcs(struct vcpu *v) void vmx_destroy_vmcs(struct vcpu *v) { - struct arch_vmx_struct *arch_vmx = &v->arch.hvm_vmx; + struct vmx_vcpu *vmx = &v->arch.hvm_vmx; vmx_clear_vmcs(v); - vmx_free_vmcs(arch_vmx->vmcs_pa); + vmx_free_vmcs(vmx->vmcs_pa); free_xenheap_page(v->arch.hvm_vmx.host_msr_area); free_xenheap_page(v->arch.hvm_vmx.msr_area); diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index d605554c50..141737c72e 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -205,7 +205,7 @@ void vmx_pi_desc_fixup(unsigned int cpu) { unsigned int new_cpu, dest; unsigned long flags; - struct arch_vmx_struct *vmx, *tmp; + struct vmx_vcpu *vmx, *tmp; spinlock_t *new_lock, *old_lock = &per_cpu(vmx_pi_blocking, cpu).lock; struct list_head *blocked_vcpus = &per_cpu(vmx_pi_blocking, cpu).list; @@ -2357,7 +2357,7 @@ static struct hvm_function_table __initdata vmx_function_table = { /* Handle VT-d posted-interrupt when VCPU is blocked. */ static void pi_wakeup_interrupt(struct cpu_user_regs *regs) { - struct arch_vmx_struct *vmx, *tmp; + struct vmx_vcpu *vmx, *tmp; spinlock_t *lock = &per_cpu(vmx_pi_blocking, smp_processor_id()).lock; struct list_head *blocked_vcpus = &per_cpu(vmx_pi_blocking, smp_processor_id()).list; diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index 54ea0445a7..abf78e4252 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -176,7 +176,7 @@ struct hvm_vcpu { u64 msr_xss; union { - struct arch_vmx_struct vmx; + struct vmx_vcpu vmx; struct arch_svm_struct svm; } u; diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index 46668a7007..f964a951ea 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -100,7 +100,7 @@ struct pi_blocking_vcpu { spinlock_t *lock; }; -struct arch_vmx_struct { +struct vmx_vcpu { /* Physical address of VMCS. */ paddr_t vmcs_pa; /* VMCS shadow machine address. */ -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |