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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d947359d-0eb8-1e6f-ef53-54bcec0410c7@redhat.com>
Date:   Sat, 2 Nov 2019 10:51:15 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Cc:     "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "rkagan@...tuozzo.com" <rkagan@...tuozzo.com>,
        "graf@...zon.com" <graf@...zon.com>,
        "jschoenh@...zon.de" <jschoenh@...zon.de>,
        "karahmed@...zon.de" <karahmed@...zon.de>,
        "rimasluk@...zon.com" <rimasluk@...zon.com>,
        "Grimm, Jon" <Jon.Grimm@....com>
Subject: Re: [PATCH v4 03/17] kvm: x86: Introduce APICv deactivate bits

On 01/11/19 23:41, Suthikulpanit, Suravee wrote:
> +	unsigned long apicv_deact_msk;

No abbrev fld names. :)  I can change this to something like
apicv_inhibit_reasons if there are no other issues (and likewise
s/APICV_DEACT_BIT_/APICV_INHIBIT_REASON_/).

> 
> +bool kvm_apicv_activated(struct kvm *kvm)
> +{
> +	return (READ_ONCE(kvm->arch.apicv_deact_msk) == 0);
> +}

Using READ_ONCE introduces a risk of races.  I'll check during a more
thorough review if it's worth introducing separate kvm_apicv_active and
kvm_apicv_active_nolock functions.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ