[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200110181053.GH21485@linux.intel.com>
Date: Fri, 10 Jan 2020 10:10:53 -0800
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Yang Weijiang <weijiang.yang@...el.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
pbonzini@...hat.com, jmattson@...gle.com,
yu.c.zhang@...ux.intel.com, alazar@...defender.com,
edwin.zhai@...el.com
Subject: Re: [RESEND PATCH v10 05/10] x86: spp: Introduce user-space SPP
IOCTLs
On Thu, Jan 02, 2020 at 02:13:14PM +0800, Yang Weijiang wrote:
> User application, e.g., QEMU or VMI, must initialize SPP
> before gets/sets SPP subpages, the dynamic initialization is to
> reduce the extra storage cost if the SPP feature is not not used.
>
> Co-developed-by: He Chen <he.chen@...ux.intel.com>
> Signed-off-by: He Chen <he.chen@...ux.intel.com>
> Co-developed-by: Zhang Yi <yi.z.zhang@...ux.intel.com>
> Signed-off-by: Zhang Yi <yi.z.zhang@...ux.intel.com>
> Signed-off-by: Yang Weijiang <weijiang.yang@...el.com>
> ---
> arch/x86/include/asm/kvm_host.h | 4 ++
> arch/x86/kvm/mmu/spp.c | 44 +++++++++++++++
> arch/x86/kvm/mmu/spp.h | 9 ++++
> arch/x86/kvm/vmx/vmx.c | 15 ++++++
> arch/x86/kvm/x86.c | 95 ++++++++++++++++++++++++++++++++-
> include/uapi/linux/kvm.h | 3 ++
> 6 files changed, 169 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index f5145b86d620..c7a9f03f39a7 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -1238,6 +1238,10 @@ struct kvm_x86_ops {
>
> bool (*apic_init_signal_blocked)(struct kvm_vcpu *vcpu);
> int (*enable_direct_tlbflush)(struct kvm_vcpu *vcpu);
> +
> + int (*init_spp)(struct kvm *kvm);
> + int (*flush_subpages)(struct kvm *kvm, u64 gfn, u32 npages);
> + int (*get_inst_len)(struct kvm_vcpu *vcpu);
If this is necessary, which hopefully it isn't, then get_insn_len() to be
consistent with other KVM nomenclature.
A comment for the series overall, it needs a lot of work to properly order
code between patches. E.g. this patch introduces get_inst_len() without
any justification in the changelog and without a user. At best it's
confusing, at worst this series will be impossible to bisect.
Powered by blists - more mailing lists