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: <5cdb2703-2b94-4f38-a440-8f5c9a4c66be@linux.microsoft.com>
Date: Mon, 28 Apr 2025 12:23:04 -0700
From: Roman Kisel <romank@...ux.microsoft.com>
To: Michael Kelley <mhklinux@...look.com>
Cc: "apais@...rosoft.com" <apais@...rosoft.com>,
 "benhill@...rosoft.com" <benhill@...rosoft.com>,
 "bperkins@...rosoft.com" <bperkins@...rosoft.com>,
 "sunilmut@...rosoft.com" <sunilmut@...rosoft.com>,
 "arnd@...db.de" <arnd@...db.de>, "bhelgaas@...gle.com"
 <bhelgaas@...gle.com>, "bp@...en8.de" <bp@...en8.de>,
 "catalin.marinas@....com" <catalin.marinas@....com>,
 "conor+dt@...nel.org" <conor+dt@...nel.org>,
 "dan.carpenter@...aro.org" <dan.carpenter@...aro.org>,
 "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
 "decui@...rosoft.com" <decui@...rosoft.com>,
 "haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
 "hpa@...or.com" <hpa@...or.com>, "joey.gouly@....com" <joey.gouly@....com>,
 "krzk+dt@...nel.org" <krzk+dt@...nel.org>, "kw@...ux.com" <kw@...ux.com>,
 "kys@...rosoft.com" <kys@...rosoft.com>, "lenb@...nel.org"
 <lenb@...nel.org>, "lpieralisi@...nel.org" <lpieralisi@...nel.org>,
 "manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
 "mark.rutland@....com" <mark.rutland@....com>,
 "maz@...nel.org" <maz@...nel.org>, "mingo@...hat.com" <mingo@...hat.com>,
 "oliver.upton@...ux.dev" <oliver.upton@...ux.dev>,
 "rafael@...nel.org" <rafael@...nel.org>, "robh@...nel.org"
 <robh@...nel.org>, "rafael.j.wysocki@...el.com"
 <rafael.j.wysocki@...el.com>,
 "ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
 "sudeep.holla@....com" <sudeep.holla@....com>,
 "suzuki.poulose@....com" <suzuki.poulose@....com>,
 "tglx@...utronix.de" <tglx@...utronix.de>,
 "wei.liu@...nel.org" <wei.liu@...nel.org>, "will@...nel.org"
 <will@...nel.org>, "yuzenghui@...wei.com" <yuzenghui@...wei.com>,
 "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
 "kvmarm@...ts.linux.dev" <kvmarm@...ts.linux.dev>,
 "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
 "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
 "linux-arm-kernel@...ts.infradead.org"
 <linux-arm-kernel@...ts.infradead.org>,
 "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
 "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH hyperv-next v8 02/11] arm64: hyperv: Use SMCCC to detect
 hypervisor presence



On 4/17/2025 8:27 AM, Michael Kelley wrote:
> From: Roman Kisel <romank@...ux.microsoft.com> Sent: Monday, April 14, 2025 3:47 PM
[...]
> I had previously given my Reviewed-by: on v5 of this patch. But
> looking at it again, it would be nice if this UUID were defined in
> include/linux/arm-smccc.h alongside the definition of
> ARM_SMCCC_VENDOR_HYP_UID_KVM. The UUID values are
> are independent of each other, but it's a bit asymmetric to have
> the KVM UUID defined centrally while the Hyper-V UUID is
> buried in Hyper-V specific code. But I'm OK with the current code
> if there's nothing else to respin for.
> 

As I saw that, KVM is special in the kernel as the kernel provides
both the host side code and the kernel side code so the UUID has
to be shared in the header file.

In the Hyper-V case, we have only the guest side code so it seemed
more economical to have that tucked into the function rather than
adding to the arch-wide header and including the header.


>> +
>> +	return arm_smccc_hypervisor_has_uuid(&hyperv_uuid);
>> +}
>> +
>>   static int __init hyperv_init(void)
>>   {
>>   	struct hv_get_vp_registers_output	result;
>> @@ -36,13 +78,11 @@ static int __init hyperv_init(void)
>>
>>   	/*
>>   	 * Allow for a kernel built with CONFIG_HYPERV to be running in
>> -	 * a non-Hyper-V environment, including on DT instead of ACPI.
>> +	 * a non-Hyper-V environment.
>> +	 *
>>   	 * In such cases, do nothing and return success.
>>   	 */
>> -	if (acpi_disabled)
>> -		return 0;
>> -
>> -	if (strncmp((char *)&acpi_gbl_FADT.hypervisor_id, "MsHyperV", 8))
>> +	if (!hyperv_detect_via_acpi() && !hyperv_detect_via_smccc())
>>   		return 0;
>>
>>   	/* Setup the guest ID */
>> --
>> 2.43.0
>>
> 
> My UUID comment notwithstanding,
> 
> Reviewed-by: Michael Kelley <mhklinux@...look.com>
> 
> 

-- 
Thank you,
Roman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ