Re: [Xen-devel] [PATCH 6/7] x86/svm: Rename arch_svm_struct to svm_vcpu

2018-08-30 Thread Jan Beulich
>>> On 28.08.18 at 19:39,  wrote:
> The suffix and prefix are redundant, and the name is curiously odd.  Rename it
> to svm_vcpu to be consistent with all the other similar structures.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper 
> ---
> CC: Jan Beulich 
> CC: Wei Liu 
> CC: Roger Pau Monné 
> CC: Boris Ostrovsky 
> CC: Suravee Suthikulpanit 
> CC: Brian Woods 
> 
> All of the local pointers are named arch_svm.  I'm open to renaming them to
> just svm if people are happy with the additional patch delta.

Same here - with or without
Acked-by: Jan Beulich 

Jan


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 6/7] x86/svm: Rename arch_svm_struct to svm_vcpu

2018-08-28 Thread Andrew Cooper
The suffix and prefix are redundant, and the name is curiously odd.  Rename it
to svm_vcpu to be consistent with all the other similar structures.

No functional change.

Signed-off-by: Andrew Cooper 
---
CC: Jan Beulich 
CC: Wei Liu 
CC: Roger Pau Monné 
CC: Boris Ostrovsky 
CC: Suravee Suthikulpanit 
CC: Brian Woods 

All of the local pointers are named arch_svm.  I'm open to renaming them to
just svm if people are happy with the additional patch delta.
---
 xen/arch/x86/hvm/svm/nestedsvm.c   | 2 +-
 xen/arch/x86/hvm/svm/svm.c | 4 ++--
 xen/arch/x86/hvm/svm/vmcb.c| 6 +++---
 xen/include/asm-x86/hvm/svm/vmcb.h | 2 +-
 xen/include/asm-x86/hvm/vcpu.h | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index a1f840e..9d0fef1 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -350,7 +350,7 @@ static int nsvm_vcpu_hostrestore(struct vcpu *v, struct 
cpu_user_regs *regs)
 
 static int nsvm_vmrun_permissionmap(struct vcpu *v, bool_t viopm)
 {
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 struct nestedsvm *svm = _nestedsvm(v);
 struct nestedvcpu *nv = _nestedhvm(v);
 struct vmcb_struct *ns_vmcb = nv->nv_vvmcx;
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 92b29b1..e7e944d 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -663,7 +663,7 @@ static void svm_update_guest_efer(struct vcpu *v)
 
 static void svm_cpuid_policy_changed(struct vcpu *v)
 {
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 struct vmcb_struct *vmcb = arch_svm->vmcb;
 const struct cpuid_policy *cp = v->domain->arch.cpuid;
 u32 bitmap = vmcb_get_exception_intercepts(vmcb);
@@ -683,7 +683,7 @@ static void svm_cpuid_policy_changed(struct vcpu *v)
 
 static void svm_sync_vmcb(struct vcpu *v, enum vmcb_sync_state new_state)
 {
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 
 if ( new_state == vmcb_needs_vmsave )
 {
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 3776c53..a7630a0 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -53,7 +53,7 @@ void free_vmcb(struct vmcb_struct *vmcb)
 /* This function can directly access fields which are covered by clean bits. */
 static int construct_vmcb(struct vcpu *v)
 {
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 struct vmcb_struct *vmcb = arch_svm->vmcb;
 
 /* Build-time check of the size of VMCB AMD structure. */
@@ -225,7 +225,7 @@ static int construct_vmcb(struct vcpu *v)
 int svm_create_vmcb(struct vcpu *v)
 {
 struct nestedvcpu *nv = _nestedhvm(v);
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 int rc;
 
 if ( (nv->nv_n1vmcx == NULL) &&
@@ -252,7 +252,7 @@ int svm_create_vmcb(struct vcpu *v)
 void svm_destroy_vmcb(struct vcpu *v)
 {
 struct nestedvcpu *nv = _nestedhvm(v);
-struct arch_svm_struct *arch_svm = >arch.hvm_svm;
+struct svm_vcpu *arch_svm = >arch.hvm_svm;
 
 if ( nv->nv_n1vmcx != NULL )
 free_vmcb(nv->nv_n1vmcx);
diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h 
b/xen/include/asm-x86/hvm/svm/vmcb.h
index f7974da..3a514f8 100644
--- a/xen/include/asm-x86/hvm/svm/vmcb.h
+++ b/xen/include/asm-x86/hvm/svm/vmcb.h
@@ -518,7 +518,7 @@ enum vmcb_sync_state {
 vmcb_needs_vmload /* VMCB dirty (VMLOAD needed)? */
 };
 
-struct arch_svm_struct {
+struct svm_vcpu {
 struct vmcb_struct *vmcb;
 u64vmcb_pa;
 unsigned long *msrpm;
diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h
index abf78e4..c8d0a4e 100644
--- a/xen/include/asm-x86/hvm/vcpu.h
+++ b/xen/include/asm-x86/hvm/vcpu.h
@@ -177,7 +177,7 @@ struct hvm_vcpu {
 
 union {
 struct vmx_vcpu vmx;
-struct arch_svm_struct svm;
+struct svm_vcpu svm;
 } u;
 
 struct tasklet  assert_evtchn_irq_tasklet;
-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel