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: <89c9f27c-f539-ef75-dc67-bdb0a8480c4b@gmail.com>
Date:   Wed, 26 Jul 2023 21:47:03 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     "Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <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>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "arnd@...db.de" <arnd@...db.de>
Cc:     Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>
Subject: Re: [PATCH V3 5/9] x86/hyperv: Use vmmcall to implement Hyper-V
 hypercall in sev-snp enlightened guest

On 7/26/2023 11:44 AM, Michael Kelley (LINUX) wrote:
>> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
>> index 2fa38e9f6207..025eda129d99 100644
>> --- a/arch/x86/include/asm/mshyperv.h
>> +++ b/arch/x86/include/asm/mshyperv.h
>> @@ -64,12 +64,12 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
>>   	if (!hv_hypercall_pg)
>>   		return U64_MAX;
>>
>> -	__asm__ __volatile__("mov %4, %%r8\n"
>> -			     CALL_NOSPEC
>> +	__asm__ __volatile__("mov %[output], %%r8\n"
>> +			     ALTERNATIVE("vmmcall", CALL_NOSPEC, X86_FEATURE_SEV_ES)
> Since this code is for SEV-SNP, what's the thinking behind using
> X86_FEATURE_SEV_ES in the ALTERNATIVE statements?   Don't you need
> to use X86_FEATURE_SEV_SNP (which is being added in another patch set that
> Boris Petkov pointed out).

Hi Michael:
	Thanks for your review. The patch mentioned by Boris has not been 
merged and so still use X86_FEATURE_SEV_ES here. We may replace the 
feature flag with X86_FEATURE_SEV_SNP after it's upstreamed.

> 
> Also, does this patch depend on Peter Zijlstra's patch to support nested
> ALTERNATIVE statements?  If so, that needs to be called out, probably in
> the cover letter.  Peter's patch doesn't yet appear in linux-next.
> 

It may work without Peterz's patch. Please see 
https://lkml.org/lkml/2023/6/27/520.
Peterz's patch optimizes ALTERNATIVE_n implementation with nested 
expression.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ