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

Re: [PATCH] x86/svm: Provide EXITINFO decodes for IO intercetps


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Mar 2023 11:49:30 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=CLL56g339PAMvvMKhErnGA5ozcoKvyEsNy0lBIUZR3E=; b=nw+Jmu/ljYs1YIK9CrFbSwSeQ94mH/PLzrh3dK+zV5DDcnv9pUA/Y5LvXGlJZiStSShBnxS8YBqLN80nwqqzzjTtcJ32Jh9u0gaFnRWmqjallfZzAi4/K9A9+3XlYusJejmCVs+5EAvrOD4IAuaZlWJj5TdGR6X64TnjQ7jIF9JXXfxtFkGGJGIoUXEict/tsMzA1eJ7gmpFSDVo33MQfQzm5LfWvosNhlSsfxLNSxXlSJYG/T/m0p/cpSwuBHSdV3k2FCywyzGg2SSD+G1ikVUDGde3ZKAUYkjRMGJA7xbrFLaRmWFg6Vys93QTG7epw3fwKN0HbnwkPHwulaw1Ww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXN6e3wdEBLLew8DOIgAVJLe/v8j64DBV1TV+aGf1O6rrtpj9TT0YfjT/FYM+iZrrtdtRUEyprj0gzjHvlDproEhsG1R54ERw6WVcEG7gWn+TgpY7EcfWbLhye8Ze6eznGQASV12BsaSoTWSl52q8do/SmU15EP/yUN6QyAteg/m4zIu1d3gvnXJRyukiqWdqsfWiStQZa2VusJ6q5LItZcMcxkdueoqMjDpibJDJkIwV6X2VKjpSo3pUtn3zEvTa8+Cok2rdf/5nmtMgN7N9AJEWKHNxiYQG3s7yWG8gbe9Su357m5Phxrd17+f80toafkWGcmDW/vh4KxwLHYoFg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Mar 2023 10:49:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.03.2023 11:27, Andrew Cooper wrote:
> On 16/03/2023 10:19 am, Jan Beulich wrote:
>> On 15.03.2023 23:10, Andrew Cooper wrote:
>>> This removes raw number manipulation, and makes the logic easier to follow.
>>>
>>> No functional change.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Thanks.
> 
> Although looking through the emails on list, apparently the vmx side of
> this got missed.

I was wondering, but then expected it would be a separate patch at some
other time.

>>> --- a/xen/arch/x86/include/asm/hvm/svm/vmcb.h
>>> +++ b/xen/arch/x86/include/asm/hvm/svm/vmcb.h
>>> @@ -436,6 +436,20 @@ struct vmcb_struct {
>>>              uint64_t exitinfo2; /* offset 0x80 */
>>>          };
>>>          union {
>>> +            struct {
>>> +                bool     in:1;
>>> +                bool     :1;
>>> +                bool     str:1;
>>> +                bool     /* rep */:1;
>>> +                uint16_t bytes:3;
>>> +                uint16_t /* asz */:3;
>>> +                uint16_t /* seg */:3;
>> Is there a particular reason you comment out some of the field names? I
>> can see that "asz" might be a little odd to use, but both "rep" and "seg"
>> are imo fine to have a name even if currently there's nothing accessing
>> these fields.
> 
> There's not currently used, and in particular asz looks hard to use as
> it doesn't appear to translate nicely.  Also, I don't that seg matches
> Xen's x86_segment_* encoding.
> 
> I can uncomment them if you'd prefer, but I thought this was marginally
> safer.  I suppose it doesn't really matter.

I would appreciate if you uncommented rep and seg; leaving asz commented
is ...

> As for asz, I previously had osz to match before renaming to bytes. 
> Suggestions welcome.

... perhaps better, as the name would be misleading, and half_asz isn't
very nice either.

Jan



 


Rackspace

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