qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 7/8] hw/dma: Introduce dma_size_t type definition
Date: Mon, 3 Jan 2022 11:20:38 +0100	[thread overview]
Message-ID: <8be25e98-6870-a492-b21e-a650f9d847c9@redhat.com> (raw)
In-Reply-To: <20211231114901.976937-8-philmd@redhat.com>


>  /*
>   * When an IOMMU is present, bus addresses become distinct from
>   * CPU/memory physical addresses and may be a different size.  Because
> @@ -39,9 +28,22 @@ struct QEMUSGList {
>   * least most) cases.
>   */
>  typedef uint64_t dma_addr_t;
> +typedef uint64_t dma_size_t;

This is a bit inconsistent with other address types (hwaddr,
ram_addr_t), no?

-> git grep "_size_t"

What sticks out are "external" mach_vm_size_t and png_size_t.

To me, it logically makes sense that both types are equal, because we're
operating on the same address space (with the same size).

So at least I don't see the benefit here, but I'd love to be enlightened  :)

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-01-03 10:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31 11:48 [PATCH 0/8] hw/dma: Introduce dma_size_t type definition Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 1/8] hw/nvram: Restrict stub to sysemu and tools Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 2/8] hw/pci: Restrict pci-bus stub to sysemu Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 3/8] hw/pci: Document pci_dma_map() Philippe Mathieu-Daudé
2022-01-04  7:25   ` Peter Xu
2022-01-04  8:36     ` Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 4/8] hw/dma: Remove CONFIG_USER_ONLY check Philippe Mathieu-Daudé
2021-12-31 11:48 ` [PATCH 5/8] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument Philippe Mathieu-Daudé
2022-01-18 10:13   ` Yuval Shaia
2021-12-31 11:48 ` [PATCH 6/8] hw/scsi: Rename SCSIRequest::resid as 'residual' Philippe Mathieu-Daudé
2021-12-31 11:49 ` [PATCH 7/8] hw/dma: Introduce dma_size_t type definition Philippe Mathieu-Daudé
2022-01-03 10:20   ` David Hildenbrand [this message]
2022-01-04  8:50     ` Philippe Mathieu-Daudé
2021-12-31 11:49 ` [PATCH 8/8] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult Philippe Mathieu-Daudé
2021-12-31 11:51   ` Philippe Mathieu-Daudé

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=8be25e98-6870-a492-b21e-a650f9d847c9@redhat.com \
    --to=david@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).