Re: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Borislav Petkov
On Fri, Oct 20, 2023 at 08:00:13PM +, Dexuan Cui wrote: > Currently arch/x86/mm/mem_encrypt.c: print_mem_encrypt_feature_info() > prints an incorrect and confusing message > "Memory Encryption Features active: AMD SEV". > when an Intel TDX VM with a paravisor runs on Hyper-V. > > So I think

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dexuan Cui
> From: Dave Hansen > Sent: Friday, October 20, 2023 1:14 PM > To: Dexuan Cui ; KY Srinivasan > [...] > On 10/20/23 13:00, Dexuan Cui wrote: > >> OK, then what good is this patch in the first place? If you are right, > >> then this would give equivalent information: > >> > >> cat /proc/cpuinfo |

Re: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dave Hansen
On 10/20/23 13:00, Dexuan Cui wrote: >> OK, then what good is this patch in the first place? If you are right, >> then this would give equivalent information: >> >> cat /proc/cpuinfo | grep -q Intel && echo 'TDX' >> cat /proc/cpuinfo | grep -q AMD && echo 'SEV' >> >> No kernel patching needed,

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dexuan Cui
> From: Dave Hansen > Sent: Friday, October 20, 2023 11:40 AM > To: Dexuan Cui ; KY Srinivasan > [...] > On 10/19/23 23:01, Dexuan Cui wrote: > > This patch only modifies x86 related files. I think it's unlikely to see > > a third hardware Coco implementation for x86 in the foreseeable feature >

Re: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dave Hansen
On 10/19/23 23:01, Dexuan Cui wrote: > This patch only modifies x86 related files. I think it's unlikely to see > a third hardware Coco implementation for x86 in the foreseeable feature (?) OK, then what good is this patch in the first place? If you are right, then this would give equivalent

RE: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-20 Thread Dexuan Cui
> From: Dave Hansen > Sent: Thursday, October 19, 2023 8:54 AM > To: Dexuan Cui ; KY Srinivasan > [...] > > --- a/arch/x86/hyperv/ivm.c > > +++ b/arch/x86/hyperv/ivm.c > > @@ -450,6 +450,16 @@ static bool hv_is_private_mmio(u64 addr) > > return false; > > } > > > > +static void

Re: [PATCH] x86/mm: Print the encryption features correctly when a paravisor is present

2023-10-19 Thread Dave Hansen
> --- a/arch/x86/hyperv/ivm.c > +++ b/arch/x86/hyperv/ivm.c > @@ -450,6 +450,16 @@ static bool hv_is_private_mmio(u64 addr) > return false; > } > > +static void hv_print_mem_enc_feature_info(void) > +{ > + enum hv_isolation_type type = hv_get_isolation_type(); > + > + if (type ==