Re: [PATCH v2 11/14] vdpa: Adapt vhost_vdpa_get_vring_base to SVQ

2022-02-28 Thread Eugenio Perez Martin
On Mon, Feb 28, 2022 at 8:38 AM Jason Wang wrote: > > > 在 2022/2/27 下午9:41, Eugenio Pérez 写道: > > This is needed to achieve migration, so the destination can restore its > > index. > > > I suggest to duplicate the comment below here. > Sure, I'll duplicate here in the commit message. Thanks! >

[PATCH v2 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-02-28 Thread Kshitij Suri
Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri --- meson.build| 9 - meson_options.txt | 4 ++-- ui/vnc-enc-tight.c |

[PATCH v2 2/2] Added parameter to take screenshot with screendump as PNG.

2022-02-28 Thread Kshitij Suri
Currently screendump only supports PPM format, which is un-compressed and not standard. Added a "format" parameter to qemu monitor screendump capabilites to support PNG image capture using libpng. The param was added in QAPI schema of screendump present in ui.json along with png_save() function whi

Re: [PATCH v5 07/12] target/riscv: Support mcycle/minstret write operation

2022-02-28 Thread Alistair Francis
On Sat, Feb 19, 2022 at 10:32 AM Atish Patra wrote: > > From: Atish Patra > > mcycle/minstret are actually WARL registers and can be written with any > given value. With SBI PMU extension, it will be used to store a initial > value provided from supervisor OS. The Qemu also need prohibit the coun

Re: [PATCH v15 3/8] net/vmnet: implement shared mode (vmnet-shared)

2022-02-28 Thread Akihiko Odaki
On 2022/02/28 20:59, Vladislav Yaroshchuk wrote: On Sat, Feb 26, 2022 at 3:27 PM Akihiko Odaki > wrote: On Sat, Feb 26, 2022 at 8:33 PM Vladislav Yaroshchuk mailto:vladislav.yaroshc...@jetbrains.com>> wrote: > > > > On Sat, Feb 26, 2

Re: [PATCH 20/20] tests: Add postcopy preempt test

2022-02-28 Thread Peter Xu
On Wed, Feb 23, 2022 at 03:50:24PM +0800, Peter Xu wrote: > On Tue, Feb 22, 2022 at 12:51:59PM +, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > Two tests are added: a normal postcopy preempt test, and a recovery test. > > > > Yes, this is difficult; without huge

SPI support for the virt platform

2022-02-28 Thread Marcelo Schmitt
Hi, I'd like to know the opinion of the QEMU community on some topics. In 2021, a pair of patch sets for drivers of the Linux IIO subsystem was proposed based on some QEMU hacks that added virtual devices with which it was possible to test the proposed modifications to the Linux kernel [1, 2, 3].

Re: [PATCH v8 5/5] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-02-28 Thread Peter Xu
On Fri, Feb 18, 2022 at 05:57:13PM +0100, Juan Quintela wrote: > I did a change on: > > commit d48c3a044537689866fe44e65d24c7d39a68868a > Author: Juan Quintela > Date: Fri Nov 19 15:35:58 2021 +0100 > > multifd: Use a single writev on the send side > > Until now, we wrote the pack

Re: [PATCH 03/14] hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_set_string()

2022-02-28 Thread David Gibson
On Mon, Feb 28, 2022 at 02:49:53PM -0300, Daniel Henrique Barboza wrote: > And get rid of the 'out' label since it's now used. s/used/unused/ > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > hw/ppc/spapr_caps.c | 8 +++- > 1 file changed, 3 insertions(+), 5 de

Re: [PATCH 05/14] hw/ppc/spapr_caps.c: use g_autofree in spapr_caps_add_properties()

2022-02-28 Thread David Gibson
On Mon, Feb 28, 2022 at 02:49:55PM -0300, Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > hw/ppc/spapr_caps.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c > i

Re: [PATCH 04/14] hw/ppc/spapr_caps.c: use g_autofree in spapr_cap_get_string()

2022-02-28 Thread David Gibson
On Mon, Feb 28, 2022 at 02:49:54PM -0300, Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > hw/ppc/spapr_caps.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c > i

Re: [PATCH 02/14] hw/ppc/spapr.c: fail early if no firmware found in machine_init()

2022-02-28 Thread David Gibson
On Mon, Feb 28, 2022 at 02:49:52PM -0300, Daniel Henrique Barboza wrote: > The firmware check consists on a file search (qemu_find_file) and load > it via load_imag_targphys(). This validation is not dependent on any > other machine state but it currently being done at the end of > spapr_machine_in

Re: [PATCH v4 3/3] tests/acpi: i386: update FACP table differences

2022-02-28 Thread Ani Sinha
On Mon, 28 Feb 2022, Liav Albani wrote: > After changing the IAPC boot flags register to indicate support of i8042 > in the machine chipset to help the guest OS to determine its existence > "faster", we need to have the updated FACP ACPI binary images in tree. > > @@ -1,32 +1,32 @@ > /* > *

Re: [PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-28 Thread Ani Sinha
On Mon, 28 Feb 2022, Liav Albani wrote: > This can allow the guest OS to determine more easily if i8042 controller > is present in the system or not, so it doesn't need to do probing of the > controller, but just initialize it immediately, before enumerating the > ACPI AML namespace. > > This c

Re: [PATCH v4 1/3] tests/acpi: i386: allow FACP acpi table changes

2022-02-28 Thread Ani Sinha
On Mon, 28 Feb 2022, Liav Albani wrote: > The FACP table is going to be changed for x86/q35 machines. To be sure > the following changes are not breaking any QEMU test this change follows > step 2 from the bios-tables-test.c guide on changes that affect ACPI > tables. Please retain the tags in

Re: [PATCH v7 12/14] target/riscv: rvk: add CSR support for Zkr

2022-02-28 Thread Weiwei Li
在 2022/3/1 上午9:44, Weiwei Li 写道: 在 2022/3/1 上午4:11, Richard Henderson 写道: On 2/28/22 04:48, Weiwei Li wrote: +/* Crypto Extension */ +static RISCVException rmw_seed(CPURISCVState *env, int csrno, +  target_ulong *ret_value, +  target_ulo

RE: [PATCH 3/3] whpx: Added support for breakpoints and stepping

2022-02-28 Thread Ivan Shcherbakov
Hi Alex, Thanks for getting back to me. It is definitely the latter case (i.e. it is possible to change it while the target is stopped at a breakpoint before resuming any VCPUs). vm_state_notify() does look like it's intended for this type of notifications, but unfortunately, it doesn't make a

Re: [PATCH v7 12/14] target/riscv: rvk: add CSR support for Zkr

2022-02-28 Thread Weiwei Li
在 2022/3/1 上午4:11, Richard Henderson 写道: On 2/28/22 04:48, Weiwei Li wrote: +/* Crypto Extension */ +static RISCVException rmw_seed(CPURISCVState *env, int csrno, +  target_ulong *ret_value, +  target_ulong new_value, target_ulong write_

Re: [PATCH 01/14] hw/ppc/spapr.c: use g_autofree in spapr_dt_chosen()

2022-02-28 Thread David Gibson
On Mon, Feb 28, 2022 at 02:49:51PM -0300, Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > hw/ppc/spapr.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index f0b75b22bb

Re: [PATCH v7 09/14] target/riscv: rvk: add support for sha512 related instructions for RV32 in zknh extension

2022-02-28 Thread Weiwei Li
在 2022/3/1 上午3:38, Richard Henderson 写道: On 2/28/22 04:48, Weiwei Li wrote: +#define GEN_SHA512H_RV32(NAME, OP, NUM1, NUM2, NUM3) \ +static void gen_##NAME(TCGv dest, TCGv src1, TCGv src2) \ +{ \ +    TCGv_i64 t0 = tcg_temp_new_i64(); \ +    TCGv_i64 t1 = tcg_temp_new_i64(); \ +    TCGv_i64 t2

Re: [PATCH] target/riscv: fix inverted checks for ext_zb[abcs]

2022-02-28 Thread Vineet Gupta
Hi Alistair, On 2/3/22 16:59, Alistair Francis wrote: On Fri, Feb 4, 2022 at 1:42 AM Philipp Tomsich wrote: While changing to the use of cfg_ptr, the conditions for REQUIRE_ZB[ABCS] inadvertently became inverted and slipped through the initial testing (which used RV64GC_XVentanaCondOps as a t

Re: [PATCH v4 0/7] malta: Fix PCI IRQ levels to be preserved during migration, cleanup

2022-02-28 Thread Philippe Mathieu-Daudé
On 25/2/22 21:36, Bernhard Beschow wrote: Am 17. Februar 2022 10:19:17 UTC schrieb Bernhard Beschow : Tested with [1]: qemu-system-mipsel -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda \ debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" It was possible to log in as

Re: [PATCH 2/9] util: Make qemu_oom_check() a static function

2022-02-28 Thread Philippe Mathieu-Daudé
On 26/2/22 19:07, Peter Maydell wrote: The qemu_oom_check() function, which we define in both oslib-posix.c and oslib-win32.c, is now used only locally in that file; make it static. Signed-off-by: Peter Maydell --- include/qemu-common.h | 2 -- util/oslib-posix.c| 2 +- util/oslib-win32

Re: [PATCH 1/9] hw/usb/redirect.c: Stop using qemu_oom_check()

2022-02-28 Thread Philippe Mathieu-Daudé
On 26/2/22 19:07, Peter Maydell wrote: qemu_oom_check() is a function which essentially says "if you pass me a NULL pointer then print a message then abort()". On POSIX systems the message includes strerror(errno); on Windows it includes the GetLastError() error value printed as an integer. Oth

Re: [PATCH 9/9] osdep: Move memalign-related functions to their own header

2022-02-28 Thread Philippe Mathieu-Daudé
On 26/2/22 19:07, Peter Maydell wrote: Move the various memalign-related functions out of osdep.h and into their own header, which we include only where they are used. While we're doing this, add some brief documentation comments. Signed-off-by: Peter Maydell --- include/qemu/memalign.h

Re: [PATCH v2] coreaudio: Notify error in coreaudio_init_out

2022-02-28 Thread Philippe Mathieu-Daudé
On 26/2/22 12:59, Akihiko Odaki wrote: Otherwise, the audio subsystem tries to use the voice and eventually aborts due to the maximum number of samples in the buffer is not set. Signed-off-by: Akihiko Odaki Reviewed-by: Christian Schoenebeck --- audio/coreaudio.c | 2 ++ 1 file changed, 2 i

Re: [PATCH 7/9] util: Use meson checks for valloc() and memalign() presence

2022-02-28 Thread Philippe Mathieu-Daudé
On 26/2/22 19:07, Peter Maydell wrote: Instead of assuming that all CONFIG_BSD have valloc() and anything else is memalign(), explicitly check for those functions in meson.build and use the "is the function present" define. Tests for specific functionality are better than which-OS checks; this a

Re: [PATCH v2 1/2] hw/ssi: Add Ibex SPI device model

2022-02-28 Thread Philippe Mathieu-Daudé
Hi Wilfred, On 28/2/22 10:13, Alistair Francis wrote: On Mon, Feb 28, 2022 at 1:41 PM Alistair Francis wrote: From: Wilfred Mallawa Adds the SPI_HOST device model for ibex. The device specification is as per [1]. The model has been tested on opentitan with spi_host unit tests written for To

Re: [PATCH v2 2/2] riscv: opentitan: Connect opentitan SPI Host

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 04:40, Alistair Francis wrote: From: Wilfred Mallawa Conenct spi host[1/0] to opentitan. Typo "Connect". Signed-off-by: Wilfred Mallawa --- hw/riscv/opentitan.c | 36 include/hw/riscv/opentitan.h | 12 +++- 2 files changed

Re: [PATCH v2 2/2] meson: fix CONFIG_ATOMIC128 check

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 21:00, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The current testing code isn't correct and matching QEMU usage: testfile.c: In function 'main': testfile.c:5:11: error: incorrect number of arguments to function '__atomic_load' 5 | y = __atomic_load(&x, 0

Re: [PATCH 02/10] macfb: don't use special irq_state and irq_mask variables in MacfbState

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 23:25, Mark Cave-Ayland wrote: The current IRQ state and IRQ mask are handled exactly the same as standard register accesses, so store these values directly in the regs array rather than having separate variables for them. Signed-off-by: Mark Cave-Ayland --- hw/display/macfb.c

Re: [PATCH 08/10] esp: convert ESPState pdma_cb from a function pointer to an integer

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 23:25, Mark Cave-Ayland wrote: This prepares for the inclusion of the current PDMA callback in the migration stream since the callback is referenced by an integer instead of a function pointer. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 47 +

Re: [PATCH 07/10] esp: introduce esp_pdma_cb() function

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 23:25, Mark Cave-Ayland wrote: This function is to be used to execute the current PDMA callback rather than dereferencing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-

Re: [PATCH 06/10] esp: introduce esp_set_pdma_cb() function

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 23:25, Mark Cave-Ayland wrote: This function is to be used to set the current PDMA callback rather than accessing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 19 --- 1 file changed, 12 insertions(+), 7 deletio

[PATCH 07/10] esp: introduce esp_pdma_cb() function

2022-02-28 Thread Mark Cave-Ayland
This function is to be used to execute the current PDMA callback rather than dereferencing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c

[PATCH 08/10] esp: convert ESPState pdma_cb from a function pointer to an integer

2022-02-28 Thread Mark Cave-Ayland
This prepares for the inclusion of the current PDMA callback in the migration stream since the callback is referenced by an integer instead of a function pointer. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 47 ++- include/hw/scsi/esp.h | 1

[PATCH 06/10] esp: introduce esp_set_pdma_cb() function

2022-02-28 Thread Mark Cave-Ayland
This function is to be used to set the current PDMA callback rather than accessing the ESPState pdma_cb function pointer directly. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/es

[PATCH 05/10] macfb: set initial value of mode control registers in macfb_common_realize()

2022-02-28 Thread Mark Cave-Ayland
If booting Linux directly in the q800 machine using -kernel rather than using a MacOS toolbox ROM, the mode control registers are never initialised, causing macfb_mode_write() to fail to determine the current resolution after migration. Resolve this by always setting the initial values of the mode

[PATCH 10/10] esp: recreate ESPState current_req after migration

2022-02-28 Thread Mark Cave-Ayland
Since PDMA reads/writes are driven by the guest, it is possible that migration can occur whilst a SCSIRequest is still active. Fortunately active SCSIRequests are already included in the migration stream and restarted post migration but this still leaves the reference in ESPState uninitialised. Im

[PATCH 04/10] macfb: add VMStateDescription fields for display type and VBL timer

2022-02-28 Thread Mark Cave-Ayland
These fields are required in the migration stream to restore macfb state correctly. Signed-off-by: Mark Cave-Ayland --- hw/display/macfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index fb54b460c1..f9ceea532e 100644 --- a/hw/display/macfb.c ++

[PATCH 09/10] esp: include the current PDMA callback in the migration stream

2022-02-28 Thread Mark Cave-Ayland
This involves (re)adding a PDMA-specific subsection to hold the reference to the current PDMA callback. Signed-off-by: Mark Cave-Ayland --- hw/scsi/esp.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index e8b6f25dbb..7998dcfb97 100644

[PATCH 03/10] macfb: increase number of registers saved in MacfbState

2022-02-28 Thread Mark Cave-Ayland
The MacOS toolbox ROM accesses a number of addresses between 0x0 and 0x200 during initialisation and resolution changes. Whilst the function of many of these registers is unknown, it is worth the minimal cost of saving these extra values as part of migration to help future-proof the migration str

[PATCH 02/10] macfb: don't use special irq_state and irq_mask variables in MacfbState

2022-02-28 Thread Mark Cave-Ayland
The current IRQ state and IRQ mask are handled exactly the same as standard register accesses, so store these values directly in the regs array rather than having separate variables for them. Signed-off-by: Mark Cave-Ayland --- hw/display/macfb.c | 15 +++ include/hw/display/

[PATCH 00/10] q800: migration fixes

2022-02-28 Thread Mark Cave-Ayland
This patchset contains fixes for the macfb and esp devices which enable migration of the q800 machine to succeed here in local testing. Patches 1-5 contain fixes and improvements for migrating the macfb device whilst patches 6-9 change the ESPState pdma_cb field from being a function pointer to an

[PATCH 01/10] macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState

2022-02-28 Thread Mark Cave-Ayland
Currently when QEMU tries to migrate the macfb framebuffer it crashes randomly because the opaque provided by the DeviceClass vmsd property for both devices is set to MacfbState rather than MacfbNubusState or MacfbSysBusState as appropriate. Resolve the issue by adding new VMStateDescriptions for

Re: [PATCH] hw/virtio: vdpa: Fix leak of host-notifier memory-region

2022-02-28 Thread Michael S. Tsirkin
yes - in the next pull, thanks! On Mon, Feb 28, 2022 at 07:27:34PM +0100, Laurent Vivier wrote: > Ping? > > Thanks, > Laurent > > On 22/02/2022 09:53, Laurent Vivier wrote: > > Michael, > > > > do you plan to merge this soon? > > > > This is a bugfix for a QEMU coredump. > > > > Thanks, > > L

Re: [PATCH v2 2/2] meson: fix CONFIG_ATOMIC128 check

2022-02-28 Thread Richard Henderson
On 2/28/22 10:00, marcandre.lur...@redhat.com wrote: -# See if 64-bit atomic operations are supported. -# Note that without __atomic builtins, we can only -# assume atomic loads/stores max at pointer size. -config_host_data.set('CONFIG_ATOMIC64', cc.links(''' +atomic_test = ''' #include

Re: [PATCH v2 1/2] meson: move int128 checks from configure

2022-02-28 Thread Richard Henderson
On 2/28/22 10:00, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau (note: the test isn't working as intended, the next patches fixes it) Signed-off-by: Marc-André Lureau --- configure | 47 --- meson.build | 39 +

Re: [PATCH v2 1/1] tcg: Set MAX_OPC_PARAM_IARGS to 7

2022-02-28 Thread Richard Henderson
On 2/27/22 01:31, Ziqiao Kong wrote: The last entry of DEF_HELPERS_FLAGS_n is DEF_HELPER_FLAGS_7 and thus the MAX_OPC_PARAM_IARGS should be 7. Signed-off-by: Ziqiao Kong --- include/tcg/tcg.h| 2 +- tcg/tci/tcg-target.c.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

RE: [PATCH v2 1/1] tcg: Set MAX_OPC_PARAM_IARGS to 7

2022-02-28 Thread Taylor Simpson
> -Original Message- > From: Ziqiao Kong > Sent: Sunday, February 27, 2022 5:32 AM > To: qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; s...@weilnetz.de; Taylor Simpson > ; Ziqiao Kong > Subject: [PATCH v2 1/1] tcg: Set MAX_OPC_PARAM_IARGS to 7 > > The last entry of DEF_HEL

Re: [PATCH v2 13/18] tests/tcg: add vectorised sha512 versions

2022-02-28 Thread Richard Henderson
On 2/25/22 07:20, Alex Bennée wrote: +# TCG does not yet support all SSE (SIGILL on pshufb) +# sha512-sse: CFLAGS=-march=core2 -O3 +# sha512-sse: sha512.c +# $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + Given ops_sse.h:void glue(helper_pshufb, SUFFIX)(CPUX86State *env, Reg *d, Re

Re: [RFC PATCH] tcg/optimize: only read val after const check

2022-02-28 Thread Richard Henderson
On 2/9/22 01:21, Alex Bennée wrote: valgrind pointed out that arg_info()->val can be undefined which will be the case if the arguments are not constant. The ordering of the checks will have ensured we never relied on an undefined value but for the sake of completeness re-order the code to be clea

[PATCH v4 3/3] tests/acpi: i386: update FACP table differences

2022-02-28 Thread Liav Albani
After changing the IAPC boot flags register to indicate support of i8042 in the machine chipset to help the guest OS to determine its existence "faster", we need to have the updated FACP ACPI binary images in tree. @@ -1,32 +1,32 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembl

[PATCH v4 2/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-28 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. This change only applies to the x86/q35 machine type, as it u

[PATCH v4 1/3] tests/acpi: i386: allow FACP acpi table changes

2022-02-28 Thread Liav Albani
The FACP table is going to be changed for x86/q35 machines. To be sure the following changes are not breaking any QEMU test this change follows step 2 from the bios-tables-test.c guide on changes that affect ACPI tables. Signed-off-by: Liav Albani --- tests/qtest/bios-tables-test-allowed-diff.h

[PATCH v4 0/3] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-28 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. To allow "flexible" indication, I don't hardcode the bit at l

Re: [PATCH v7 12/14] target/riscv: rvk: add CSR support for Zkr

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: +/* Crypto Extension */ +static RISCVException rmw_seed(CPURISCVState *env, int csrno, + target_ulong *ret_value, + target_ulong new_value, target_ulong write_mask) +{ +if (!write_mask) { +ret

Re: [PATCH] memory: Make memory_region_readd_subregion() properly handle mapped aliases

2022-02-28 Thread Niek Linnenbank
Hi Paolo, Thanks for queing this patch. I did not yet see it appear in master. Do you know when we can expect to see it? Regards, Niek On Tue, Feb 1, 2022 at 11:51 AM Paolo Bonzini wrote: > On 2/1/22 11:09, David Hildenbrand wrote: > > memory_region_readd_subregion() wants to readd a region by

[PATCH v2 2/2] meson: fix CONFIG_ATOMIC128 check

2022-02-28 Thread marcandre . lureau
From: Marc-André Lureau The current testing code isn't correct and matching QEMU usage: testfile.c: In function 'main': testfile.c:5:11: error: incorrect number of arguments to function '__atomic_load' 5 | y = __atomic_load(&x, 0); | ^ testfile.c:6:7: error

[PATCH v2 1/2] meson: move int128 checks from configure

2022-02-28 Thread marcandre . lureau
From: Marc-André Lureau (note: the test isn't working as intended, the next patches fixes it) Signed-off-by: Marc-André Lureau --- configure | 47 --- meson.build | 39 +++ 2 files changed, 39 insertions(+), 47 d

Re: [PATCH v6 01/19] configure, meson: override C compiler for cmake

2022-02-28 Thread Jag Raman
> On Feb 28, 2022, at 1:12 PM, Paolo Bonzini wrote: > > On 2/25/22 05:03, Jag Raman wrote: >>> On Feb 24, 2022, at 12:52 PM, Paolo Bonzini wrote: >>> >>> On 2/22/22 20:05, Jag Raman wrote: > -defaults[prefix + 'COMPILER'] = exe_list > +defaults[f'{prefix}COMPIL

Re: [PATCH v6 12/19] vfio-user: IOMMU support for remote device

2022-02-28 Thread Jag Raman
> On Feb 22, 2022, at 5:40 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:59AM -0500, Jagannathan Raman wrote: >> +struct RemoteIommuElem { >> +AddressSpace as; >> +MemoryRegion mr; >> +}; >> + >> +GHashTable *remote_iommu_elem_by_bdf; > > A mutable global hash table re

Re: [PATCH v7 11/14] target/riscv: rvk: add support for zksed/zksh extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: +static bool trans_sm4ed(DisasContext *ctx, arg_sm4ed *a) +{ +REQUIRE_ZKSED(ctx); +return gen_aes32_sm4(ctx, a , gen_helper_sm4ed); +} + +static bool trans_sm4ks(DisasContext *ctx, arg_sm4ks *a) +{ +REQUIRE_ZKSED(ctx); +return gen_aes32_sm4(ctx,

Re: [PATCH v7 10/14] target/riscv: rvk: add support for sha512 related instructions for RV64 in zknh extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: - add sha512sum0, sha512sig0, sha512sum1 and sha512sig1 instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/insn32.decode | 5 target/riscv/insn_trans/trans_rvk.c.inc | 32

Re: [PATCH v7 09/14] target/riscv: rvk: add support for sha512 related instructions for RV32 in zknh extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: +#define GEN_SHA512H_RV32(NAME, OP, NUM1, NUM2, NUM3) \ +static void gen_##NAME(TCGv dest, TCGv src1, TCGv src2) \ +{ \ +TCGv_i64 t0 = tcg_temp_new_i64(); \ +TCGv_i64 t1 = tcg_temp_new_i64(); \ +TCGv_i64 t2 = tcg_temp_new_i64(); \ +\ +tcg_gen

Re: [PATCH 02/14] hw/ppc/spapr.c: fail early if no firmware found in machine_init()

2022-02-28 Thread BALATON Zoltan
On Mon, 28 Feb 2022, Daniel Henrique Barboza wrote: The firmware check consists on a file search (qemu_find_file) and load it via load_imag_targphys(). This validation is not dependent on any other machine state but it currently being done at the end of spapr_machine_init(). This means that we ca

Re: [PATCH v6 11/19] vfio-user: handle PCI config space accesses

2022-02-28 Thread Jag Raman
> On Feb 22, 2022, at 6:09 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:58AM -0500, Jagannathan Raman wrote: >> Define and register handlers for PCI config space accesses >> >> Signed-off-by: Elena Ufimtseva >> Signed-off-by: John G Johnson >> Signed-off-by: Jagannathan Rama

Re: [PATCH v6 10/19] vfio-user: run vfio-user context

2022-02-28 Thread Jag Raman
> On Feb 25, 2022, at 11:06 AM, Eric Blake wrote: > > On Thu, Feb 17, 2022 at 02:48:57AM -0500, Jagannathan Raman wrote: >> Setup a handler to run vfio-user context. The context is driven by >> messages to the file descriptor associated with it - get the fd for >> the context and hook up the h

Re: [PATCH 3/3] util/event-loop: Introduce options to set the thread pool size

2022-02-28 Thread Nicolas Saenz Julienne
On Thu, 2022-02-24 at 10:40 +, Stefan Hajnoczi wrote: > On Mon, Feb 21, 2022 at 06:08:45PM +0100, Nicolas Saenz Julienne wrote: > > The thread pool regulates itself: when idle, it kills threads until > > empty, when in demand, it creates new threads until full. This behaviour > > doesn't play w

Re: [PATCH v6 09/19] vfio-user: find and init PCI device

2022-02-28 Thread Jag Raman
> On Feb 21, 2022, at 10:57 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:56AM -0500, Jagannathan Raman wrote: >> @@ -221,6 +272,14 @@ static void vfu_object_finalize(Object *obj) >> >> o->device = NULL; >> >> +if (o->unplug_blocker && o->pci_dev) { >> +qdev_de

Re: [PATCH v6 08/19] vfio-user: instantiate vfio-user context

2022-02-28 Thread Jag Raman
> On Feb 21, 2022, at 10:42 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:55AM -0500, Jagannathan Raman wrote: >> @@ -124,6 +190,11 @@ static void vfu_object_init(Object *obj) >> >> k->nr_devs++; >> >> +if (!phase_check(PHASE_MACHINE_READY)) { >> +o->machine_do

Re: [PATCH v6 07/19] vfio-user: define vfio-user-server object

2022-02-28 Thread Jag Raman
> On Feb 21, 2022, at 10:37 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:54AM -0500, Jagannathan Raman wrote: >> +struct VfuObjectClass { >> +ObjectClass parent_class; >> + >> +unsigned int nr_devs; >> + >> +/* >> + * Can be set to shutdown automatically when all

Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM

2022-02-28 Thread Nicolas Saenz Julienne
On Thu, 2022-02-24 at 10:01 +, Stefan Hajnoczi wrote: > On Mon, Feb 21, 2022 at 06:08:44PM +0100, Nicolas Saenz Julienne wrote: > > diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h > > index 8dbc6fcb89..fea5a3e9d4 100644 > > --- a/include/qemu/main-loop.h > > +++ b/include/qemu/

Re: [PATCH v6 03/19] qdev: unplug blocker for devices

2022-02-28 Thread Jag Raman
> On Feb 21, 2022, at 10:30 AM, Stefan Hajnoczi wrote: > > On Thu, Feb 17, 2022 at 02:48:50AM -0500, Jagannathan Raman wrote: >> diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c >> index 01f3834db5..69d9cf3f25 100644 >> --- a/softmmu/qdev-monitor.c >> +++ b/softmmu/qdev-monitor.c >

Re: [PATCH 1/3] util & iothread: Introduce event-loop abstract class

2022-02-28 Thread Nicolas Saenz Julienne
Hi Stefan, thanks for the review. On Thu, 2022-02-24 at 09:48 +, Stefan Hajnoczi wrote: > On Mon, Feb 21, 2022 at 06:08:43PM +0100, Nicolas Saenz Julienne wrote: > > diff --git a/qom/meson.build b/qom/meson.build > > index 062a3789d8..c20e5dd1cb 100644 > > --- a/qom/meson.build > > +++ b/qom/m

Re: [PATCH v7 08/14] target/riscv: rvk: add support for sha256 related instructions in zknh extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: - add sha256sig0, sha256sig1, sha256sum0 and sha256sum1 instructions Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/insn32.decode | 5 target/riscv/insn_trans/trans_rvk.c.inc | 37

Re: [PATCH v7 07/14] target/riscv: rvk: add support for zkne/zknd extension in RV64

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: - add aes64dsm, aes64ds, aes64im, aes64es, aes64esm, aes64ks2, aes64ks1i instructions Co-authored-by: Ruibo Lu Co-authored-by: Zewen Ye Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/crypto_helper.c| 169

Re: [PATCH v7 06/14] target/riscv: rvk: add support for zknd/zkne extension in RV32

2022-02-28 Thread Richard Henderson
On 2/28/22 04:48, Weiwei Li wrote: +static bool gen_aes32_sm4(DisasContext *ctx, arg_k_aes *a, + void (*func)(TCGv, TCGv, TCGv, TCGv)) +{ +TCGv shamt = tcg_const_tl(a->shamt); tcg_constant_tl Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH v7 03/14] target/riscv: rvk: add support for zbkc extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:47, Weiwei Li wrote: - reuse partial instructions of zbc extension, update extension check for them Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/insn32.decode | 3 ++- target/riscv/insn_trans/trans_rvb.c.inc

Re: [PATCH v7 02/14] target/riscv: rvk: add support for zbkb extension

2022-02-28 Thread Richard Henderson
On 2/28/22 04:47, Weiwei Li wrote: - reuse partial instructions of zbb extension, update extension check for them - add brev8, pack, packh, packw, unzip, zip instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis --- target/riscv/bitmanip_helper.c

Re: [PATCH 2/2] meson: fix CONFIG_ATOMIC128 check

2022-02-28 Thread Richard Henderson
On 2/28/22 03:36, Peter Maydell wrote: I think we should have the 128-bit atomics check in meson.build look the same as the existing one for 64-bit atomics, though, unless there's a reason why they should look different. For the 64-bit version we explicitly pass __ATOMIC_RELAXED, and we use __ato

Re: [PATCH v7 3/4] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-28 Thread David Miller
Had it on my TODO list for this morning, thank you. On Mon, Feb 28, 2022 at 12:59 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/28/22 00:14, Thomas Huth wrote: > > Full patch can be seen here: > > > > https://gitlab.com/thuth/qemu/-/commit/38af118ea2fef0c473 > > > > static in

Re: [PATCH] hw/virtio: vdpa: Fix leak of host-notifier memory-region

2022-02-28 Thread Laurent Vivier
Ping? Thanks, Laurent On 22/02/2022 09:53, Laurent Vivier wrote: Michael, do you plan to merge this soon? This is a bugfix for a QEMU coredump. Thanks, Laurent On 11/02/2022 18:02, Laurent Vivier wrote: If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-regio

[PULL 15/16] bsd-user: Define target_arg64

2022-02-28 Thread Warner Losh
target_arg64 is a generic way to extract 64-bits from a pair of arguments. On 32-bit platforms, it returns them joined together as appropriate. On 64-bit platforms, it returns the first arg because it's already 64-bits. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans

[PULL 16/16] bsd-user: Add safe system call macros

2022-02-28 Thread Warner Losh
Add a series of macros to create system call macros that go via the safe_syscall path. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/syscall_defs.h | 47 + 1 file changed, 47 insertions(+) diff --git a/

[PULL 12/16] bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

2022-02-28 Thread Warner Losh
Add the helper functions get_errno and host_to_target_errno. get_errno returns either the system call results, or the -errno when system call indicates failure by returning -1. Host_to_target_errno returns errno (since on FreeBSD they are the same on all architectures) along with a comment about wh

[PULL 13/16] bsd-user/bsd-file.h: Implementation details for the filesystem calls

2022-02-28 Thread Warner Losh
An include file that pulls in all the definitions needed for the file related system calls. This also includes the host definitions to implement the system calls and some helper routines to lock/unlock different aspects of the system call arguments. Signed-off-by: Warner Losh Reviewed-by: Richard

Re: [PATCH v6 02/14] target/riscv: rvk: add support for zbkb extension

2022-02-28 Thread Richard Henderson
On 2/27/22 17:02, Weiwei Li wrote: Thanks for your comments. 在 2022/2/28 上午2:47, Richard Henderson 写道: On 2/27/22 04:25, Weiwei Li wrote: +static void gen_packh(TCGv ret, TCGv src1, TCGv src2) +{ +    TCGv t = tcg_temp_new(); + +    tcg_gen_ext8u_tl(t, src2); +    tcg_gen_deposit_tl(ret, src1,

[PULL 10/16] bsd-user: Move system call building to os-syscall.c

2022-02-28 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/meson.build | 1 + bsd-user/meson.build | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/freebsd/meson.build b/bsd-user/freebsd/meson.build index 4b69cca7b90..f87c788e846 100644 ---

[PULL 11/16] bsd-user/sycall.c: Now obsolete, remove

2022-02-28 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/syscall.c | 516 - 1 file changed, 516 deletions(-) delete mode 100644 bsd-user/syscall.c diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c deleted fil

Re: [PATCH 00/14] simple cleanups in spapr files

2022-02-28 Thread Philippe Mathieu-Daudé
On 28/2/22 18:49, Daniel Henrique Barboza wrote: Hi, These are some cleanups in spapr files I decided to make after seeing Greg adding g_auto* in virtio-9p files. I also took the opportunity to simplify the logic in some places where I found it to be more complex than needed. Aside from patch

[PULL 08/16] bsd-user: Remove bsd_type

2022-02-28 Thread Warner Losh
Remove keeping track of which type of bsd we're running on. It's no longer referenced in the code. Building bsd-user on NetBSD or OpenBSD isn't possible, let alone running that code. Stop pretending that we can do the cross BSD thing since there's been a large divergence since 2000 that makes this

[PULL 00/16] Bsd user preen 2022q1 patches

2022-02-28 Thread Warner Losh
The following changes since commit fa435db8ce1dff3b15e3f59a12f55f7b3a347b08: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2022-02-24 12:48:14 +) are available in the Git repository at: g...@gitlab.com:bsdimp/qemu.git tags/bsd-user-preen-2022

[PULL 14/16] bsd-user: introduce target.h

2022-02-28 Thread Warner Losh
Create target.h. This file is intended to be simple and describe basic things about the architecture. If something is a basic feature of the architecture, it belongs here. Should we need something that's per-BSD there will be a target-os.h that will live in the per-bsd directories. Define regpairs

[PULL 02/16] bsd-user/x86_64/target_arch_cpu.h: int $80 never was a BSD system call on amd64

2022-02-28 Thread Warner Losh
Although initial versions of NetBSD did use int $80, it was replaced by syscall before any releases. OpenBSD and FreeBSD always did syscall. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/x86_64/target_arch_cpu.h | 58

[PULL 05/16] bsd-user/arm/target_arch_cpu.h: Only support FreeBSD sys calls

2022-02-28 Thread Warner Losh
Since we don't build on OpenBSD, only do FreeBSD system calls here. In the future, we'll need to move this to some place like bsd-user/freebsd/arm/mumble.h, but until then just leave this inline. This reflects changes to the upstream. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-b

[PULL 04/16] bsd-user/i386/target_arch_cpu.h: Remove openbsd syscall

2022-02-28 Thread Warner Losh
This doesn't build on openbsd at the moment, and this could should arguably be in bsd-user/*bsd/i386 somewhere. Until we refactor to support OpenBSD/NetBSD again, drop it here. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_cpu.h

[PULL 09/16] bsd-user/freebsd/os-syscall.c: Move syscall processing here

2022-02-28 Thread Warner Losh
While there is some commonality between *BSD syscall processing, there's a number of differences and the system call numbers and ABIs have been independent since the late 90s. Move FreeBSD's proessing here and delete it. The upstream implementation is somewhat different than the current implementa

[PULL 07/16] bsd-user/x86_64/target_arch_thread.h: Assume a FreeBSD target

2022-02-28 Thread Warner Losh
Since we can't run on anything else, assume for the moment that this is a FreeBSD target. In the future, we'll need to handle this properly via some include file in bsd-user/*bsd/x86_64/mumble.h. There's a number of other diffs that would be needed to make things work on OtherBSD, so it doesn't mak

[PULL 01/16] bsd-user/main.c: Drop syscall flavor arg -bsd

2022-02-28 Thread Warner Losh
We've not realistically been able to actually run any bsd program on any other bsd program. They are too diverged to do this easily. The current code is setup to do it, but implementing it is hard. Stop pretending that we can do this. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

  1   2   3   >