From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Jim Mattson <jmattson@google.com>
Cc: David Hildenbrand <david@redhat.com>,
kvm list <kvm@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v1 1/2] KVM: nVMX: get rid of nested_get_page()
Date: Thu, 3 Aug 2017 19:41:00 +0200 [thread overview]
Message-ID: <20170803174100.GC1015@flask> (raw)
In-Reply-To: <CALMp9eR+u1GP=0oKCm1a69Phw4WkKJwYSx1q2XiNy-80BfQrbw@mail.gmail.com>
2017-08-03 09:05-0700, Jim Mattson:
> On Thu, Aug 3, 2017 at 8:36 AM, Radim Krčmář <rkrcmar@redhat.com> wrote:
> > 2017-08-03 16:09+0200, David Hildenbrand:
> >> /*
> >> * If translation failed, no matter: This feature asks
> >> * to exit when accessing the given address, and if it
> >> * can never be accessed, this feature won't do
> >> * anything anyway.
> >> */
>
> This comment is incorrect. On real hardware, the APIC access page
> doesn't have to exist (i.e. be backed by actual memory), because the
> APIC access page is never accessed. Think of the APIC access page as a
> sentinel value that the hypervisor can put in the page tables (EPT
> page tables if they are in use, x86 page tables otherwise) to trigger
> APIC virtualization. If there is an access, it is to the page at the
> virtual APIC address, not the APIC access page.
Right,
> Similarly, in a VM, there need not be a mapping for the APIC access
> page for the feature to work as architected. (Or, at least, that's the
> way it should work. :-)
the APIC_ACCESS_ADDR is always L0 physical address, so we somehow need
to map the L1 physical address somewhere in order to recognize accesses
from L2.
I think the correct way would be to should create a new mapping if the
chosen L1 physical address has no L0 physical address yet.
The code was made for the common case where hypervisors select a page
that is mapped by KVM ...
Do you wish to send patches? :)
Thanks.
next prev parent reply other threads:[~2017-08-03 17:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 14:09 [PATCH v1 0/2] KVM: nVMX: remove nested_get_page() David Hildenbrand
2017-08-03 14:09 ` [PATCH v1 1/2] KVM: nVMX: get rid of nested_get_page() David Hildenbrand
2017-08-03 15:36 ` Radim Krčmář
2017-08-03 15:58 ` David Hildenbrand
2017-08-03 16:05 ` Jim Mattson
2017-08-03 17:41 ` Radim Krčmář [this message]
2017-08-03 18:42 ` Jim Mattson
2017-08-03 18:40 ` Konrad Rzeszutek Wilk
2017-08-03 19:42 ` David Hildenbrand
2017-08-07 10:48 ` Paolo Bonzini
2017-08-03 14:09 ` [PATCH v1 2/2] KVM: nVMX: get rid of nested_release_page* David Hildenbrand
2017-08-03 15:14 ` [PATCH v1 0/2] KVM: nVMX: remove nested_get_page() Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170803174100.GC1015@flask \
--to=rkrcmar@redhat.com \
--cc=david@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.