From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2 4/4] KVM: x86: Add VCPU substate for NMI states
Date: Mon, 19 Oct 2009 18:32:54 -0200 [thread overview]
Message-ID: <20091019203254.GD17781@amt.cnet> (raw)
In-Reply-To: <20091015170536.5076.56790.stgit@mchn012c.ww002.siemens.net>
On Thu, Oct 15, 2009 at 07:05:36PM +0200, Jan Kiszka wrote:
> This plugs an NMI-related hole in the VCPU synchronization between
> kernel and user space. So far, neither pending NMIs nor the inhibit NMI
> mask was properly read/set which was able to cause problems on
> vmsave/restore, live migration and system reset. Fix it by making use
> of the new VCPU substate interface.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Documentation/kvm/api.txt | 12 ++++++++++++
> arch/x86/include/asm/kvm.h | 7 +++++++
> arch/x86/include/asm/kvm_host.h | 2 ++
> arch/x86/kvm/svm.c | 22 ++++++++++++++++++++++
> arch/x86/kvm/vmx.c | 30 ++++++++++++++++++++++++++++++
> arch/x86/kvm/x86.c | 26 ++++++++++++++++++++++++++
> 6 files changed, 99 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
> index bee5bbd..e483edb 100644
> --- a/Documentation/kvm/api.txt
> +++ b/Documentation/kvm/api.txt
> @@ -848,3 +848,15 @@ Deprecates: KVM_GET/SET_CPUID2
> Architectures: x86
> Payload: struct kvm_lapic
> Deprecates: KVM_GET/SET_LAPIC
> +
> +6.8 KVM_X86_VCPU_STATE_NMI
> +
> +Architectures: x86
> +Payload: struct kvm_nmi_state
> +Deprecates: -
> +
> +struct kvm_nmi_state {
> + __u8 pending;
> + __u8 masked;
> + __u8 pad1[6];
Don't you also have to save "nmi_injected", in case of failure during
NMI delivery.
BTW, what happens to exceptions that fail to be delivered? Can't see
where they are saved/restored across migration.
next prev parent reply other threads:[~2009-10-19 20:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 17:05 [PATCH v2 0/4] Extensible VCPU state IOCTL Jan Kiszka
2009-10-15 17:05 ` [PATCH v2 1/4] KVM: Reorder IOCTLs in main kvm.h Jan Kiszka
2009-10-15 17:05 ` [PATCH v2 3/4] KVM: x86: Add support for KVM_GET/SET_VCPU_STATE Jan Kiszka
2009-10-15 17:05 ` [PATCH v2 4/4] KVM: x86: Add VCPU substate for NMI states Jan Kiszka
2009-10-19 20:32 ` Marcelo Tosatti [this message]
2009-10-19 20:39 ` Gleb Natapov
2009-10-19 23:34 ` Avi Kivity
2009-10-20 8:56 ` Jan Kiszka
2009-10-20 9:06 ` Avi Kivity
2009-10-20 9:08 ` Gleb Natapov
2009-10-20 9:14 ` Avi Kivity
2009-10-20 11:13 ` Marcelo Tosatti
2009-10-20 12:44 ` Gleb Natapov
2009-10-20 8:52 ` Jan Kiszka
2009-10-15 17:05 ` [PATCH v2 2/4] KVM: Add unified KVM_GET/SET_VCPU_STATE IOCTL Jan Kiszka
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=20091019203254.GD17781@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox