aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2016-01-11 08:35:32 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 13:34:21 -0500
commitbb0c70bcca6ba3c84afc2da7426f3b923bbe6825 (patch)
treed9be51e3943387e1d402d84040541e51ee3a2525 /arch/arm/kvm
parentf577f6c2a6a5ccabe98061f256a1e2ff468d5e93 (diff)
arm64: KVM: Add a new vcpu device control group for PMUv3
To configure the virtual PMUv3 overflow interrupt number, we use the vcpu kvm_device ioctl, encapsulating the KVM_ARM_VCPU_PMU_V3_IRQ attribute within the KVM_ARM_VCPU_PMU_V3_CTRL group. After configuring the PMUv3, call the vcpu ioctl with attribute KVM_ARM_VCPU_PMU_V3_INIT to initialize the PMUv3. Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Acked-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm')
-rw-r--r--arch/arm/kvm/arm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 166232356291..75c7fed5d14c 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -835,6 +835,7 @@ static int kvm_arm_vcpu_set_attr(struct kvm_vcpu *vcpu,
835 835
836 switch (attr->group) { 836 switch (attr->group) {
837 default: 837 default:
838 ret = kvm_arm_vcpu_arch_set_attr(vcpu, attr);
838 break; 839 break;
839 } 840 }
840 841
@@ -848,6 +849,7 @@ static int kvm_arm_vcpu_get_attr(struct kvm_vcpu *vcpu,
848 849
849 switch (attr->group) { 850 switch (attr->group) {
850 default: 851 default:
852 ret = kvm_arm_vcpu_arch_get_attr(vcpu, attr);
851 break; 853 break;
852 } 854 }
853 855
@@ -861,6 +863,7 @@ static int kvm_arm_vcpu_has_attr(struct kvm_vcpu *vcpu,
861 863
862 switch (attr->group) { 864 switch (attr->group) {
863 default: 865 default:
866 ret = kvm_arm_vcpu_arch_has_attr(vcpu, attr);
864 break; 867 break;
865 } 868 }
866 869