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]
Message-ID: <b3da88d7-709b-3228-cf3b-3694fd00a97d@redhat.com>
Date:   Wed, 14 Dec 2016 23:29:33 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Denis Plotnikov <dplotnikov@...tuozzo.com>, rkagan@...tuozzo.com,
        den@...tuozzo.com, rkrcmar@...hat.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] KVM: x86: avoid redundant REQ_EVENT



On 14/12/2016 11:59, Denis Plotnikov wrote:
>  
>  	if ((exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT)
>  	    && nested_exit_intr_ack_set(vcpu)) {
> -		int irq = kvm_cpu_get_interrupt(vcpu);
> +		int irq = kvm_cpu_get_interrupt(vcpu, true);
>  		WARN_ON(irq < 0);

I think this is not needed, because all nested vmexits end with a KVM_REQ_EVENT:

        /*
         * the KVM_REQ_EVENT optimization bit is only on for one entry, and if
         * we did not inject a still-pending event to L1 now because of
         * nested_run_pending, we need to re-enable this bit.
         */
        if (vmx->nested.nested_run_pending)
                kvm_make_request(KVM_REQ_EVENT, vcpu);

This would allow you to always pass false from kvm_cpu_get_interrupt to
kvm_get_apic_interrupt.  Not sure if the additional complication in vmx.c
is worth the simplification in lapic.c.  Radim, second opinion? :)

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ