On Fri, Mar 11, 2022 at 12:25:16AM +, David Matlack wrote:
> Allow adding new entries to the rmap and linking shadow pages without a
> struct kvm_vcpu pointer by moving the implementation of rmap_add() and
> link_shadow_page() into inner helper functions.
>
> No functional change intended.
>
On Fri, Mar 11, 2022 at 12:25:17AM +, David Matlack wrote:
> Update the page stats in __rmap_add() rather than at the call site. This
> will avoid having to manually update page stats when splitting huge
> pages in a subsequent commit.
>
> No functional change intended.
>
> Reviewed-by: Ben
On Fri, Mar 11, 2022 at 12:25:07AM +, David Matlack wrote:
> Rename 3 functions:
>
> kvm_mmu_get_page() -> kvm_mmu_get_shadow_page()
> kvm_mmu_alloc_page() -> kvm_mmu_alloc_shadow_page()
> kvm_mmu_free_page() -> kvm_mmu_free_shadow_page()
>
> This change makes it clear that these
On Fri, Mar 11, 2022 at 12:25:10AM +, David Matlack wrote:
> Link the shadow page table to the sp (via set_page_private()) during
> allocation rather than initialization. This is a more logical place to
> do it because allocation time is also where we do the reverse link
> (setting sp->spt).
>
On Fri, Mar 11, 2022 at 12:25:03AM +, David Matlack wrote:
> Commit fb58a9c345f6 ("KVM: x86/mmu: Optimize MMU page cache lookup for
> fully direct MMUs") skipped the unsync checks and write flood clearing
> for full direct MMUs. We can extend this further and skip the checks for
> all direct
On Fri, Mar 11, 2022 at 12:25:06AM +, David Matlack wrote:
> Decompose kvm_mmu_get_page() into separate helper functions to increase
> readability and prepare for allocating shadow pages without a vcpu
> pointer.
>
> Specifically, pull the guts of kvm_mmu_get_page() into 3 helper
> functions:
On Fri, Mar 11, 2022 at 12:25:11AM +, David Matlack wrote:
> Move the code that allocates a new shadow page for splitting huge pages
> into mmu.c. Currently this code is only used by the TDP MMU but it will
> be reused in subsequent commits to also split huge pages mapped by the
> shadow MMU.
Add QEMU_ARCH, which allows run scripts to specify which architecture
of QEMU should be used. This is useful on AArch64 when running with
KVM and running AArch32 tests. For those tests, we *don't* want to
select the 'arm' QEMU, as would have been selected, but rather the
$HOST ('aarch64') QEMU.
On Fri, Mar 11, 2022 at 12:25:08AM +, David Matlack wrote:
> Passing the memslot to kvm_mmu_new_shadow_page() avoids the need for the
> vCPU pointer when write-protecting indirect 4k shadow pages. This moves
> us closer to being able to create new shadow pages during VM ioctls for
> eager page
On Fri, Mar 11, 2022 at 12:25:12AM +, David Matlack wrote:
> static void tdp_mmu_free_sp(struct kvm_mmu_page *sp)
> {
> - free_page((unsigned long)sp->spt);
> - kmem_cache_free(mmu_page_header_cache, sp);
> + kvm_mmu_free_shadow_page(sp);
> }
Perhaps tdp_mmu_free_sp() can be
On Fri, Mar 11, 2022 at 12:25:04AM +, David Matlack wrote:
> The parameter "direct" can either be true or false, and all of the
> callers pass in a bool variable or true/false literal, so just use the
> type bool.
>
> No functional change intended.
>
> Signed-off-by: David Matlack
If we
On Fri, Mar 11, 2022 at 12:25:05AM +, David Matlack wrote:
> Instead of computing the shadow page role from scratch for every new
> page, we can derive most of the information from the parent shadow page.
> This avoids redundant calculations and reduces the number of parameters
> to
On Fri, Mar 11, 2022 at 12:25:09AM +, David Matlack wrote:
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 519910938478..e866e05c4ba5 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -1716,16 +1716,9 @@ static struct kvm_mmu_page
>
On Fri, Mar 11, 2022 at 12:25:13AM +, David Matlack wrote:
> static struct kvm_mmu_page *tdp_mmu_alloc_sp(struct kvm_vcpu *vcpu)
> {
> - struct kvm_mmu_page *sp;
> -
> - sp = kvm_mmu_memory_cache_alloc(>arch.mmu_page_header_cache);
> - sp->spt =
Hi,
Arm is planning to upstream tests that are being developed as part of the
Confidential Compute Architecture [1]. Some of the tests target the
attestation part of creating and managing a confidential compute VM, which
requires the manipulation of messages in the Concise Binary Object
On 15/03/2022 14.33, Alexandru Elisei wrote:
Hi,
Arm is planning to upstream tests that are being developed as part of the
Confidential Compute Architecture [1]. Some of the tests target the
attestation part of creating and managing a confidential compute VM, which
requires the manipulation of
Hi,
On Tue, Mar 15, 2022 at 09:01:52AM +0100, Andrew Jones wrote:
> Add QEMU_ARCH, which allows run scripts to specify which architecture
> of QEMU should be used. This is useful on AArch64 when running with
> KVM and running AArch32 tests. For those tests, we *don't* want to
> select the 'arm'
On Tue, Mar 15, 2022 at 01:33:57PM +, Alexandru Elisei wrote:
> Hi,
>
> Arm is planning to upstream tests that are being developed as part of the
> Confidential Compute Architecture [1]. Some of the tests target the
> attestation part of creating and managing a confidential compute VM, which
On Tue, Mar 15, 2022 at 12:33:17PM +, Alexandru Elisei wrote:
> Hi,
>
> On Tue, Mar 15, 2022 at 09:01:52AM +0100, Andrew Jones wrote:
> > Add QEMU_ARCH, which allows run scripts to specify which architecture
> > of QEMU should be used. This is useful on AArch64 when running with
> > KVM and
Hi,
On Tue, Mar 15, 2022 at 03:21:39PM +0100, Thomas Huth wrote:
> On 15/03/2022 14.33, Alexandru Elisei wrote:
> > Hi,
> >
> > Arm is planning to upstream tests that are being developed as part of the
> > Confidential Compute Architecture [1]. Some of the tests target the
> > attestation part
Hi,
On Tue, Mar 15, 2022 at 04:16:30PM +0100, Andrew Jones wrote:
> On Tue, Mar 15, 2022 at 12:33:17PM +, Alexandru Elisei wrote:
> > Hi,
> >
> > On Tue, Mar 15, 2022 at 09:01:52AM +0100, Andrew Jones wrote:
> > > Add QEMU_ARCH, which allows run scripts to specify which architecture
> > > of
On Tue, Mar 15, 2022 at 04:31:34PM +, Alexandru Elisei wrote:
> Well, kvm-unit-tests selects KVM or TCG under the hood without the user
> being involved at all.
The under the hood aspect isn't great. It's best for testers to know what
they're testing. It's pretty obvious, though, that if you
22 matches
Mail list logo