Re: [PATCH v2 4/4] KVM: x86: Add VCPU substate for NMI states

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
>> ---
>>
>>  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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux