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>
* 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;
* for use by hypervisor/software.
*/
union {
- struct hv_enlightenments hv_enlightenments;
+ struct hv_vmcb_enlightenments hv_enlightenments;
u8 reserved_sw[32];
};
};
*/
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;
/*
u64 virt_ext;
u32 clean;
union {
- struct hv_enlightenments hv_enlightenments;
+ struct hv_vmcb_enlightenments hv_enlightenments;
u8 reserved_sw[32];
};
};
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;
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));
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);
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) {
INTERCEPT_RDPRU,
};
-struct hv_enlightenments {
+struct hv_vmcb_enlightenments {
struct __packed hv_enlightenments_control {
u32 nested_flush_hypercall:1;
u32 msr_bitmap:1;
* for use by hypervisor/software.
*/
union {
- struct hv_enlightenments hv_enlightenments;
+ struct hv_vmcb_enlightenments hv_enlightenments;
u8 reserved_sw[32];
};
};
{
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);