[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191122162020.GB10458@local-michael-cet-test>
Date: Sat, 23 Nov 2019 00:20:20 +0800
From: Yang Weijiang <weijiang.yang@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Yang Weijiang <weijiang.yang@...el.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, jmattson@...gle.com,
sean.j.christopherson@...el.com, yu.c.zhang@...ux.intel.com,
alazar@...defender.com, edwin.zhai@...el.com
Subject: Re: [PATCH v7 5/9] x86: spp: Introduce user-space SPP IOCTLs
On Thu, Nov 21, 2019 at 11:03:52AM +0100, Paolo Bonzini wrote:
> On 19/11/19 09:49, Yang Weijiang wrote:
> > + case KVM_INIT_SPP: {
> > + r = kvm_vm_ioctl_init_spp(kvm);
> > + break;
> > + }
> > default:
> > r = -ENOTTY;
> > }
> > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> > index 9460830de536..700f0825336d 100644
> > --- a/include/uapi/linux/kvm.h
> > +++ b/include/uapi/linux/kvm.h
> > @@ -1257,6 +1257,9 @@ struct kvm_vfio_spapr_tce {
> > struct kvm_userspace_memory_region)
> > #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47)
> > #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64)
> > +#define KVM_SUBPAGES_GET_ACCESS _IOR(KVMIO, 0x49, __u64)
> > +#define KVM_SUBPAGES_SET_ACCESS _IOW(KVMIO, 0x4a, __u64)
> > +#define KVM_INIT_SPP _IOW(KVMIO, 0x4b, __u64)
>
> You also need to define a capability and return a value for it in
> kvm_vm_ioctl_check_extension. We could return SUBPAGE_MAX_BITMAP (now
> KVM_SUBPAGE_MAX_PAGES). And instead of introducing KVM_INIT_SPP, you
> can then use KVM_ENABLE_CAP on the new capability.
>
Yep, will change these stuffs, thanks.
> Paolo
Powered by blists - more mailing lists