Nicholas Piggin <npig...@gmail.com> writes: > This implements the Nested KVM HV hcall API for spapr under TCG. > > The L2 is switched in when the H_ENTER_NESTED hcall is made, and the > L1 is switched back in returned from the hcall when a HV exception > is sent to the vhyp. Register state is copied in and out according to > the nested KVM HV hcall API specification. > > The hdecr timer is started when the L2 is switched in, and it provides > the HDEC / 0x980 return to L1. > > The MMU re-uses the bare metal radix 2-level page table walker by > using the get_pate method to point the MMU to the nested partition > table entry. MMU faults due to partition scope errors raise HV > exceptions and accordingly are routed back to the L1. > > The MMU does not tag translations for the L1 (direct) vs L2 (nested) > guests, so the TLB is flushed on any L1<->L2 transition (hcall entry > and exit). > > Signed-off-by: Nicholas Piggin <npig...@gmail.com>
Reviewed-by: Fabiano Rosas <faro...@linux.ibm.com>