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:
 <SN6PR02MB4157A5928B486CF5D43C50F8D491A@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Wed, 14 May 2025 16:54:27 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Tianyu Lan <ltykernel@...il.com>, "kys@...rosoft.com" <kys@...rosoft.com>,
	"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>, "wei.liu@...nel.org"
	<wei.liu@...nel.org>, "decui@...rosoft.com" <decui@...rosoft.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "mingo@...hat.com"
	<mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "x86@...nel.org"
	<x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>, "Neeraj.Upadhyay@....com"
	<Neeraj.Upadhyay@....com>, "yuehaibing@...wei.com" <yuehaibing@...wei.com>,
	"kvijayab@....com" <kvijayab@....com>, "jacob.jun.pan@...ux.intel.com"
	<jacob.jun.pan@...ux.intel.com>, "jpoimboe@...nel.org" <jpoimboe@...nel.org>,
	"tiala@...rosoft.com" <tiala@...rosoft.com>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 1/6] x86/Hyper-V: Not use hv apic driver when Secure
 AVIC is available

From: Tianyu Lan <ltykernel@...il.com> Sent: Tuesday, May 6, 2025 6:07 AM
> 

Suggested Subject line:

x86/hyperv: Don't use hv apic driver when Secure AVIC is available

> When Secure AVIC is available, AMD x2apic Secure
> AVIC driver should be selected and return directly
> in the hv_apic_init().

Suggested wording:

When Secure AVIC is available, the AMD x2apic Secure AVIC
driver will be selected. So skip initialization of the
Hyper-V apic driver.

> 
> Signed-off-by: Tianyu Lan <tiala@...rosoft.com>
> ---
>  arch/x86/hyperv/hv_apic.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
> index 6d91ac5f9836..bd8f83923305 100644
> --- a/arch/x86/hyperv/hv_apic.c
> +++ b/arch/x86/hyperv/hv_apic.c
> @@ -292,6 +292,9 @@ static void hv_send_ipi_self(int vector)
> 
>  void __init hv_apic_init(void)
>  {
> +	if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC))
> +		return;
> +
>  	if (ms_hyperv.hints & HV_X64_CLUSTER_IPI_RECOMMENDED) {
>  		pr_info("Hyper-V: Using IPI hypercalls\n");
>  		/*

It seems like this patch will cause a bisect problem if a bisect includes
this patch but none of the subsequent patches in this series. The
Hyper-V guest VM could see Secure AVIC is enabled, but the VM
wouldn't boot because the code to allow Hyper-V to inject an interrupt
haven't been added yet.

This patch probably should come later in the patch series after Secure
AVIC can be functional in a Hyper-V guest.

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ