From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Dong, Eddie" <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: MSR virtualization
Date: Wed, 08 Aug 2007 17:13:17 +0300 [thread overview]
Message-ID: <46B9CF7D.1070008@qumranet.com> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01E45F0A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
Dong, Eddie wrote:
> Avi:
> We (Yunfeng) encountered some warning from KVM in certain
> situation like:
> "kvm: 9612: cpu0 unhandled wrmsr: 0xc1"
> Further check find that we are doing MSR write virtualization
> per a predefined whitelist and give gp fault for others. On the other
> hand, Xen just silently return (no gp fault). We may not implement
> policy for all MSRs, but not sure if injecting gp fault for them will
> cause problem.
>
Silently returning is IMO problematic. If a guest depends on the
correct behavior of some msr, and we mis-emulate it by ignoring it, then
we get a guest failure with no message in the kernel to point us in the
right direction.
In the case of 0xc1, this is the performance counter, likely used for
the nmi watchdog. If we ignore it, the guest kernel will just report a
soft lockup and hang. So there are only two realistic options left:
- printk() and ignore - that is a mis-emulation of writes to msrs that
are supposed to #gp
- printk() and #gp - that is a mis-emulation of writes to msrs that must
be handled. But there are fewer of these than msrs that need to #gp.
So I think the current behavior is best. Unhandled msrs are rare, we
just need to implement them when they happen.
-------------------------------------------------------------------------
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/
prev parent reply other threads:[~2007-08-08 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 9:50 MSR virtualization Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01E45F0A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-08 14:13 ` Avi Kivity [this message]
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=46B9CF7D.1070008@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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