From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Lai Jiangshan <laijs@linux.alibaba.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [RFC PATCH 4/6] KVM: X86: Introduce role.level_promoted
Date: Fri, 11 Feb 2022 17:06:00 +0100 [thread overview]
Message-ID: <7ccb16e5-579e-b3d9-cedc-305152ef9b8f@redhat.com> (raw)
In-Reply-To: <YdTGuoh2vYPsRcu+@google.com>
On 1/4/22 23:14, Sean Christopherson wrote:
> Alternatively, should we mark passthrough shadow pages as direct=1? That would
> naturally handle this code, and for things like reexecute_instruction()'s usage
> of kvm_mmu_unprotect_page(), I don't think passthrough shadow pages should be
> considered indirect, e.g. zapping them won't help and the shadow page can't become
> unsync.
So the main difference between direct and passthrough shadow pages is that
passthrough pages can have indirect children. A direct page maps the
page at sp->gfn, while a passthrough page maps the page _table_ at
sp->gfn.
Is this correct?
If so, I think there is a difference between a passthrough page that
maps a level-2 page from level-4, and a passthrough page that maps a
level-3 page from level-4. This means that a single bit in the role
is not enough.
One way to handle this could be to have a single field "direct_levels"
that subsumes both "direct" and "passthrough". direct && !passthrough
would correspond to "direct_levels == level", while !direct && !passthrough
would correspond to "direct_levels == 0".
Paolo
next prev parent reply other threads:[~2022-02-11 16:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 9:25 [RFC PATCH 0/6] KVM: X86: Add and use shadow page with level promoted or acting as pae_root Lai Jiangshan
2021-12-10 9:25 ` [RFC PATCH 1/6] KVM: X86: Check root_level only in fast_pgd_switch() Lai Jiangshan
2022-01-04 20:24 ` Sean Christopherson
2021-12-10 9:25 ` [RFC PATCH 2/6] KVM: X86: Walk shadow page starting with shadow_root_level Lai Jiangshan
2022-01-04 20:34 ` Sean Christopherson
2022-01-04 20:37 ` Paolo Bonzini
2022-01-04 20:43 ` Maxim Levitsky
2021-12-10 9:25 ` [RFC PATCH 3/6] KVM: X86: Add arguement gfn and role to kvm_mmu_alloc_page() Lai Jiangshan
2022-01-04 20:53 ` Sean Christopherson
2021-12-10 9:25 ` [RFC PATCH 4/6] KVM: X86: Introduce role.level_promoted Lai Jiangshan
2022-01-04 22:14 ` Sean Christopherson
2022-02-11 16:06 ` Paolo Bonzini [this message]
2021-12-10 9:25 ` [RFC PATCH 5/6] KVM: X86: Alloc pae_root shadow page Lai Jiangshan
2022-01-04 21:54 ` Sean Christopherson
2022-01-05 3:11 ` Lai Jiangshan
2022-01-05 16:45 ` Sean Christopherson
2022-01-06 2:01 ` Lai Jiangshan
2022-01-06 19:41 ` Sean Christopherson
2022-01-07 4:36 ` Lai Jiangshan
2021-12-10 9:25 ` [RFC PATCH 6/6] KVM: X86: Use level_promoted and pae_root shadow page for 32bit guests Lai Jiangshan
2022-01-04 20:55 ` Sean Christopherson
2021-12-10 10:27 ` [RFC PATCH 0/6] KVM: X86: Add and use shadow page with level promoted or acting as pae_root Maxim Levitsky
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=7ccb16e5-579e-b3d9-cedc-305152ef9b8f@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jiangshanlai@gmail.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=laijs@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome