From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuoIr-00084C-JB for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:40:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuoIr-00083l-2Z for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:40:25 -0400 Received: from [199.232.76.173] (port=43391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuoIq-00083h-VN for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:40:24 -0400 Received: from qw-out-1920.google.com ([74.125.92.148]:55958) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuoIq-0006tf-GZ for qemu-devel@nongnu.org; Fri, 17 Apr 2009 09:40:24 -0400 Received: by qw-out-1920.google.com with SMTP id 5so704453qwf.4 for ; Fri, 17 Apr 2009 06:40:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5d6222a80904170622g1977ec37s8872800a12bfafbe@mail.gmail.com> References: <1239945321-3903-1-git-send-email-glommer@redhat.com> <49E82825.602@web.de> <5d6222a80904170622g1977ec37s8872800a12bfafbe@mail.gmail.com> Date: Fri, 17 Apr 2009 10:40:23 -0300 Message-ID: <5d6222a80904170640p7c50950fla5ebb65e0b1db138@mail.gmail.com> From: Glauber Costa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] return default values for apic probe functions. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel@nongnu.org, Glauber Costa , avi@redhat.com, kvm@vger.kernel.org, aliguori@us.ibm.com On Fri, Apr 17, 2009 at 10:22 AM, Glauber Costa wrote: >> Even on sunny days, this collides with QEMU commit #7048. :) >> >> Does Intel specify what non-existent MSRs should return, ie. is your >> version still correct if !s->apicbase means that there is actually no >> APIC? And does kvm depend on the default base? If so, I would say: >> provide a patch against upstream. > > hummm, I missed this one going in. > But sadly, your patch also breaks cpu hotplug. Not a segfault anymore, bu= t the > VM will freeze instead of shutting down, if we ask too. It does not even = respond > to ^C anymore. > > By leaving your patch as is, and changing the apic base return to > > =C2=A0 return s ? s->apicbase : (0xfee00000 | MSR_IA32_APICBASE_ENABLE); > > fixes the issue. > After reading the manual, my understanding is that only the flag must be set. I tried, and in fact: return s ? s->apicbase : MSR_IA32_APICBASE_ENABLE; still fixes it. If it works for you, I believe this is a good solution, and will send a descriptive patch. If we ever read the apic as disabled, we will have problems enabling it again. So for my test case, kvm should never see a disabled apic. For yours, you'll still see the apic base address as zero. what do you think? --=20 Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."