From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 3/8] KVM: mark apic enabled on start up. Date: Sun, 5 Aug 2012 17:43:12 +0300 Message-ID: <20120805144312.GQ27579@redhat.com> References: <1344171513-4659-1-git-send-email-gleb@redhat.com> <1344171513-4659-4-git-send-email-gleb@redhat.com> <501E7FE3.3010405@redhat.com> <20120805141713.GO27579@redhat.com> <501E85A5.9050108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14237 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754459Ab2HEOnN (ORCPT ); Sun, 5 Aug 2012 10:43:13 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q75EhDjT016662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 5 Aug 2012 10:43:13 -0400 Content-Disposition: inline In-Reply-To: <501E85A5.9050108@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Aug 05, 2012 at 05:39:33PM +0300, Avi Kivity wrote: > On 08/05/2012 05:17 PM, Gleb Natapov wrote: > > On Sun, Aug 05, 2012 at 05:14:59PM +0300, Avi Kivity wrote: > >> On 08/05/2012 03:58 PM, Gleb Natapov wrote: > >> > According to SDM apic is enabled on start up. > >> > > >> > Signed-off-by: Gleb Natapov > >> > --- > >> > arch/x86/kvm/lapic.c | 3 ++- > >> > 1 file changed, 2 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > >> > index 49f4ac0..c3f14fe 100644 > >> > --- a/arch/x86/kvm/lapic.c > >> > +++ b/arch/x86/kvm/lapic.c > >> > @@ -1311,7 +1311,8 @@ int kvm_create_lapic(struct kvm_vcpu *vcpu) > >> > HRTIMER_MODE_ABS); > >> > apic->lapic_timer.timer.function = apic_timer_fn; > >> > > >> > - kvm_lapic_set_base(vcpu, APIC_DEFAULT_PHYS_BASE); > >> > + kvm_lapic_set_base(vcpu, > >> > + APIC_DEFAULT_PHYS_BASE | MSR_IA32_APICBASE_ENABLE); > >> > > >> > >> I'm guessing that in practice this is a no-op since qemu reset involves > >> programming this MSR. > >> > > Qemu is not the only userspace :) But this is here to avoid unneeded > > jump label patching truth to be told. > > It's also correct, otherwise it wouldn't be here. > Of course. > But won't the patching happen anyway? since it starts software disabled? > Yes, but different label, so less patching. -- Gleb.