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 <steven.price@arm.com>
Loading
Please register or sign in to comment