[PATCH 33/40] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki This function is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20231213-gdb-v17-9-777047380...@daynix.com> Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 4 target/arm/cpu.h | 6 -- target/ppc/cpu.h | 1 -

[PATCH 17/40] tests/unit: Bump test-aio-multithread test timeout to 2 minutes

2023-12-21 Thread Alex Bennée
From: Thomas Huth When running the tests in slow mode on a very loaded system and with --enable-debug, the test-aio-multithread can take longer than 1 minute. Bump the timeout to two minutes to make sure that it also passes in such situations. Signed-off-by: Thomas Huth Message-Id: <20231215070

[PATCH 28/40] gdbstub: Use GDBFeature for gdb_register_coprocessor

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki 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 Acked-by: A

[PATCH 27/40] target/riscv: Use GDBFeature for dynamic XML

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki 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 Message-Id: <20231213-gdb-v17-3-777047380...@daynix.com> Signed-off-b

[PATCH 26/40] target/ppc: Use GDBFeature for dynamic XML

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki 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: Richard Henderson Message-Id: <20231213-gdb-v17-2-77704

[PATCH 18/40] tests/unit: Bump test-crypto-block test timeout to 5 minutes

2023-12-21 Thread Alex Bennée
From: Thomas Huth When running the tests in slow mode on a very loaded system and with --enable-debug, the test-crypto-block can take longer than 4 minutes. Bump the timeout to 5 minutes to make sure that it also passes in such situations. Signed-off-by: Thomas Huth Message-Id: <20231215070357.

[PATCH 24/40] target/riscv: Validate misa_mxl_max only once

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki misa_mxl_max is now a class member and initialized only once for each class. This also moves the initialization of gdb_core_xml_file which will be referenced before realization in the future. Signed-off-by: Akihiko Odaki Message-Id: <20231213-riscv-v7-4-a760156a3...@daynix.c

[PATCH 20/40] mtest2make: stop disabling meson test timeouts

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The mtest2make.py script passes the arg '-t 0' to 'meson test' which disables all test timeouts. This is a major source of pain when running in GitLab CI and a test gets stuck. It will stall until GitLab kills the CI job. This leaves us with little easily consumable infor

[PATCH 22/40] target/riscv: Remove misa_mxl validation

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki It is initialized with a simple assignment and there is little room for error. In fact, the validation is even more complex. Signed-off-by: Akihiko Odaki Acked-by: LIU Zhiwei Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20231213-riscv-v7-2-

[PATCH 16/40] tests/qtest: Bump the device-introspect-test timeout to 12 minutes

2023-12-21 Thread Alex Bennée
From: Thomas Huth When running the test in slow mode on a very loaded system with the arm/aarch64 target and with --enable-debug, it can take longer than 10 minutes to finish the introspection test. Bump the timeout to twelve minutes to make sure that it also finishes in such situations. Signed-

[PATCH 23/40] target/riscv: Move misa_mxl_max to class

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki misa_mxl_max is common for all instances of a RISC-V CPU class so they are better put into class. Signed-off-by: Akihiko Odaki Message-Id: <20231213-riscv-v7-3-a760156a3...@daynix.com> Signed-off-by: Alex Bennée --- target/riscv/cpu.h | 4 +- target/riscv/cpu.c

[PATCH 25/40] target/arm: Use GDBFeature for dynamic XML

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki 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 Acked-by: Richard Henderson Message-Id: <20231213-gdb-v17-1-77704738

[PATCH 29/40] gdbstub: Use GDBFeature for GDBRegisterState

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki Simplify GDBRegisterState by replacing num_regs and xml members with one member that points to GDBFeature. Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée Message-Id: <20231213-gdb-v17-5-777047380...@daynix.com> Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 14

[PATCH 31/40] gdbstub: Simplify XML lookup

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki 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 Reviewed-by: Alex Bennée Message-Id: <20231213-gdb-v17-7-777047380...@day

[PATCH 21/40] hw/riscv: Use misa_mxl instead of misa_mxl_max

2023-12-21 Thread Alex Bennée
From: Akihiko Odaki The effective MXL value matters when booting. Signed-off-by: Akihiko Odaki Message-Id: <20231213-riscv-v7-1-a760156a3...@daynix.com> Signed-off-by: Alex Bennée --- hw/riscv/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/boot.c b/hw/risc

Re: [PATCH 6/6] nbd/server: introduce NBDClient->lock to protect fields

2023-12-21 Thread Kevin Wolf
Am 21.12.2023 um 02:49 hat Stefan Hajnoczi geschrieben: > NBDClient has a number of fields that are accessed by both the export > AioContext and the main loop thread. When the AioContext lock is removed > these fields will need another form of protection. > > Add NBDClient->lock and protect fields

[PATCH 3/6] target/riscv: Add pointer masking tb flags

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 19 +-- target/riscv/cpu_helper.c | 4 target/riscv/translate.c | 10 ++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index

[PATCH 36/40] gdbstub: expose api to find registers

2023-12-21 Thread Alex Bennée
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 Signed-off-by: Alex Bennée --- v2 - just make gdb_get_register_list ret

[PATCH 4/6] target/riscv: Add functions to calculate current number of masked bits for pointer masking

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 2 ++ target/riscv/cpu_helper.c | 49 +++ 2 files changed, 51 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 2099168950..9a8e5bc022 100644 --- a/targe

[PATCH 37/40] plugins: add an API to read registers

2023-12-21 Thread Alex Bennée
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 don't expose the reg number to the plugin instead hiding it behind an opaque handle. This allows for a bit of

[PATCH 0/6] Pointer Masking update for Zjpm v0.8

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Hi all, It looks like Zjpm v0.8 is almost frozen and we don't expect it change drastically anymore. Compared to the original implementation with explicit base and mask CSRs, we now only have several fixed options for number of masked bits which are set using existing CSRs.

[PATCH 39/40] contrib/plugins: extend execlog to track register changes

2023-12-21 Thread Alex Bennée
With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow down if a large number of register values are being tracked. This could be improved by only instrumenting instructions which mention registers we are interested

[PATCH 1/6] target/riscv: Remove obsolete pointer masking extension code.

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Zjpm v0.8 is almost frozen and it's much simplier compared to the existing one: The newer version doesn't allow to specify custom mask or base for masking. Instead it allows only certain options for masking top bits. Signed-off-by: Alexey Baturo --- target/riscv/cpu.c

[PATCH 03/40] gitlab: include microblazeel in testing

2023-12-21 Thread Alex Bennée
This reverts aeb5f8f248e (gitlab: build the correct microblaze target) now we actually have a little-endian test in avocado thanks to this years advent calendar. Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.git

[PATCH 6/6] target/riscv: Enable updates for pointer masking variables and thus enable pointer masking extension

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.c| 9 + target/riscv/cpu_helper.c | 1 + target/riscv/csr.c| 4 target/riscv/machine.c| 1 + target/riscv/pmp.c| 1 + 5 files changed, 16 insertions(+) diff --git a/target/riscv/cpu.c

[PATCH 2/6] target/riscv: Add new CSR fields for S{sn, mn, m}pm extensions as part of Zjpm v0.8

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h | 8 target/riscv/cpu_bits.h | 3 +++ target/riscv/cpu_cfg.h | 3 +++ target/riscv/csr.c | 11 +++ target/riscv/machine.c | 6 -- target/riscv/pmp.c | 13 ++--- target/riscv

[PATCH 01/40] tests/avocado: Add a test for a little-endian microblaze machine

2023-12-21 Thread Alex Bennée
From: Thomas Huth We've already got a test for a big endian microblaze machine, but so far we lack one for a little endian machine. Now that the QEMU advent calendar featured such an image, we can test the little endian mode, too. Signed-off-by: Thomas Huth Message-Id: <20231215161851.71508-1-t

[PATCH 14/40] qtest: bump aspeed_smc-test timeout to 6 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé On a loaded system with --enable-debug, this test can take longer than 5 minutes. Raising the timeout to 6 minutes gives greater headroom for such situations. Signed-off-by: Daniel P. Berrangé [thuth: Increase the timeout to 6 minutes for very loaded systems] Signed-off

[PATCH 04/40] chardev: use bool for fe_is_open

2023-12-21 Thread Alex Bennée
The function qemu_chr_fe_init already treats be->fe_open as a bool and if it acts like a bool it should be one. While we are at it make the variable name more descriptive and add kdoc decorations. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231211145959.93759-1-

[PATCH 06/40] qtest: bump migration-test timeout to 8 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The migration test should take between 1 min 30 and 2 mins on reasonably modern hardware. The test is not especially compute bound, rather its running time is dominated by the guest RAM size relative to the bandwidth cap, which forces each iteration to take at least 30 se

[PATCH 13/40] qtest: bump qos-test timeout to 2 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The qos-test takes just under 1 minute in a --enable-debug build. Bumping to 2 minutes will give more headroom. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-ID: <20230717182859.707658-10-berra...@redhat.com> Signed-off-by: Thomas Huth Message-Id:

[PATCH 40/40] contrib/plugins: optimise the register value tracking

2023-12-21 Thread Alex Bennée
This adds an additional flag which attempts to optimise the register tracking by only instrumenting instructions which are likely to change its value. This relies on the disassembler showing up the register names in disassembly so is only enabled when asked for. Signed-off-by: Alex Bennée --- do

[PATCH 02/40] tests/avocado: use snapshot=on in kvm_xen_guest

2023-12-21 Thread Alex Bennée
This ensures the rootfs is never permanently changed as we don't need persistence between tests anyway. Signed-off-by: Alex Bennée --- tests/avocado/kvm_xen_guest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.p

[PATCH 10/40] qtest: bump pxe-test timeout to 10 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The pxe-test uses the boot_sector_test() function, and that already uses a timeout of 600 seconds. So adjust the timeout on the meson side accordingly. Signed-off-by: Daniel P. Berrangé [thuth: Bump timeout to 600s and adjust commit description] Signed-off-by: Thomas Hu

[PATCH 07/40] qtest: bump qom-test timeout to 15 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The qom-test is periodically hitting the 5 minute timeout when running on the aarch64 emulator under GitLab CI. With an --enable-debug build it can take over 10 minutes for arm/aarch64 targets. Setting timeout to 15 minutes gives enough headroom to hopefully make it relia

[PATCH 5/6] target/riscv: Update address modify functions to take into account pointer masking

2023-12-21 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/translate.c | 21 +++-- target/riscv/vector_helper.c | 7 +++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 4c0d526b58..70bbead7

[PATCH 09/40] qtest: bump test-hmp timeout to 4 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The hmp test takes just under 3 minutes in a --enable-debug build. Bumping to 4 minutes will give more headroom. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-ID: <20230717182859.707658-6-berra...@redhat.com> [thuth: fix copy-n-paste error in the d

[PATCH 15/40] qtest: bump bios-table-test timeout to 9 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé This is reliably hitting the current 2 minute timeout in GitLab CI, and for the TCI job, it even hits a 6 minute timeout. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-ID: <20230717182859.707658-12-berra...@redhat.com> Signed-off-by: Thomas Huth M

[PATCH 08/40] qtest: bump npcm7xx_pwn-test timeout to 5 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The npcm7xx_pwn-test takes 3 & 1/2 minutes in a --enable-debug build. Bumping to 5 minutes will give more headroom. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-ID: <20230717182859.707658-5-berra...@redhat.com> Signed-off-by: Thomas Huth Message-

[PATCH 38/40] contrib/plugins: fix imatch

2023-12-21 Thread Alex Bennée
We can't directly save the ephemeral imatch from argv as that memory will get recycled. Signed-off-by: Alex Bennée --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 82dc2f584e2..f262ee

[PATCH 05/40] qtest: bump min meson timeout to 60 seconds

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé Even some of the relatively fast qtests can sometimes hit the 30 second timeout in GitLab CI under high parallelism/load conditions. Bump the min to 60 seconds to give a higher margin for reliability. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Message-I

[PATCH 12/40] qtest: bump boot-serial-test timeout to 3 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The boot-serial-test takes about 1 + 1/2 minutes in a --enable-debug build. Bumping to 3 minutes will give more headroom. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-ID: <20230717182859.707658-9-berra...@redhat.com> Signed-off-by: Thomas Huth Me

[PATCH 19/40] tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes

2023-12-21 Thread Alex Bennée
From: Thomas Huth When running the tests in slow mode with --enable-debug on a very loaded system, the fp-test-mulAdd test can take longer than 2 minutes. Bump the timeout to three minutes to make sure it passes in such situations, too. Signed-off-by: Thomas Huth Message-Id: <20231215070357.10

[PATCH 11/40] qtest: bump prom-env-test timeout to 6 minutes

2023-12-21 Thread Alex Bennée
From: Daniel P. Berrangé The prom-env-test can take more than 5 minutes in a --enable-debug build on a loaded system. Bumping to 6 minutes will give more headroom. Signed-off-by: Daniel P. Berrangé [thuth: Bump timeout to 6 minutes instead of 3] Signed-off-by: Thomas Huth Message-Id: <20231215

[PATCH 00/40] testing and plugin updates for 9.0

2023-12-21 Thread Alex Bennée
This brings in the first batch of testing updates for the next release. The main bulk of these is Daniel and Thomas' cleanups of the qtest timeouts and allowing meson control them. There are a few minor tweaks I've made to some avocado and gitlab tests. The big update is support for reading regist

RE: [PATCH v3 06/70] kvm: Introduce support for memory_attributes

2023-12-21 Thread Wang, Wei W
On Thursday, December 21, 2023 2:11 PM, Li, Xiaoyao wrote: > On 12/12/2023 9:56 PM, Wang, Wei W wrote: > > On Wednesday, November 15, 2023 3:14 PM, Xiaoyao Li wrote: > >> Introduce the helper functions to set the attributes of a range of > >> memory to private or shared. > >> > >> This is necessary

[PATCH v2 0/1] Implementation of resource_query_layout

2023-12-21 Thread Julia Zhang
Hi all, Sorry to late reply. This is v2 of the implementation of resource_query_layout. This adds a new ioctl to let guest query information of host resource, which is originally from Daniel Stone. We add some changes to support query the correct stride of host resource before it's created, which

[PATCH v2 1/1] virgl: Implement resource_query_layout

2023-12-21 Thread Julia Zhang
From: Daniel Stone A new ioctl to shuttle information between host and guest about the actual buffer allocation, which can be used for interop between GL and Vulkan when supporting standard window systems. Signed-off-by: Daniel Stone Co-developed-by: Julia Zhang Signed-off-by: Julia Zhang ---

[RFC PATCH 0/4] target/riscv/kvm: QEMU support for KVM Guest Debug on RISC-V

2023-12-21 Thread Chao Du
This series implements QEMU KVM Guest Debug on RISC-V. Currently, we can debug RISC-V KVM guest from the host side, with software breakpoints. A brief test was done on QEMU RISC-V hypervisor emulator. A TODO list which will be added later: 1. HW breakpoints support 2. Test cases This series is b

[RFC PATCH 4/4] linux-headers: enable KVM GUEST DEBUG for RISC-V

2023-12-21 Thread Chao Du
Synchronize the kvm.h file which enables KVM GUEST DEBUG at QEMU side. Signed-off-by: Chao Du --- linux-headers/asm-riscv/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/asm-riscv/kvm.h b/linux-headers/asm-riscv/kvm.h index 992c5e4071..72942a7aaf 100644 --- a/linux-header

[RFC PATCH 2/4] target/riscv/kvm: implement kvm_arch_update_guest_debug()

2023-12-21 Thread Chao Du
Set the control flag when there are active breakpoints. This will help KVM to know the status in the userspace. Signed-off-by: Chao Du --- target/riscv/kvm/kvm-cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c ind

[RFC PATCH 1/4] target/riscv/kvm: add software breakpoints support

2023-12-21 Thread Chao Du
This patch implements insert/remove software breakpoint process: Add an input parameter for kvm_arch_insert_sw_breakpoint() and kvm_arch_remove_sw_breakpoint() to pass the length information, which helps us to know whether it is a compressed instruction. For some remove cases, we do not have the l

[RFC PATCH 3/4] target/riscv/kvm: handle the exit with debug reason

2023-12-21 Thread Chao Du
If the breakpoint belongs to the userspace then set the ret value. Signed-off-by: Chao Du --- target/riscv/kvm/kvm-cpu.c | 20 1 file changed, 20 insertions(+) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 94697b09bb..b1aed78780 100644 --- a/tar

Re: [PATCH v2] qdev: Report an error for machine without HotplugHandler

2023-12-21 Thread Akihiko Odaki
On 2023/12/21 17:49, Markus Armbruster wrote: Akihiko Odaki writes: On 2023/12/21 1:46, Zhao Liu wrote: Hi Markus, On Wed, Dec 20, 2023 at 08:53:21AM +0100, Markus Armbruster wrote: Date: Wed, 20 Dec 2023 08:53:21 +0100 From: Markus Armbruster Subject: Re: [PATCH v2] qdev: Report an error f

RE: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, December 21, 2023 5:16 PM >Subject: Re: [PATCH] vfio/iommufd: Remove the use of stat() to check file >existence > >Hello Zhenzhong > >On 12/21/23 09:55, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédr

Re: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Cédric Le Goater
Hello Zhenzhong On 12/21/23 09:55, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, December 21, 2023 4:10 PM Subject: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence Using stat() before opening a file or a directory can lead to

RE: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, December 21, 2023 4:10 PM >Subject: [PATCH] vfio/iommufd: Remove the use of stat() to check file >existence > >Using stat() before opening a file or a directory can lead to a >time-of-check to time-of-use (TOCTOU) filesystem ra

Re: [PATCH v2] qdev: Report an error for machine without HotplugHandler

2023-12-21 Thread Markus Armbruster
Akihiko Odaki writes: > On 2023/12/21 1:46, Zhao Liu wrote: >> Hi Markus, >> On Wed, Dec 20, 2023 at 08:53:21AM +0100, Markus Armbruster wrote: >>> Date: Wed, 20 Dec 2023 08:53:21 +0100 >>> From: Markus Armbruster >>> Subject: Re: [PATCH v2] qdev: Report an error for machine without >>> Hotplu

Re: [PATCH] vfio/container: Rename vfio_init_container to vfio_set_iommu

2023-12-21 Thread Cédric Le Goater
On 12/21/23 03:45, Zhenzhong Duan wrote: vfio_container_init() and vfio_init_container() names are confusing especially when we see vfio_init_container() calls vfio_container_init(). vfio_container_init() operates on base container which is consistent with all routines handling 'VFIOContainerBas

Re: [PATCH v2 10/11] next-cube.c: remove val and size arguments from nextscr2_write()

2023-12-21 Thread Thomas Huth
Am Wed, 20 Dec 2023 13:16:40 + schrieb Mark Cave-Ayland : > These are now redundant with the scr2 and old_scr2 fields in NeXTPC. Rename > the function from nextscr2_write() to next_scr2_rtc_update() to better > reflect its purpose. At the same time replace the manual bit manipulation with > th

Re: [PATCH v2 09/11] next-cube.c: move LED logic to new next_scr2_led_update() function

2023-12-21 Thread Thomas Huth
Am Wed, 20 Dec 2023 13:16:39 + schrieb Mark Cave-Ayland : > Ensure that the LED status is updated by calling next_scr2_led_update() > whenever > the SC2 register is written. > > Signed-off-by: Mark Cave-Ayland > --- > hw/m68k/next-cube.c | 22 +- > 1 file changed, 13 in

Re: [PATCH v2 08/11] next-cube.c: move static old_scr2 variable to NeXTPC

2023-12-21 Thread Thomas Huth
Am Wed, 20 Dec 2023 19:36:27 + schrieb Mark Cave-Ayland : > On 20/12/2023 19:20, Thomas Huth wrote: > > > Am Wed, 20 Dec 2023 13:16:38 + > > schrieb Mark Cave-Ayland : > > > >> Move the old_scr2 variable to NeXTPC so that the old SCR2 register state is > >> stored along with the curren

Re: [PATCH v6 06/11] softmmu/memory: enable automatic deallocation of memory regions

2023-12-21 Thread Xenia Ragiadakou
On 21/12/23 09:50, Akihiko Odaki wrote: On 2023/12/21 16:35, Xenia Ragiadakou wrote: On 21/12/23 07:45, Akihiko Odaki wrote: On 2023/12/19 16:53, Huang Rui wrote: From: Xenia Ragiadakou When the memory region has a different life-cycle from that of her parent, could be automatically rele

RE: [PATCH v3 1/6] target/i386: add support for FRED in CPUID enumeration

2023-12-21 Thread Li, Xin3
>> @@ -1552,6 +1552,14 @@ static FeatureDep feature_dependencies[] = { >> .from = { FEAT_VMX_SECONDARY_CTLS, >> VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE }, >> .to = { FEAT_7_0_ECX, CPUID_7_0_ECX_WAITPKG }, >> }, >> +{ >> +.from = { FEAT_7_1_EAX

Re: [PATCH for 9.0 08/12] vdpa: add vhost_vdpa_load_setup

2023-12-21 Thread Eugenio Perez Martin
On Thu, Dec 21, 2023 at 3:17 AM Jason Wang wrote: > > On Wed, Dec 20, 2023 at 3:07 PM Eugenio Perez Martin > wrote: > > > > On Wed, Dec 20, 2023 at 6:22 AM Jason Wang wrote: > > > > > > On Sat, Dec 16, 2023 at 1:28 AM Eugenio Pérez wrote: > > > > > > > > Callers can use this function to setup t

[PULL 0/2] loongarch-to-apply queue

2023-12-21 Thread Song Gao
-loongarch-20231221 for you to fetch changes up to be45144bee708d3b84c3c474a4d4aeb7e5c4733a: target/loongarch: Add timer information dump support (2023-12-21 16:07:47 +0800) pull-loongarc

[PULL 2/2] target/loongarch: Add timer information dump support

2023-12-21 Thread Song Gao
From: Bibo Mao Timer emulation sometimes is problematic especially when vm is running in kvm mode. This patch adds registers dump support relative with timer hardware, so that it is easier to find the problems. Signed-off-by: Bibo Mao Reviewed-by: Song Gao Message-Id: <20231206081839.2290178-1

[PULL 1/2] hw/loongarch/virt: Align high memory base address with super page size

2023-12-21 Thread Song Gao
From: Bibo Mao With LoongArch virt machine, there is low memory space with region 0--0x1000, and high memory space with started from 0x9000. High memory space is aligned with 256M, it will be better if it is aligned with 1G, which is super page aligned for 4K page size. Currently linux k

Re: [PATCH v2 59/71] hw/vfio: Constify VMState

2023-12-21 Thread Cédric Le Goater
On 12/21/23 04:16, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Cédric Le Goater I suppose you will include the patch in : https://lore.kernel.org/qemu-devel/20231221031652.119827-1-richard.hender...@linaro.org/ Thanks, C. --- hw/vfio/display.c | 2 +-

[PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Cédric Le Goater
Using stat() before opening a file or a directory can lead to a time-of-check to time-of-use (TOCTOU) filesystem race, which is reported by coverity as a Security best practices violations. The sequence could be replaced by open and fdopendir but it doesn't add much in this case. Simply use opendir

[PATCH] load_elf: fix iterator type in glue

2023-12-21 Thread Anastasia Belova
file_size is uint32_t, so j < file_size should be uint32_t too. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 7ef295ea5b ("loader: Add data swap option to load-elf") Signed-off-by: Anastasia Belova --- include/hw/elf_ops.h | 2 +- 1 file changed, 1 insertion(+), 1 del

Re: [PATCH v6 07/11] virtio-gpu: Handle resource blob commands

2023-12-21 Thread Akihiko Odaki
On 2023/12/19 16:53, Huang Rui wrote: From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true I have another concern about de

Re: [PATCH for-9.0 v2 00/10] vfio: Introduce a VFIOIOMMUClass

2023-12-21 Thread Cédric Le Goater
On 12/20/23 21:35, Eric Farman wrote: On Tue, 2023-12-19 at 07:58 +0100, Cédric Le Goater wrote: Hello, The VFIO object hierarchy has some constraints because each VFIO type has a dual nature: a VFIO nature for passthrough support and a bus nature (PCI, AP, CCW, Platform) for its initial presen

<    1   2   3