Skip to content

Commit 729c15c

Browse files
committed
KVM: x86: rename KVM_REQ_GET_VMCS12_PAGES
We are going to use it for SVM too, so use a more generic name. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent d468706 commit 729c15c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#define KVM_REQ_HV_EXIT KVM_ARCH_REQ(21)
8181
#define KVM_REQ_HV_STIMER KVM_ARCH_REQ(22)
8282
#define KVM_REQ_LOAD_EOI_EXITMAP KVM_ARCH_REQ(23)
83-
#define KVM_REQ_GET_VMCS12_PAGES KVM_ARCH_REQ(24)
83+
#define KVM_REQ_GET_NESTED_STATE_PAGES KVM_ARCH_REQ(24)
8484
#define KVM_REQ_APICV_UPDATE \
8585
KVM_ARCH_REQ_FLAGS(25, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
8686
#define KVM_REQ_TLB_FLUSH_CURRENT KVM_ARCH_REQ(26)
@@ -1261,7 +1261,7 @@ struct kvm_x86_nested_ops {
12611261
int (*set_state)(struct kvm_vcpu *vcpu,
12621262
struct kvm_nested_state __user *user_kvm_nested_state,
12631263
struct kvm_nested_state *kvm_state);
1264-
bool (*get_vmcs12_pages)(struct kvm_vcpu *vcpu);
1264+
bool (*get_nested_state_pages)(struct kvm_vcpu *vcpu);
12651265
int (*write_log_dirty)(struct kvm_vcpu *vcpu, gpa_t l2_gpa);
12661266

12671267
int (*enable_evmcs)(struct kvm_vcpu *vcpu,

arch/x86/kvm/vmx/nested.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static void free_nested(struct kvm_vcpu *vcpu)
285285
if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon)
286286
return;
287287

288-
kvm_clear_request(KVM_REQ_GET_VMCS12_PAGES, vcpu);
288+
kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
289289

290290
vmx->nested.vmxon = false;
291291
vmx->nested.smm.vmxon = false;
@@ -3395,7 +3395,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
33953395
* to nested_get_vmcs12_pages before the next VM-entry. The MSRs
33963396
* have already been set at vmentry time and should not be reset.
33973397
*/
3398-
kvm_make_request(KVM_REQ_GET_VMCS12_PAGES, vcpu);
3398+
kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
33993399
}
34003400

34013401
/*
@@ -6192,7 +6192,7 @@ static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
61926192
* restored yet. EVMCS will be mapped from
61936193
* nested_get_vmcs12_pages().
61946194
*/
6195-
kvm_make_request(KVM_REQ_GET_VMCS12_PAGES, vcpu);
6195+
kvm_make_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);
61966196
} else {
61976197
return -EINVAL;
61986198
}
@@ -6573,7 +6573,7 @@ struct kvm_x86_nested_ops vmx_nested_ops = {
65736573
.hv_timer_pending = nested_vmx_preemption_timer_pending,
65746574
.get_state = vmx_get_nested_state,
65756575
.set_state = vmx_set_nested_state,
6576-
.get_vmcs12_pages = nested_get_vmcs12_pages,
6576+
.get_nested_state_pages = nested_get_vmcs12_pages,
65776577
.write_log_dirty = nested_vmx_write_pml_buffer,
65786578
.enable_evmcs = nested_enable_evmcs,
65796579
.get_evmcs_version = nested_get_evmcs_version,

arch/x86/kvm/x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8640,8 +8640,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
86408640
bool req_immediate_exit = false;
86418641

86428642
if (kvm_request_pending(vcpu)) {
8643-
if (kvm_check_request(KVM_REQ_GET_VMCS12_PAGES, vcpu)) {
8644-
if (unlikely(!kvm_x86_ops.nested_ops->get_vmcs12_pages(vcpu))) {
8643+
if (kvm_check_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu)) {
8644+
if (unlikely(!kvm_x86_ops.nested_ops->get_nested_state_pages(vcpu))) {
86458645
r = 0;
86468646
goto out;
86478647
}

0 commit comments

Comments
 (0)