lkml.org 
[lkml]   [2020]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linux.intel.com>
> Signed-off-by: He Chen <he.chen@linux.intel.com>
> Co-developed-by: Zhang Yi <yi.z.zhang@linux.intel.com>
> Signed-off-by: Zhang Yi <yi.z.zhang@linux.intel.com>
> Signed-off-by: Yang Weijiang <weijiang.yang@intel.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.

\
 
 \ /
  Last update: 2020-01-10 19:11    [W:0.072 / U:7.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site