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: <20200921145320.2b2ipdj6w4morjc3@google.com>
Date:   Mon, 21 Sep 2020 15:53:20 +0100
From:   David Brazdil <dbrazdil@...gle.com>
To:     Will Deacon <will@...nel.org>
Cc:     kvmarm@...ts.cs.columbia.edu,
        Catalin Marinas <catalin.marinas@....com>,
        Marc Zyngier <maz@...nel.org>,
        James Morse <james.morse@....com>,
        Julien Thierry <julien.thierry.kdev@...il.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
        Christoph Lameter <cl@...ux.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel-team@...roid.com, Andrew Scull <ascull@...gle.com>
Subject: Re: [PATCH v3 05/11] kvm: arm64: Remove hyp_adr/ldr_this_cpu

Hi Will,

> Cosmetic, but I think it would be cleaner just to define two variants of the
> macro here:
> 
> #if defined(__KVM_NVHE_HYPERVISOR__) || defined(__KVM_VHE_HYPERVISOR__)
> 	.macro  this_cpu_offset, dst
> 	mrs     \dst, tpidr_el2
> 	.endm
> #else
> 	.macro  this_cpu_offset, dst
> alternative_if_not ARM64_HAS_VIRT_HOST_EXTN
> 	mrs     \dst, tpidr_el1
> alternative_else
> 	mrs     \dst, tpidr_el2
> alternative_endif
> 	.endm
> #endif

Sure.

> (and should we have a shorthand __HYPERVISOR define to avoid the NVHE || VHE
> logic?)

Happy to add this but let's agree on the details.
 * name: just __HYPERVISOR or __KVM_HYPERVISOR__?
 * defined where? I'm wary of defining it in a header file because then sombody
   will forget to add it and 'ifdef HYP' will be skipped. So I'd put this as
   another '-D__HYPERVISOR' in the build rules. Do you agree?

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ