lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled
From
Date
On 25.01.21 18:26, Andrew Cooper wrote:
> On 25/01/2021 14:00, Juergen Gross wrote:
>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
>> index 4409306364dc..82948251f57b 100644
>> --- a/arch/x86/xen/enlighten_pv.c
>> +++ b/arch/x86/xen/enlighten_pv.c
>> @@ -583,6 +583,14 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)
>> exc_debug(regs);
>> }
>>
>> +#ifdef CONFIG_AMD_MEM_ENCRYPT
>> +DEFINE_IDTENTRY_RAW(xenpv_exc_vmm_communication)
>> +{
>> + /* This should never happen and there is no way to handle it. */
>> + panic("X86_TRAP_VC in Xen PV mode.");
>
> Honestly, exactly the same is true of #VE, #HV and #SX.
>
> What we do in the hypervisor is wire up one handler for all unknown
> exceptions (to avoid potential future #DF issues) leading to a panic.
> Wouldn't it be better to do this unconditionally, especially as #GP/#NP
> doesn't work for PV guests for unregistered callbacks, rather than
> fixing up piecewise like this?

I agree it would be better to have a "catch all unknown" handler.

I'll have a try how this would look like.


Juergen

[unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-01-27 02:10    [W:0.032 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site