[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled


  • To: Jürgen Groß <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 27 Jan 2021 11:23:56 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R6nQ7HGU/s0s6LAoEgdBUKYsNClcpf60fTivNq5cCjM=; b=c1pcS9u6YKggZtlKUfH9bFNddhuEqzXlDBY5OJJ8QuuYKNZ+xwDH5EclSlhJdpXV4Wc5K1oC9CZiJFaIkEA523SEKzKpV15CpFlThbxTN7PI/cdFPA3X0i3Bw3uMbfzP4ihTdIl38ucjOoS4EAW4QM3TkxcNlhqSCu6LXvw7k1NcTazy5QfnMeaxy/T+8x32K0bcoAeTUX6kdvxJaqW42llpNyECa9Bd+mz3gH6y/rgeGm6l0FZiG4t+oVF5ijaoStLcI+rhvDB4Y8Whhm1Jo0MXOW1xgXvvl4Iqy+2gjh37OHwVYf3ykfDgjYvieuN0xoi/2vNitW+89DjM5oFabA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Frq8nvpRr0lKjDlmgHk1hbOPKeV1/HnWY7QSkdzc2xFvHWcnQTLK5IHUrj8LQLS0qo8xzf4i89Z2y8aCM/cGxtSqrRnP4O8w7z4+KvixL5nOVeE6alxxUiIe7PptXKhloblyGDPl2TjTgZpj0jP1elVh3YABbYnnarWdRRs7ouZ8tIvG/N4L0tkMZhgU5c1OjjNbWzN8qTMT3sCbZcBjsRTHl+441XrxVU/ZLLaGJsY5SfIddtdw3JRMIsY9gcfI8pgDZPqt5YJTLVVQYQEh4/Qb8eKRt2oFF1EQqtbZutihZd99GU8Wfbxk5euFgt9RxQ3BaMhO8st3KMNfcM24Ag==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "Boris Ostrovsky" <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <stable@xxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 27 Jan 2021 11:24:12 +0000
  • Ironport-sdr: GgGyFyPvfVGFDgz7Ah7jbpv0MW8fELnKeqA08POMt3VhH9Z0lJ/2Radm66g91KdJTERMnDjNKO 5nH/QWkpovgHz5Z7Ma7VYVfOK41ylXJ4lKGK9NYVjDGvNWjcjns6n0vI6IWfvG4ilSJRnPrNZF U/TqExJn8ASgIsKhbP7hOu7F/TdEDVnS2VOkkFCPCxkqYmo41VMKgPT8rFqlUG+sEOA7J4WItW uNXIzhcCdxfzngrJVY79yBBcSYOZGy9QNNO6HrTTMzHe926n2C//CfguuKDOBUwNSagJezz0G3 qcA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/01/2021 10:26, Jürgen Groß wrote:
> On 27.01.21 10:43, Andrew Cooper wrote:
>> On 27/01/2021 09:38, Juergen Gross wrote:
>>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
>>> index 4409306364dc..ca5ac10fcbf7 100644
>>> --- a/arch/x86/xen/enlighten_pv.c
>>> +++ b/arch/x86/xen/enlighten_pv.c
>>> @@ -583,6 +583,12 @@ DEFINE_IDTENTRY_RAW(xenpv_exc_debug)
>>>           exc_debug(regs);
>>>   }
>>>   +DEFINE_IDTENTRY_RAW(exc_xen_unknown_trap)
>>> +{
>>> +    /* This should never happen and there is no way to handle it. */
>>> +    panic("Unknown trap in Xen PV mode.");
>>
>> Looks much better.  How about including regs->entry_vector here, just to
>> short circuit the inevitable swearing which will accompany encountering
>> this panic() ?
>
> You are aware the regs parameter is struct pt_regs *, not the Xen
> struct cpu_user_regs *?

Yes, but I was assuming that they both contained the same information.

>
> So I have no idea how I should get this information without creating
> a per-vector handler.

Oh - that's dull.

Fine then.  Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.