public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] KVM: x86: Add VCPU substate for NMI states
Date: Tue, 20 Oct 2009 10:52:56 +0200	[thread overview]
Message-ID: <4ADD7A68.1010804@siemens.com> (raw)
In-Reply-To: <20091019203254.GD17781@amt.cnet>

Marcelo Tosatti wrote:
> 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.
> 

Something made me think it's not required. Don't ask me what, it was
wrong anyway. Will roll out -v3 for this patch.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  parent reply	other threads:[~2009-10-20  8:53 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 4/4] KVM: x86: Add VCPU substate for NMI states Jan Kiszka
2009-10-19 20:32   ` Marcelo Tosatti
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 [this message]
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 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=4ADD7A68.1010804@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.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