[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6858d5c-7db6-6e4c-7f07-92ff3340e02b@redhat.com>
Date: Thu, 10 Aug 2023 16:03:16 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Ackerley Tng <ackerleytng@...gle.com>, seanjc@...gle.com,
tglx@...utronix.de, x86@...nel.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Cc: mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
hpa@...or.com, shuah@...nel.org, andrew.jones@...ux.dev,
ricarkol@...gle.com, chao.p.peng@...ux.intel.com, tabba@...gle.com,
jarkko@...nel.org, yu.c.zhang@...ux.intel.com,
vannapurve@...gle.com, erdemaktas@...gle.com,
mail@...iej.szmigiero.name, vbabka@...e.cz, david@...hat.com,
qperret@...gle.com, michael.roth@....com, wei.w.wang@...el.com,
liam.merwick@...cle.com, isaku.yamahata@...il.com,
kirill.shutemov@...ux.intel.com
Subject: Re: [RFC PATCH 08/11] KVM: x86: Let moving encryption context be
configurable
On 8/8/23 01:01, Ackerley Tng wrote:
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 75d48379d94d..a1a28dd77b94 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6351,7 +6351,14 @@ static int kvm_vm_move_enc_context_from(struct kvm *kvm, unsigned int source_fd)
> if (r)
> goto out_mark_migration_done;
>
> - r = static_call(kvm_x86_vm_move_enc_context_from)(kvm, source_kvm);
> + /*
> + * Different types of VMs will allow userspace to define if moving
> + * encryption context should be supported.
> + */
> + if (kvm->arch.vm_move_enc_ctxt_supported &&
> + kvm_x86_ops.vm_move_enc_context_from) {
> + r = static_call(kvm_x86_vm_move_enc_context_from)(kvm, source_kvm);
> + }
Rather than "supported" this is more "required". So perhaps
kvm->arch.use_vm_enc_ctxt_op?
Paolo
Powered by blists - more mailing lists