From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Luca Tettamanti <kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.org,
Uri Lublin <uril-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [BUG][PATCH?] kvm: unhandled wrmsr: 0xc0000083
Date: Mon, 13 Aug 2007 12:09:46 +0300 [thread overview]
Message-ID: <46C01FDA.9000302@qumranet.com> (raw)
In-Reply-To: <20070811212520.GA26794-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
Luca Tettamanti wrote:
> which enabled the compilation of code depending on TARGET_X86_64.
> Problems arise when the host is in 32 bit mode; Avi fixed part of the
> issue with d9ff68d1 (masking the LM bit when the host is 32 bit).
>
> The MSR issue is caused by load_regs (qemu/qemu-kvm.c); at line 304 (git
> current) you can see:
>
> #ifdef TARGET_X86_64
> set_msr_entry(&msrs[n++], MSR_CSTAR, env->cstar);
> set_msr_entry(&msrs[n++], MSR_KERNELGSBASE, env->kernelgsbase);
> set_msr_entry(&msrs[n++], MSR_FMASK, env->fmask);
> set_msr_entry(&msrs[n++], MSR_LSTAR , env->lstar);
> #endif
>
> But the kernel side part (vmx.c) cannot handle those MSRs when using a
> 32 bit kernel (hence the "unhandled wrmsr").
>
> As a side note: MSC_CSTAR (syscall target for compat mode) is supported
> *only* on AMD processors (there's no syscall on Intel in 32 bit mode);
> is it safe to use it unconditionally? (AFAICS vmx.c would do wrmsrl,
> maybe it's not documented but supported?).
>
> In order to fix this bug I hijacked "lm_capable_kernel" (introduced by
> Avi) so that {load,save}_regs don't touch 64bit-only MSRs while the host
> is in 32bit mode:
>
>
Good catch -- patch applied, thanks.
> get_msr_entry should be fine, cpu_save/cpu_load (used by savevm -
> qemu/vl.c) may need a similar fix.
>
> The patch stops the "unhandled wrmsr", but reboot is still not working
> (guest is stuck using 100% of the CPU). The last working userspace is
> KVM-28, and I tested it with recent kernel modules. Any idea on this
> one?
>
That's around the time kvm moved to its own main loop (for smp), so it's
not surprising there's breakage there. I tested erboot at the time, but
not with all guests.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-08-13 9:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 21:25 [BUG][PATCH?] kvm: unhandled wrmsr: 0xc0000083 Luca Tettamanti
[not found] ` <20070811212520.GA26794-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-08-13 9:09 ` Avi Kivity [this message]
[not found] ` <46C01FDA.9000302-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-16 17:23 ` Jindrich Makovicka
2007-08-17 12:11 ` Avi Kivity
[not found] ` <46C59079.6020308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-17 12:48 ` Jindrich Makovicka
[not found] ` <5f0e26840708170548m5e689df8g9ef633d9c9f5af16-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-19 11:23 ` Avi Kivity
[not found] ` <46C82845.3010908-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-19 11:41 ` Jindrich Makovicka
2007-08-17 20:14 ` Luca
[not found] ` <68676e00708171314r4be1840bo95f5af50df6f7dfd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-19 7:36 ` Avi Kivity
[not found] ` <46C7F2E6.4030808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-19 19:54 ` Luca Tettamanti
[not found] ` <20070819195458.GA31865-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-08-20 7:58 ` Avi Kivity
[not found] ` <46C949C1.90807-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-03 21:09 ` Luca Tettamanti
[not found] ` <20070903210949.GA19919-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-09-09 12:51 ` Avi Kivity
[not found] ` <46E3EC48.60004-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-09 17:07 ` Luca Tettamanti
[not found] ` <20070909170718.GA8918-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org>
2007-09-09 17:13 ` 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=46C01FDA.9000302@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.org \
--cc=uril-atKUWr5tajBWk0Htik3J/w@public.gmane.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