Skip to content

Commit

Permalink
target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported()
Browse files Browse the repository at this point in the history
KVMState is already accessible via CPUState::kvm_state, use it.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200121110349.25842-5-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
philmd authored and bonzini committed Jan 24, 2020
1 parent dd32e94 commit d70c996
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions target/arm/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)

bool kvm_arm_pmu_supported(CPUState *cpu)
{
KVMState *s = KVM_STATE(current_machine->accelerator);

return kvm_check_extension(s, KVM_CAP_ARM_PMU_V3);
return kvm_check_extension(cpu->kvm_state, KVM_CAP_ARM_PMU_V3);
}

int kvm_arm_get_max_vm_ipa_size(MachineState *ms)
Expand Down

0 comments on commit d70c996

Please sign in to comment.