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:22:14 -0300 [thread overview]
Message-ID: <5d6222a80904170622g1977ec37s8872800a12bfafbe@mail.gmail.com> (raw)
In-Reply-To: <49E82825.602@web.de>
> 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.
I'm not sure about what the manual says (will check now), but I
believe if we ever try to
read from apic, we should return a meaningful value. Can you verify if
this also works for your
test case?
>
>>
>> void cpu_set_apic_tpr(CPUX86State *env, uint8_t val)
>> @@ -314,7 +319,10 @@ void cpu_set_apic_tpr(CPUX86State *env, uint8_t val)
>> uint8_t cpu_get_apic_tpr(CPUX86State *env)
>> {
>> APICState *s = env->apic_state;
>> - return s->tpr >> 4;
>> + if (s)
>> + return s->tpr >> 4;
>> + else
>> + return 0;
>> }
>>
>> /* return -1 if no bit is set */
>
> This is already upstream.
Yeah, and the rest of your patch is totally ok for me.
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
next prev parent reply other threads:[~2009-04-17 13:22 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 [this message]
2009-04-17 13:40 ` Glauber Costa
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=5d6222a80904170622g1977ec37s8872800a12bfafbe@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).