linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled
Date: Tue, 26 Jan 2021 06:12:42 +0100	[thread overview]
Message-ID: <aebac64f-a807-f3c6-1738-f14a4470efe3@suse.com> (raw)
In-Reply-To: <e49727ce-80b6-9eb6-8bd7-a4ce63c693e0@citrix.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1113 bytes --]

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


[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

      reply	other threads:[~2021-01-26 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 14:00 [PATCH] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled Juergen Gross
2021-01-25 17:26 ` Andrew Cooper
2021-01-26  5:12   ` Jürgen Groß [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aebac64f-a807-f3c6-1738-f14a4470efe3@suse.com \
    --to=jgross@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).