login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
27
Re: [PATCH 4/6] export new cpuid KVM_CAP
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Marcelo Tosatti
Subject:
Re: [PATCH 4/6] export new cpuid KVM_CAP
Date: Tuesday, April 27, 2010 - 6:30 am
On Mon, Apr 26, 2010 at 01:46:26PM -0400, Glauber Costa wrote:
quoted text
> Since we're changing the msrs kvmclock uses, we have to communicate > that to the guest, through cpuid. We can add a new KVM_CAP to the > hypervisor, and then patch userspace to recognize it. > > And if we ever add a new cpuid bit in the future, we have to do that again, > which create some complexity and delay in feature adoption. > > Instead, what I'm proposing in this patch is a new capability, called > KVM_CAP_X86_CPUID_FEATURE_LIST, that returns the current feature list > currently supported by the hypervisor. If we ever want to add or remove > some feature, we only need to tweak into the HV, leaving userspace untouched. > > Signed-off-by: Glauber Costa <glommer@redhat.com> > --- > arch/x86/include/asm/kvm_para.h | 4 ++++ > arch/x86/kvm/x86.c | 6 ++++++ > include/linux/kvm.h | 1 + > 3 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h > index 9734808..f019f8c 100644 > --- a/arch/x86/include/asm/kvm_para.h > +++ b/arch/x86/include/asm/kvm_para.h > @@ -16,6 +16,10 @@ > #define KVM_FEATURE_CLOCKSOURCE 0 > #define KVM_FEATURE_NOP_IO_DELAY 1 > #define KVM_FEATURE_MMU_OP 2 > +/* This indicates that the new set of kvmclock msrs > + * are available. The use of 0x11 and 0x12 is deprecated > + */ > +#define KVM_FEATURE_CLOCKSOURCE2 3 > > #define MSR_KVM_WALL_CLOCK 0x11 > #define MSR_KVM_SYSTEM_TIME 0x12 > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index a2ead7f..04f04aa 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -1545,6 +1545,12 @@ int kvm_dev_ioctl_check_extension(long ext) > case KVM_CAP_MCE: > r = KVM_MAX_MCE_BANKS; > break; > + case KVM_CAP_X86_CPUID_FEATURE_LIST: > + r = (1 << KVM_FEATURE_CLOCKSOURCE) | > + (1 << KVM_FEATURE_NOP_IO_DELAY) | > + (1 << KVM_FEATURE_MMU_OP) |
Remove this flag, it has been deprecated.
quoted text
> + (1 << KVM_FEATURE_CLOCKSOURCE2); > + break; > default:
Also missing qemu-kvm/qemu patches. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/6] pvclock fixes
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 1/6] Enable pvclock flags in vcpu_time_info structure
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 2/6] Add a global synchronization point for pvclock
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 3/6] change msr numbers for kvmclock
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 4/6] export new cpuid KVM_CAP
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 5/6] Try using new kvm clock msrs
, Glauber Costa
, (Mon Apr 26, 10:46 am)
[PATCH 6/6] don't compute pvclock adjustments if we trust ...
, Glauber Costa
, (Mon Apr 26, 10:46 am)
Re: [PATCH 1/6] Enable pvclock flags in vcpu_time_info str ...
, Jeremy Fitzhardinge
, (Mon Apr 26, 11:11 am)
Re: [PATCH 0/6] pvclock fixes
, Zachary Amsden
, (Mon Apr 26, 7:21 pm)
Re: [PATCH 2/6] Add a global synchronization point for pvclock
, Marcelo Tosatti
, (Tue Apr 27, 6:28 am)
Re: [PATCH 4/6] export new cpuid KVM_CAP
, Marcelo Tosatti
, (Tue Apr 27, 6:30 am)
Re: [PATCH 5/6] Try using new kvm clock msrs
, Marcelo Tosatti
, (Tue Apr 27, 6:35 am)
Re: [PATCH 6/6] don't compute pvclock adjustments if we tr ...
, Marcelo Tosatti
, (Tue Apr 27, 6:40 am)
Re: [PATCH 6/6] don't compute pvclock adjustments if we tr ...
, Glauber Costa
, (Tue Apr 27, 8:11 am)
Re: [PATCH 4/6] export new cpuid KVM_CAP
, Glauber Costa
, (Tue Apr 27, 9:55 am)
Re: [PATCH 2/6] Add a global synchronization point for pvclock
, Jeremy Fitzhardinge
, (Tue Apr 27, 11:00 am)
Re: [PATCH 1/6] Enable pvclock flags in vcpu_time_info str ...
, Avi Kivity
, (Tue Apr 27, 11:07 am)
Re: [PATCH 4/6] export new cpuid KVM_CAP
, Avi Kivity
, (Tue Apr 27, 11:12 am)
Re: [PATCH 6/6] don't compute pvclock adjustments if we tr ...
, Glauber Costa
, (Tue Apr 27, 11:57 am)
Re: [PATCH 4/6] export new cpuid KVM_CAP
, Glauber Costa
, (Tue Apr 27, 12:09 pm)
Re: [PATCH 1/6] Enable pvclock flags in vcpu_time_info str ...
, Glauber Costa
, (Tue Apr 27, 12:09 pm)
Re: [PATCH 4/6] export new cpuid KVM_CAP
, Avi Kivity
, (Tue Apr 27, 12:20 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate