From: Gleb Natapov <gleb@redhat.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
Jan Kiszka <jan.kiszka@web.de>
Subject: Re: IA32_FEATURE_CONTROL MSR in nested virt
Date: Wed, 3 Jul 2013 12:14:46 +0300 [thread overview]
Message-ID: <20130703091446.GH18508@redhat.com> (raw)
In-Reply-To: <CABpY8MLoUkJ02FLtz+_WXFrt528-TYe5RV52Wk2avGB4QT4n0w@mail.gmail.com>
On Wed, Jul 03, 2013 at 04:24:33PM +0800, Arthur Chunqi Li wrote:
> Hi Gleb and Paolo,
> When I write test cases for nested virt and found that reading/writing
> IA32_FEATURE_CONTROL will be simply ignored or return 0 (in
> arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some
> hypervisors (e.g. NOVA) and may cause error then, so it is necessary
> to behave right when read/write it in VM.
>
NOVA cannot write to it and expect anything but #GP since BIOSes usually
lock the MSR. So I agree with Paolo about returning 5 on read and #GP on
write. Later we can implement locking functionality and make BIOS
enable/disable nested vmx.
> Are there any difficulties to handle this MSR? I have two solutions.
> The first one is return the value of physical CPU's and always return
> true when write. This is simple but may behave as if it is a VM
> because write to it after VMXON will not return GP exception. This
> solution can solve most basic problems since this MSR is not commonly
> used. Another solution is adding a field in VCPU to handle this MSR.
> This is a complex but better method.
>
> I think I can complete this if needed.
>
> Thanks,
> Arthur
>
> --
> Arthur Chunqi Li
> Department of Computer Science
> School of EECS
> Peking University
> Beijing, China
--
Gleb.
next prev parent reply other threads:[~2013-07-03 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 8:24 IA32_FEATURE_CONTROL MSR in nested virt Arthur Chunqi Li
2013-07-03 8:32 ` Paolo Bonzini
2013-07-03 8:46 ` Zhang, Yang Z
2013-07-03 8:58 ` Paolo Bonzini
2013-07-03 9:14 ` Gleb Natapov [this message]
2013-07-03 9:32 ` Gmail
2013-07-03 14:48 ` Bandan Das
2013-07-03 14:59 ` Gleb Natapov
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=20130703091446.GH18508@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yzt356@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.