From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] fill cpuid with clocksource information Date: Sun, 20 Jan 2008 17:41:02 +0200 Message-ID: <47936B8E.8030708@qumranet.com> References: <12004098521016-git-send-email-gcosta@redhat.com> <12004098602108-git-send-email-gcosta@redhat.com> <1200409866869-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, jeremy-TSDbQ3PG+2Y@public.gmane.org To: Glauber de Oliveira Costa Return-path: In-Reply-To: <1200409866869-git-send-email-gcosta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Glauber de Oliveira Costa wrote: > In this patch, we probe the host checking for clocksource capabilities. > In case it is found, it is advertised to the guest through the appropriate > cpuid mechanism > > Signed-off-by: Glauber de Oliveira Costa > --- > qemu/qemu-kvm-x86.c | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c > index 21ec112..6b11f02 100644 > --- a/qemu/qemu-kvm-x86.c > +++ b/qemu/qemu-kvm-x86.c > @@ -517,6 +517,11 @@ int kvm_arch_qemu_init_env(CPUState *cenv) > int cpuid_nent = 0; > CPUState copy; > uint32_t i, limit; > + int clocksource_feature = 0; > +#ifdef KVM_CAP_CLOCKSOURCE > + clocksource_feature = kvm_check_extension(kvm_context, KVM_CAP_CLOCKSOURCE); > + clocksource_feature <<= KVM_FEATURE_CLOCKSOURCE; > +#endif > There is no reason to be tricky here. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/