[PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-21 Thread chenh
From: Hao Chen When use dpdk-vdpa tests vdpa device. You need to specify the mac address to start the virtual machine through libvirt or qemu, but now, the libvirt or qemu can call dpdk vdpa vendor driver's ops .get_config through vhost_net_get_config to get the mac address of the vdpa hardware

[PATCH v5 4/4] x86: re-enable rng seeding via SetupData

2022-09-21 Thread Jason A. Donenfeld
This reverts 3824e25db1 ("x86: disable rng seeding via setup_data"), but for 7.2 rather than 7.1, now that modifying setup_data is safe to do. Cc: Laurent Vivier Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson Cc: Ard Biesheuvel

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Paolo Bonzini
On Wed, Sep 21, 2022 at 11:12 AM Jason A. Donenfeld wrote: > > Also I think it's cleaner if a reset callback puts the value back to > > zero. fw_cfg already has fw_cfg_machine_reset, so perhaps the easiest > > way is to add a FWCfgCallback reset_cb argument to just > > fw_cfg_add_bytes_callback.

Re: [PATCH] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-21 Thread 陈浩
在 2022/9/21 13:28, Raphael Norwitz 写道: I have some concerns from the vhost-user-blk side. >On Tue, Sep 13, 2022 at 5:13 PM Hao Chen wrote: >> >> When use dpdk-vdpa tests vdpa device. You need to specify the mac address to >> start the virtual machine through libvirt or qemu, but now, the

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Paolo Bonzini
> diff --git a/hw/i386/x86.c b/hw/i386/x86.c > index 050eedc0c8..933bbdd836 100644 > --- a/hw/i386/x86.c > +++ b/hw/i386/x86.c > @@ -764,6 +764,18 @@ static bool load_elfboot(const char *kernel_filename, > return true; > } > > +struct setup_data_fixup { > +void *pos; > +hwaddr val; >

Re: [PATCH v9 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-09-21 Thread Klaus Jensen
On Sep 21 13:44, Damien Le Moal wrote: > On 9/20/22 17:51, Klaus Jensen wrote: > > On Sep 10 13:27, Sam Li wrote: > > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > > accepts only zoned host block devices. By adding zone management > > > operations in this new

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Jason A. Donenfeld
On Wed, Sep 21, 2022 at 11:15 AM Michael S. Tsirkin wrote: > > On Wed, Sep 14, 2022 at 12:41:34AM +0100, Jason A. Donenfeld wrote: > > If setup_data is being read into a specific memory location, then > > generally the setup_data address parameter is read first, so that the > > caller knows where

[PATCH v5 2/4] x86: use typedef for SetupData struct

2022-09-21 Thread Jason A. Donenfeld
The preferred style is SetupData as a typedef, not setup_data as a plain struct. Cc: Paolo Bonzini Cc: Ard Biesheuvel Suggested-by: Michael S. Tsirkin Signed-off-by: Jason A. Donenfeld --- hw/i386/x86.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v5 3/4] x86: reinitialize RNG seed on system reboot

2022-09-21 Thread Jason A. Donenfeld
Since this is read from fw_cfg on each boot, the kernel zeroing it out alone is insufficient to prevent it from being used twice. And indeed on reboot we always want a new seed, not the old one. So re-fill it in this circumstance. Cc: Paolo Bonzini Signed-off-by: Jason A. Donenfeld ---

Re: [PATCH 0/9] Deprecate sysbus_get_default() and get_system_memory() et. al

2022-09-21 Thread Peter Maydell
On Tue, 20 Sept 2022 at 23:50, Bernhard Beschow wrote: > > Am 20. September 2022 09:55:37 UTC schrieb Peter Maydell > : > >On Tue, 20 Sept 2022 at 00:18, Bernhard Beschow wrote: > >> > >> In address-spaces.h it can be read that get_system_memory() and > >> get_system_io() are temporary

Re: [PATCH v1 0/3] ui/gtk: Add a new parameter to assign connectors/monitors to Guests' windows

2022-09-21 Thread Markus Armbruster
"Kasireddy, Vivek" writes: > Hi Markus, > >> Any overlap with Dongwon Kim's "[PATCH v5 0/2] handling guest multiple >> displays"? > > [Kasireddy, Vivek] Yes, there is some overlap but as I mentioned in the cover > letter, > this series is intended to replace Dongwon's series dealing with

Re: [PATCH 0/1] hw/display: expose linear framebuffer address in Bochs VBE registers

2022-09-21 Thread Gerd Hoffmann
Hi, > 1. Although it is reasonable to assume no more than one isa-vga device > will exist in one machine, this could be changed easily later on. Nope. Even if you fix the framebuffer address conflict you still have the io address conflict. > As it stands now, on an ISA-PC machine with no

Re: [PATCH] virtio-net: set the max of queue size to 4096

2022-09-21 Thread Jason Wang
On Wed, Sep 21, 2022 at 11:57 AM Michael S. Tsirkin wrote: > > On Wed, Sep 21, 2022 at 10:59:50AM +0800, Jason Wang wrote: > > On Tue, Sep 20, 2022 at 8:59 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 20, 2022 at 10:03:23AM +0800, Jason Wang wrote: > > > > On Tue, Sep 20, 2022 at 9:38 AM

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Jason A. Donenfeld
Hi Paolo, On Wed, Sep 21, 2022 at 10:59 AM Paolo Bonzini wrote: > Just a small comment, addr should be little-endian (see > fw_cfg_add_i32). It's not used outside x86_load_linux, so it is > possible to just use cpu_to_le32 there. Oh, shucks: I thought about this and then forgot to do it.

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Jason A. Donenfeld
On Wed, Sep 21, 2022 at 11:04:17AM +0200, Jason A. Donenfeld wrote: > > Also I think it's cleaner if a reset callback puts the value back to > > zero. fw_cfg already has fw_cfg_machine_reset, so perhaps the easiest > > way is to add a FWCfgCallback reset_cb argument to just > >

Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Claudio Fontana
On 9/20/22 18:50, Kevin Wolf wrote: > Am 08.09.2022 um 19:36 hat Claudio Fontana geschrieben: >> On 9/8/22 19:10, Claudio Fontana wrote: >>> On 9/8/22 18:03, Richard Henderson wrote: On 9/8/22 15:53, Claudio Fontana wrote: > @@ -446,8 +447,13 @@ static int dmg_open(BlockDriverState *bs,

Re: [PATCH v4 1/2] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Michael S. Tsirkin
On Wed, Sep 14, 2022 at 12:41:34AM +0100, Jason A. Donenfeld wrote: > If setup_data is being read into a specific memory location, then > generally the setup_data address parameter is read first, so that the > caller knows where to read it into. In that case, we should return > setup_data

[PATCH v5 1/4] x86: return modified setup_data only if read as memory, not as file

2022-09-21 Thread Jason A. Donenfeld
If setup_data is being read into a specific memory location, then generally the setup_data address parameter is read first, so that the caller knows where to read it into. In that case, we should return setup_data containing the absolute addresses that are hard coded and determined a priori. This

Re: [PATCH v2 2/7] multifd: modifying 'migrate' qmp command to add multifd socket on particular src and dest pair

2022-09-21 Thread Het Gala
On 29/08/22 10:04 am, Het Gala wrote: On 08/08/22 11:41 am, Het Gala wrote: On 02/08/22 1:23 pm, Markus Armbruster wrote: Het Gala writes: On 26/07/22 4:43 pm, Daniel P. Berrangé wrote: On Thu, Jul 21, 2022 at 07:56:15PM +, Het Gala wrote: i) Modified the format of the qemu

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-21 Thread Alberto Garcia
On Wed 21 Sep 2022 09:47:32 AM +08, Wang Liang wrote: >> > -return limit->slice_end_time - now; >> > +return MAX(limit->slice_end_time - now, 0); >> >> How can this be negative? slice_end_time is guaranteed to be larger >> than >> now: >> >> if (limit->slice_end_time < now) { >>

Re: [PATCH] virtio-net: set the max of queue size to 4096

2022-09-21 Thread Michael S. Tsirkin
On Wed, Sep 21, 2022 at 02:15:41PM +0800, Jason Wang wrote: > On Wed, Sep 21, 2022 at 11:57 AM Michael S. Tsirkin wrote: > > > > On Wed, Sep 21, 2022 at 10:59:50AM +0800, Jason Wang wrote: > > > On Tue, Sep 20, 2022 at 8:59 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Tue, Sep 20, 2022

Re: [PATCH] ratelimit: restrict the delay time to a non-negative value

2022-09-21 Thread Wang Liang
On Wed, 2022-09-21 at 06:53 +0200, Markus Armbruster wrote: > Wang Liang writes: > > > On Tue, 2022-09-20 at 13:18 +, Alberto Garcia wrote: > > > On Tue 20 Sep 2022 08:33:50 PM +08, wanglian...@126.com wrote: > > > > From: Wang Liang > > > > > > > > The delay time should never be a

[PATCH v8 2/2] target/s390x: support PRNO_TRNG instruction

2022-09-21 Thread Jason A. Donenfeld
In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19. Cc: Thomas Huth Cc: David Hildenbrand Cc: Christian

[PATCH v8 1/2] target/s390x: support SHA-512 extensions

2022-09-21 Thread Jason A. Donenfeld
In order to fully support MSA_EXT_5, we have to support the SHA-512 special instructions. So implement those. The implementation began as something TweetNacl-like, and then was adjusted to be useful here. It's not very beautiful, but it is quite short and compact, which is what we're going for.

Re: QEMU's FreeBSD 13 CI job is failing

2022-09-21 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 02:21:46PM -0600, Warner Losh wrote: > On Tue, Sep 20, 2022 at 2:57 AM Daniel P. Berrangé > wrote: > > > On Tue, Sep 20, 2022 at 10:23:56AM +0200, Thomas Huth wrote: > > > On 20/09/2022 10.21, Daniel P. Berrangé wrote: > > > > On Tue, Sep 20, 2022 at 08:44:27AM +0200,

guest Linux Kernel hangs and reports CPU lockup/stuck gitlab bug

2022-09-21 Thread Claudio Fontana
Hi, I think this bug report warrants some attention, can Gerd take a look here? The GTK Clipboard commit seems involved: https://gitlab.com/qemu-project/qemu/-/issues/1150 Thanks, Claudio

Re: [PATCH v2 07/23] target/i386: Introduce DISAS_EOB*

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Add a few DISAS_TARGET_* aliases to reduce the number of > calls to gen_eob() and gen_eob_inhibit_irq(). So far, > only update i386_tr_translate_insn for exiting the block > because of single-step or previous inhibit irq. > >

Re: [PATCH v2 14/23] target/i386: Truncate values for lcall_real to i32

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Use i32 not int or tl for eip and cs arguments. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/helper.h | 2 +- > target/i386/tcg/seg_helper.c | 6 ++ > target/i386/tcg/translate.c

Re: [PATCH v2 15/23] target/i386: Create eip_next_*

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Create helpers for loading the address of the next insn. > Use tcg_constant_* in adjacent code where convenient. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/tcg/translate.c | 44

[RFC PATCH 2/3] target/mips: Convert legacy arithmatic instructions to decodetree

2022-09-21 Thread Jiaxun Yang
Mostly copy paste from translate.c, with some simplification based on newly introduced register access functions. Signed-off-by: Jiaxun Yang --- target/mips/tcg/insn_trans/trans_arith.c.inc | 352 +++ target/mips/tcg/legacy.decode| 62

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-21 Thread Bin Meng
Hi, On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > > At present packaging the required DLLs of QEMU executables is a > manual process, and error prone. > > Improve scripts/nsis.py by adding a logic to automatically package > required DLLs of QEMU executables. > > 'make installer' is tested in

Re: [PATCH] target/m68k: Implement atomic test-and-set

2022-09-21 Thread Laurent Vivier
Le 29/08/2022 à 07:17, Richard Henderson a écrit : This is slightly more complicated than cas, because tas is allowed on data registers. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 40 ++-- 1 file changed, 30 insertions(+), 10

Re: [PATCH v2 21/23] target/i386: Use gen_jmp_rel for DISAS_TOO_MANY

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > With gen_jmp_rel, we may chain between two translation blocks > which may only be separated because of TB size limits. > > Signed-off-by: Richard Henderson > --- > target/i386/tcg/translate.c | 3 +++ > 1 file changed, 3 insertions(+)

Re: [RFC 1/4] docs/tcg-plugins: describe QPP API

2022-09-21 Thread Alex Bennée
Andrew Fasano writes: > Describe how multiple TCG plugins can interact using the QEMU > Plugin-to-Plugin API (QPP) with both callbacks and direct > function calls. Looks ok at first glance. I suspect it is quickly coming to the point we need to split the examples and the API apart in the docs

Re: [PATCH RESEND] hw/microblaze: pass random seed to fdt

2022-09-21 Thread Jason A. Donenfeld
On Thu, Sep 8, 2022 at 11:40 AM Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This FDT node is part of the DT specification. > > Reviewed-by: Edgar E.

Re: guest Linux Kernel hangs and reports CPU lockup/stuck gitlab bug

2022-09-21 Thread Gerd Hoffmann
On Wed, Sep 21, 2022 at 11:55:01AM +0200, Claudio Fontana wrote: > Hi, > > I think this bug report warrants some attention, > > can Gerd take a look here? > > The GTK Clipboard commit seems involved: > > https://gitlab.com/qemu-project/qemu/-/issues/1150 Had a very quick look. Seems

Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Kevin Wolf
Am 21.09.2022 um 06:45 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 08.09.2022 um 19:36 hat Claudio Fontana geschrieben: > >> On 9/8/22 19:10, Claudio Fontana wrote: > >> > On 9/8/22 18:03, Richard Henderson wrote: > >> >> On 9/8/22 15:53, Claudio Fontana wrote: > >> >>> @@

Re: [PATCH v2 03/23] target/i386: Remove cur_eip argument to gen_exception

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 4:45 PM Philippe Mathieu-Daudé wrote: > > On 6/9/22 12:09, Richard Henderson wrote: > > All callers pass s->base.pc_next - s->cs_base, which we can just > > as well compute within the function. Note the special case of > > EXCP_VSYSCALL in which s->cs_base didn't have the

Re: [PATCH v2 05/23] target/i386: Create gen_update_eip_cur

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Like gen_update_cc_op, sync EIP before doing something > that could raise an exception. Replace all gen_jmp_im > that use s->base.pc_next. The commit message seems a bit off (it sounds like adding stuff rather than refactoring), but

Re: [PATCH v2 11/23] target/i386: Create cur_insn_len, cur_insn_len_i32

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 4:50 PM Philippe Mathieu-Daudé wrote: > > On 6/9/22 12:09, Richard Henderson wrote: > > Create common routines for computing the length of the insn. > > > > Signed-off-by: Richard Henderson > > --- > > target/i386/tcg/translate.c | 31 +++ > >

Re: [PATCH v2 1/4] scripts/ci/setup: ninja missing from build-environment

2022-09-21 Thread Lucas Mateus Martins Araujo e Castro
On 15/09/2022 12:54, Thomas Huth wrote: On 14/09/2022 13.41, Lucas Mateus Castro(alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36

[RFC PATCH 3/3] tests/tcg/mips: Add mips32 arithmatic instruction test cases

2022-09-21 Thread Jiaxun Yang
Those cases are delivered from MIPS internal architecture validation tools. Signed-off-by: Jiaxun Yang --- tests/tcg/mips/include/test_utils_32.h| 75 +++ .../tcg/mips/user/isa/mips32/arithmatic/add.c | 99 ++ .../mips/user/isa/mips32/arithmatic/addi.c| 70

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Markus Armbruster
Claudio Fontana writes: > Hi Markus, sorry for the harsh response last week, it comes from a position > of lack of time, > and the expectation that Richard's review would be enough. I gladly accept your apology. We had the good fortune to meet in person (at KVM Forums before the plague).

Re: [PATCH v2 17/23] target/i386: Create gen_jmp_rel

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Create a common helper for pc-relative branches. > The jmp jb insn was missing a mask for CODE32. > > Signed-off-by: Richard Henderson (Oops, my remark the previous patch should still have pointed to gen_jmp_tb). In

[PATCH] virtio-gpu: Resource UUID

2022-09-21 Thread Antonio Caggiano
Enable resource UUID feature and implement command resource assign UUID. This is done by introducing a hash table to map resource IDs to their UUIDs. Signed-off-by: Antonio Caggiano --- hw/display/trace-events| 1 + hw/display/virtio-gpu-base.c | 2 ++ hw/display/virtio-gpu-virgl.c

Re: [PATCH v2 01/23] target/i386: Remove pc_start

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > The DisasContext member and the disas_insn local variable of > the same name are identical to DisasContextBase.pc_next. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/tcg/translate.c | 114

Re: [PATCH v2 08/23] target/i386: Use DISAS_EOB* in gen_movl_seg_T0

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Set is_jmp properly in gen_movl_seg_T0, so that the callers > need to nothing special. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/tcg/translate.c | 36 +--- >

[RFC PATCH 1/3] target/mips: Introduce register access helper functions

2022-09-21 Thread Jiaxun Yang
Introduce register access functions with value extend capability to prepare for decodetree based translation implmentation. Signed-off-by: Jiaxun Yang --- target/mips/tcg/translate.c | 143 +++- target/mips/tcg/translate.h | 54 ++ 2 files changed,

Re: [PATCH 1/4] target/m68k: rename M68K_FEATURE_M68000 to M68K_FEATURE_M68K

2022-09-21 Thread Laurent Vivier
Le 17/09/2022 à 13:25, Mark Cave-Ayland a écrit : The M68K_FEATURE_M68000 feature is misleading in that its name suggests the feature is defined just for Motorola 68000 CPUs, whilst in fact it is defined for all Motorola 680X0 CPUs. In order to avoid confusion with the other

Re: [PATCH v2] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-21 Thread Igor Mammedov
On Tue, 20 Sep 2022 14:15:36 +0100 Peter Maydell wrote: > On Wed, 24 Aug 2022 at 16:04, Igor Mammedov wrote: > > > > On Tue, 16 Aug 2022 17:49:57 +0800 > > Keqian Zhu wrote: > > > > > Setup an ARM virtual machine of machine virt and execute qmp > > > "query-acpi-ospm-status" > > > causes

Re: [PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-09-21 Thread Thomas Huth
On 29/08/2022 18.29, Jason A. Donenfeld wrote: On Fri, Aug 26, 2022 at 01:28:11PM +0200, Thomas Huth wrote: +qemu_guest_getrandom_nofail(tmp, block); +for (size_t i = 0; i < block; ++i) { +cpu_stb_data_ra(env, wrap_address(env, *buf_reg), tmp[i], ra); +

Re: [PATCH v2 06/23] target/i386: Create gen_update_eip_next

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Sync EIP before exiting a translation block. > Replace all gen_jmp_im that use s->pc. > > Signed-off-by: Richard Henderson > --- > target/i386/tcg/translate.c | 45 - > 1 file changed, 25

Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Kevin Wolf
Am 21.09.2022 um 09:50 hat Claudio Fontana geschrieben: > On 9/20/22 18:50, Kevin Wolf wrote: > > Am 08.09.2022 um 19:36 hat Claudio Fontana geschrieben: > >> On 9/8/22 19:10, Claudio Fontana wrote: > >>> On 9/8/22 18:03, Richard Henderson wrote: > On 9/8/22 15:53, Claudio Fontana wrote: >

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-21 Thread Thomas Huth
On 21/09/2022 14.18, Bin Meng wrote: Hi, On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: At present packaging the required DLLs of QEMU executables is a manual process, and error prone. Improve scripts/nsis.py by adding a logic to automatically package required DLLs of QEMU executables.

Re: [PATCH v2 12/23] target/i386: Remove cur_eip, next_eip arguments to gen_repz*

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > All callers pass s->base.pc_next and s->pc, which we can just > as well compute within the functions. Pull out common helpers > and reduce the amount of code under macros. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 16/9/22 11:27, Markus Armbruster wrote: >> Claudio Fontana writes: >> >>> improve error handling during module load, by changing: >>> >>> bool module_load_one(const char *prefix, const char *lib_name); >>> void module_load_qom_one(const char *type); >>> >>>

Re: [PATCH 1/2] target/m68k: Fix MACSR to CCR

2022-09-21 Thread Laurent Vivier
Le 13/09/2022 à 16:28, Richard Henderson a écrit : First, we were writing to the entire SR register, instead of only the flags portion. Second, we were not clearing C as per the documentation (X was cleared via the 0xf mask). Signed-off-by: Richard Henderson --- target/m68k/translate.c | 6

Re: [PATCH 4/4] target/m68k: always call gen_exit_tb() after writes to SR

2022-09-21 Thread Laurent Vivier
Le 17/09/2022 à 13:25, Mark Cave-Ayland a écrit : Any write to SR can change the security state so always call gen_exit_tb() when this occurs. In particular MacOS makes use of andiw/oriw in a few places to handle the switch between user and supervisor mode. Signed-off-by: Mark Cave-Ayland ---

Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-09-21 Thread Igor Mammedov
On Tue, 20 Sep 2022 20:28:31 +0800 Robert Hoo wrote: > On Tue, 2022-09-20 at 11:13 +0200, Igor Mammedov wrote: > > On Fri, 16 Sep 2022 21:15:35 +0800 > > Robert Hoo wrote: > > > > > On Fri, 2022-09-16 at 09:37 +0200, Igor Mammedov wrote: > > > > > > > > Fine, get your point now. > > > > >

Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.09.2022 um 06:45 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 08.09.2022 um 19:36 hat Claudio Fontana geschrieben: >> >> On 9/8/22 19:10, Claudio Fontana wrote: >> >> > On 9/8/22 18:03, Richard Henderson wrote: >> >> >> On 9/8/22 15:53, Claudio

RE: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-09-21 Thread Meng, Bin
-Original Message- From: Philippe Mathieu-Daudé On Behalf Of Philippe Mathieu-Daudé Sent: Sunday, September 18, 2022 5:32 AM To: Bin Meng ; qemu-devel@nongnu.org Cc: Meng, Bin ; Hanna Reitz ; Kevin Wolf ; Peter Lieven ; qemu-bl...@nongnu.org Subject: Re: [PATCH 5/7] block/nfs: Fix

Re: [PATCH v2 13/23] target/i386: Introduce DISAS_JUMP

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Drop the unused dest argument to gen_jr(). > Remove most of the calls to gen_jr, and use DISAS_JUMP. > Remove some unused loads of eip for lcall and ljmp. The only use outside i386_tr_tb_stop is here: static void

[RFC PATCH 0/3] MIPS decodetree conversion attempt

2022-09-21 Thread Jiaxun Yang
Hi, This is my attempt of converting MIPS translation code into decodetree. Currently only MIPS I to MIPS Release 5 arithmatic functions are converted. Old decoding functions are perserved in codebase for now due to dependencies from microMIPS/nanoMIPS translation code. Will remove them after

Re: [PATCH v2 22/23] target/i386: Create gen_eip_cur

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/i386/tcg/translate.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c > index

Re: [PATCH v2 16/23] target/i386: Use DISAS_TOO_MANY to exit after gen_io_start

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > We can set is_jmp early, using only one if, and let that > be overwritten by gen_repz_* etc. Perhaps "be overwritten by gen_rep*'s calls to gen_jmp_rel". Code-wise, Reviewed-by: Paolo Bonzini Paolo > > Signed-off-by: Richard

Re: [PATCH v2 19/23] target/i386: Use gen_jmp_rel for gen_jcc

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > -static inline void gen_jcc(DisasContext *s, int b, > - target_ulong val, target_ulong next_eip) > +static void gen_jcc(DisasContext *s, MemOp ot, int b, int diff) > { > -TCGLabel *l1, *l2; > +TCGLabel

Re: [PATCH v2 18/23] target/i386: Use gen_jmp_rel for loop and jecxz insns

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > With gen_jmp_rel, we may chain to the next tb > instead of merely writing to eip and exiting. > > Signed-off-by: Richard Henderson See comment on the previous patch. Paolo > --- > target/i386/tcg/translate.c | 21

Re: [PATCH 13/14] migration: Remove old preempt code around state maintainance

2022-09-21 Thread Peter Xu
On Tue, Sep 20, 2022 at 08:47:20PM -0400, Peter Xu wrote: > On Tue, Sep 20, 2022 at 06:52:27PM -0400, Peter Xu wrote: > > With the new code to send pages in rp-return thread, there's little help to > > keep lots of the old code on maintaining the preempt state in migration > > thread, because the

Re: [PATCH v2 04/23] target/i386: Remove cur_eip, next_eip arguments to gen_interrupt

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 4:46 PM Philippe Mathieu-Daudé wrote: > > On 6/9/22 12:09, Richard Henderson wrote: > > All callers pass s->base.pc_next and s->pc, which we can just > > as well compute within the function. > > > > Signed-off-by: Richard Henderson > > --- > > target/i386/tcg/translate.c

Re: [PATCH v2 10/23] target/i386: USe DISAS_EOB_ONLY

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Replace lone calls to gen_eob() with the new enumerator. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/tcg/translate.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > >

Re: [PATCH v2 09/23] target/i386: Use DISAS_EOB_NEXT

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Replace sequences of gen_update_cc_op, gen_update_eip_next, > and gen_eob with the new is_jmp enumerator. > > Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini > --- > target/i386/tcg/translate.c | 40

Re: [PATCH 2/2] target/m68k: Perform writback before modifying SR

2022-09-21 Thread Laurent Vivier
Le 13/09/2022 à 16:28, Richard Henderson a écrit : Writes to SR may change security state, which may involve a swap of %ssp with %usp as reflected in %a7. Finish the writeback of %sp@+ before swapping stack pointers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1206 Signed-off-by:

Re: [PATCH v2 20/23] target/i386: Use gen_jmp_rel for gen_repz*

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:09 PM Richard Henderson wrote: > > Subtract cur_insn_len to restart the current insn. > > Signed-off-by: Richard Henderson I wouldn't mind squashing this with the jecxz/loop patch (and the review comments there apply here too). Paolo > --- >

Re: [RFC 0/4] Support interactions between TCG plugins

2022-09-21 Thread Alex Bennée
Andrew Fasano writes: > Hello, > > I'm requesting comments on the following series of patches expanding the > TCG plugin system to add the "QEMU Plugin-to-Plugin (QPP)" interface > that allows for interactions between TCG plugins. The goal of this > interface is to enable plugins to expand on

Re: [PATCH 2/4] target/m68k: increase size of m68k CPU features from uint32_t to uint64_t

2022-09-21 Thread Laurent Vivier
Le 20/09/2022 à 18:30, Mark Cave-Ayland a écrit : On 17/09/2022 23:27, Philippe Mathieu-Daudé via wrote: On 17/9/22 14:09, BALATON Zoltan wrote: On Sat, 17 Sep 2022, Mark Cave-Ayland wrote: There are already 32 feature bits in use, so change the size of the m68k CPU features to uint64_t

Re: [RFC 2/4] tcg/plugins: Automatically define CURRENT_PLUGIN

2022-09-21 Thread Alex Bennée
Andrew Fasano writes: > Use plugin filenames to set the preprocessor variable CURRENT_PLUGIN > as a string during plugin compilation. > > Signed-off-by: Andrew Fasano > --- > contrib/plugins/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v1 3/3] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs

2022-09-21 Thread Markus Armbruster
Vivek Kasireddy writes: > The new parameter named "connector" can be used to assign physical > monitors/connectors to individual GFX VCs such that when the monitor > is connected or hotplugged, the associated GTK window would be > fullscreened on it. If the monitor is disconnected or unplugged,

[PATCH] try to find out which cluster allocated in qcow2

2022-09-21 Thread songlinfeng
In our project,we want to full backup a disk only allocated area,but qmp block-dity-block-add can create a bitmap with all zero,so we can't find out which cluster is allocated.in qcow2,I think l2_table can help me find out which cluster should be backup. Signed-off-by: songlinfeng ---

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-09-21 Thread David Hildenbrand
On 21.09.22 16:44, Michal Prívozník wrote: On 7/21/22 14:07, David Hildenbrand wrote: Ping? Is there any plan how to move forward? I have libvirt patches ready to consume this and I'd like to prune my old local branches :-) Heh, I was thinking about this series just today. I was distracted

Re: [PATCH] qga: fix possible memory leak

2022-09-21 Thread Markus Armbruster
luzhipeng writes: > From: lu zhipeng > > Signed-off-by: lu zhipeng > --- > qga/main.c | 19 ++- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > index 5f1efa2333..73ea1aae65 100644 > --- a/qga/main.c > +++ b/qga/main.c > @@ -1287,7

Re: [PATCH v8 13/14] net: stream: move to QIO

2022-09-21 Thread Markus Armbruster
Laurent Vivier writes: > Use QIOChannel, QIOChannelSocket and QIONetListener. > > Signed-off-by: Laurent Vivier > --- [...] > diff --git a/qemu-options.hx b/qemu-options.hx > index ee2436ae14a7..a0b5b70c80cb 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -2732,8 +2732,8 @@

Re: [RFC 4/4] tcg/plugins: Add example pair of QPP plugins

2022-09-21 Thread Alex Bennée
Andrew Fasano writes: > The first plugin, qpp_srv exposes two functions and one callback that other > plugins can leverage. These functions are described in the corresponding > header file. > > The second plugin, qpp_client, imports this header file, registers its > own function to run on a

Re: [PATCH] add keepalive for qemu-nbd

2022-09-21 Thread Denis V. Lunev
On 9/21/22 10:36, songlinfeng wrote: From: songlinfeng we want to export a image with qemu-nbd as server, in client we use libnbd to connect qemu-nbd,but when client power down,the server is still working. qemu-nbd will exit when last client exit.so,we still want server exit when client

[PULL 5/5] target/m68k: always call gen_exit_tb() after writes to SR

2022-09-21 Thread Laurent Vivier
From: Mark Cave-Ayland Any write to SR can change the security state so always call gen_exit_tb() when this occurs. In particular MacOS makes use of andiw/oriw in a few places to handle the switch between user and supervisor mode. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson

[PULL 4/5] target/m68k: rename M68K_FEATURE_M68000 to M68K_FEATURE_M68K

2022-09-21 Thread Laurent Vivier
From: Mark Cave-Ayland The M68K_FEATURE_M68000 feature is misleading in that its name suggests the feature is defined just for Motorola 68000 CPUs, whilst in fact it is defined for all Motorola 680X0 CPUs. In order to avoid confusion with the other M68K_FEATURE_M680X0 constants which define

[PATCH v1 01/10] monitor: expose monitor_puts to rest of code

2022-09-21 Thread Alex Bennée
This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the _puts api. Signed-off-by: Alex Bennée

[PATCH v1 00/10] plugins/next (disas, monitor, docs, execlog)

2022-09-21 Thread Alex Bennée
Hi, It has been a while since I last posted the state of my plugins queue. These are mostly small cleanups and documentation tweaks. I also did a little bit of tidying up in the disas interface. The following still need review: - docs/devel: document the test plugins - contrib/plugins: reset

[PATCH v1 03/10] disas: use result of ->read_memory_func

2022-09-21 Thread Alex Bennée
This gets especially confusing if you start plugging in host addresses from a trace and you wonder why the output keeps changing. Report when read_memory_func fails instead of blindly disassembling the buffer contents. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- disas.c

[PATCH v1 04/10] tests/tcg: add memory-sve test for aarch64

2022-09-21 Thread Alex Bennée
This will be helpful in debugging problems with tracking SVE memory accesses via the TCG plugins system. Signed-off-by: Alex Bennée Cc: Robert Henry Cc: Aaron Lindsay --- tests/tcg/aarch64/Makefile.softmmu-target | 7 +++ tests/tcg/aarch64/system/boot.S | 3 ++- 2 files changed,

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-21 Thread Claudio Fontana
On 9/21/22 14:16, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 16/9/22 11:27, Markus Armbruster wrote: >>> Claudio Fontana writes: >>> improve error handling during module load, by changing: bool module_load_one(const char *prefix, const char *lib_name);

[PATCH v1 05/10] plugins: extend execlog to filter matches

2022-09-21 Thread Alex Bennée
Sometimes the whole execlog is just two much so add the ability to filter by instruction opcode or address. [AJB: this shows for example .qemu-system-aarch64 -display none -serial mon:stdio \ -M virt -cpu max \ -semihosting-config enable=on \ -kernel

[PATCH v1 06/10] plugins: Assert mmu_idx in range before use in qemu_plugin_get_hwaddr

2022-09-21 Thread Alex Bennée
From: Richard Henderson Coverity reports out-of-bound accesses here. This should be a false positive due to how the index is decoded from MemOpIdx. Fixes: Coverity CID 1487201 Signed-off-by: Richard Henderson Reviewed-by: Damien Hedde Message-Id:

Re: [PATCH v2 23/23] target/i386: Enable TARGET_TB_PCREL

2022-09-21 Thread Paolo Bonzini
On Tue, Sep 6, 2022 at 12:10 PM Richard Henderson wrote: > static void gen_update_eip_cur(DisasContext *s) > { > gen_jmp_im(s, s->base.pc_next - s->cs_base); > +s->pc_save = s->base.pc_next; s->pc_save is not valid after all gen_jmp_im() calls. Is it worth noting after each call to

[PATCH] qga: fix possible memory leak

2022-09-21 Thread luzhipeng
From: lu zhipeng Signed-off-by: lu zhipeng --- qga/main.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/qga/main.c b/qga/main.c index 5f1efa2333..73ea1aae65 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1287,7 +1287,7 @@ static GAState

Re: [PATCH v2] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2022-09-21 Thread Venu Busireddy
On 2022-09-21 16:33:35 +0200, Paolo Bonzini wrote: > On Fri, Sep 16, 2022 at 3:44 AM Venu Busireddy > wrote: > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c > > index 41f2a5630173..69194c7ae23c 100644 > > --- a/hw/scsi/virtio-scsi.c > > +++ b/hw/scsi/virtio-scsi.c > > @@ -608,7

Re: [PATCH] i386: Add new CPU model SapphireRapids

2022-09-21 Thread Dr. David Alan Gilbert
* Wang, Lei (lei4.w...@intel.com) wrote: > The new CPU model mostly inherits features from Icelake-Server, while > adding new features: > - AMX (Advance Matrix eXtensions) > - Bus Lock Debug Exception > and new instructions: > - AVX VNNI (Vector Neural Network Instruction): > - VPDPBUS:

Re: [PATCH v8 12/14] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-09-21 Thread Markus Armbruster
Laurent Vivier writes: > To be consistent with socket_uri(), add 'tcp:' prefix for inet type in > socket_parse(), by default socket_parse() use tcp when no prefix is > provided (format is host:port). > > In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:' > because it makes a

Re: [RFC 4/4] tcg/plugins: Add example pair of QPP plugins

2022-09-21 Thread Alex Bennée
Andrew Fasano writes: > The first plugin, qpp_srv exposes two functions and one callback that other > plugins can leverage. These functions are described in the corresponding > header file. > > The second plugin, qpp_client, imports this header file, registers its > own function to run on a

[PATCH v1 10/10] docs/devel: document the test plugins

2022-09-21 Thread Alex Bennée
Although the test plugins are fairly basic they are still useful for some things so we should document their existence. Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 137 +++-- 1 file changed, 133 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v2 26/39] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled

2022-09-21 Thread Daniel P . Berrangé
On Wed, Sep 21, 2022 at 05:29:55PM +0100, Dr. David Alan Gilbert wrote: > * Bin Meng (bmeng...@gmail.com) wrote: > > From: Xuzhou Cheng > > > > Make sure QEMU process "to" exited before launching another target > > for migration in the test_multifd_tcp_cancel case. > > > > Signed-off-by: Xuzhou

  1   2   >