From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 13/21] KVM: Add support for enabling capabilities per-vcpu Date: Thu, 01 Apr 2010 11:51:41 +0300 Message-ID: <4BB45E9D.20303@redhat.com> References: <1269463717-18305-1-git-send-email-agraf@suse.de> <1269463717-18305-14-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alexander Graf Return-path: In-Reply-To: <1269463717-18305-14-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On 03/24/2010 10:48 PM, Alexander Graf wrote: > Some times we don't want all capabilities to be available to all > our vcpus. One example for that is the OSI interface, implemented > in the next patch. > > In order to have a generic mechanism in how to enable capabilities > individually, this patch introduces a new ioctl that can be used > for this purpose. That way features we don't want in all guests or > userspace configurations can just not be enabled and we're good. > > Documentation/kvm/api.txt | 35 +++++++++++++++++++++++++++++++++++ > arch/powerpc/kvm/powerpc.c | 27 +++++++++++++++++++++++++++ > include/linux/kvm.h | 12 ++++++++++++ > 3 files changed, 74 insertions(+), 0 deletions(-) > > Should really have been generic instead of ppc-specific, but can be moved later. > @@ -697,6 +707,8 @@ struct kvm_clock_data { > /* Available with KVM_CAP_DEBUGREGS */ > #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) > #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) > +/* No need for CAP, because then it just always fails */ > +#define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) > I dropped this comment while applying. -- error compiling committee.c: too many arguments to function