All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu
Date: Tue, 09 Mar 2010 15:09:18 +0200	[thread overview]
Message-ID: <4B96487E.5060100@redhat.com> (raw)
In-Reply-To: <2CBC3D25-CD0A-4090-8177-E1FD5022A155@suse.de>

On 03/09/2010 03:01 PM, Alexander Graf wrote:
> On 09.03.2010, at 13:56, Avi Kivity wrote:
>
>    
>> On 03/08/2010 08:03 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.
>>>
>>>
>>> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
>>> index d170cb4..6a19ab6 100644
>>> --- a/Documentation/kvm/api.txt
>>> +++ b/Documentation/kvm/api.txt
>>> @@ -749,6 +749,21 @@ Writes debug registers into the vcpu.
>>>   See KVM_GET_DEBUGREGS for the data structure. The flags field is unused
>>>   yet and must be cleared on entry.
>>>
>>> +4.34 KVM_ENABLE_CAP
>>> +
>>> +Capability: basic
>>>
>>>        
>> Capability: basic means that the feature was present in 2.6.22.  Otherwise you need to specify the KVM_CAP_ that presents this feature.
>>
>>      
>>> +Architectures: all
>>>
>>>
>>>        
>> But it's implemented for ppc only (other arches will get ENOTTY).
>>      
> That was the whole idea behind it. if it fails it fails. Nothing we can do about it. If it succeeds - great.
>    

If KVM_CAP_ENABLE_CAP is present, it means the KVM_ENABLE_CAP ioctl will 
not return ENOTTY (it may return EINVAL if wrong values are present).

ENOTTY means not implemented.  'Architectures: all' means implemented.

>>> +Not all extensions are enabled by default. Using this ioctl the application
>>> +can enable an extension, making it available to the guest.
>>> +
>>> +On systems that do not support this ioctl, it always fails. On systems that
>>> +do support it, it only works for extensions that are supported for enablement.
>>> +As of writing this the only enablement enabled extenion is KVM_CAP_PPC_OSI.
>>>
>>>        
>> That needs to be documented.  It also needs to be discoverable separately - we can have a kernel with KVM_ENABLE_CAP but without KVM_CAP_PPC_OSI.
>>
>> btw, KVM_CAP_PPC_OSI conflicts with the KVM_CAP_ namespace.  Please choose another namespace.
>>      
> Well I figured it'd be slick to have capabilities get enabled or disabled. That's the whole idea behind making it generic. If I wanted a specific interface I'd go in and create an ioctl ENABLE_OSI_INTERFACE.
>    

Ah, I see.  Well, that makes sense.  Please document it.

> But this way the detection if a capability exists can be done using the existing CAP detection. It can then be enabled using ENABLE_CAP.
>    

Okay, I agree.

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu
Date: Tue, 09 Mar 2010 13:09:18 +0000	[thread overview]
Message-ID: <4B96487E.5060100@redhat.com> (raw)
In-Reply-To: <2CBC3D25-CD0A-4090-8177-E1FD5022A155@suse.de>

On 03/09/2010 03:01 PM, Alexander Graf wrote:
> On 09.03.2010, at 13:56, Avi Kivity wrote:
>
>    
>> On 03/08/2010 08:03 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.
>>>
>>>
>>> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
>>> index d170cb4..6a19ab6 100644
>>> --- a/Documentation/kvm/api.txt
>>> +++ b/Documentation/kvm/api.txt
>>> @@ -749,6 +749,21 @@ Writes debug registers into the vcpu.
>>>   See KVM_GET_DEBUGREGS for the data structure. The flags field is unused
>>>   yet and must be cleared on entry.
>>>
>>> +4.34 KVM_ENABLE_CAP
>>> +
>>> +Capability: basic
>>>
>>>        
>> Capability: basic means that the feature was present in 2.6.22.  Otherwise you need to specify the KVM_CAP_ that presents this feature.
>>
>>      
>>> +Architectures: all
>>>
>>>
>>>        
>> But it's implemented for ppc only (other arches will get ENOTTY).
>>      
> That was the whole idea behind it. if it fails it fails. Nothing we can do about it. If it succeeds - great.
>    

If KVM_CAP_ENABLE_CAP is present, it means the KVM_ENABLE_CAP ioctl will 
not return ENOTTY (it may return EINVAL if wrong values are present).

ENOTTY means not implemented.  'Architectures: all' means implemented.

>>> +Not all extensions are enabled by default. Using this ioctl the application
>>> +can enable an extension, making it available to the guest.
>>> +
>>> +On systems that do not support this ioctl, it always fails. On systems that
>>> +do support it, it only works for extensions that are supported for enablement.
>>> +As of writing this the only enablement enabled extenion is KVM_CAP_PPC_OSI.
>>>
>>>        
>> That needs to be documented.  It also needs to be discoverable separately - we can have a kernel with KVM_ENABLE_CAP but without KVM_CAP_PPC_OSI.
>>
>> btw, KVM_CAP_PPC_OSI conflicts with the KVM_CAP_ namespace.  Please choose another namespace.
>>      
> Well I figured it'd be slick to have capabilities get enabled or disabled. That's the whole idea behind making it generic. If I wanted a specific interface I'd go in and create an ioctl ENABLE_OSI_INTERFACE.
>    

Ah, I see.  Well, that makes sense.  Please document it.

> But this way the detection if a capability exists can be done using the existing CAP detection. It can then be enabled using ENABLE_CAP.
>    

Okay, I agree.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-03-09 13:09 UTC|newest]

Thread overview: 140+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 18:03 [PATCH 00/15] KVM: PPC: MOL bringup patches Alexander Graf
2010-03-08 18:03 ` Alexander Graf
2010-03-08 18:03 ` [PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line Alexander Graf
2010-03-08 18:03   ` Alexander Graf
     [not found]   ` <1268071402-27112-3-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-09 12:50     ` Avi Kivity
2010-03-09 12:50       ` Avi Kivity
     [not found]       ` <4B964412.8030708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-09 12:54         ` Alexander Graf
2010-03-09 12:54           ` Alexander Graf
     [not found]           ` <954C5195-A8E4-4CA5-8D5E-AA21E2E21C5B-l3A5Bk7waGM@public.gmane.org>
2010-03-09 13:05             ` Avi Kivity
2010-03-09 13:05               ` Avi Kivity
2010-03-08 18:03 ` [PATCH 04/15] KVM: PPC: Book3S_32 guest MMU fixes Alexander Graf
2010-03-08 18:03   ` Alexander Graf
2010-03-08 18:03 ` [PATCH 06/15] KVM: PPC: Don't reload FPU with invalid values Alexander Graf
2010-03-08 18:03   ` Alexander Graf
2010-03-08 18:03 ` [PATCH 09/15] KVM: PPC: Implement BAT reads Alexander Graf
2010-03-08 18:03   ` Alexander Graf
2010-03-08 18:03 ` [PATCH 10/15] KVM: PPC: Make XER load 32 bit Alexander Graf
2010-03-08 18:03   ` Alexander Graf
2010-03-08 18:03 ` [PATCH 11/15] KVM: PPC: Implement emulation for lbzux and lhax Alexander Graf
2010-03-08 18:03   ` Alexander Graf
     [not found] ` <1268071402-27112-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-08 18:03   ` [PATCH 01/15] KVM: PPC: Ensure split mode works Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 03/15] KVM: PPC: Make DSISR 32 bits wide Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 05/15] KVM: PPC: Split instruction reading out Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 07/15] KVM: PPC: Load VCPU for register fetching Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 08/15] KVM: PPC: Implement mfsr emulation Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 12/15] KVM: PPC: Implement alignment interrupt Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-09 12:56     ` Avi Kivity
2010-03-09 12:56       ` Avi Kivity
2010-03-09 13:01       ` Alexander Graf
2010-03-09 13:01         ` Alexander Graf
2010-03-09 13:09         ` Avi Kivity [this message]
2010-03-09 13:09           ` Avi Kivity
2010-03-08 18:03   ` [PATCH 14/15] KVM: PPC: Add OSI hypercall interface Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-09 13:00     ` Avi Kivity
2010-03-09 13:00       ` Avi Kivity
2010-03-09 13:04       ` Alexander Graf
2010-03-09 13:04         ` Alexander Graf
2010-03-09 13:11         ` Avi Kivity
2010-03-09 13:11           ` Avi Kivity
2010-03-09 13:12           ` Alexander Graf
2010-03-09 13:12             ` Alexander Graf
     [not found]             ` <3D0D6963-FEC8-4A53-ACCE-570BEAF3721B-l3A5Bk7waGM@public.gmane.org>
2010-03-09 13:19               ` Avi Kivity
2010-03-09 13:19                 ` Avi Kivity
     [not found]                 ` <4B964ADE.5030200-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-09 13:20                   ` Alexander Graf
2010-03-09 13:20                     ` Alexander Graf
2010-03-08 18:03   ` [PATCH 15/15] KVM: PPC: Make build work without CONFIG_VSX/ALTIVEC Alexander Graf
2010-03-08 18:03     ` Alexander Graf
2010-03-08 18:06 ` [PATCH 00/15] KVM: PPC: MOL bringup patches Alexander Graf
2010-03-08 18:06   ` Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2010-03-05 16:50 Alexander Graf
2010-03-05 16:50 ` Alexander Graf
2010-03-05 16:50 ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Alexander Graf
2010-03-05 16:50   ` Alexander Graf
     [not found]   ` <1267807842-3751-2-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-08 13:40     ` Avi Kivity
2010-03-08 13:40       ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Avi Kivity
     [not found]       ` <4B94FE41.1040904-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 13:44         ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Alexander Graf
2010-03-08 13:44           ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Alexander Graf
     [not found]           ` <4B94FF56.9060200-l3A5Bk7waGM@public.gmane.org>
2010-03-08 13:50             ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Avi Kivity
2010-03-08 13:50               ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Avi Kivity
2010-03-08 13:53               ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Alexander Graf
2010-03-08 13:53                 ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Alexander Graf
     [not found]                 ` <4B950174.7010709-l3A5Bk7waGM@public.gmane.org>
2010-03-08 14:06                   ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Avi Kivity
2010-03-08 14:06                     ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Avi Kivity
     [not found]                     ` <4B950475.1020106-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 14:14                       ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Alexander Graf
2010-03-08 14:14                         ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Alexander Graf
     [not found]                         ` <4B95062D.2020908-l3A5Bk7waGM@public.gmane.org>
2010-03-08 14:16                           ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Avi Kivity
2010-03-08 14:16                             ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Avi Kivity
     [not found]                             ` <4B9506C5.30606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 14:20                               ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Alexander Graf
2010-03-08 14:20                                 ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Alexander Graf
2010-03-08 14:23                                 ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work Avi Kivity
2010-03-08 14:23                                   ` [PATCH 01/15] KVM: PPC: Make register read/write wrappers always Avi Kivity
2010-03-05 16:50 ` [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line Alexander Graf
2010-03-05 16:50   ` Alexander Graf
     [not found]   ` <1267807842-3751-4-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-08 13:44     ` Avi Kivity
2010-03-08 13:44       ` Avi Kivity
     [not found]       ` <4B94FF27.5010800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 13:48         ` Alexander Graf
2010-03-08 13:48           ` Alexander Graf
2010-03-08 13:52           ` Avi Kivity
2010-03-08 13:52             ` Avi Kivity
2010-03-08 13:55             ` Alexander Graf
2010-03-08 13:55               ` Alexander Graf
2010-03-08 13:58               ` Avi Kivity
2010-03-08 13:58                 ` Avi Kivity
     [not found]                 ` <4B95029C.6000800-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 14:01                   ` Alexander Graf
2010-03-08 14:01                     ` Alexander Graf
2010-03-08 14:09                     ` Avi Kivity
2010-03-08 14:09                       ` Avi Kivity
     [not found] ` <1267807842-3751-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-05 16:50   ` [PATCH 02/15] KVM: PPC: Ensure split mode works Alexander Graf
2010-03-05 16:50     ` Alexander Graf
2010-03-05 16:50   ` [PATCH 04/15] KVM: PPC: Make DSISR 32 bits wide Alexander Graf
2010-03-05 16:50     ` Alexander Graf
2010-03-05 16:50   ` [PATCH 05/15] KVM: PPC: Book3S_32 guest MMU fixes Alexander Graf
2010-03-05 16:50     ` Alexander Graf
2010-03-05 16:50   ` [PATCH 10/15] KVM: PPC: Implement BAT reads Alexander Graf
2010-03-05 16:50     ` Alexander Graf
2010-03-05 16:50   ` [PATCH 13/15] KVM: PPC: Implement alignment interrupt Alexander Graf
2010-03-05 16:50     ` Alexander Graf
2010-03-05 16:50 ` [PATCH 06/15] KVM: PPC: Split instruction reading out Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 07/15] KVM: PPC: Don't reload FPU with invalid values Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 08/15] KVM: PPC: Load VCPU for register fetching Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 09/15] KVM: PPC: Implement mfsr emulation Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 11/15] KVM: PPC: Make XER load 32 bit Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 12/15] KVM: PPC: Implement emulation for lbzux and lhax Alexander Graf
2010-03-05 16:50   ` Alexander Graf
2010-03-05 16:50 ` [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu Alexander Graf
2010-03-05 16:50   ` Alexander Graf
     [not found]   ` <1267807842-3751-15-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-03-08 13:49     ` Avi Kivity
2010-03-08 13:49       ` Avi Kivity
     [not found]       ` <4B950057.1090204-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 13:51         ` Alexander Graf
2010-03-08 13:51           ` Alexander Graf
     [not found]           ` <4B9500D1.2060008-l3A5Bk7waGM@public.gmane.org>
2010-03-08 13:52             ` Avi Kivity
2010-03-08 13:52               ` Avi Kivity
     [not found]               ` <4B95012B.3030505-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 13:56                 ` Alexander Graf
2010-03-08 13:56                   ` Alexander Graf
2010-03-08 14:02                   ` Avi Kivity
2010-03-08 14:02                     ` Avi Kivity
2010-03-08 14:10                     ` Alexander Graf
2010-03-08 14:10                       ` Alexander Graf
     [not found]                       ` <4B950562.6050509-l3A5Bk7waGM@public.gmane.org>
2010-03-08 14:14                         ` Avi Kivity
2010-03-08 14:14                           ` Avi Kivity
     [not found]                           ` <4B950656.4010307-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-03-08 14:18                             ` Alexander Graf
2010-03-08 14:18                               ` Alexander Graf
2010-03-08 14:21                               ` Avi Kivity
2010-03-08 14:21                                 ` Avi Kivity
2010-03-05 16:50 ` [PATCH 15/15] KVM: PPC: Add OSI hypercall interface Alexander Graf
2010-03-05 16:50   ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B96487E.5060100@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.