On Tue, Aug 06, 2013 at 01:31:03PM +0300, Gleb Natapov wrote: > On Tue, Aug 06, 2013 at 12:25:55PM +0200, Jan Kiszka wrote: > > On 2013-08-06 12:12, Gleb Natapov wrote: > > > On Tue, Aug 06, 2013 at 10:39:59AM +0200, Jan Kiszka wrote: > > >> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> > > >> > > >> If nested EPT is enabled, the L2 guest may change CR3 without any exits. > > >> We therefore have to read the current value from the VMCS when switching > > >> to L1. However, if paging wasn't enabled, L0 tracks L2's CR3, and > > >> GUEST_CR3 rather contains the real-mode identity map. So we need to > > >> retrieve CR3 from the architectural state after conditionally updating > > >> it - and this is what kvm_read_cr3 does. > > >> > > > I have a headache from trying to think about it already, but shouldn't > > > L1 be the one who setups identity map for L2? I traced what > > > vmcs_read64(GUEST_CR3)/kvm_read_cr3(vcpu) return here and do not see > > > different values in real mode. > > > > Did you try with my patches applied and unrestricted guest mode in use? > > > No, for that I need to setup nested environment on the machine that > support unrestricted guest first :) > Did that. I see unrestricted guest is enabled in L1, but still do not see different values. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html