x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments"
authorSean Christopherson <seanjc@google.com>
Tue, 1 Nov 2022 14:53:42 +0000 (15:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Nov 2022 17:58:59 +0000 (12:58 -0500)
Now that KVM isn't littered with "struct hv_enlightenments" casts, rename
the struct to "hv_vmcb_enlightenments" to highlight the fact that the
struct is specifically for SVM's VMCB.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221101145426.251680-5-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/hyperv-tlfs.h
arch/x86/include/asm/svm.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/svm/svm_onhyperv.c
arch/x86/kvm/svm/svm_onhyperv.h
tools/testing/selftests/kvm/include/x86_64/svm.h
tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c

index 245a806a971706d38af202849809f3c3fde92b7d..c5e0e5a06c0dcc639c8e5826450c741576b56f9d 100644 (file)
@@ -602,7 +602,7 @@ struct hv_enlightened_vmcs {
  * Hyper-V uses the software reserved 32 bytes in VMCB control area to expose
  * SVM enlightenments to guests.
  */
-struct hv_enlightenments {
+struct hv_vmcb_enlightenments {
        struct __packed hv_enlightenments_control {
                u32 nested_flush_hypercall:1;
                u32 msr_bitmap:1;
index b37249e7c6607b9a1bda888fc05869982979de52..cb1ee53ad3b18900a6945b11bb4e267d5d77cd6e 100644 (file)
@@ -164,7 +164,7 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
         * for use by hypervisor/software.
         */
        union {
-               struct hv_enlightenments hv_enlightenments;
+               struct hv_vmcb_enlightenments hv_enlightenments;
                u8 reserved_sw[32];
        };
 };
index 622fe00c3acf1ccf8c847a4e8ca8246a48f45eda..cc8f47e7e294db1351d1b8a932dfbc1ce305443b 100644 (file)
@@ -180,7 +180,7 @@ void recalc_intercepts(struct vcpu_svm *svm)
  */
 static bool nested_svm_vmrun_msrpm(struct vcpu_svm *svm)
 {
-       struct hv_enlightenments *hve = &svm->nested.ctl.hv_enlightenments;
+       struct hv_vmcb_enlightenments *hve = &svm->nested.ctl.hv_enlightenments;
        int i;
 
        /*
index a5af367502e4270e4e44ae221de8843b48015bfb..4826e6cc611bf1305c55c93c52f2364bf40d4506 100644 (file)
@@ -152,7 +152,7 @@ struct vmcb_ctrl_area_cached {
        u64 virt_ext;
        u32 clean;
        union {
-               struct hv_enlightenments hv_enlightenments;
+               struct hv_vmcb_enlightenments hv_enlightenments;
                u8 reserved_sw[32];
        };
 };
index 422d00fee24ab21404c934417bfa5d3e6a884ab4..52c73a8be72b1215855e67208eb7ae2b42796ffe 100644 (file)
@@ -16,7 +16,7 @@
 
 int svm_hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu)
 {
-       struct hv_enlightenments *hve;
+       struct hv_vmcb_enlightenments *hve;
        struct hv_partition_assist_pg **p_hv_pa_pg =
                        &to_kvm_hv(vcpu->kvm)->hv_pa_pg;
 
index 5c664dd7bee21aa0e9aa99ffc6ae0223b243639a..d5cb2c62e35574f89ed03bba79817299be9b9730 100644 (file)
@@ -17,7 +17,7 @@ int svm_hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu);
 
 static inline void svm_hv_init_vmcb(struct vmcb *vmcb)
 {
-       struct hv_enlightenments *hve = &vmcb->control.hv_enlightenments;
+       struct hv_vmcb_enlightenments *hve = &vmcb->control.hv_enlightenments;
 
        BUILD_BUG_ON(sizeof(vmcb->control.hv_enlightenments) !=
                     sizeof(vmcb->control.reserved_sw));
@@ -62,7 +62,7 @@ static inline void svm_hv_vmcb_dirty_nested_enlightenments(
                struct kvm_vcpu *vcpu)
 {
        struct vmcb *vmcb = to_svm(vcpu)->vmcb;
-       struct hv_enlightenments *hve = &vmcb->control.hv_enlightenments;
+       struct hv_vmcb_enlightenments *hve = &vmcb->control.hv_enlightenments;
 
        if (hve->hv_enlightenments_control.msr_bitmap)
                vmcb_mark_dirty(vmcb, HV_VMCB_NESTED_ENLIGHTENMENTS);
@@ -70,7 +70,7 @@ static inline void svm_hv_vmcb_dirty_nested_enlightenments(
 
 static inline void svm_hv_update_vp_id(struct vmcb *vmcb, struct kvm_vcpu *vcpu)
 {
-       struct hv_enlightenments *hve = &vmcb->control.hv_enlightenments;
+       struct hv_vmcb_enlightenments *hve = &vmcb->control.hv_enlightenments;
        u32 vp_index = kvm_hv_get_vpindex(vcpu);
 
        if (hve->hv_vp_id != vp_index) {
index 6e1527aa34191c487e0b4c754603112c82309b74..483e6ae12f69ee81cca2e722c445790858108f1b 100644 (file)
@@ -58,7 +58,7 @@ enum {
        INTERCEPT_RDPRU,
 };
 
-struct hv_enlightenments {
+struct hv_vmcb_enlightenments {
        struct __packed hv_enlightenments_control {
                u32 nested_flush_hypercall:1;
                u32 msr_bitmap:1;
@@ -124,7 +124,7 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
         * for use by hypervisor/software.
         */
        union {
-               struct hv_enlightenments hv_enlightenments;
+               struct hv_vmcb_enlightenments hv_enlightenments;
                u8 reserved_sw[32];
        };
 };
index 8ef6a4c83cb1e5249d58aad3a95bca0d84f2099a..1c3fc38b4f15133d73b8e8594207c555054e3d62 100644 (file)
@@ -46,7 +46,7 @@ static void __attribute__((__flatten__)) guest_code(struct svm_test_data *svm)
 {
        unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];
        struct vmcb *vmcb = svm->vmcb;
-       struct hv_enlightenments *hve = &vmcb->control.hv_enlightenments;
+       struct hv_vmcb_enlightenments *hve = &vmcb->control.hv_enlightenments;
 
        GUEST_SYNC(1);