[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 14:30:39 +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=jj14pedKkncpqIXLBcI9CBl1Vb6UH4rswwObh9LJYYY=; b=WYnLsoIkyxgm+TBWOrVBixrM+5amMdRLYc88+d5tWSEGv+0VCmIMW6ngML/QPLAUeYYsqOBPs6dQ6iYwcmhMiOImRFFkZb9y9LKq4g8Cp/bar33gAl7nSKAWzVxdFNkaVIJSnfWNTG/T8A8SHHyP6WHOajP8TpiIF97pcxTD+NY7fkVRFmb/E6mdk30jtPlIooRHs1T72x3Q5lBi+AQOmHvE+IaC6uvzRHv4tmboZ8QMecsGDtK58MAKmO1WNviHnaofua1s7PrOKJS8qbxWpI5JHsBSpV/tc4Hu82CLStKlMa/Dur3ShZDt9v4Qst8Uh9W8cPiY24sPfDgCZdNqCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X4oX6rhIsZz16fDKDxtxY/qKsXQugds3y2tlTm2CM1RARSBlt4HpwHT+FB5tGYJa4R6JF2U/STn1ymfllEnDqVC5TWTWBCyUTnb+MN9c4u6zixZW6VCG/CX1unR2sULgBS366GunB/HuoLB22zMEfsIJrIyYWObd6TFZgM6P/qGb0s9qwZ9ekjWJF8pOmkExI3SdzpJMVD/n6+IfMomVoJ1usaKm9/iXsIwAEJ3rKiJ9ZR2JK6HLiMdEFv3zeqRMzLu4oIqdD0WNpY6Ti3LDVZ40azUMLQsw4APRjROzgvsJfCJBpjsXaYEVBy8oDxk+YMflHJeQvMlxEmg8Gi1VSw==
  • Authentication-results: esa5.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 14:31:02 +0000
  • Ironport-sdr: Nwjm5BZ86zTKKfEyQvuLDIm2cRYQqTVZOaV8H8OUoKTDquOHrxfi1Q8G1S3iXsQNpYwwKFkCDC L8dnWcwxJQn68vjg01g0Q1Rh1kMa4+wioH7+e54H+LsubQfsC2kIMzmsf0rQvqfOyMZEyJuY5m C+PR3WDRL/7oWAJ4WvmqSAd+Vb40C3/boHsP4kmKBLUDbqYI2fMnTl8cYAL4prPC1t+UVqjTVA w51uQxIgFfxQlWUT3n+HJvaS5eBGpnzdbO4TNjDfkTjEZNt3Z1pjVPAtlQnnkoCCxcbsRN6HAw LqE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/01/2021 13:59, Jürgen Groß wrote:
> On 27.01.21 12:23, Andrew Cooper wrote:
>> 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>
>>
>
> I think I'll switch the panic() to printk(); BUG(); in order to have
> more diagnostic data. Can I keep your R-b: with that modification?

Yeah.  Sounds good.

~Andrew



 


Rackspace

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