qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Gao Shiyuan <gaoshiyuan@baidu.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: zuoboqun@baidu.com, qemu-devel@nongnu.org,
	Junjie Mao <junjie.mao@hotmail.com>,
	wangliang44@baidu.com
Subject: Re: [PATCH v2 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR
Date: Fri, 11 Oct 2024 10:18:43 +0200	[thread overview]
Message-ID: <f8702c07-442e-488c-8093-2b6ff89c82a2@redhat.com> (raw)
In-Reply-To: <20241009095827.67393-1-gaoshiyuan@baidu.com>

On 09.10.24 11:58, Gao Shiyuan wrote:
> As shown below, if a virtio PCI device is attached under a pci-bridge, the MR
> of VirtIOPCIRegion does not belong to any address space. So memory_region_find
> cannot be used to search for this MR.
> 
> Introduce the virtio-pci and pci_bridge address spaces to solve this problem.
> 
> Before:
> memory-region: pci_bridge_pci
>    0000000000000000-ffffffffffffffff (prio 0, i/o): pci_bridge_pci
>      00000000fe840000-00000000fe840fff (prio 1, i/o): virtio-net-pci-msix
>        00000000fe840000-00000000fe84003f (prio 0, i/o): msix-table
>        00000000fe840800-00000000fe840807 (prio 0, i/o): msix-pba
>      0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
>        0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
>        0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
>        0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
>        0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net
> 
> After:
> address-space: virtio-pci-cfg-mem-as
>    0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
>      0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
>      0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
>      0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
>      0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net
> 
> address-space: pci_bridge_pci_mem
>    0000000000000000-ffffffffffffffff (prio 0, i/o): pci_bridge_pci
>      00000000fe840000-00000000fe840fff (prio 1, i/o): virtio-net-pci-msix
>        00000000fe840000-00000000fe84003f (prio 0, i/o): msix-table
>        00000000fe840800-00000000fe840807 (prio 0, i/o): msix-pba
>      0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
>        0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
>        0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
>        0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
>        0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2576
> Fixes: ffa8a3e3b2e6 ("virtio-pci: Add lookup subregion of VirtIOPCIRegion MR")
> 
> Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com>
> Signed-off-by: Zuo Boqun <zuoboqun@baidu.com>
> Signed-off-by: Wang Liang <wangliang44@baidu.com>

Why the two additional SOB?

You're the author and you sent out the patch.

If the other two were co-authors, it should be something like


Co-developed-by: Zuo Boqun <zuoboqun@baidu.com>
Signed-off-by: Zuo Boqun <zuoboqun@baidu.com>
Co-developed-by: Wang Liang <wangliang44@baidu.com>
Signed-off-by: Wang Liang <wangliang44@baidu.com>
Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com>

[...]

>   
>   static void virtio_pci_reset(DeviceState *qdev)
> diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h
> index 5cd452115a..bd12fbe4ef 100644
> --- a/include/hw/pci/pci_bridge.h
> +++ b/include/hw/pci/pci_bridge.h
> @@ -72,6 +72,8 @@ struct PCIBridge {
>        */
>       MemoryRegion address_space_mem;
>       MemoryRegion address_space_io;
> +    AddressSpace as_mem;
> +    AddressSpace as_io;

address_space_mem vs. as_mem is really confusing, likely 
"address_space_mem" shpuld be called "mem_mr" ot sth. like that. Anyhow, 
that's independent of your patch

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2024-10-11  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  9:58 [PATCH v2 1/1] virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR Gao Shiyuan via
2024-10-11  8:18 ` David Hildenbrand [this message]
2024-10-11 10:00 ` Junjie Mao
2024-10-29 15:21 ` Gao,Shiyuan via
2024-10-29 17:07 ` Daniel P. Berrangé
2024-10-29 19:44 ` Michael S. Tsirkin
2024-10-30 11:36   ` Daniel P. Berrangé

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=f8702c07-442e-488c-8093-2b6ff89c82a2@redhat.com \
    --to=david@redhat.com \
    --cc=gaoshiyuan@baidu.com \
    --cc=junjie.mao@hotmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wangliang44@baidu.com \
    --cc=zuoboqun@baidu.com \
    /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).