Thread (78 messages) 78 messages, 8 authors, 2020-05-27

Re: [PATCH 09/26] KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu

From: Marc Zyngier <maz@kernel.org>
Date: 2020-05-08 12:20:58
Also in: kvm, kvmarm

On Thu, 7 May 2020 17:26:06 +0100
James Morse [off-list ref] wrote:

Hi James,
Hi Marc, Christoffer,

On 22/04/2020 13:00, Marc Zyngier wrote:
quoted
From: Christoffer Dall <redacted>

If we move the used_lrs field to the version-specific cpu interface
structure, the following functions only operate on the struct
vgic_v3_cpu_if and not the full vcpu:

  __vgic_v3_save_state
  __vgic_v3_restore_state
  __vgic_v3_activate_traps
  __vgic_v3_deactivate_traps
  __vgic_v3_save_aprs
  __vgic_v3_restore_aprs

This is going to be very useful for nested virt,   
... because you don't need to consider whether the vcpu is running in vEL2?
That's one of the reasons, as vEL2 is still EL1.

But things become really fun when you run a L2 guest, which is an EL1
guest from the PoV of the guest hypervisor (aka L1). At this stage
what you feed to the HW is not the state that could be populated by L0
for L1, but instead what L1 has created for L2 (with a bit of
additional repainting to adjust some of the interrupt numbers).

So we build a shadow cpu_if on the fly and pass it to the normal vgic
handling functions. I told you it was fun! ;-)
quoted
so move the used_lrs
field and change the prototypes and implementations of these functions to
take the cpu_if parameter directly.  
quoted
No functional change.  
Looks like no change!

Reviewed-by: James Morse <james.morse@arm.com>
Thanks!

	M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help