All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Gleb Natapov <gleb@kernel.org>, kvm <kvm@vger.kernel.org>
Subject: Re: [RFC][PATCH] KVM: nVMX: Leave VMX mode on apparent CPU reset
Date: Tue, 17 Dec 2013 14:25:26 +0100	[thread overview]
Message-ID: <52B050C6.5090407@redhat.com> (raw)
In-Reply-To: <52AEC8B2.7010602@siemens.com>

Il 16/12/2013 10:32, Jan Kiszka ha scritto:
> As long as we do not expose all the VMX related states to user space,
> there is no way to properly reset a VCPU when VMX is enabled. Emulate
> this for now by catching host-side clearings of the feature control MSR.
> This allows to reboot a VM while it is running some hypervisor code.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Better ideas? Or continue to leave it as it is?

The final vmx_vcpu_reset is the only really ugly part, but it is
_really_ ugly...  Can you modify QEMU to restore MSRs first, and reduce
vmx_reset_nested to just

	if (is_guest_mode(vcpu))
		nested_vmx_vmexit(vcpu);

	free_nested(vmx);

?

Paolo

  reply	other threads:[~2013-12-17 13:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16  9:32 [RFC][PATCH] KVM: nVMX: Leave VMX mode on apparent CPU reset Jan Kiszka
2013-12-17 13:25 ` Paolo Bonzini [this message]
2013-12-17 14:40   ` Jan Kiszka
2013-12-17 14:43     ` Paolo Bonzini
2013-12-30 20:02 ` Marcelo Tosatti
2013-12-30 20:05   ` Marcelo Tosatti
2013-12-30 20:02 ` Marcelo Tosatti

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=52B050C6.5090407@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.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 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.