Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Daniel P . Berrangé
In $SUBJECT it is called GHashTable, not GHashMap On Sat, Sep 03, 2022 at 05:03:27PM +0200, Linus Heckemann wrote: > The previous implementation would iterate over the fid table for > lookup operations, resulting in an operation with O(n) complexity on > the number of open files and poor cache loc

Re: [PATCH v6 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-05 Thread BALATON Zoltan
On Sun, 4 Sep 2022, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Setting machine->fdt requires a MachineState pointer to be used inside sam460ex_load_device_tree(). Let's change the function to receive this pointer from the calle

[RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-05 Thread Ani Sinha
Possible fix for https://bugzilla.redhat.com/show_bug.cgi?id=2089545 Change in AML: @@ -47,33 +47,39 @@ Scope (_SB) { Device (PCI0) { Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID Name (_CID, EisaId ("PNP0A03") /

Re: [PATCH 0/2] expose host-phys-bits to guest

2022-09-05 Thread Gerd Hoffmann
Hi, > > I don't see a need for that. Live migration compatibility can be > > handled just fine today using > > 'host-phys-bits=on,host-phys-bits-limit=' > > > > Which is simliar to 'phys-bits='. > > yes but what if user did not configure anything? I expect that'll be less and less common

Re: [PATCH v2] scsi-disk: support setting CD-ROM block size via device options

2022-09-05 Thread Paolo Bonzini
Probably just my screw up, or it broke something when testing... let me check. Paolo Il lun 5 set 2022, 05:30 John Millikin ha scritto: > I notice this patch wasn't included in the [PULL] series last week, and > it isn't present in the `master` branch. > > Is there anything else I should be doi

Re: [PATCH v2] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-09-05 Thread Paolo Bonzini
Thanks, I will queue it. Paolo Il lun 5 set 2022, 02:00 Alberto Faria ha scritto: > flatview_(read|write)_continue() must be called with an address in the > FlatView's address space, but `addr` is relative to the > MemoryRegionCache. > > Convert `addr` from the MemoryRegionCache's address space

Re: [PATCH v3 06/15] virtio-pci: support queue reset

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: From: Xuan Zhuo PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. The migration of the virtio devices will not happen during a reset operation. This is becuase the g

Re: [PATCH v3 07/15] virtio-pci: support queue enable

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: PCI devices support device specific vq enable. Based on this function, the driver can re-enable the virtqueue after the virtqueue is reset. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/virtio/virtio-pci.c | 1 + 1

Re: [PATCH v3 10/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset()

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: Introduce vhost_virtqueue_reset(), which can reset the specific virtqueue in the device. Then it will unmap vrings and the desc of the virtqueue. Here we do not reuse the vhost_net_stop_one() or vhost_dev_stop(), because they work at queue pair level. We do no

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-09-05 Thread Clément Chigot
Hi all, I did reach the same issue while trying to connect a gdb to qemu on Windows hosts. Some inputs send by gdb aren't getting correctly pulled, they will be retrieved only once g_poll times out. As you explained earlier, the issue, AFAICT, is that WSAEnumNetworkEvents will reset the internal

Re: [PATCH] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Andrew Jones
On Mon, Sep 05, 2022 at 09:59:40AM +0530, Sunil V L wrote: > To boot S-mode firmware payload like EDK2 from persistent > flash storage, qemu needs to pass the flash address as the > next_addr in fw_dynamic_info to the opensbi. > > Update the kernel_entry with the flash address when no kernel > is

Re: [PATCH v3 11/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: Introduce vhost_net_virtqueue_restart(), which can restart the specific virtqueue when the vhost net started running before. If it fails to restart the virtqueue, the device will be stopped. Here we do not reuse vhost_net_start_one() or vhost_dev_start() becau

Re: [PATCH v3 12/15] virtio-net: introduce flush_or_purge_queued_packets()

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: Introduce the fucntion flush_or_purge_queued_packets(), it will be used in device reset and virtqueue reset. Therefore, we extract the common logic as a new function. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- hw/net

Re: [PATCH v3 13/15] virtio-net: support queue reset

2022-09-05 Thread Jason Wang
在 2022/8/25 16:08, Kangjie Xu 写道: From: Xuan Zhuo virtio-net and vhost-kernel implement queue reset. Queued packets in the corresponding queue pair are flushed or purged. Signed-off-by: Xuan Zhuo Signed-off-by: Kangjie Xu --- hw/net/virtio-net.c | 18 ++ 1 file changed,

Re: [PATCH] x86: only modify setup_data if the boot protocol indicates safety

2022-09-05 Thread Gerd Hoffmann
On Sun, Sep 04, 2022 at 06:50:58PM +0200, Jason A. Donenfeld wrote: > This reverts 3824e25db1 ("x86: disable rng seeding via setup_data"), and > then makes the use of setup_data safe. It does so by checking the boot > protocol version. If it's sufficient, then it means EFI boots won't > crash. Whil

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Linus Heckemann
Hi all, thanks for your reviews. > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > V9fsTransport *t, > s->ctx.fmode = fse->fmode; > s->ctx.dmode = fse->dmode; > > -QSIMPLEQ_INIT(&s->fid_list); > +s->fids = g_hash_table_new(NULL, NULL); > qemu_co_

Re: [PATCH v5 01/10] module: qom module support

2022-09-05 Thread Claudio Fontana
Hello Gerd, Paolo, this commit from 2020, together with others in the same series, contains a flaw that now comes back to bite. >From commit 28457744c345ca4ccb58c984c9552e9c5955a9de ("module: qom module >support") : On 6/24/20 15:10, Gerd Hoffmann wrote: > Add support for qom types provided by

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-09-05 Thread Markus Armbruster
Akihiko Odaki writes: > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster wrote: >> >> Akihiko Odaki writes: >> >> > pci_add_capability appears most PCI devices. Its error handling required >> > lots of code, and led to inconsistent behaviors such as: >> > - passing error_abort >> > - passing er

Re: [PATCH v1 3/8] migration: Introduce dirty-limit capability

2022-09-05 Thread Markus Armbruster
Hyman Huang writes: > 在 2022/9/2 16:07, Markus Armbruster 写道: >> huang...@chinatelecom.cn writes: >> >>> From: Hyman Huang(黄勇) >>> >>> Introduce migration dirty-limit capability, which can >>> be turned on before live migration and limit dirty >>> page rate durty live migration. >>> >>> Introdu

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
Ping... Any advises are welcome On 8/23/22 15:50, t...@chinatelecom.cn wrote: From: Guoyi Tu Introduce qemu_socketpair() to create socket pair fd, and set the close-on-exec flag at default as with the other type of socket does. besides, the live update feature is developing, so it's necessar

[PATCH v2 02/20] disas/nanomips: Extract enums out of the NMD class

2022-09-05 Thread Milica Lazarevic
Definitions of enums TABLE_ENTRY_TYPE and TABLE_ATTRIBUTE_TYPE are moved out of the NMD class. The main goal is to remove NMD class completely. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 8 +++ disas/nanomips.h | 59 +++--

[PATCH v2 08/20] disas/nanomips: Remove NMD class

2022-09-05 Thread Milica Lazarevic
NMD class has been deleted. The following methods are now declared as static functions: - public NMD::Disassemble method - private NMD::Disassemble method - private NMD::extract_op_code_value helper method Also, the implementation of the print_insn_nanomips function and nanomips_dis function is mo

[PATCH v2 05/20] disas/nanomips: Remove __cond methods from class

2022-09-05 Thread Milica Lazarevic
NMD class methods with the conditional_function type like NMD::ADDIU_32__cond, NMD::ADDIU_RS5__cond, etc. are removed from the NMD class. They're now declared global static functions. Therefore, typedef of the function pointer, conditional_function is defined outside of the class. Now that conditi

[PATCH v2 09/20] disas/nanomips: Move typedefs etc to nanomips.cpp

2022-09-05 Thread Milica Lazarevic
The following is moved from the nanomips.h to nanomips.cpp file: - #include line - typedefs - enums - definition of the Pool struct. Header file nanomips.h will be deleted to be consistent with the rest of the disas/ code. Signed-off-by: Milica Lazarevic Reviewed-by: Philippe Mathieu-Daudé ---

[PATCH v2 0/20] Convert nanoMIPS disassembler from C++ to C

2022-09-05 Thread Milica Lazarevic
Hi, This patchset converts the nanomips disassembler to plain C. C++ features like class, std::string type, exception handling, and function overloading have been removed and replaced with the equivalent C code. === Changes since previous version: (1) disas/nanomi

[PATCH v2 04/20] disas/nanomips: Remove helper methods from class

2022-09-05 Thread Milica Lazarevic
Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been deleted because they're not used by the nanomips disassembler: - NMD::encode_msbd_from_pos_and_size,

[PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c

2022-09-05 Thread Milica Lazarevic
Now that everything is converted to the C code, nanomips.cpp file is renamed to "nanomips.c". Therefore, meson.build file is also changed. The explicit cast after the call to g_malloc() is no longer needed because the file now compiles as a C code. Signed-off-by: Milica Lazarevic --- disas/meso

[PATCH v2 07/20] disas/nanomips: Remove Pool tables from the class

2022-09-05 Thread Milica Lazarevic
Pool tables are no longer declared as static fields of the NMD class but as global static variables. The NMD::Disassemble method is using the MAJOR Pool table variable, so its implementation is moved to the end of the nanomips.cpp file, right after the initialization of the MAJOR Pool table. Sign

[PATCH] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Paolo Bonzini
Reported by Coverity as CID 1490142. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 7c8ce18bdd..208b0c74e3 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -3962,6 +3962,7 @@ st

[PATCH v2 10/20] disas/nanomips: Delete nanomips.h

2022-09-05 Thread Milica Lazarevic
Header file nanomips.h has been deleted for the nanomips disassembler to stay consistent with the rest of the disassemblers which don't include extra header files. Signed-off-by: Milica Lazarevic Reviewed-by: Philippe Mathieu-Daudé --- disas/nanomips.h | 26 -- 1 file ch

[PATCH v2 11/20] disas/nanomips: Remove #inlcude

2022-09-05 Thread Milica Lazarevic
is a C++ library and it's not used by disassembler. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp index c11c0aceaf..bfbd472150 100644 --- a/disas/nanomips.cpp +++ b/disa

[PATCH v2 13/20] disas/nanomips: Prevent memory leaking

2022-09-05 Thread Milica Lazarevic
g_autofree attribute is added for every dynamically allocated string to prevent memory leaking. The implementation of the several functions that work with dynamically allocated strings is slightly changed so we can add those attributes. Almost every disassembly_function returns the result of the

[PATCH] spapr_pci: fix leak in spapr_phb_vfio_get_loc_code

2022-09-05 Thread Paolo Bonzini
Overwriting "path" in the second call to g_strdup_printf() causes a memory leak, even if the variable itself is g_autofree. Reported by Coverity as CID 1460454. Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/sp

[PATCH v2 16/20] disas/nanomips: Replace exception handling

2022-09-05 Thread Milica Lazarevic
Since there's no support for exception handling in C, the try-catch blocks have been deleted, and throw clauses are replaced. When a runtime error happens, we're printing out the error message. Disassembling of the current instruction interrupts. This behavior is achieved by adding sigsetjmp() to d

Re: [PATCH v3 11/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()

2022-09-05 Thread Kangjie Xu
在 2022/9/5 16:24, Jason Wang 写道: 在 2022/8/25 16:08, Kangjie Xu 写道: Introduce vhost_net_virtqueue_restart(), which can restart the specific virtqueue when the vhost net started running before. If it fails to restart the virtqueue, the device will be stopped. Here we do not reuse vhost_net_sta

[PATCH v2 17/20] disas/nanomips: Replace Cpp enums for C enums

2022-09-05 Thread Milica Lazarevic
Change enums to typedef enums to keep naming clear. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp index a8295ebfa8..f57d255de3 100644 --- a/disas

[PATCH] accel: print an error message and exit if plugin not loaded

2022-09-05 Thread Claudio Fontana
If module_load_one, module_load_file fail for any reason (permissions, plugin not installed, ...), we need to provide some notification to the user to understand that this is happening; otherwise the errors reported on initialization will make no sense to the user. Signed-off-by: Claudio Fontana

Re: [PATCH v3 13/15] virtio-net: support queue reset

2022-09-05 Thread Kangjie Xu
在 2022/9/5 16:30, Jason Wang 写道: 在 2022/8/25 16:08, Kangjie Xu 写道: From: Xuan Zhuo virtio-net and vhost-kernel implement queue reset. Queued packets in the corresponding queue pair are flushed or purged. Signed-off-by: Xuan Zhuo Signed-off-by: Kangjie Xu ---   hw/net/virtio-net.c | 18 ++

[PATCH v2 19/20] disas/nanomips: Add struct keyword

2022-09-05 Thread Milica Lazarevic
Changed the type of the table parameter in Disassemble function: - from const Pool * - to const struct Pool * Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.c

Re: [PATCH v3 10/15] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset()

2022-09-05 Thread Kangjie Xu
在 2022/9/5 16:03, Jason Wang 写道: 在 2022/8/25 16:08, Kangjie Xu 写道: Introduce vhost_virtqueue_reset(), which can reset the specific virtqueue in the device. Then it will unmap vrings and the desc of the virtqueue. Here we do not reuse the vhost_net_stop_one() or vhost_dev_stop(), because they

[PATCH v2 18/20] disas/nanomips: Remove argument passing by ref

2022-09-05 Thread Milica Lazarevic
Replaced argument passing by reference with passing by address. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp index f57d255de3..ab54456c2e 100644 -

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Christian Schoenebeck
On Montag, 5. September 2022 10:51:10 CEST Linus Heckemann wrote: > Hi all, thanks for your reviews. > > > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > > V9fsTransport *t,> > > s->ctx.fmode = fse->fmode; > > s->ctx.dmode = fse->dmode; > > > > -QSIMPLEQ

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-09-05 Thread Akihiko Odaki
On Mon, Sep 5, 2022 at 6:26 PM Markus Armbruster wrote: > > Akihiko Odaki writes: > > > On Fri, Sep 2, 2022 at 7:23 PM Markus Armbruster wrote: > >> > >> Akihiko Odaki writes: > >> > >> > pci_add_capability appears most PCI devices. Its error handling required > >> > lots of code, and led to in

[PATCH] coverity: put NUBus under m68k component

2022-09-05 Thread Paolo Bonzini
It is only used by the Q800 emulation, so put it under that architecture. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/coverity-scan/COMPONENTS.md index fc16

Re: [PATCH] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Richard Henderson
On 9/5/22 11:06, Paolo Bonzini wrote: Reported by Coverity as CID 1490142. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 7c8ce18bdd..208b0c74e3 100644 --- a/accel/kvm/kvm-all.c +++ b/ac

[PATCH] smbios: sanitize type from external type before checking have_fields_bitmap

2022-09-05 Thread Paolo Bonzini
test_bit uses header->type as an offset; if the file incorrectly specifies a type greater than 127, smbios_entry_add will read garbage. To fix this, just pass the smbios data through, assuming the user knows what to do. Reported by Coverity as CID 1487255. Signed-off-by: Paolo Bonzini --- hw/s

[PATCH] tests: unit: simplify test-visitor-serialization list tests

2022-09-05 Thread Paolo Bonzini
test-visitor-serialization list tests is using an "if" to pick either the first element of the list or the next one. This was done presumably to mimic the code that creates the list, which has to fill in either the head pointer or the next pointer of the last element. However, the code in the ins

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-05 Thread Michael S. Tsirkin
On Mon, Sep 05, 2022 at 12:55:31PM +0530, Ani Sinha wrote: > Possible fix for https://bugzilla.redhat.com/show_bug.cgi?id=2089545 > > Change in AML: > > @@ -47,33 +47,39 @@ > Scope (_SB) > { > Device (PCI0) > { > Name (_HID, EisaId ("PNP0A08") /* PCI Expre

Re: [PATCH v2 07/20] disas/nanomips: Remove Pool tables from the class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Pool tables are no longer declared as static fields of the NMD class but as global static variables. The NMD::Disassemble method is using the MAJOR Pool table variable, so its implementation is moved to the end of the nanomips.cpp file, right after the in

Re: [PATCH v2 01/20] disas/nanomips: Remove namespace img

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Since there's no namespace feature in C, namespace img has been replaced with adding the prefix "img" to the namespace members. Prefix "img" has been added to the function names of functions that used to be wrapped in namespace img. Those are img::format(

Re: [PATCH] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Marc-André Lureau
On Mon, Sep 5, 2022 at 2:32 PM Paolo Bonzini wrote: > Reported by Coverity as CID 1490142. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > accel/kvm/kvm-all.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c > index

Re: [PATCH v2 02/20] disas/nanomips: Extract enums out of the NMD class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Definitions of enums TABLE_ENTRY_TYPE and TABLE_ATTRIBUTE_TYPE are moved out of the NMD class. The main goal is to remove NMD class completely. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 8 +++ disas/nanomips

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Marc-André Lureau
Hi On Tue, Aug 23, 2022 at 12:00 PM wrote: > From: Guoyi Tu > > Introduce qemu_socketpair() to create socket pair fd, and > set the close-on-exec flag at default as with the other type > of socket does. > > besides, the live update feature is developing, so it's necessary > to do that. > > Guoy

[PATCH] tests: test-qga: close socket on failure to connect

2022-09-05 Thread Paolo Bonzini
Reported by Coverity as CID 1432543. Signed-off-by: Paolo Bonzini --- tests/unit/test-qga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c index a05a4628ed..d27ff94d13 100644 --- a/tests/unit/test-qga.c +++ b/tests/unit/test-qga.c @@ -32,6 +32,7

Re: [PULL 0/4] chardev patches & a small audio fix

2022-09-05 Thread Stefan Hajnoczi
To: =?utf-8?q?Marc-André?= Lureau Cc: qemu-devel@nongnu.org, Daniel =?utf-8?q?P._Berrangé?= , bin.m...@windriver.com, , Gerd Hoffmann , Stefan Weil , Paolo Bonzini Subject: Re: [PULL 0/4] chardev patches & a small audio fix In-Reply-To: <20220902131412.3125752-1-marcandre.lur...@redhat.com> Re

Re: [PATCH v2 05/20] disas/nanomips: Remove __cond methods from class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: NMD class methods with the conditional_function type like NMD::ADDIU_32__cond, NMD::ADDIU_RS5__cond, etc. are removed from the NMD class. They're now declared global static functions. Therefore, typedef of the function pointer, conditional_function is defi

Re: [PATCH v2 06/20] disas/nanomips: Remove disasm methods from class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: NMD class methods with the disassembly_function type like NMD::ABS_D, NMD::ABS_S, etc. are removed from the class. They're now declared global static functions. Therefore, typedef of the function pointer, disassembly_function is defined outside of the clas

Re: [PATCH v2 03/20] disas/nanomips: Delete NMD class fields

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Two class fields have been deleted. Since the m_requested_instruction_categories field always has the same value, which is ALL_ATTRIBUTES, the only use of that field has been replaced with the concrete ALL_ATTRIBUTES value. Since these ALL_ATTRIBUTES te

Re: [PATCH v2 08/20] disas/nanomips: Remove NMD class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: NMD class has been deleted. The following methods are now declared as static functions: - public NMD::Disassemble method - private NMD::Disassemble method - private NMD::extract_op_code_value helper method Also, the implementation of the print_insn_nanomi

Re: [PATCH v2 04/20] disas/nanomips: Remove helper methods from class

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been deleted because they're not used by the nanomips disassem

Re: [PULL 0/4] target/avr patch queue

2022-09-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 10/20] disas/nanomips: Delete nanomips.h

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Header file nanomips.h has been deleted for the nanomips disassembler to stay consistent with the rest of the disassemblers which don't include extra header files. Signed-off-by: Milica Lazarevic Reviewed-by: Philippe Mathieu-Daudé --- disas/nanomips.h

Re: [PATCH v2 11/20] disas/nanomips: Remove #inlcude

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: is a C++ library and it's not used by disassembler. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

[PATCH] tests: unit: add NULL-pointer check

2022-09-05 Thread Paolo Bonzini
In CID 1432593, Coverity complains that the result of qdict_crumple() might leak if it is not a dictionary. This is not a practical concern since the test would fail immediately with a NULL pointer dereference in qdict_size(). However, it is not nice to depend on qdict_size() crashing, so add an

Re: [PATCH v2 12/20] disas/nanomips: Replace std::string type

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: -static std::string save_restore_list(uint64 rt, uint64 count, uint64 gp) +static char *save_restore_list(uint64 rt, uint64 count, uint64 gp) { -std::string str; +/* + * Currently, this file compiles as a cpp file, so the explicit cast here +

Re: [PATCH v2 09/20] disas/nanomips: Move typedefs etc to nanomips.cpp

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: The following is moved from the nanomips.h to nanomips.cpp file: - #include line - typedefs - enums - definition of the Pool struct. Header file nanomips.h will be deleted to be consistent with the rest of the disas/ code. Signed-off-by: Milica Lazarevic

Re: [PATCH v9 01/10] s390x/cpus: Make absence of multithreading clear

2022-09-05 Thread Nico Boehr
Quoting Pierre Morel (2022-09-02 09:55:22) > S390x do not support multithreading in the guest. > Do not let admin falsely specify multithreading on QEMU > smp commandline. > > Signed-off-by: Pierre Morel > --- > hw/s390x/s390-virtio-ccw.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --gi

Re: [PATCH] tests: test-qga: close socket on failure to connect

2022-09-05 Thread Marc-André Lureau
Hi On Mon, Sep 5, 2022 at 3:27 PM Paolo Bonzini wrote: > Reported by Coverity as CID 1432543. > > Signed-off-by: Paolo Bonzini > --- > tests/unit/test-qga.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c > index a05a4628ed..d27ff94d13 100

Re: [PULL 00/21] Net patches

2022-09-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Sunil V L
On Mon, Sep 05, 2022 at 10:07:22AM +0200, Andrew Jones wrote: > On Mon, Sep 05, 2022 at 09:59:40AM +0530, Sunil V L wrote: > > To boot S-mode firmware payload like EDK2 from persistent > > flash storage, qemu needs to pass the flash address as the > > next_addr in fw_dynamic_info to the opensbi. >

Re: [PATCH v2 14/20] disas/nanomips: Remove function overloading

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: -static uint64 copy(uint64 d) +static uint64 copy_ui(uint64 d) { return d; } -static int64 copy(int64 d) +static int64 copy_i(int64 d) { return d; } These functions can surely just be removed. -static char *IMMEDIATE(uint64

Re: [PULL 00/39] i386, SCSI, build system changes for 2022-09-01

2022-09-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 03/20] disas/nanomips: Delete NMD class fields

2022-09-05 Thread Richard Henderson
On 9/5/22 12:04, Richard Henderson wrote: On 9/5/22 10:55, Milica Lazarevic wrote: Two class fields have been deleted. Since the m_requested_instruction_categories field always has the same value, which is ALL_ATTRIBUTES, the only use of that field has been replaced with the concrete ALL_ATTRIB

Re: [PATCH v2 16/20] disas/nanomips: Replace exception handling

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Since there's no support for exception handling in C, the try-catch blocks have been deleted, and throw clauses are replaced. When a runtime error happens, we're printing out the error message. Disassembling of the current instruction interrupts. This beha

Re: [PATCH v2 13/20] disas/nanomips: Prevent memory leaking

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: g_autofree attribute is added for every dynamically allocated string to prevent memory leaking. The implementation of the several functions that work with dynamically allocated strings is slightly changed so we can add those attributes. Almost every disa

Re: [PATCH v2 18/20] disas/nanomips: Remove argument passing by ref

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Replaced argument passing by reference with passing by address. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Now that everything is converted to the C code, nanomips.cpp file is renamed to "nanomips.c". Therefore, meson.build file is also changed. The explicit cast after the call to g_malloc() is no longer needed because the file now compiles as a C code. Signe

Re: [PATCH v2 17/20] disas/nanomips: Replace Cpp enums for C enums

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Change enums to typedef enums to keep naming clear. Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] accel: print an error message and exit if plugin not loaded

2022-09-05 Thread Richard Henderson
On 9/5/22 11:13, Claudio Fontana wrote: If module_load_one, module_load_file fail for any reason (permissions, plugin not installed, ...), we need to provide some notification to the user to understand that this is happening; otherwise the errors reported on initialization will make no sense to t

Re: [PATCH v2 15/20] disas/nanomips: Introduce Dis_info struct

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: This patch introduces the Dis_info struct, which should hold the necessary data for handling runtime errors. Fields fprintf_func and stream are in charge of error printing. Field buf enables the use of sigsetjmp() and siglongjmp() functions. Support for ru

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
On 9/5/22 19:19, Marc-André Lureau wrote: Hi On Tue, Aug 23, 2022 at 12:00 PM > wrote: From: Guoyi Tu mailto:t...@chinatelecom.cn>> Introduce qemu_socketpair() to create socket pair fd, and set the close-on-exec flag at default as with the other typ

Re: [PATCH v2 19/20] disas/nanomips: Add struct keyword

2022-09-05 Thread Richard Henderson
On 9/5/22 10:55, Milica Lazarevic wrote: Changed the type of the table parameter in Disassemble function: - from const Pool * - to const struct Pool * Signed-off-by: Milica Lazarevic Reviewed-by: Thomas Huth --- disas/nanomips.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 2/3] target/ppc: Move fsqrts to decodetree

2022-09-05 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 1 + target/ppc/translate/fp-impl.c.inc | 23 +-- target/ppc/translate/fp-ops.c.inc | 1 - 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.dec

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Marc-André Lureau
Hi On Mon, Sep 5, 2022 at 4:28 PM Guoyi Tu wrote: > > > On 9/5/22 19:19, Marc-André Lureau wrote: > > Hi > > > > On Tue, Aug 23, 2022 at 12:00 PM > > wrote: > > > > From: Guoyi Tu mailto:t...@chinatelecom.cn>> > > > > Introduce qemu_socketpair() to create so

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Christian Schoenebeck
On Dienstag, 23. August 2022 09:50:38 CEST t...@chinatelecom.cn wrote: > From: Guoyi Tu > > Introduce qemu_socketpair() to create socket pair fd, and > set the close-on-exec flag at default as with the other type > of socket does. > > besides, the live update feature is developing, so it's neces

Re: [PATCH] tests: test-qga: close socket on failure to connect

2022-09-05 Thread Paolo Bonzini
There is no portable way to handle EINTR on close() as far as I know. You can't really do anything but cross your fingers. Paolo Il lun 5 set 2022, 13:36 Marc-André Lureau ha scritto: > Hi > > On Mon, Sep 5, 2022 at 3:27 PM Paolo Bonzini wrote: > >> Reported by Coverity as CID 1432543. >> >> S

[PATCH 0/3] target/ppc: Move fsqrt[s] to decodetree

2022-09-05 Thread Víctor Colombo
Move fsqrt and fsqrts instructions from decode legacy to decodetree. Víctor Colombo (3): target/ppc: Move fsqrt to decodetree target/ppc: Move fsqrts to decodetree target/ppc: Merge fsqrt and fsqrts helpers target/ppc/fpu_helper.c| 35 - target/ppc/helper.h

[PATCH 3/3] target/ppc: Merge fsqrt and fsqrts helpers

2022-09-05 Thread Víctor Colombo
These two helpers are almost identical, differing only by the softfloat operation it calls. Merge them into one using a macro. Also, take this opportunity to capitalize the helper name as we moved the instruction to decodetree in a previous patch. Signed-off-by: Víctor Colombo --- target/ppc/fpu

Re: [PATCH] 9pfs: use GHashMap for fid table

2022-09-05 Thread Greg Kurz
Hi Linus, Thanks for this promising change ! On Mon, 05 Sep 2022 10:51:10 +0200 Linus Heckemann wrote: > Hi all, thanks for your reviews. > > > @@ -4226,7 +4232,7 @@ int v9fs_device_realize_common(V9fsState *s, const > > V9fsTransport *t, > > s->ctx.fmode = fse->fmode; > > s->ctx.dm

[PATCH 1/3] target/ppc: Move fsqrt to decodetree

2022-09-05 Thread Víctor Colombo
Signed-off-by: Víctor Colombo --- target/ppc/insn32.decode | 7 +++ target/ppc/translate/fp-impl.c.inc | 29 + target/ppc/translate/fp-ops.c.inc | 1 - 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/target/ppc/insn32.decode b/target/p

Re: [PATCH] coverity: put NUBus under m68k component

2022-09-05 Thread Peter Maydell
On Mon, 5 Sept 2022 at 12:07, Paolo Bonzini wrote: > > It is only used by the Q800 emulation, so put it under that architecture. > > Signed-off-by: Paolo Bonzini > --- > scripts/coverity-scan/COMPONENTS.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/coverity-

Re: [RFC PATCH] hw/acpi: do not let OSPM set pcie native hotplug when acpi hotplug is enabled

2022-09-05 Thread Ani Sinha
On Mon, 5 Sep 2022, Michael S. Tsirkin wrote: > On Mon, Sep 05, 2022 at 12:55:31PM +0530, Ani Sinha wrote: > > Possible fix for https://bugzilla.redhat.com/show_bug.cgi?id=2089545 > > > > Change in AML: > > > > @@ -47,33 +47,39 @@ > > Scope (_SB) > > { > > Device (PCI0) > >

[PATCH v2 1/2] dump: simplify a bit kdump get_next_page()

2022-09-05 Thread marcandre . lureau
From: Marc-André Lureau This should be functionally equivalent, but slightly easier to read, with simplified paths and checks at the end of the function. The following patch is a major rewrite to get rid of the assert(). Signed-off-by: Marc-André Lureau --- dump/dump.c | 21 --

[PATCH v2 2/2] dump: fix kdump to work over non-aligned blocks

2022-09-05 Thread marcandre . lureau
From: Marc-André Lureau Rewrite get_next_page() to work over non-aligned blocks. When it encounters non aligned addresses, it will try to fill a page provided by the caller. This solves a kdump crash with "tpm-crb-cmd" RAM memory region, qemu-kvm: ../dump/dump.c:1162: _Bool get_next_page(GuestPh

Re: [PATCH] tests: test-qga: close socket on failure to connect

2022-09-05 Thread Marc-André Lureau
Hi On Mon, Sep 5, 2022 at 4:29 PM Paolo Bonzini wrote: > There is no portable way to handle EINTR on close() as far as I know. You > can't really do anything but cross your fingers. > > Right, it actually ignores EINTR at this point. See: https://gitlab.gnome.org/GNOME/glib/-/commit/f398bec5bcc

Re: [PATCH v1 0/2] introduce qemu_socketpiar()

2022-09-05 Thread Guoyi Tu
On 9/5/22 20:33, Marc-André Lureau wrote: Hi On Mon, Sep 5, 2022 at 4:28 PM Guoyi Tu > wrote: On 9/5/22 19:19, Marc-André Lureau wrote: > Hi > > On Tue, Aug 23, 2022 at 12:00 PM mailto:t...@chinatelecom.cn> >

Re: [PATCH v6 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-05 Thread Daniel Henrique Barboza
On 9/5/22 04:15, BALATON Zoltan wrote: On Sun, 4 Sep 2022, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Setting machine->fdt requires a MachineState pointer to be used inside sam460ex_load_device_tree(). Let's change the func

Re: [PATCH 01/19] target/ppc: Remove extra space from s128 field in ppc_vsr_t

2022-09-05 Thread Daniel Henrique Barboza
On 9/1/22 10:17, Víctor Colombo wrote: Very trivial rogue space removal. There are two spaces between Int128 and s128 in ppc_vsr_t struct, where it should be only one. Signed-off-by: Víctor Colombo --- Reviewed-by: Daniel Henrique Barboza Ccing qemu-trivial since this can be picked up b

Re: [PATCH v2 1/2] dump: simplify a bit kdump get_next_page()

2022-09-05 Thread David Hildenbrand
On 05.09.22 14:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau This should be functionally equivalent, but slightly easier to read, with simplified paths and checks at the end of the function. The following patch is a major rewrite to get rid of the assert(). Signed-off-by: Mar

[PATCH v2] kvm: fix memory leak on failure to read stats descriptors

2022-09-05 Thread Paolo Bonzini
Reported by Coverity as CID 1490142. Since the size is constant and the lifetime is the same as the StatsDescriptors struct, embed the struct directly instead of using a separate allocation. Suggested-by: Richard Henderson Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 9 - 1 f

  1   2   3   >