[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aebac64f-a807-f3c6-1738-f14a4470efe3@suse.com>
Date: Tue, 26 Jan 2021 06:12:42 +0100
From: Jürgen Groß <jgross@...e.com>
To: Andrew Cooper <andrew.cooper3@...rix.com>,
xen-devel@...ts.xenproject.org, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>,
stable@...r.kernel.org
Subject: Re: [PATCH] x86/xen: avoid warning in Xen pv guest with
CONFIG_AMD_MEM_ENCRYPT enabled
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
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3092 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists