All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: "Paul Durrant" <paul@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 05/10] IOMMU: add common API for device reserved memory
Date: Thu, 4 Aug 2022 16:41:51 +0200	[thread overview]
Message-ID: <0d98ea45-5fbf-9c88-40ad-d225b29939d2@suse.com> (raw)
In-Reply-To: <YuvZ2mhKOkHEdQt8@mail-itl>

On 04.08.2022 16:38, Marek Marczykowski-Górecki wrote:
> On Thu, Aug 04, 2022 at 04:25:38PM +0200, Jan Beulich wrote:
>> On 26.07.2022 05:23, Marek Marczykowski-Górecki wrote:
>>> --- a/xen/drivers/passthrough/iommu.c
>>> +++ b/xen/drivers/passthrough/iommu.c
>>> @@ -651,6 +651,51 @@ bool_t iommu_has_feature(struct domain *d, enum iommu_feature feature)
>>>      return is_iommu_enabled(d) && test_bit(feature, dom_iommu(d)->features);
>>>  }
>>>  
>>> +#define MAX_EXTRA_RESERVED_RANGES 20
>>> +struct extra_reserved_range {
>>> +    unsigned long start;
>>> +    unsigned long nr;
>>> +    uint32_t sbdf;
>>
>> It's not easy to judge why this isn't pci_sbdf_t when no callers
>> exist at this point.
> 
> I'm following here types used in the rest of IOMMU code. Especially,
> this field is later passed to iommu_grdm_t func, which is:
> 
> typedef int iommu_grdm_t(xen_pfn_t start, xen_ulong_t nr, u32 id, void *ctxt);
>                                                           ^^^^
> 
> I can probably use pci_sbdf_t here, but it will be cast to u32 later
> anyway...

No, rather than a cast you'd use the union's sbdf field. And yes, eventually
that function typedef you refer to will want switching to pci_sbdf_t as well.

Jan


  reply	other threads:[~2022-08-04 14:42 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  3:23 [PATCH v3 00/10] Add Xue - console over USB 3 Debug Capability Marek Marczykowski-Górecki
2022-07-26  3:19 ` [PATCH v3 01/10] drivers/char: Add support for USB3 DbC debugger Marek Marczykowski-Górecki
2022-07-26  3:23   ` Marek Marczykowski-Górecki
2022-08-04 12:57   ` Jan Beulich
2022-08-04 13:43     ` Marek Marczykowski-Górecki
2022-08-04 14:21       ` Jan Beulich
2022-08-04 14:28         ` Marek Marczykowski-Górecki
2022-08-04 14:36           ` Jan Beulich
2022-08-04 14:41             ` Marek Marczykowski-Górecki
2022-08-04 14:49               ` Jan Beulich
2022-08-04 14:34         ` Jan Beulich
2022-08-05  6:14           ` Jan Beulich
2022-08-05  7:23   ` Jan Beulich
2022-08-05  9:51     ` Marek Marczykowski-Górecki
2022-08-05  9:54       ` Jan Beulich
2022-08-05 10:01         ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 02/10] drivers/char: reset XHCI ports when initializing dbc Marek Marczykowski-Górecki
2022-08-04 13:14   ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 03/10] drivers/char: add support for selecting specific xhci Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 04/10] console: support multiple serial console simultaneously Marek Marczykowski-Górecki
2022-08-04 14:13   ` Jan Beulich
2022-08-05  7:41   ` Jan Beulich
2022-08-05 13:11     ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 05/10] IOMMU: add common API for device reserved memory Marek Marczykowski-Górecki
2022-08-04 14:25   ` Jan Beulich
2022-08-04 14:38     ` Marek Marczykowski-Górecki
2022-08-04 14:41       ` Jan Beulich [this message]
2022-07-26  3:23 ` [PATCH v3 06/10] IOMMU/VT-d: wire common device reserved memory API Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 07/10] IOMMU/AMD: " Marek Marczykowski-Górecki
2022-08-04 14:53   ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 08/10] drivers/char: mark DMA buffers as reserved for the XHCI Marek Marczykowski-Górecki
2022-08-05  7:05   ` Jan Beulich
2022-08-05 10:11     ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 09/10] drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC Marek Marczykowski-Górecki
2022-08-05  8:15   ` Jan Beulich
2022-08-05 15:49     ` Marek Marczykowski-Górecki
2022-08-09  6:24       ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 10/10] driver/char: add RX support to the XHCI driver Marek Marczykowski-Górecki
2022-08-05  8:38   ` Jan Beulich
2022-08-05  9:58     ` Marek Marczykowski-Górecki
2022-08-05 12:38       ` Jan Beulich
2022-08-05 12:47         ` Marek Marczykowski-Górecki
2022-08-05 12:51           ` Jan Beulich
2022-07-26  6:18 ` [PATCH v3 00/10] Add Xue - console over USB 3 Debug Capability Jan Beulich
2022-07-26  9:26   ` Marek Marczykowski-Górecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d98ea45-5fbf-9c88-40ad-d225b29939d2@suse.com \
    --to=jbeulich@suse.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.