[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 1a59bd: memory: Directly dispatch alias acces
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 1a59bd: memory: Directly dispatch alias accesses on origin... |
Date: |
Tue, 18 Jan 2022 07:06:45 -0800 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 1a59bdba4bf476c242fbf88283a71427c0160f06
https://github.com/qemu/qemu/commit/1a59bdba4bf476c242fbf88283a71427c0160f06
Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M softmmu/memory.c
Log Message:
-----------
memory: Directly dispatch alias accesses on origin memory region
Since commit 2cdfcf272d ("memory: assign MemoryRegionOps to all
regions"), all newly created regions are assigned with
unassigned_mem_ops (which might be then overwritten).
When using aliased container regions, and there is no region mapped
at address 0 in the container, the memory_region_dispatch_read()
and memory_region_dispatch_write() calls incorrectly return the
container unassigned_mem_ops, because the alias offset is not used.
Consider the following setup:
+--------------------+ < - - - - - - - - - - - +
| Container | mr
| (unassigned_mem) | |
| |
| | |
| | alias_offset
+ + <- - - - - - +----------+---------+
| +----------------+ | | |
| | MemoryRegion0 | | | |
| +----------------+ | | Alias | addr1
| | MemoryRegion1 | | <~ ~ ~ ~ ~ | | <~~~~~~
| +----------------+ | | |
| | +--------------------+
| |
| |
| |
| |
| +----------------+ |
| | MemoryRegionX | |
| +----------------+ |
| | MemoryRegionY | |
| +----------------+ |
| | MemoryRegionZ | |
| +----------------+ |
+--------------------+
The memory_region_init_alias() flow is:
memory_region_init_alias()
-> memory_region_init()
-> object_initialize(TYPE_MEMORY_REGION)
-> memory_region_initfn()
-> mr->ops = &unassigned_mem_ops;
Later when accessing offset=addr1 via the alias, we expect to hit
MemoryRegion1. The memory_region_dispatch_read() flow is:
memory_region_dispatch_read(addr1)
-> memory_region_access_valid(mr) <- addr1 offset is ignored
-> mr->ops->valid.accepts()
-> unassigned_mem_accepts()
<- false
<- false
<- MEMTX_DECODE_ERROR
The caller gets a MEMTX_DECODE_ERROR while the access is OK.
Fix by dispatching aliases recursively, accessing its origin region
after adding the alias offset.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210418055708.820980-1-f4bug@amsat.org>
Commit: 670c0780e7a12013f06b7702e37d8434274cc018
https://github.com/qemu/qemu/commit/670c0780e7a12013f06b7702e37d8434274cc018
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M softmmu/memory.c
Log Message:
-----------
memory: Split mtree_info() as mtree_info_flatview() + mtree_info_as()
While mtree_info() handles both ASes and flatviews cases,
the two cases share basically no code. Split mtree_info()
as mtree_info_flatview() + mtree_info_as() to simplify.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210904231101.1071929-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 7bdbf99aa2aac3bf483db6a08d1cea5bf1053c74
https://github.com/qemu/qemu/commit/7bdbf99aa2aac3bf483db6a08d1cea5bf1053c74
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M softmmu/memory.c
Log Message:
-----------
memory: Have 'info mtree' remove duplicated Address Space information
Per Peter Maydell [*]:
'info mtree' monitor command was designed on the assumption that
there's really only one or two interesting address spaces, and
with more recent developments that's just not the case any more.
Similarly about how the FlatView are sorted using a GHashTable,
sort the AddressSpace objects to remove the duplications (AS
using the same root MemoryRegion).
This drastically reduces the output of 'info mtree' on some boards.
Before:
$ (echo info mtree; echo q) \
| qemu-system-aarch64 -S -monitor stdio -M raspi3b \
| wc -l
423
After:
$ (echo info mtree; echo q) \
| qemu-system-aarch64 -S -monitor stdio -M raspi3b \
| wc -l
106
(qemu) info mtree
address-space: I/O
0000000000000000-000000000000ffff (prio 0, i/o): io
address-space: cpu-memory-0
address-space: cpu-memory-1
address-space: cpu-memory-2
address-space: cpu-memory-3
address-space: cpu-secure-memory-0
address-space: cpu-secure-memory-1
address-space: cpu-secure-memory-2
address-space: cpu-secure-memory-3
address-space: memory
0000000000000000-ffffffffffffffff (prio 0, i/o): system
0000000000000000-000000003fffffff (prio 0, ram): ram
000000003f000000-000000003fffffff (prio 1, i/o): bcm2835-peripherals
000000003f003000-000000003f00301f (prio 0, i/o): bcm2835-sys-timer
000000003f004000-000000003f004fff (prio -1000, i/o): bcm2835-txp
000000003f006000-000000003f006fff (prio 0, i/o): mphi
000000003f007000-000000003f007fff (prio 0, i/o): bcm2835-dma
000000003f00b200-000000003f00b3ff (prio 0, i/o): bcm2835-ic
000000003f00b400-000000003f00b43f (prio -1000, i/o): bcm2835-sp804
000000003f00b800-000000003f00bbff (prio 0, i/o): bcm2835-mbox
000000003f100000-000000003f1001ff (prio 0, i/o): bcm2835-powermgt
000000003f101000-000000003f102fff (prio 0, i/o): bcm2835-cprman
000000003f104000-000000003f10400f (prio 0, i/o): bcm2835-rng
000000003f200000-000000003f200fff (prio 0, i/o): bcm2835_gpio
000000003f201000-000000003f201fff (prio 0, i/o): pl011
000000003f202000-000000003f202fff (prio 0, i/o): bcm2835-sdhost
000000003f203000-000000003f2030ff (prio -1000, i/o): bcm2835-i2s
000000003f204000-000000003f20401f (prio -1000, i/o): bcm2835-spi0
000000003f205000-000000003f20501f (prio -1000, i/o): bcm2835-i2c0
000000003f20f000-000000003f20f07f (prio -1000, i/o): bcm2835-otp
000000003f212000-000000003f212007 (prio 0, i/o): bcm2835-thermal
000000003f214000-000000003f2140ff (prio -1000, i/o): bcm2835-spis
000000003f215000-000000003f2150ff (prio 0, i/o): bcm2835-aux
000000003f300000-000000003f3000ff (prio 0, i/o): sdhci
000000003f600000-000000003f6000ff (prio -1000, i/o): bcm2835-smi
000000003f804000-000000003f80401f (prio -1000, i/o): bcm2835-i2c1
000000003f805000-000000003f80501f (prio -1000, i/o): bcm2835-i2c2
000000003f900000-000000003f907fff (prio -1000, i/o): bcm2835-dbus
000000003f910000-000000003f917fff (prio -1000, i/o): bcm2835-ave0
000000003f980000-000000003f990fff (prio 0, i/o): dwc2
000000003f980000-000000003f980fff (prio 0, i/o): dwc2-io
000000003f981000-000000003f990fff (prio 0, i/o): dwc2-fifo
000000003fc00000-000000003fc00fff (prio -1000, i/o): bcm2835-v3d
000000003fe00000-000000003fe000ff (prio -1000, i/o): bcm2835-sdramc
000000003fe05000-000000003fe050ff (prio 0, i/o): bcm2835-dma-chan15
0000000040000000-00000000400000ff (prio 0, i/o): bcm2836-control
address-space: bcm2835-dma-memory
address-space: bcm2835-fb-memory
address-space: bcm2835-property-memory
address-space: dwc2
0000000000000000-00000000ffffffff (prio 0, i/o): bcm2835-gpu
0000000000000000-000000003fffffff (prio 0, ram): alias
bcm2835-gpu-ram-alias[*] @ram 0000000000000000-000000003fffffff
0000000040000000-000000007fffffff (prio 0, ram): alias
bcm2835-gpu-ram-alias[*] @ram 0000000000000000-000000003fffffff
000000007e000000-000000007effffff (prio 1, i/o): alias
bcm2835-peripherals @bcm2835-peripherals 0000000000000000-0000000000ffffff
0000000080000000-00000000bfffffff (prio 0, ram): alias
bcm2835-gpu-ram-alias[*] @ram 0000000000000000-000000003fffffff
00000000c0000000-00000000ffffffff (prio 0, ram): alias
bcm2835-gpu-ram-alias[*] @ram 0000000000000000-000000003fffffff
address-space: bcm2835-mbox-memory
0000000000000000-000000000000008f (prio 0, i/o): bcm2835-mbox
0000000000000010-000000000000001f (prio 0, i/o): bcm2835-fb
0000000000000080-000000000000008f (prio 0, i/o): bcm2835-property
memory-region: ram
0000000000000000-000000003fffffff (prio 0, ram): ram
memory-region: bcm2835-peripherals
000000003f000000-000000003fffffff (prio 1, i/o): bcm2835-peripherals
000000003f003000-000000003f00301f (prio 0, i/o): bcm2835-sys-timer
000000003f004000-000000003f004fff (prio -1000, i/o): bcm2835-txp
000000003f006000-000000003f006fff (prio 0, i/o): mphi
000000003f007000-000000003f007fff (prio 0, i/o): bcm2835-dma
000000003f00b200-000000003f00b3ff (prio 0, i/o): bcm2835-ic
000000003f00b400-000000003f00b43f (prio -1000, i/o): bcm2835-sp804
000000003f00b800-000000003f00bbff (prio 0, i/o): bcm2835-mbox
000000003f100000-000000003f1001ff (prio 0, i/o): bcm2835-powermgt
000000003f101000-000000003f102fff (prio 0, i/o): bcm2835-cprman
000000003f104000-000000003f10400f (prio 0, i/o): bcm2835-rng
000000003f200000-000000003f200fff (prio 0, i/o): bcm2835_gpio
000000003f201000-000000003f201fff (prio 0, i/o): pl011
000000003f202000-000000003f202fff (prio 0, i/o): bcm2835-sdhost
000000003f203000-000000003f2030ff (prio -1000, i/o): bcm2835-i2s
000000003f204000-000000003f20401f (prio -1000, i/o): bcm2835-spi0
000000003f205000-000000003f20501f (prio -1000, i/o): bcm2835-i2c0
000000003f20f000-000000003f20f07f (prio -1000, i/o): bcm2835-otp
000000003f212000-000000003f212007 (prio 0, i/o): bcm2835-thermal
000000003f214000-000000003f2140ff (prio -1000, i/o): bcm2835-spis
000000003f215000-000000003f2150ff (prio 0, i/o): bcm2835-aux
000000003f300000-000000003f3000ff (prio 0, i/o): sdhci
000000003f600000-000000003f6000ff (prio -1000, i/o): bcm2835-smi
000000003f804000-000000003f80401f (prio -1000, i/o): bcm2835-i2c1
000000003f805000-000000003f80501f (prio -1000, i/o): bcm2835-i2c2
000000003f900000-000000003f907fff (prio -1000, i/o): bcm2835-dbus
000000003f910000-000000003f917fff (prio -1000, i/o): bcm2835-ave0
000000003f980000-000000003f990fff (prio 0, i/o): dwc2
000000003f980000-000000003f980fff (prio 0, i/o): dwc2-io
000000003f981000-000000003f990fff (prio 0, i/o): dwc2-fifo
000000003fc00000-000000003fc00fff (prio -1000, i/o): bcm2835-v3d
000000003fe00000-000000003fe000ff (prio -1000, i/o): bcm2835-sdramc
000000003fe05000-000000003fe050ff (prio 0, i/o): bcm2835-dma-chan15
(qemu) q
[*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg829821.html
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210904231101.1071929-2-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: eef3a7abff8a5eab840868fffd6195d8a2a555d0
https://github.com/qemu/qemu/commit/eef3a7abff8a5eab840868fffd6195d8a2a555d0
Author: David Hildenbrand <david@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/core/machine.c
Log Message:
-----------
machine: Use host_memory_backend_is_mapped() in machine_consume_memdev()
memory_region_is_mapped() is the wrong check, we actually want to check
whether the backend is already marked mapped.
For example, memory regions mapped via an alias, such as NVDIMMs,
currently don't make memory_region_is_mapped() return "true". As the
machine is initialized before any memory devices (and thereby before
NVDIMMs are initialized), this isn't a fix but merely a cleanup.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211102164317.45658-2-david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 5ead62185d23caad41ef2afc80773fb384e40229
https://github.com/qemu/qemu/commit/5ead62185d23caad41ef2afc80773fb384e40229
Author: David Hildenbrand <david@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M include/exec/memory.h
M softmmu/memory.c
Log Message:
-----------
memory: Make memory_region_is_mapped() succeed when mapped via an alias
memory_region_is_mapped() currently does not return "true" when a memory
region is mapped via an alias.
Assuming we have:
alias (A0) -> alias (A1) -> region (R0)
Mapping A0 would currently only make memory_region_is_mapped() succeed
on A0, but not on A1 and R0.
Let's fix that by adding a "mapped_via_alias" counter to memory regions and
updating it accordingly when an alias gets (un)mapped.
I am not aware of actual issues, this is rather a cleanup to make it
consistent.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211102164317.45658-3-david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 455faf03df1a9beff236e3b194cad93e4b014076
https://github.com/qemu/qemu/commit/455faf03df1a9beff236e3b194cad93e4b014076
Author: David Hildenbrand <david@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M include/exec/memory.h
Log Message:
-----------
memory: Update description of memory_region_is_mapped()
Let's update the documentation, making it clearer what the semantics
of memory_region_is_mapped() actually are.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211102164317.45658-4-david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 7b0538ed3a22ce30817f818449d10701fb0821f9
https://github.com/qemu/qemu/commit/7b0538ed3a22ce30817f818449d10701fb0821f9
Author: Peter Xu <peterx@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M softmmu/memory.c
Log Message:
-----------
memory: Fix incorrect calls of log_global_start/stop
We should only call the log_global_start/stop when the global dirty track
bitmask changes from zero<->non-zero.
No real issue reported for this yet probably because no immediate user to
enable both dirty rate measurement and migration at the same time. However
it'll be good to be prepared for it.
Fixes: 63b41db4bc ("memory: make global_dirty_tracking a bitmask")
Cc: qemu-stable@nongnu.org
Cc: Hyman Huang <huangy81@chinatelecom.cn>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211130080028.6474-1-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: e3ae2bbfcac6400c1eff72b5e89d093dd5758f56
https://github.com/qemu/qemu/commit/e3ae2bbfcac6400c1eff72b5e89d093dd5758f56
Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M stubs/meson.build
Log Message:
-----------
stubs: Restrict fw_cfg to system emulation
fw_cfg_arch_key_name() stub is only required for sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-2-f4bug@amsat.org>
Commit: 33cda58f0064fdeffe0c13bf340c63878e321f19
https://github.com/qemu/qemu/commit/33cda58f0064fdeffe0c13bf340c63878e321f19
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/nvram/meson.build
Log Message:
-----------
hw/nvram: Restrict fw_cfg QOM interface to sysemu and tools
fw_cfg QOM interface is required by system emulation and
qemu-storage-daemon. User-mode emulation doesn't need it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-3-f4bug@amsat.org>
Commit: e0431aafc48ed0bea934148fb7266dbe36ef7685
https://github.com/qemu/qemu/commit/e0431aafc48ed0bea934148fb7266dbe36ef7685
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M stubs/meson.build
Log Message:
-----------
hw/pci: Restrict pci-bus stub to sysemu
Neither tools nor user-mode emulation require the PCI bus stub.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-4-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 1efc6b319cfab73176412d86fa8f3702ed30c867
https://github.com/qemu/qemu/commit/1efc6b319cfab73176412d86fa8f3702ed30c867
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M include/hw/pci/pci.h
Log Message:
-----------
hw/pci: Document pci_dma_map()
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220111184309.28637-5-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: fd5e451edbebecaa65d2e6fef09b9afd7eefc951
https://github.com/qemu/qemu/commit/fd5e451edbebecaa65d2e6fef09b9afd7eefc951
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M include/sysemu/dma.h
Log Message:
-----------
hw/dma: Remove CONFIG_USER_ONLY check
DMA API should not be included in user-mode emulation.
If so, build should fail. Remove the CONFIG_USER_ONLY check.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-6-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: ce0a7982855afd873600a4180161adbfaef24cc1
https://github.com/qemu/qemu/commit/ce0a7982855afd873600a4180161adbfaef24cc1
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/rdma/rdma_utils.c
M hw/rdma/rdma_utils.h
Log Message:
-----------
hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument
Various APIs use 'pval' naming for 'pointer to val'.
rdma_pci_dma_map() uses 'plen' for 'PCI length', but since
'PCI' is already explicit in the function name, simplify
and rename the argument 'len'. No logical change.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Tested-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Message-Id: <20220111184309.28637-7-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 5f412602ded57bbdce614685eba915f6042dda1d
https://github.com/qemu/qemu/commit/5f412602ded57bbdce614685eba915f6042dda1d
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/scsi/megasas.c
M hw/scsi/scsi-bus.c
M hw/scsi/scsi-disk.c
M include/hw/scsi/scsi.h
M softmmu/dma-helpers.c
Log Message:
-----------
hw/scsi: Rename SCSIRequest::resid as 'residual'
The 'resid' field is slightly confusing and could be
interpreted as some ID. Rename it as 'residual' which
is clearer to review. No logical change.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-8-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 60791a2c27e1b8f82ff035a474b2f96f0fafa66c
https://github.com/qemu/qemu/commit/60791a2c27e1b8f82ff035a474b2f96f0fafa66c
Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/ide/ahci.c
M hw/rdma/trace-events
Log Message:
-----------
hw/dma: Fix format string issues using dma_addr_t
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220111184309.28637-10-f4bug@amsat.org>
Commit: 026644cf5f9fd8c27ea7f4f2fd4fea8102b30001
https://github.com/qemu/qemu/commit/026644cf5f9fd8c27ea7f4f2fd4fea8102b30001
Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M include/sysemu/dma.h
Log Message:
-----------
hw/dma: Move ScatterGatherEntry / QEMUSGList declarations around
In the next commit we will use the dma_addr_t type in the QEMUSGList
structure. Since currently dma_addr_t is defined after QEMUSGList,
move the declarations to have dma_addr_t defined first. This is a
pure code-movement patch.
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220111184309.28637-10-f4bug@amsat.org>
Commit: bfa30f3903e0542611196b21f5832a4be5775a21
https://github.com/qemu/qemu/commit/bfa30f3903e0542611196b21f5832a4be5775a21
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/nvme/ctrl.c
M hw/rdma/rdma_utils.c
M hw/scsi/megasas.c
M include/sysemu/dma.h
M softmmu/dma-helpers.c
Log Message:
-----------
hw/dma: Use dma_addr_t type definition when relevant
Update the obvious places where dma_addr_t should be used
(instead of uint64_t, hwaddr, size_t, int32_t types).
This allows to have &dma_addr_t type portable on 32/64-bit
hosts.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220111184309.28637-11-f4bug@amsat.org>
Commit: f02b664aad8f1aaafbcdf45285f6fcab0a4bd5d0
https://github.com/qemu/qemu/commit/f02b664aad8f1aaafbcdf45285f6fcab0a4bd5d0
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M hw/ide/ahci.c
M hw/nvme/ctrl.c
M hw/scsi/megasas.c
M hw/scsi/scsi-bus.c
M include/hw/scsi/scsi.h
M include/sysemu/dma.h
M softmmu/dma-helpers.c
Log Message:
-----------
hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult
Since commit 292e13142d2, dma_buf_rw() returns a MemTxResult type.
Do not discard it, return it to the caller. Pass the previously
returned value (the QEMUSGList residual size, which was rarely used)
as an optional argument.
With this new API, SCSIRequest::residual might now be accessed via
a pointer. Since the size_t type does not have the same size on
32 and 64-bit host architectures, convert it to a uint64_t, which
is big enough to hold the residual size, and the type is constant
on both 32/64-bit hosts.
Update the few dma_buf_read() / dma_buf_write() callers to the new
API.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220117125130.131828-1-f4bug@amsat.org>
Commit: 9d696cd50442327fd71ec7309e7b0c6fee693b1d
https://github.com/qemu/qemu/commit/9d696cd50442327fd71ec7309e7b0c6fee693b1d
Author: Alex Bennée <alex.bennee@linaro.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M docs/devel/memory.rst
Log Message:
-----------
docs/devel: add some clarifying text for aliases
We do mention the limitation of single parenthood for
memory_region_add_subregion but lets also make it clear how aliases
help solve that conundrum.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220110175104.2908956-7-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit: 8b846207151955a7d4de2d33d07645991824e345
https://github.com/qemu/qemu/commit/8b846207151955a7d4de2d33d07645991824e345
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2022-01-18 (Tue, 18 Jan 2022)
Changed paths:
M docs/devel/memory.rst
M hw/core/machine.c
M hw/ide/ahci.c
M hw/nvme/ctrl.c
M hw/nvram/meson.build
M hw/rdma/rdma_utils.c
M hw/rdma/rdma_utils.h
M hw/rdma/trace-events
M hw/scsi/megasas.c
M hw/scsi/scsi-bus.c
M hw/scsi/scsi-disk.c
M include/exec/memory.h
M include/hw/pci/pci.h
M include/hw/scsi/scsi.h
M include/sysemu/dma.h
M softmmu/dma-helpers.c
M softmmu/memory.c
M stubs/meson.build
Log Message:
-----------
Merge remote-tracking branch 'remotes/philmd/tags/memory-api-20220118' into
staging
Memory API patches
- Directly dispatch MemoryRegion alias accesses
- Remove duplicated Address Space information in 'info mtree'
- Cleanups around memory_region_is_mapped()
- Fix incorrect calls of log_global_start/stop()
- Use dma_addr_t type definition when relevant
- Let dma_buf_read() / dma_buf_write() propagate MemTxResult
- Clarify MemoryRegion aliases documentation
# gpg: Signature made Tue 18 Jan 2022 12:01:10 GMT
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>"
[unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* remotes/philmd/tags/memory-api-20220118:
docs/devel: add some clarifying text for aliases
hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult
hw/dma: Use dma_addr_t type definition when relevant
hw/dma: Move ScatterGatherEntry / QEMUSGList declarations around
hw/dma: Fix format string issues using dma_addr_t
hw/scsi: Rename SCSIRequest::resid as 'residual'
hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument
hw/dma: Remove CONFIG_USER_ONLY check
hw/pci: Document pci_dma_map()
hw/pci: Restrict pci-bus stub to sysemu
hw/nvram: Restrict fw_cfg QOM interface to sysemu and tools
stubs: Restrict fw_cfg to system emulation
memory: Fix incorrect calls of log_global_start/stop
memory: Update description of memory_region_is_mapped()
memory: Make memory_region_is_mapped() succeed when mapped via an alias
machine: Use host_memory_backend_is_mapped() in machine_consume_memdev()
memory: Have 'info mtree' remove duplicated Address Space information
memory: Split mtree_info() as mtree_info_flatview() + mtree_info_as()
memory: Directly dispatch alias accesses on origin memory region
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/6621441db50d...8b8462071519
- [Qemu-commits] [qemu/qemu] 1a59bd: memory: Directly dispatch alias accesses on origin...,
Peter Maydell <=