[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/svm: Provide EXITINFO decodes for Exceptions/NPT intercepts
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 6 Apr 2023 15:30:55 +0100
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lbKvxOKsESnEm+UoB7N2Ts/1VLqyZuSkZzZthBYVx30=; b=ddqTz98C+ZtTqdRpjVfm0PQbhwmlBxBiDjZkb2DZwuuX3khzrmt5bXkF3ngKKebfujMZWMnRaEhhBJrTTWh3W/tGaGgKyqird4BIdfNM2n0THmEiAb2SekNz20xmAsiMt5+gsPOkGGBBtQm3zJxKlj4N45W52JJOgycMSRdfOh9OSDgt3JcJTsQrLNeAp8nO/Rm1J3Eo0rkfZESYOj9JXEBEcnAxSoXnkXVTy5ahoctS6XAjbDAMmFmTsKlYziFljf0Vi1Rqm/Uio7YS1LuDezn9TGtQaTRXcnzbgGUCDqQklTk+MMM8KRIshW1fT3wTrDIr0vQCALbTBejdhOit4A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KUI/wd0uTYaYDhzqC4rWnh5Zm2HCNWOzTXZhYNM9ZfPYqhdYv9YhH2nS0YvJbL6kqxSuzgU1+NbqhqlOKvr7tjsRUwlafo53RClSqeAZUMaYmWM2PohthRsVEqE/8JTmK5LqUX+S9/Po6k/1IqBxP4wdaEfGtTsiXRJIa1vkCwgCzAhQmp2nXJp2D0ib8v1XvYTHp7lWbv20zqKVYsP2NQwxWTYan0ioAWQc0Xp4A6Mgcfwv3LMRkYdZTH1MMvcDuNNhcgn8nYXxq8hbY+NMSf7DvQiT85xNxeetphh9vgO/GMJy+ha7EuekfzoMuN1RzPsXuwIFk3GmAPWhDlUCxA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 06 Apr 2023 14:31:25 +0000
- Ironport-data: A9a23:Vo+/aq7/EO37lRdSyBXNUwxRtBXGchMFZxGqfqrLsTDasY5as4F+v mIaWWuBO/jeM2fzKIh+Od+zpkJV6peHn95iTVBkrnw0Hi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+7JwehBtC5gZlPawT4geE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5mz eM4JmgCUhu6jcXr35GkTvRxufkDM5y+VG8fkikIITDxK98DGMiGZpqQoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OkUooiOOF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNtKSOPgqqUy3jV/wEQvCxYPbHq1psOX1BO8fckAJ E4f/wYX+P1aGEuDC4OVsweDiHyOswMYWtFQO/Yn8wzLwa3Riy6GAkAUQzgHb8Yp3OcmSDpv2 lKXktfBAT10rKbTWX+b7q2Trz65JW4SN2BqWMMfZQ4M4t2mpZ5piBvKF45nCPTs1oazHizsy TeXqiR4n68UkcMAy6S8+xbAni6ooZ/KCAUy4207Q16Y0++wX6b9D6TA1LQRxaoowFqxJrVZg EU5pg==
- Ironport-hdrordr: A9a23:evAMiaClFaAQe2zlHelc55DYdb4zR+YMi2TDt3oddfU1SL39qy nKpp4mPHDP5wr5NEtPpTniAtjkfZq/z+8X3WB5B97LMDUO3lHIEGgL1+DfKlbbak/DH4BmtZ uICJIOb+EZDTJB/LrHCAvTKade/DFQmprY+9s3zB1WPHBXg7kL1XYeNu4CeHcGPjWvA/ACZe Ohz/sCnRWMU1INYP+2A3EUNtKz2uEixPrdEGY77wdM0nj0sQ+V
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 06/04/2023 3:28 pm, Jan Beulich wrote:
> On 06.04.2023 15:27, Andrew Cooper wrote:
>> Exceptions and NPT intercepts almost have the same layout, but NPT has bits
>> above 31 in the error code, and the name for exitinfo2 really does want
>> distinguishing between cr2 and gpa.
>>
>> In nsvm_vcpu_vmexit_inject() rearrange VMEXIT_NPF to fall through instead of
>> repeating the exitinfo1 write. Use the fallthrough pseudo keyword instead of
>> a comment.
>>
>> In VMEXIT_NPF, as we're editing the printk() anyway, switch to using the
>> newer
>> domain_crash() form.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> with one remark / suggestion:
>
>> @@ -455,6 +461,10 @@ struct vmcb_struct {
>> uint64_t :59;
>> bool mov_insn:1; /* MOV, as opposed to LMSW, CLTS, etc
>> */
>> } mov_cr;
>> + struct {
>> + uint64_t ec;
>> + uint64_t gpa;
>> + } npt;
> Maybe better "npf" than "npt", as it's describing the exit/fault?
Oh yes, of course. That is what I'd intended to put here.
Thanks.
~Andrew
|