All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] expose kvmclock upper msr set.
@ 2011-02-23 17:44 Glauber Costa
  2011-02-24 23:24 ` Steven Rostedt
  2011-02-27 12:16 ` Avi Kivity
  0 siblings, 2 replies; 10+ messages in thread
From: Glauber Costa @ 2011-02-23 17:44 UTC (permalink / raw)
  To: kvm; +Cc: linux-kernel

We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
for a while now, but we're not exposing it yet, meaning nobody is using it.
This simple patch takes care of that.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 arch/x86/kvm/x86.c  |    1 +
 include/linux/kvm.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8575d85..c0808db 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1966,6 +1966,7 @@ int kvm_dev_ioctl_check_extension(long ext)
 	case KVM_CAP_SET_TSS_ADDR:
 	case KVM_CAP_EXT_CPUID:
 	case KVM_CAP_CLOCKSOURCE:
+	case KVM_CAP_CLOCKSOURCE2:
 	case KVM_CAP_PIT:
 	case KVM_CAP_NOP_IO_DELAY:
 	case KVM_CAP_MP_STATE:
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index ea2dc1a..a15d2e8 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -541,6 +541,7 @@ struct kvm_ppc_pvinfo {
 #define KVM_CAP_PPC_GET_PVINFO 57
 #define KVM_CAP_PPC_IRQ_LEVEL 58
 #define KVM_CAP_ASYNC_PF 59
+#define KVM_CAP_CLOCKSOURCE2 60 /* hypervisor supports MSRs at upper range */
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-23 17:44 [PATCH] expose kvmclock upper msr set Glauber Costa
@ 2011-02-24 23:24 ` Steven Rostedt
  2011-02-24 23:48   ` Glauber Costa
  2011-02-27 12:16 ` Avi Kivity
  1 sibling, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2011-02-24 23:24 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, linux-kernel

On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:
> We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> for a while now, but we're not exposing it yet, meaning nobody is using it.
> This simple patch takes care of that.

Is nobody using it because it was never exposed? Or because nobody ever
needed it, and we don't care (thus don't bother supporting it).

-- Steve


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-24 23:24 ` Steven Rostedt
@ 2011-02-24 23:48   ` Glauber Costa
  2011-02-24 23:54     ` Steven Rostedt
  0 siblings, 1 reply; 10+ messages in thread
From: Glauber Costa @ 2011-02-24 23:48 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: kvm, linux-kernel

On Thu, 2011-02-24 at 18:24 -0500, Steven Rostedt wrote:
> On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:
> > We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> > for a while now, but we're not exposing it yet, meaning nobody is using it.
> > This simple patch takes care of that.
> 
> Is nobody using it because it was never exposed? Or because nobody ever
> needed it, and we don't care (thus don't bother supporting it).
> 
The former. Our guest kernels will only rely on features that are
exposed, meaning that if they are not, the guest kernel will never know
it is available. 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-24 23:48   ` Glauber Costa
@ 2011-02-24 23:54     ` Steven Rostedt
  2011-02-25 13:11       ` Glauber Costa
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2011-02-24 23:54 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, linux-kernel

On Thu, 2011-02-24 at 20:48 -0300, Glauber Costa wrote:
> On Thu, 2011-02-24 at 18:24 -0500, Steven Rostedt wrote:
> > On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:
> > > We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> > > for a while now, but we're not exposing it yet, meaning nobody is using it.
> > > This simple patch takes care of that.
> > 
> > Is nobody using it because it was never exposed? Or because nobody ever
> > needed it, and we don't care (thus don't bother supporting it).
> > 
> The former. Our guest kernels will only rely on features that are
> exposed, meaning that if they are not, the guest kernel will never know
> it is available. 
> 

Might want to rephrase your change log, as to me it sounds like nobody
is using it because it is not needed. Adding the "Our guest..." from
your response to the change log will clear that up.

Thanks,

-- Steve



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-24 23:54     ` Steven Rostedt
@ 2011-02-25 13:11       ` Glauber Costa
  2011-02-27  9:29         ` Avi Kivity
  0 siblings, 1 reply; 10+ messages in thread
From: Glauber Costa @ 2011-02-25 13:11 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: kvm, linux-kernel, avi

On Thu, 2011-02-24 at 18:54 -0500, Steven Rostedt wrote:
> On Thu, 2011-02-24 at 20:48 -0300, Glauber Costa wrote:
> > On Thu, 2011-02-24 at 18:24 -0500, Steven Rostedt wrote:
> > > On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:
> > > > We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> > > > for a while now, but we're not exposing it yet, meaning nobody is using it.
> > > > This simple patch takes care of that.
> > > 
> > > Is nobody using it because it was never exposed? Or because nobody ever
> > > needed it, and we don't care (thus don't bother supporting it).
> > > 
> > The former. Our guest kernels will only rely on features that are
> > exposed, meaning that if they are not, the guest kernel will never know
> > it is available. 
> > 
> 
> Might want to rephrase your change log, as to me it sounds like nobody
> is using it because it is not needed. Adding the "Our guest..." from
> your response to the change log will clear that up.
> 
> Thanks,
I can do that, sure.

OTOH, I know avi changed changelogs for clarity a couple of times
before, so if there is no code change needed, maybe he think it is
easier to rephrase it before picking it up.

Avi?




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-25 13:11       ` Glauber Costa
@ 2011-02-27  9:29         ` Avi Kivity
  0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2011-02-27  9:29 UTC (permalink / raw)
  To: Glauber Costa; +Cc: Steven Rostedt, kvm, linux-kernel

On 02/25/2011 03:11 PM, Glauber Costa wrote:
> On Thu, 2011-02-24 at 18:54 -0500, Steven Rostedt wrote:
> >  On Thu, 2011-02-24 at 20:48 -0300, Glauber Costa wrote:
> >  >  On Thu, 2011-02-24 at 18:24 -0500, Steven Rostedt wrote:
> >  >  >  On Wed, Feb 23, 2011 at 12:44:14PM -0500, Glauber Costa wrote:
> >  >  >  >  We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> >  >  >  >  for a while now, but we're not exposing it yet, meaning nobody is using it.
> >  >  >  >  This simple patch takes care of that.
> >  >  >
> >  >  >  Is nobody using it because it was never exposed? Or because nobody ever
> >  >  >  needed it, and we don't care (thus don't bother supporting it).
> >  >  >
> >  >  The former. Our guest kernels will only rely on features that are
> >  >  exposed, meaning that if they are not, the guest kernel will never know
> >  >  it is available.
> >  >
> >
> >  Might want to rephrase your change log, as to me it sounds like nobody
> >  is using it because it is not needed. Adding the "Our guest..." from
> >  your response to the change log will clear that up.
> >
> >  Thanks,
> I can do that, sure.
>
> OTOH, I know avi changed changelogs for clarity a couple of times
> before, so if there is no code change needed, maybe he think it is
> easier to rephrase it before picking it up.
>
> Avi?
>

If that's the only change, no problem.

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-23 17:44 [PATCH] expose kvmclock upper msr set Glauber Costa
  2011-02-24 23:24 ` Steven Rostedt
@ 2011-02-27 12:16 ` Avi Kivity
  2011-02-28 13:24   ` Glauber Costa
  1 sibling, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2011-02-27 12:16 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, linux-kernel

On 02/23/2011 07:44 PM, Glauber Costa wrote:
> We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> for a while now, but we're not exposing it yet, meaning nobody is using it.
> This simple patch takes care of that.

We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf KVM_CPUID_FEATURES.

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-27 12:16 ` Avi Kivity
@ 2011-02-28 13:24   ` Glauber Costa
  2011-02-28 13:30     ` Avi Kivity
  0 siblings, 1 reply; 10+ messages in thread
From: Glauber Costa @ 2011-02-28 13:24 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, linux-kernel

On Sun, 2011-02-27 at 14:16 +0200, Avi Kivity wrote:
> On 02/23/2011 07:44 PM, Glauber Costa wrote:
> > We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> > for a while now, but we're not exposing it yet, meaning nobody is using it.
> > This simple patch takes care of that.
> 
> We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf KVM_CPUID_FEATURES.
> 
Our userspace does not really use it, and rely on the capability list.
Historically, we've been relying on the capabilities mechanism to
indicate what exists and what does not. 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-28 13:24   ` Glauber Costa
@ 2011-02-28 13:30     ` Avi Kivity
  2011-02-28 13:30       ` Avi Kivity
  0 siblings, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2011-02-28 13:30 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, linux-kernel

On 02/28/2011 03:24 PM, Glauber Costa wrote:
> On Sun, 2011-02-27 at 14:16 +0200, Avi Kivity wrote:
> >  On 02/23/2011 07:44 PM, Glauber Costa wrote:
> >  >  We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff range
> >  >  for a while now, but we're not exposing it yet, meaning nobody is using it.
> >  >  This simple patch takes care of that.
> >
> >  We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf KVM_CPUID_FEATURES.
> >
> Our userspace does not really use it, and rely on the capability list.
> Historically, we've been relying on the capabilities mechanism to
> indicate what exists and what does not.

Yes.  I believe this bit marked the change point.

Anyway, it's exposed, and it's a lot better for userspace to make use of 
KVM_GET_SUPPORTED_CPUID since it will work on more kernels.

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] expose kvmclock upper msr set.
  2011-02-28 13:30     ` Avi Kivity
@ 2011-02-28 13:30       ` Avi Kivity
  0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2011-02-28 13:30 UTC (permalink / raw)
  To: Glauber Costa; +Cc: kvm, linux-kernel

On 02/28/2011 03:30 PM, Avi Kivity wrote:
> On 02/28/2011 03:24 PM, Glauber Costa wrote:
>> On Sun, 2011-02-27 at 14:16 +0200, Avi Kivity wrote:
>> >  On 02/23/2011 07:44 PM, Glauber Costa wrote:
>> > >  We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff 
>> range
>> > >  for a while now, but we're not exposing it yet, meaning nobody 
>> is using it.
>> > >  This simple patch takes care of that.
>> >
>> >  We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf 
>> KVM_CPUID_FEATURES.
>> >
>> Our userspace does not really use it, and rely on the capability list.
>> Historically, we've been relying on the capabilities mechanism to
>> indicate what exists and what does not.
>
> Yes.  I believe this bit marked the change point.
>
> Anyway, it's exposed, and it's a lot better for userspace to make use 
> of KVM_GET_SUPPORTED_CPUID since it will work on more kernels.
>

btw, it should work with -cpu host as well, no?

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-28 13:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 17:44 [PATCH] expose kvmclock upper msr set Glauber Costa
2011-02-24 23:24 ` Steven Rostedt
2011-02-24 23:48   ` Glauber Costa
2011-02-24 23:54     ` Steven Rostedt
2011-02-25 13:11       ` Glauber Costa
2011-02-27  9:29         ` Avi Kivity
2011-02-27 12:16 ` Avi Kivity
2011-02-28 13:24   ` Glauber Costa
2011-02-28 13:30     ` Avi Kivity
2011-02-28 13:30       ` Avi Kivity

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.