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: <20200421090704.gypbtaiplde7ebbq@debian>
Date:   Tue, 21 Apr 2020 10:07:04 +0100
From:   Wei Liu <wei.liu@...nel.org>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        wei.liu@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, x86@...nel.org, hpa@...or.com,
        linux-kernel@...r.kernel.org, linux-hyperv@...r.kernel.org
Subject: Re: [PATCH 1/1] Drivers: hv: Move AEOI determination to architecture
 dependent code

On Mon, Apr 20, 2020 at 09:49:26AM -0700, Michael Kelley wrote:
> Hyper-V on ARM64 doesn't provide a flag for the AEOI recommendation
> in ms_hyperv.hints, so having the test in architecture independent
> code doesn't work. Resolve this by moving the check of the flag
> to an architecture dependent helper function. No functionality is
> changed.
> 
> Signed-off-by: Michael Kelley <mikelley@...rosoft.com>

Applied to hyperv-fixes. Thanks.

> ---
>  arch/x86/include/asm/mshyperv.h | 2 ++
>  drivers/hv/hv.c                 | 6 +-----
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 1c42ecbe75cb..d30805ed323e 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -35,6 +35,8 @@ typedef int (*hyperv_fill_flush_list_func)(
>  	rdmsrl(HV_X64_MSR_SINT0 + int_num, val)
>  #define hv_set_synint_state(int_num, val) \
>  	wrmsrl(HV_X64_MSR_SINT0 + int_num, val)
> +#define hv_recommend_using_aeoi() \
> +	(!(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED))
>  
>  #define hv_get_crash_ctl(val) \
>  	rdmsrl(HV_X64_MSR_CRASH_CTL, val)
> diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
> index 6098e0cbdb4b..533c8b82b344 100644
> --- a/drivers/hv/hv.c
> +++ b/drivers/hv/hv.c
> @@ -184,11 +184,7 @@ void hv_synic_enable_regs(unsigned int cpu)
>  
>  	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
>  	shared_sint.masked = false;
> -	if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
> -		shared_sint.auto_eoi = false;
> -	else
> -		shared_sint.auto_eoi = true;
> -
> +	shared_sint.auto_eoi = hv_recommend_using_aeoi();
>  	hv_set_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
>  
>  	/* Enable the global synic bit */
> -- 
> 2.18.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ