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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ee9fe58-73ca-98fd-3d79-198e1093f722@redhat.com>
Date:   Thu, 18 Nov 2021 12:11:02 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Maxim Levitsky <mlevitsk@...hat.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     stable@...r.kernel.org, Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH v2] KVM: x86: check PIR even for vCPUs with disabled APICv

On 11/18/21 10:56, Maxim Levitsky wrote:
> vmx_sync_pir_to_irr has 'if (KVM_BUG_ON(!vcpu->arch.apicv_active,
> vcpu->kvm))' That has to be removed I think for this to work.

Good point.

> Plus the above calls now can happen when APICv is fully disabled (and
> not just inhibited), which is also something that I think that
> vmx_sync_pir_to_irr should be fixed to be aware of.

No, that works because sync_pir_to_irr is set to NULL as you point out 
below.  static_call sites are updated right after ops->hardware_setup(), 
in kvm_arch_hardware_setup.

Paolo

> Also note that VMX has code that sets vmx_x86_ops.sync_pir_to_irr to
> NULL in its 'hardware_setup' if APICv is disabled. I wonder if that
> done befor or after the static_call_cond sites are updated.
> 
> I think that this code should be removed as well, and
> vmx_sync_pir_to_irr should just do nothing when APICv is fully
> disabled.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ