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

Re: [Xen-devel] [PATCH v3 04/14] AMD/IOMMU: use bit field for IRTE


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 19 Jul 2019 16:16:06 +0000
  • Accept-language: en-US
  • 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-SenderADCheck; bh=hgMeDhCJhKji8V92nOa8YpnKZcKBP+08d8HqdS2aCDw=; b=UPq63fF1+zYib3Juzo+NLqXUfWfsAUyUgP59giHvI2r2M2oVMVAGu48LsAvVx8BD6y1+H5sMpIFwdnJg1Kq0xn1DwMskh9q2FsEkRlx8f61eKY0WScydQxLmH5FYFfb8kP7a51xeib5SS0n+Dq3URKC48Dwxvtlq2/HAnzzZkpJKkvAU1l/RVpnnDHPVZuRfKWl4ecfp2gMzFA2Gc5Kc9oGVgT2nTVowkQwDMSrZ1GqPFf8BeRczyriAXGcg1uyjL6eyB6+zShBwfpOQZIARo2n1s+jFwRn8avcUAoBQ7mLXobEfxawFiwImHwTJ6RTc2cfmq83d3O3zOV+509WV3Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vtt1qtyJmDA/kAXfu793IjnP61vZidHH+yHipb+P26HVofUe9ptvoEPJhkCI3CGpi5liWk52gJPQ5JvbnKYegEbBkP2MVBZE9tooRhEHNwqBMKgtLf0Ikmqv1N8LFE5su/D9ha8wdKA3bbGalLKxVkPdb8Bj+PJAXlNMiQl/ANriR36Il+DLoeKVcUeUJne/9B80wOnTOXX6tG/M4w2xBbqXpH7NDT6FtAhgjBg8WMQcT4f50GRHGHnxkOdIiNteEczvmcIip30nagvjKyhdbJWdyPuf9b0LqgX6j0qPWqw+6bWVYzyfVlAXZNV4Et4KMif88S51XGtQ5xs5paXQpw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Brian Woods <brian.woods@xxxxxxx>, Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
  • Delivery-date: Fri, 19 Jul 2019 16:16:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVO/ShZ1XycBFTpEyE5AJFB9blPabSHS6jgAAFboA=
  • Thread-topic: [PATCH v3 04/14] AMD/IOMMU: use bit field for IRTE

On 19.07.2019 17:56, Andrew Cooper wrote:
> On 16/07/2019 17:36, Jan Beulich wrote:
>> At the same time restrict its scope to just the single source file
>> actually using it, and abstract accesses by introducing a union of
>> pointers. (A union of the actual table entries is not used to make it
>> impossible to [wrongly, once the 128-bit form gets added] perform
>> pointer arithmetic / array accesses on derived types.)
>>
>> Also move away from updating the entries piecemeal: Construct a full new
>> entry, and write it out.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> I'm still not entirely convinced by extra union and containerof(), but
> the result looks correct.

And I'm still open to going the other way, if you're convinced that
in update_intremap_entry() this

     struct irte_basic basic = {
         .flds = {
             .remap_en = true,
             .int_type = int_type,
             .dm = dest_mode,
             .dest = dest,
             .vector = vector,
         }
     };

(and similarly then for the 128-bit form, and of course .flds
inserted at other use sites) is overall better than the current
variant.

> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thanks, Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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