[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1e89e6d-fec5-d865-533d-04902137c082@amd.com>
Date: Mon, 21 Apr 2025 14:04:04 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: roy.hopkins@...e.com, seanjc@...gle.com, ashish.kalra@....com,
michael.roth@....com, jroedel@...e.de, nsaenz@...zon.com, anelkz@...zon.de,
James.Bottomley@...senPartnership.com
Subject: Re: [PATCH 03/29] KVM: add plane info to structs
On 4/1/25 11:10, Paolo Bonzini wrote:
> Add some of the data to move from one plane to the other within a VM,
> typically from plane N to plane 0.
>
> There is quite some difference here because while separate planes provide
> very little of the vm file descriptor functionality, they are almost fully
> functional vCPUs except that non-zero planes(*) can only be ran indirectly
> through the initial plane.
>
> Therefore, vCPUs use struct kvm_vcpu for all planes, with just a couple
> fields that will be added later and will only be valid for plane 0. At
> the VM level instead plane info is stored in a completely different struct.
> For now struct kvm_plane has no architecture-specific counterpart, but this
> may change in the future if needed. It's possible for example that some MMU
> info becomes per-plane in order to support per-plane RWX permissions.
>
> (*) I will restrain from calling them astral planes.
>
> Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> ---
> include/linux/kvm_host.h | 17 ++++++++++++++++-
> include/linux/kvm_types.h | 1 +
> virt/kvm/kvm_main.c | 32 ++++++++++++++++++++++++++++++++
> 3 files changed, 49 insertions(+), 1 deletion(-)
>
> @@ -332,7 +336,8 @@ struct kvm_vcpu {
> #ifdef CONFIG_PROVE_RCU
> int srcu_depth;
> #endif
> - int mode;
> + short plane;
> + short mode;
> u64 requests;
> unsigned long guest_debug;
>
> @@ -753,6 +760,11 @@ struct kvm_memslots {
> int node_idx;
> };
>
> +struct kvm_plane {
> + struct kvm *kvm;
> + int plane;
Should there be consistency between the use of short in kvm_run vs int
in kvm_plane? And elsewhere in the series, unsigned int is used, also.
Thanks,
Tom
> +};
> +
Powered by blists - more mailing lists