[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why guest physical addresses are not the same as the corresponding h
From: |
Sean Christopherson |
Subject: |
Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks! |
Date: |
Mon, 12 Oct 2020 21:52:45 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Oct 13, 2020 at 12:30:39AM -0400, harry harry wrote:
> Hi Sean,
>
> Thank you very much for your thorough explanations. Please see my
> inline replies as follows. Thanks!
>
> On Mon, Oct 12, 2020 at 12:54 PM Sean Christopherson
> <sean.j.christopherson@intel.com> wrote:
> >
> > No, the guest physical address spaces is not intrinsically tied to the host
> > virtual address spaces. The fact that GPAs and HVAs are related in KVM is a
> > property KVM's architecture. EPT/NPT has absolutely nothing to do with
> > HVAs.
> >
> > As Maxim pointed out, KVM links a guest's physical address space, i.e.
> > GPAs, to
> > the host's virtual address space, i.e. HVAs, via memslots. For all intents
> > and
> > purposes, this is an extra layer of address translation that is purely
> > software
> > defined. The memslots allow KVM to retrieve the HPA for a given GPA when
> > servicing a shadow page fault (a.k.a. EPT violation).
> >
> > When EPT is enabled, a shadow page fault due to an unmapped GPA will look
> > like:
> >
> > GVA -> [guest page tables] -> GPA -> EPT Violation VM-Exit
> >
> > The above walk of the guest page tables is done in hardware. KVM then does
> > the
> > following walks in software to retrieve the desired HPA:
> >
> > GPA -> [memslots] -> HVA -> [host page tables] -> HPA
>
> Do you mean that GPAs are different from their corresponding HVAs when
> KVM does the walks (as you said above) in software?
What do you mean by "different"? GPAs and HVAs are two completely different
address spaces.
- Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/11
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Maxim Levitsky, 2020/10/11
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/11
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Sean Christopherson, 2020/10/12
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!,
Sean Christopherson <=
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Paolo Bonzini, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Paolo Bonzini, 2020/10/14
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Maxim Levitsky, 2020/10/14
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/14
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Sean Christopherson, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, harry harry, 2020/10/13
- Re: Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!, Paolo Bonzini, 2020/10/14