qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@gmail.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel@nongnu.org, Glauber Costa <glommer@redhat.com>,
	avi@redhat.com, kvm@vger.kernel.org, aliguori@us.ibm.com
Subject: [Qemu-devel] Re: [PATCH] return default values for apic probe functions.
Date: Fri, 17 Apr 2009 10:40:23 -0300	[thread overview]
Message-ID: <5d6222a80904170640p7c50950fla5ebb65e0b1db138@mail.gmail.com> (raw)
In-Reply-To: <5d6222a80904170622g1977ec37s8872800a12bfafbe@mail.gmail.com>

On Fri, Apr 17, 2009 at 10:22 AM, Glauber Costa <glommer@gmail.com> 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, but 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
>
>   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?

-- 
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."

  reply	other threads:[~2009-04-17 13:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  5:15 [Qemu-devel] [PATCH] return default values for apic probe functions Glauber Costa
2009-04-17  6:56 ` [Qemu-devel] " Jan Kiszka
2009-04-17 13:22   ` Glauber Costa
2009-04-17 13:40     ` Glauber Costa [this message]
2009-04-17 14:15       ` Jan Kiszka
2009-04-17 13:53 ` Marcelo Tosatti
2009-04-17 13:59   ` Glauber Costa
2009-04-17 14:18     ` Marcelo Tosatti
2009-04-19  8:45 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d6222a80904170640p7c50950fla5ebb65e0b1db138@mail.gmail.com \
    --to=glommer@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).