kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 4/4] KVM: x86: Add VCPU substate for NMI states
Date: Thu, 15 Oct 2009 17:09:26 +0900	[thread overview]
Message-ID: <4AD6D8B6.3050003@redhat.com> (raw)
In-Reply-To: <20091013160648.27006.29041.stgit@mchn012c.ww002.siemens.net>

On 10/14/2009 01:06 AM, 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.
>
>
> +struct kvm_nmi_state {
> +       __u8 pending;
> +       __u8 masked;
> +       __u8 pad1[2];
> +};
>    

Best to be conservative and use 64-bit alignment.  Who knows what we 
might put after this someday.
> @@ -513,6 +513,8 @@ struct kvm_x86_ops {
>   				unsigned char *hypercall_addr);
>   	void (*set_irq)(struct kvm_vcpu *vcpu);
>   	void (*set_nmi)(struct kvm_vcpu *vcpu);
> +	int (*get_nmi_mask)(struct kvm_vcpu *vcpu);
> +	void (*set_nmi_mask)(struct kvm_vcpu *vcpu, int masked);
>    

Prefer bool for booleans, please.

Needs a KVM_CAP as well.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-10-15  8:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13 16:06 [PATCH 0/4] Extensible VCPU state IOCTL Jan Kiszka
2009-10-13 16:06 ` [PATCH 4/4] KVM: x86: Add VCPU substate for NMI states Jan Kiszka
2009-10-15  8:09   ` Avi Kivity [this message]
2009-10-15  9:22     ` Jan Kiszka
2009-10-15  9:29       ` Avi Kivity
2009-10-15 11:27         ` Jan Kiszka
2009-10-25 13:11           ` Avi Kivity
2009-10-26  7:40             ` Jan Kiszka
2009-10-13 16:06 ` [PATCH 3/4] KVM: x86: Add support for KVM_GET/SET_VCPU_STATE Jan Kiszka
2009-10-13 16:06 ` [PATCH 1/4] KVM: Reorder IOCTLs in main kvm.h Jan Kiszka
2009-10-13 16:06 ` [PATCH 2/4] KVM: Add unified KVM_GET/SET_VCPU_STATE IOCTL Jan Kiszka
2009-10-15  8:00   ` Avi Kivity
2009-10-15  9:22     ` Jan Kiszka
2009-10-15  9:33       ` Avi Kivity
2009-10-15  8:07   ` Avi Kivity
2009-10-15  9:22     ` Jan Kiszka
2009-10-15  8:11   ` Avi Kivity
2009-10-15  9:22     ` Jan Kiszka
2009-10-15 14:54     ` Glauber Costa
2009-10-15 15:57     ` Glauber Costa
2009-10-15 16:06       ` Jan Kiszka
2009-10-15 16:23         ` Glauber Costa
2009-10-13 16:18 ` [RFC][PATCH] kvm: x86: Add support for KVM_GET/PUT_VCPU_STATE Jan Kiszka
2009-10-14  8:52 ` [PATCH] qemu-kvm: x86: Add support for NMI states 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=4AD6D8B6.3050003@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).