linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: PMU: Preserve vPMC registers properly on migration
@ 2023-03-02  5:50 Reiji Watanabe
  2023-03-02  5:50 ` [PATCH 1/2] KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current value Reiji Watanabe
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Reiji Watanabe @ 2023-03-02  5:50 UTC (permalink / raw)
  To: Marc Zyngier, Oliver Upton, kvmarm
  Cc: kvm, linux-arm-kernel, James Morse, Alexandru Elisei, Zenghui Yu,
	Suzuki K Poulose, Paolo Bonzini, Ricardo Koller, Jing Zhang,
	Raghavendra Rao Anata, Will Deacon, Reiji Watanabe

The series fixes two problems in preserving vPMU counter (vPMC)
registers (PMCCNTR_EL0/PMEVCNTR<n>_EL0) during migration.

One of the problems is that KVM may not return the current values
of the vPMC registers for KVM_GET_ONE_REG.

The other one might cause KVM to reset the vPMC registers on the
first KVM_RUN on the destination. This is because userspace might
save PMCR_EL0 with PMCR_EL0.{C,P} bits set on the source, and
restore it on the destination.

See patch-1 and patch-2 for details on these issues respectively.

The series is based on v6.2.

Reiji Watanabe (2):
  KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current
    value
  KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU

 arch/arm64/kvm/pmu-emul.c |  4 +++-
 arch/arm64/kvm/sys_regs.c | 21 +++++++++++++++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)


base-commit: c9c3395d5e3dcc6daee66c6908354d47bf98cb0c
-- 
2.39.2.722.g9855ee24e9-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-13  3:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-02  5:50 [PATCH 0/2] KVM: arm64: PMU: Preserve vPMC registers properly on migration Reiji Watanabe
2023-03-02  5:50 ` [PATCH 1/2] KVM: arm64: PMU: Fix GET_ONE_REG for vPMC regs to return the current value Reiji Watanabe
2023-03-12 14:57   ` Marc Zyngier
2023-03-13  3:34     ` Reiji Watanabe
2023-03-02  5:50 ` [PATCH 2/2] KVM: arm64: PMU: Don't save PMCR_EL0.{C,P} for the vCPU Reiji Watanabe
2023-03-12 15:01   ` Marc Zyngier
2023-03-13  3:34     ` Reiji Watanabe
2023-03-12 15:04 ` [PATCH 0/2] KVM: arm64: PMU: Preserve vPMC registers properly on migration Marc Zyngier
2023-03-13  3:35   ` Reiji Watanabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).