lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 22 Sep 2016 12:04:30 +0200
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Wanpeng Li <kernellwp@...il.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>, Wanpeng Li <wanpeng.li@...mail.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Bandan Das <bsd@...hat.com>
Subject: Re: [PATCH] KVM: nVMX: Fix the NMI IDT-vectoring info handling

On 2016-09-22 11:45, Wanpeng Li wrote:
> 2016-09-22 17:37 GMT+08:00 Paolo Bonzini <pbonzini@...hat.com>:
>>
>>
>> On 22/09/2016 05:34, Wanpeng Li wrote:
>>> -     if (vmx->rmode.vm86_active) {
>>> -             if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE)
>>> -                     kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
>>> -             return;
>>> +             ++vcpu->stat.nmi_injections;
>>> +             vmx->nmi_known_unmasked = false;
>>> +             if (vmx->rmode.vm86_active) {
>>> +                     if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE)
>>> +                             kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
>>> +                     return;
>>> +             }
>>>       }
>>>       vmcs_write32(VM_ENTRY_INTR_INFO_FIELD,
>>>                       INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR);
>>
>> Hi,
>>
>> the patch is mostly okay but the "if (vmx->rmode.vm86_active)" part
>> should be done also if the VCPU is in guest mode.  See
>> vmx_queue_exception for a similar example.
> 
> Thanks for pointing out. :)
> 
>>
>> I would like to know which processors lack virtual NMI support.  I'd
>> rather rip that code out...
> 
> At least the Sandy Bridge server on my hand supports Virtual NMIs, I
> don't have machine older than this.

IIRC, my last-but-one notebook was lacking vNMI, and that was a Core 2
Duo. Maybe there are embedded product out there relying on this
emulation, but I don't have any evidence.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ