aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>2017-09-12 11:42:41 -0400
committerRadim Krčmář <rkrcmar@redhat.com>2017-09-13 12:29:06 -0400
commitb2a05feff274e007abd7cda0d2cdae7fdf5cbb0a (patch)
tree7c6d455ad8bbbdfac781d99c7bc11becf9b67bc5
parentdfa20099e26e35cd9e83d4d43172615c73c4e9f5 (diff)
KVM: Add struct kvm_vcpu pointer parameter to get_enable_apicv()
Modify struct kvm_x86_ops.arch.apicv_active() to take struct kvm_vcpu pointer as parameter in preparation to subsequent changes. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
-rw-r--r--arch/x86/include/asm/kvm_host.h2
-rw-r--r--arch/x86/kvm/svm.c2
-rw-r--r--arch/x86/kvm/vmx.c2
-rw-r--r--arch/x86/kvm/x86.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index bbb802382a3e..c73e493adf07 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -972,7 +972,7 @@ struct kvm_x86_ops {
972 void (*enable_nmi_window)(struct kvm_vcpu *vcpu); 972 void (*enable_nmi_window)(struct kvm_vcpu *vcpu);
973 void (*enable_irq_window)(struct kvm_vcpu *vcpu); 973 void (*enable_irq_window)(struct kvm_vcpu *vcpu);
974 void (*update_cr8_intercept)(struct kvm_vcpu *vcpu, int tpr, int irr); 974 void (*update_cr8_intercept)(struct kvm_vcpu *vcpu, int tpr, int irr);
975 bool (*get_enable_apicv)(void); 975 bool (*get_enable_apicv)(struct kvm_vcpu *vcpu);
976 void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu); 976 void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);
977 void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr); 977 void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr);
978 void (*hwapic_isr_update)(struct kvm_vcpu *vcpu, int isr); 978 void (*hwapic_isr_update)(struct kvm_vcpu *vcpu, int isr);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index cab020acb509..76f559f5a3dd 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4407,7 +4407,7 @@ static void svm_set_virtual_x2apic_mode(struct kvm_vcpu *vcpu, bool set)
4407 return; 4407 return;
4408} 4408}
4409 4409
4410static bool svm_get_enable_apicv(void) 4410static bool svm_get_enable_apicv(struct kvm_vcpu *vcpu)
4411{ 4411{
4412 return avic; 4412 return avic;
4413} 4413}
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4253adef9044..09204993a739 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -5012,7 +5012,7 @@ static void vmx_disable_intercept_msr_x2apic(u32 msr, int type, bool apicv_activ
5012 } 5012 }
5013} 5013}
5014 5014
5015static bool vmx_get_enable_apicv(void) 5015static bool vmx_get_enable_apicv(struct kvm_vcpu *vcpu)
5016{ 5016{
5017 return enable_apicv; 5017 return enable_apicv;
5018} 5018}
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c777a8f681a8..f4a978e36030 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7980,7 +7980,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
7980 BUG_ON(vcpu->kvm == NULL); 7980 BUG_ON(vcpu->kvm == NULL);
7981 kvm = vcpu->kvm; 7981 kvm = vcpu->kvm;
7982 7982
7983 vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(); 7983 vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu);
7984 vcpu->arch.pv.pv_unhalted = false; 7984 vcpu->arch.pv.pv_unhalted = false;
7985 vcpu->arch.emulate_ctxt.ops = &emulate_ops; 7985 vcpu->arch.emulate_ctxt.ops = &emulate_ops;
7986 if (!irqchip_in_kernel(kvm) || kvm_vcpu_is_reset_bsp(vcpu)) 7986 if (!irqchip_in_kernel(kvm) || kvm_vcpu_is_reset_bsp(vcpu))