Skip to contentSkip to conversation

expose kvmclock upper msr set.

PATCH In review Glauber Costa 3 participants 10 messages Feb 23, 2011 – Feb 28, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 expose kvmclock upper msr set.

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.

---
 arch/x86/kvm/x86.c  |    1 +
 include/linux/kvm.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kvm/x86.c +1 -0
index 8575d85..c0808db 100644
@@ -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:
include/linux/kvm.h +1 -0
index ea2dc1a..a15d2e8 100644
@@ -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
 
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 3 lines · Glauber Costa

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

#2 lore raw
Quoted 8 lines · Steven Rostedt
Quoted 3 lines · Glauber Costa

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.

#3 lore raw
Quoted 6 lines · Glauber Costa
Quoted 5 lines · Steven Rostedt
Quoted 3 lines · Glauber Costa

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.

Quoted 7 lines
Quoted 3 lines

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

#4 lore raw
Quoted 15 lines · Steven Rostedt
Quoted 6 lines · Glauber Costa
Quoted 5 lines · Steven Rostedt
Quoted 3 lines · Glauber Costa

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.

Quoted 7 lines
Quoted 3 lines

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.

Quoted 5 lines

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?

#5 lore raw
Quoted 20 lines · Glauber Costa
Quoted 19 lines · Steven Rostedt
Quoted 6 lines · Glauber Costa
Quoted 5 lines · Steven Rostedt
Quoted 3 lines · Glauber Costa

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.

Quoted 7 lines
Quoted 3 lines

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.

Quoted 9 lines
Quoted 1 line

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.

Signature · 1 line
error compiling committee.c: too many arguments to function
#6 lore raw
In reply to Glauber Costa
Quoted 3 lines · Glauber Costa

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.

Signature · 1 line
error compiling committee.c: too many arguments to function
#7 lore raw
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Glauber Costa

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.

#8 lore raw
Quoted 11 lines · Glauber Costa
Quoted 7 lines · Avi Kivity
Quoted 3 lines · Glauber Costa

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.

Signature · 1 line
error compiling committee.c: too many arguments to function
#9 lore raw
Quoted 12 lines · Avi Kivity
Quoted 11 lines · Glauber Costa
Quoted 2 lines · Avi Kivity
Quoted 1 line · Glauber Costa

We've been supporting kvmclock MSRs in the 0x4b564d00-0x4b564dff

range

Quoted 1 line
Quoted 1 line

for a while now, but we're not exposing it yet, meaning nobody

is using it.

Quoted 3 lines
Quoted 1 line

This simple patch takes care of that.

We're exposing them via KVM_GET_SUPPORTED_CPUID, leaf

KVM_CPUID_FEATURES.

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

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?

Signature · 1 line
error compiling committee.c: too many arguments to function