Before this change, the information from a XML file was stored in an
array that is not descriptive. Introduce a dedicated structure type to
make it easier to understand and to extend with more fields.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
MAINTAINERS
atic_features (Philippe Mathieu-Daudé)
Dropped RFC.
Akihiko Odaki (24):
contrib/plugins: Use GRWLock in execlog
gdbstub: Introduce GDBFeature structure
gdbstub: Add num_regs member to GDBFeature
gdbstub: Introduce gdb_find_static_feature()
target/arm: Move the reference to arm-core.xml
tten later. Looking up arm-core.xml results in an error as
it will not be embedded in the AArch64 build.
Signed-off-by: Akihiko Odaki
---
target/arm/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 93c28d50e5..d71a162070 100644
--
This function is useful to determine the number of registers exposed to
GDB from the XML name.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
include/exec/gdbstub.h | 2 ++
gdbstub/gdbstub.c | 13 +
2 files changed, 15 insertions(+)
diff --git a/include
utilize additional information provided by
GDBFeature to simplify XML file lookup.
Signed-off-by: Akihiko Odaki
---
include/hw/core/cpu.h | 5 +++--
target/s390x/cpu.h | 2 --
gdbstub/gdbstub.c | 6 +++---
target/arm/cpu.c| 4 ++--
target/arm/cpu64.c | 4 ++--
target/arm
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
target/arm/cpu.h | 20 +--
target
Simplify GDBRegisterState by replacing num_regs and xml members with
one member that points to GDBFeature.
Signed-off-by: Akihiko Odaki
---
gdbstub/gdbstub.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index e84364e97c
This is a tree-wide change to introduce GDBFeature parameter to
gdb_register_coprocessor(). The new parameter just replaces num_regs
and xml parameters for now. GDBFeature will be utilized to simplify XML
lookup in a following change.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
target/ppc/cpu-qom.h | 3 +--
target/ppc/cpu.h
In preparation for a change to use GDBFeature as a parameter of
gdb_register_coprocessor(), convert the internal representation of
dynamic feature from plain XML to GDBFeature.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
target/riscv/cpu.h | 4 ++--
target/riscv
Now we know all instances of GDBFeature that is used in CPU so we can
traverse them to find XML. This removes the need for a CPU-specific
lookup function for dynamic XMLs.
Signed-off-by: Akihiko Odaki
---
gdbstub/gdbstub.c | 28 +---
1 file changed, 9 insertions(+), 19
he ptr array gets reallocated, the other threads may have
a stale reference to the old buffer. This results in use-after-free.
Use GRWLock to properly fix this issue.
Fixes: 3d7caf145e ("contrib/plugins: add execlog to log instruction execution
and memory access")
Signed-off-by: Akihi
These members will be used to help plugins to identify registers.
Signed-off-by: Akihiko Odaki
---
target/arm/gdbstub.c | 46 +++---
target/arm/gdbstub64.c | 42 +-
2 files changed, 58 insertions(+), 30 deletions(-)
diff
These members will be used to help plugins to identify registers.
Signed-off-by: Akihiko Odaki
---
target/ppc/gdbstub.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
index 19c4935260..ac4ed12371 100644
--- a/target/ppc
: Akihiko Odaki
---
include/hw/core/cpu.h | 6 --
target/alpha/cpu.h| 6 --
target/arm/cpu.h | 13 +
target/avr/cpu.h | 6 --
target/cris/cpu.h | 9 ++---
target/hexagon/internal.h | 6 --
target/hppa
These members will be used to help plugins to identify registers.
The added members in instances of GDBFeature dynamically generated by
CPUs will be filled in later changes.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h | 2 ++
scripts/feature_to_c.py | 14 +-
2 files
gdb_foreach_feature() enumerates features that are useful to identify
registers. gdb_read_register() actually reads registers.
Signed-off-by: Akihiko Odaki
---
include/exec/gdbstub.h | 6 ++
gdbstub/gdbstub.c | 38 ++
2 files changed, 36 insertions
This function is no longer used.
Signed-off-by: Akihiko Odaki
---
include/hw/core/cpu.h | 4
target/arm/cpu.h | 6 --
target/ppc/cpu.h | 1 -
target/arm/cpu.c | 1 -
target/arm/gdbstub.c | 18 --
target/ppc/cpu_init.c | 3 ---
target/ppc/gdbstub.c
This demonstrates how a register can be read from a plugin.
Signed-off-by: Akihiko Odaki
---
docs/devel/tcg-plugins.rst | 10 ++-
contrib/plugins/execlog.c | 130 -
2 files changed, 108 insertions(+), 32 deletions(-)
diff --git a/docs/devel/tcg-plugins.rst
gdb_has_xml is no longer referenced by the other components.
Signed-off-by: Akihiko Odaki
---
gdbstub/internals.h| 8
include/exec/gdbstub.h | 8
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index f2b46cce41
Make qemu-plugin.h consumable for C++ platform.
Signed-off-by: Akihiko Odaki
---
include/qemu/qemu-plugin.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index 214b12bfd6..8637e3d8cf 100644
--- a/include/qemu/qemu-plugin.h
+++ b
This demonstrates how to write a plugin in C++.
Signed-off-by: Akihiko Odaki
---
docs/devel/tcg-plugins.rst | 8
configure | 15 ---
contrib/plugins/Makefile | 5 +
contrib/plugins/cc.cc | 17 +
tests/tcg/Makefile.target | 3
It is based on GDB protocol to ensure interface stability.
The timing of the vcpu init hook is also changed so that the hook will
get called after GDB features are initialized.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706
Signed-off-by: Akihiko Odaki
---
include/qemu/qemu
These members will be used to help plugins to identify registers.
Signed-off-by: Akihiko Odaki
---
target/riscv/gdbstub.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c
index 224c69ea99..b3d4d4de3e
On 2023/08/02 18:34, Helge Deller wrote:
On 8/2/23 10:44, Akihiko Odaki wrote:
On 2023/08/02 17:42, Helge Deller wrote:
On 8/2/23 09:49, Akihiko Odaki wrote:
On 2023/08/02 8:27, Helge Deller wrote:
Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address
for all
32-bit
On 2023/08/04 10:45, Richard Henderson wrote:
This variable is unused.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
Ensure that the chosen values for mmap_next_start and
task_unmapped_base are within the guest address space.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
Provide default values that are as close as possible to the
values used by the guest's kernel.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
Copy each guest kernel's default value, then bound it
against reserved_va or the host address space.
Signed-off-by: Richard Henderson
---
linux-user/aarch64/target_mman.h | 3 +++
linux-user/alpha/target_mman.h | 3 +++
linux-user/ar
On 2023/08/04 10:45, Richard Henderson wrote:
Use this as extra protection for the guest mapping over
any qemu host mappings.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
-by: Akihiko Odaki
brk.
Signed-off-by: Helge Deller
[rth: Re-order after ELF_ET_DYN_BASE patch so that we do not
"temporarily break" tsan, and also to minimize the changes required.
Remove image_info.reserve_brk as unused.]
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
The heap starts at "brk" not "start_brk". With this fixed,
image_info.start_brk is unused and may be removed.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
Remove TARGET_ELF_EXEC_PAGESIZE, and 3 other TARGET_ELF_PAGE* macros
based off of that. Rely on target_mmap to handle guest vs host page
size mismatch.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
Rely on target_mmap to handle guest vs host page size mismatch.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
On 2023/08/04 10:45, Richard Henderson wrote:
If p_filesz == 0, then vaddr_ef == vaddr. We can reuse the
code in zero_bss rather than incompletely duplicating it in
load_elf_image.
Signed-off-by: Richard Henderson
Reviewed-by: Akihiko Odaki
Signed-off-by: Akihiko Odaki
---
Based-on: <20230804014517.6361-1-richard.hender...@linaro.org>
("[PATCH for-8.1 v8 00/17] linux-user: brk fixes")
linux-user/mmap.c | 65 +--
1 file changed, 40 insertions(+), 25 deletions(-)
diff -
rtwl
Signed-off-by: Gurchetan Singh
---
v1: Incorported various suggestions by Akihiko Odaki and Bernard Berschow
- Removed GET_VIRTIO_GPU_GL / GET_RUTABAGA macros
- Used error_report(..)
- Used g_autofree to fix leaks on error paths
- Removed unnecessary casts
- added virtio-
On 2023/08/04 8:55, Gurchetan Singh wrote:
From: Gurchetan Singh
This adds basic documentation for virtio-gpu.
Suggested-by: Akihiko Odaki
Signed-off-by: Gurchetan Singh
---
v2: - Incorporated suggestions by Akihiko Odaki
- Listed the currently supported capset_names (Bernard)
v3
ehind
an opaque handle. For now this is just the gdb_regnum encapsulated in
an anonymous GPOINTER but in future as we add more state for plugins
to track we can expand it.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706
Cc: Akihiko Odaki
Message-Id: <20240103173349.398526-39-
On 2024/02/27 19:08, Alex Bennée wrote:
Akihiko Odaki writes:
On 2024/02/27 1:56, Alex Bennée wrote:
We can only request a list of registers once the vCPU has been
initialised so the user needs to use either call the get function on
vCPU initialisation or during the translation phase.
We
On 2024/02/27 19:29, Alex Bennée wrote:
Akihiko Odaki writes:
On 2024/02/27 19:08, Alex Bennée wrote:
Akihiko Odaki writes:
On 2024/02/27 1:56, Alex Bennée wrote:
We can only request a list of registers once the vCPU has been
initialised so the user needs to use either call the get
On 2024/02/27 23:43, Alex Bennée wrote:
Expose an internal API to QEMU to return all the registers for a vCPU.
The list containing the details required to called gdb_read_register().
Based-on: <20231025093128.33116-15-akihiko.od...@daynix.com>
Cc: Akihiko Odaki
Mess
ehind
an opaque handle. For now this is just the gdb_regnum encapsulated in
an anonymous GPOINTER but in future as we add more state for plugins
to track we can expand it.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1706
Cc: Akihiko Odaki
Message-Id: <20240103173349.398526-39-
ualization Management
command")
Suggested-by: Michael S. Tsirkin
Signed-off-by: Akihiko Odaki
---
hw/nvme/ctrl.c | 26 --
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index f026245d1e9e..7a56e7b79b4d 100644
--- a/hw/nv
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization errors at PF
realization time.
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 8
e literal UINT32_MAX (0x or 4294967295) by
chance.
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 84df07a2789b..cb5ac46e9f27 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -71,7 +71,7 @@ sta
.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci_device.h | 5 +
hw/vfio/pci.c | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h
index ca151325085d..6be0f989ebe0 100644
--- a/include/hw/pci
A device gets automatically unrealized when being unparented.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index e9b23221d713..8b1fd2a89ad7 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
The renamed state will not only represent powering state of PFs, but
also represent SR-IOV VF enablement in the future.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci.h| 7 ++-
include/hw/pci/pci_device.h | 2 +-
hw/pci/pci.c| 14 +++---
hw/pci
Call pcie_sriov_pf_reset() from pci_do_device_reset() just as we do
for msi_reset() and msix_reset() to prevent duplicating code for each
SR-IOV PF.
Signed-off-by: Akihiko Odaki
---
hw/net/igb.c | 2 --
hw/nvme/ctrl.c | 4
hw/pci/pci.c | 1 +
3 files changed, 1 insertion(+), 6
not only disable VFs but also resets the capability.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 4 ++--
hw/net/igb.c| 2 +-
hw/nvme/ctrl.c | 2 +-
hw/pci/pcie_sriov.c | 26 ++
4 files changed, 22 insertions(+), 12
n
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 51b66d1bb342..e9b23221d713 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -215,7 +215,6
pcie_sriov doesn't have code to restore its state after migration, but
igb, which uses pcie_sriov, naively claimed its migration capability.
Add code to register VFs after migration and fix igb migration.
Fixes: 3a977deebe6b ("Intrdocue igb device emulation")
Signed-off-by
num_vfs is not migrated so use PCI_SRIOV_CTRL_VFE and PCI_SRIOV_NUM_VF
instead.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pcie_sriov.h | 1 -
hw/pci/pcie_sriov.c | 28
hw/pci/trace-events | 2 +-
3 files changed, 21 insertions(+), 10
prevent potential breakage.
Signed-off-by: Akihiko Odaki
Reviewed-by: Markus Armbruster
---
hw/pci/pci.c | 8
hw/xen/xen_pt_load_rom.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 54b375da2d26..84df07a2789b 100644
--- a
The guest may write NumVFs greater than TotalVFs and that can lead
to buffer overflow in VF implementations.
Cc: qemu-sta...@nongnu.org
Fixes: CVE-2024-26327
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
-
It is no longer used.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Markus Armbruster
---
include/hw/qdev-core.h | 4
hw/core/qdev.c | 1 -
system/qdev-monitor.c | 12 +++-
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pci/pcie_sriov.
://patchew.org/QEMU/20231210-sriov-v2-0-b959e8a6d...@daynix.com/
Signed-off-by: Akihiko Odaki
---
Changes in v8:
- Clarified that "hw/pci: Replace -1 with UINT32_MAX for romsize" is
not a bug fix. (Markus Armbruster)
- Squashed patch "vfio: Avoid inspecting option QDict for rombar&
On 2024/02/29 1:23, Sriram Yagnaraman wrote:
-Original Message-
From: Akihiko Odaki
Sent: Wednesday, 28 February 2024 12:33
To: Philippe Mathieu-Daudé ; Michael S. Tsirkin
; Marcel Apfelbaum ;
Alex Williamson ; Cédric Le Goater
; Paolo Bonzini ; Daniel P.
Berrangé ; Eduardo Habkost
Ensure register handles are not NULL so that a plugin can assume NULL is
invalid as a register handle.
Signed-off-by: Akihiko Odaki
---
plugins/api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/api.c b/plugins/api.c
index 81f43c9ce8a4..74e24f0697cd 100644
Contexts of some CPUs may be lacking or corrupted due to premature boot,
but the output may still contain valuable information of other CPUs and
memory.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/main.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a
rol64() is roubust against too large shift values and fixes UBSan
warnings.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/main.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index dd686280f981..432f8629f321 100644
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c
index 980a7aa5f8fb..d546a400dfda 100644
--- a
Signed-off-by: Akihiko Odaki
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 65dfdc9677e4..d25403f3709b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3583,6 +3583,7 @@ F: util/iova-tree.c
elf2dmp
M: Viktor Prutyanov
+R: Akihiko Odaki
S
This resolved UBSan warnings.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/pdb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index 40991f5f4c34..2541234205c3 100644
--- a/contrib/elf2dmp/pdb.c
+++ b/contrib/elf2dmp
elf2dmp sometimes fails to work with partially corrupted dumps, and also
emits warnings when sanitizers are in use. This series are collections
of changes to improve the situation.
Signed-off-by: Akihiko Odaki
---
Akihiko Odaki (7):
contrib/elf2dmp: Always check for PA resolution failure
Destroy PA space even if paging base couldn't be found, fixing memory
leak.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index cbc38a7c103a..dd686280f981 100644
Not checking PA resolution failure can result in NULL deference.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.c | 46 -
1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp
don't use common blocks by default[1][2] so
any remaining use of common blocks should be intentional. Remove
--warn-common ldflag to suppress warnings for intentional use of
common blocks.
[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678
[2]: https://reviews.llvm.org/D75056
Signed-off-by
On 2024/03/05 2:52, Peter Maydell wrote:
On Sun, 3 Mar 2024 at 10:53, Akihiko Odaki wrote:
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a
elf2dmp sometimes fails to work with partially corrupted dumps, and also
emits warnings when sanitizers are in use. This series are collections
of changes to improve the situation.
Signed-off-by: Akihiko Odaki
---
Changes in v2:
- Added patch "contrib/elf2dmp: Remove unnecessary err
include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.h | 6 +--
contrib/elf2dmp/download.h | 2 +-
contrib/elf2dmp/pdb.h | 2 +-
contrib/elf2dmp/q
A common construct in contrib/elf2dmp is to set "err" flag and goto
in error paths. In such a construct, there is only one successful path
while there are several error paths, so it will be more simpler to
initialize "err" flag set, and clear it in the successful path.
Si
They are always evaluated to 1.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/pdb.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index 40991f5f4c34..abf17c2e7c12 100644
--- a/contrib/elf2dmp/pdb.c
+++ b
rol64() is roubust against too large shift values and fixes UBSan
warnings.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp/main.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 65dfdc9677e4..d25403f3709b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3583,6 +3583,7 @@ F: util/iova-tree.c
elf2dmp
M: Viktor
elf2dmp assumes little endian host in many places.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/elf2dmp/meson.build b/contrib/elf2dmp/meson.build
index 6707d43c4fa5..046569861f7a 100644
--- a/contrib
This fixes crashes with truncated dumps.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2202
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/qemu_elf.c | 87 +-
1 file changed, 55 insertions(+), 32 deletions(-)
diff --git a/contrib/elf2dmp
This removes the need to enumarate QEMUCPUState twice and saves code.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/qemu_elf.c | 25 -
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c
index
Destroy PA space even if paging base couldn't be found, fixing memory
leak.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
This resolved UBSan warnings.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/pdb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index 1c5051425185..492aca4434c8 100644
--- a/contrib/elf2dmp/pdb.c
+++ b/contrib/elf2dmp
Not checking PA resolution failure can result in NULL deference.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.c | 46 -
1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c
index e01860d15b07..81295a11534a 100644
--- a
Let fill_context() continue even if it fails to fill contexts of some
CPUs. A dump may still contain valuable information even if it lacks
contexts of some CPUs due to dump corruption or a failure before
starting CPUs.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp
SR-IOV requires PCI Express.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index aac12e70f122..c449ddd0ac39 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -41,6 +41,11
A SR-IOV VF cannot have a ROM BAR.
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index cb5ac46e9f27..201ff64e11cc 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2359,6
Allow user to attach SR-IOV VF to a virtio-pci PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-pci.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 1a7039fb0c68..f6a2dbb3b5e2 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw
-creatable VFs can be attached calls
pcie_sriov_pf_init_from_user_created_vfs() during realization and
pcie_sriov_pf_exit() when exiting.
Signed-off-by: Akihiko Odaki
---
include/hw/pci/pci_device.h | 6 +-
include/hw/pci/pcie_sriov.h | 19 +++
hw/pci/pci.c| 62 ++
hw/pci
A device cannot be a SR-IOV PF and a VF at the same time.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 09a53ed30027..aac12e70f122 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci
A virtio-net device can be added as a SR-IOV VF to another virtio-pci
device that will be the PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-net-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
index e03543a70a75
689731808-3009-1-git-send-email-yui.wash...@gmail.com/
[2] https://lore.kernel.org/all/5d46f455-f530-4e5e-9ae7-13a2297d4...@daynix.com/
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
Changes in v3:
- Rebased.
- Link to v2:
https://lore.kernel.org/r/20231210-sriov-v2-0-b959e8a
On 2024/03/05 22:28, Peter Maydell wrote:
On Tue, 5 Mar 2024 at 07:36, Akihiko Odaki wrote:
include/qapi/error.h says:
We recommend
* bool-valued functions return true on success / false on failure,
...
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.h | 6 +--
contrib
On 2024/03/05 22:33, Peter Maydell wrote:
On Tue, 5 Mar 2024 at 07:37, Akihiko Odaki wrote:
elf2dmp assumes little endian host in many places.
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/elf2dmp
They are always evaluated to 1.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp/pdb.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
index 40991f5f4c34..abf17c2e7c12 100644
--- a
A common construct in contrib/elf2dmp is to set "err" flag and goto
in error paths. In such a construct, there is only one successful path
while there are several error paths, so it will be more simpler to
initialize "err" flag set, and clear it in the successful path.
Si
include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...
Signed-off-by: Akihiko Odaki
---
contrib/elf2dmp/addrspace.h | 4 ++--
contrib/elf2dmp/addrspace.c | 8
contrib/elf2dmp/main.c
rol64() is roubust against too large shift values and fixes UBSan
warnings.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp/main.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index
This makes elf2dmp more robust against corrupted inputs.
Signed-off-by: Akihiko Odaki
Reviewed-by: Peter Maydell
---
contrib/elf2dmp/addrspace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c
index e01860d15b07
101 - 200 of 3443 matches
Mail list logo