Skip to content
Commit e8bcfede authored by Steven Price's avatar Steven Price Committed by Suzuki Poulose
Browse files

arm64: rme: Enable PMU support with a realm guest



Use the PMU registers from the RmiRecExit structure to identify when an
overflow interrupt is due and inject it into the guest. Also hook up the
configuration option for enabling the PMU within the guest.

When entering a realm guest with a PMU interrupt pending, it is
necessary to disable the physical interrupt. Otherwise when the RMM
restores the PMU state the physical interrupt will trigger causing an
immediate exit back to the host. The guest is expected to acknowledge
the interrupt causing a host exit (to update the GIC state) which gives
the opportunity to re-enable the physical interrupt before the next PMU
event.

The existing PMU option (KVM_ARM_VCPU_PMU_V3_CTRL) is a per-VCPU option,
but the RMM interface requires the PMU configuration to be set at the VM
level. So in kvm_create_rec() we enforce that the per-VCPU configuration
matches that configured for the realm.

Signed-off-by: Steven Price's avatarSteven Price <steven.price@arm.com>
parent 07370b36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment