[PATCH v5 2/2] hw/ssi: ibex_spi: fixup/add rw1c functionality

2022-09-29 Thread Wilfred Mallawa
From: Wilfred Mallawa This patch adds the `rw1c` functionality to the respective registers. The status fields are cleared when the respective field is set. Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis --- hw/ssi/ibex_spi_host.c | 36 +++---

[PATCH v5 1/2] hw/ssi: ibex_spi: fixup coverity issue

2022-09-29 Thread Wilfred Mallawa
From: Wilfred Mallawa This patch addresses the coverity issues specified in [1], as suggested, `FIELD_DP32()`/`FIELD_EX32()` macros have been implemented to clean up the code. [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg887713.html Fixes: Coverity CID 1488107 Signed-off-by:

[PATCH v5 0/2] hw/ssi/ibex_spi: bug fixes

2022-09-29 Thread Wilfred Mallawa
From: Wilfred Mallawa The remaining patches in this series address: - Coverity issues for `ibex_spi` - Adds rw1c functionality Changes since V4: - Fixup compiler warning for unused variable `data` in [1/2] Wilfred Mallawa (2): hw/ssi: ibex_spi: fixup coverity issue

[PATCH v3 2/3] target/loongarch: Fix fnm{sub/add}_{s/d} set wrong flags

2022-09-29 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_farith.c.inc | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/loongarch/insn_trans/trans_farith.c.inc b/target/loongarch/insn_trans/trans_farith.c.inc index

[PATCH v3 3/3] softfloat: logB(0) should raise divideByZero exception

2022-09-29 Thread Song Gao
logB(0) should raise divideByZero exception from IEEE 754-2008 spec 7.3 Suggested-by: Richard Henderson Signed-off-by: Song Gao --- fpu/softfloat-parts.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc index a9f268fcab..247400031c

[PATCH v3 1/3] target/loongarch: bstrins.w src register need EXT_NONE

2022-09-29 Thread Song Gao
use gen_bstrins/gen_bstrpic to replace gen_rr_ms_ls. Suggested-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_bit.c.inc | 36 + 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/target/loongarch/insn_trans/trans_bit.c.inc

[PATCH v3 0/3] Fix some loongarch tcg bugs

2022-09-29 Thread Song Gao
Hi, This series fix some bugs find from RISU test. V3: -drop patch set some instruction result high 32bit 1. -follow some change from Richard's suggestion. v2: -remove patch5 div if x/0 set dividend to 0. Song Gao (3): target/loongarch: bstrins.w src register need EXT_NONE

Re: [PATCH] hw/net: npcm7xx_emc: set MAC in register space

2022-09-29 Thread Patrick Venture
On Thu, Sep 29, 2022 at 8:54 AM Peter Maydell wrote: > On Thu, 29 Sept 2022 at 16:28, Patrick Venture wrote: > > On Mon, Sep 26, 2022 at 8:45 AM Patrick Venture > wrote: > >>> I think what Jason is suggesting is that that should depend on what > >>> the real hardware does. On a physical board,

[RFC 5/8] target/riscv: add support for Zcmt extension

2022-09-29 Thread Weiwei Li
Add encode, trans* functions and helper functions support for Zcmt instrutions Add support for jvt csr Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.h| 2 ++ target/riscv/cpu_bits.h | 6 target/riscv/csr.c

[RFC 0/8] support subsets of code size reduction extension

2022-09-29 Thread Weiwei Li
This patchset implements RISC-V Zc* extension v1.0.0.RC5.6 version instructions. Specification: https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-zce-upstream To test Zc* implementation,

[RFC 7/8] target/riscv: expose properties for Zc* extension

2022-09-29 Thread Weiwei Li
Expose zca,zcb,zcf,zcd,zcmp,zcmt properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7da3de1725..e6f722278c 100644 --- a/target/riscv/cpu.c +++

[RFC 2/8] target/riscv: add support for Zca, Zcf and Zcd extension

2022-09-29 Thread Weiwei Li
Add check for Zca, Zcf and Zcd extensions in decode_opc Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/insn_trans/trans_rvi.c.inc | 5 +++-- target/riscv/translate.c| 23 +-- 2 files changed, 24 insertions(+), 4 deletions(-) diff

[RFC 1/8] target/riscv: add cfg properties for Zc* extension

2022-09-29 Thread Weiwei Li
Add properties for Zca,Zcb,Zcf,Zcd,Zcmp,Zcmt extension Add check for these properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 24 target/riscv/cpu.h | 6 ++ 2 files changed, 30 insertions(+) diff --git a/target/riscv/cpu.c

[RFC 6/8] target/riscv: delete redundant check for zcd instructions in decode_opc

2022-09-29 Thread Weiwei Li
All the check for Zcd instructions have been done in their trans function Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/translate.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index

[RFC 3/8] target/riscv: add support for Zcb extension

2022-09-29 Thread Weiwei Li
Add encode and trans* functions support for Zcb instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/insn16.decode| 22 target/riscv/insn_trans/trans_rvzce.c.inc | 133 ++ target/riscv/translate.c | 2 +

[RFC 8/8] disas/riscv.c: add disasm support for Zc*

2022-09-29 Thread Weiwei Li
Zcmp/Zcmt instructions will override disasm for c.fld*/c.fsd* instructions currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- disas/riscv.c | 287 +- 1 file changed, 286 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c

[RFC 4/8] target/riscv: add support for Zcmp extension

2022-09-29 Thread Weiwei Li
Add encode, trans* functions and helper functions support for Zcmp instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/helper.h | 6 + target/riscv/insn16.decode| 24 ++- target/riscv/insn_trans/trans_rvzce.c.inc | 123

Re: [PATCH v8 0/4] Enable notify VM exit

2022-09-29 Thread Chenyi Qiang
On 9/30/2022 1:28 AM, Paolo Bonzini wrote: On 9/29/22 09:03, Chenyi Qiang wrote: Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The detailed

[PATCH 6/6] mips: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Since the FDT is in the ROM region at this point, we add a hook right after the ROM has been added, so that we have a pointer to that copy of the FDT. Cc: Aleksandar Rikalo Cc:

[PATCH 4/6] openrisc: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Since the FDT is in the ROM region at this point, we add a hook right after the ROM has been added, so that we have a pointer to that copy of the FDT. Cc: Stafford Horne

[PATCH 2/6] arm: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Since the FDT is in the ROM region at this point, we add a hook right after the ROM has been added, so that we have a pointer to that copy of the FDT. Cc: Peter Maydell Cc:

[PATCH 3/6] riscv: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Since the FDT is in the ROM region at this point, we add a hook right after the ROM has been added, so that we have a pointer to that copy of the FDT. Cc: Palmer Dabbelt Cc:

[PATCH 5/6] rx: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Since the FDT is in the ROM region at this point, we add a hook right after the ROM has been added, so that we have a pointer to that copy of the FDT. Cc: Yoshinori Sato

[PATCH 1/6] device-tree: add re-randomization helper function

2022-09-29 Thread Jason A. Donenfeld
When the system reboots, the rng-seed that the FDT has should be re-randomized, so that the new boot gets a new seed. Several architectures require this functionality, so export a function for injecting a new seed into the given FDT. Cc: Alistair Francis Cc: David Gibson Signed-off-by: Jason A.

Re: [PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-09-29 Thread Sean Christopherson
On Thu, Sep 29, 2022, Isaku Yamahata wrote: > On Thu, Sep 15, 2022 at 10:29:07PM +0800, > Chao Peng wrote: > > @@ -4645,14 +4672,20 @@ static long kvm_vm_ioctl(struct file *filp, > > break; > > } > > case KVM_SET_USER_MEMORY_REGION: { > > - struct

Re: [PATCH] arm: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
On Thu, Sep 29, 2022 at 10:57:22PM +0200, Jason A. Donenfeld via wrote: > Hi Peter, > > On Tue, Sep 27, 2022 at 06:07:42PM +0200, Jason A. Donenfeld wrote: > > When the system reboots, the rng-seed that the FDT has should be > > re-randomized, so that the new boot gets a new seed. Since the FDT

[PATCH v5 4/9] tests/x86: Add 'q35' machine type to override-tests in hd-geo-test

2022-09-29 Thread Michael Labiuk via
Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 97 +++ 1 file changed, 97 insertions(+) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 61f4c24b81..278464c379 100644 --- a/tests/qtest/hd-geo-test.c +++

Re: [PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-09-29 Thread Isaku Yamahata
On Thu, Sep 15, 2022 at 10:29:07PM +0800, Chao Peng wrote: ... > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 584a5bab3af3..12dc0dc57b06 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c ... > @@ -4622,6 +4622,33 @@ static int kvm_vm_ioctl_get_stats_fd(struct kvm

[PATCH v5 6/9] tests/x86: Fix comment typo in drive_del-test

2022-09-29 Thread Michael Labiuk via
Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 467e752b0d..44b9578801 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c

[PATCH v5 1/9] tests/x86: add helper qtest_qmp_device_del_send()

2022-09-29 Thread Michael Labiuk via
Move sending 'device_del' command to separate function. Function can be used in case of addition action is needed to start actual removing device after sending command. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 15 ++- tests/qtest/drive_del-test.c | 6

[PATCH v5 0/9] Add 'q35' machine type to hotplug tests

2022-09-29 Thread Michael Labiuk via
Add pci bridge setting to run hotplug tests on q35 machine type. Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b v5 -> v4: * Unify device removing in tests. * Using qtest_has_machine("q35") as condition. * fixed typos. * Replaced snprintf. v4 -> v3: * Moving helper

[PATCH v5 8/9] tests/x86: Add 'q35' machine type to drive_del-test

2022-09-29 Thread Michael Labiuk via
Configure pci bridge setting to run tests on 'q35' machine type. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 107 +++ 1 file changed, 107 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index

[PATCH v5 2/9] tests/x86: Add subtest with 'q35' machine type to device-plug-test

2022-09-29 Thread Michael Labiuk via
Configure pci bridge setting to plug pci device and unplug. Signed-off-by: Michael Labiuk --- tests/qtest/device-plug-test.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index

[PATCH v5 5/9] tests/x86: Add 'q35' machine type to hotplug hd-geo-test

2022-09-29 Thread Michael Labiuk via
Add pci bridge setting to test hotplug. Duplicate tests for plugging scsi and virtio devices for q35 machine type. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 76 ++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git

[PATCH v5 7/9] tests/x86: replace snprint() by g_strdup_printf() in drive_del-test

2022-09-29 Thread Michael Labiuk via
Using g_autofree char* and g_strdup_printf(...) instead of ugly snprintf on stack array. Signed-off-by: Michael Labiuk --- tests/qtest/drive_del-test.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c

[PATCH v5 9/9] tests/x86: Add 'q35' machine type to ivshmem-test

2022-09-29 Thread Michael Labiuk via
Configure pci bridge setting to test ivshmem on 'q35'. Signed-off-by: Michael Labiuk --- tests/qtest/ivshmem-test.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index 9611d05eb5..cd550c8935 100644 ---

[PATCH v5 3/9] tests/x86: Refactor hot unplug hd-geo-test

2022-09-29 Thread Michael Labiuk via
Moving common code to function. Signed-off-by: Michael Labiuk --- tests/qtest/hd-geo-test.c | 144 +++--- 1 file changed, 57 insertions(+), 87 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index ba772f4d7a..61f4c24b81 100644 ---

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

2022-09-29 Thread Venu Busireddy
On 2022-09-29 12:49:51 +0200, Paolo Bonzini wrote: > On Wed, Sep 28, 2022 at 8:06 PM Venu Busireddy > wrote: > > > > Section 5.6.6.3 of VirtIO specification states, "Events will also > > be reported via sense codes..." However, no sense data is sent when > > VIRTIO_SCSI_EVT_RESET_RESCAN or

Re: [PULL 00/14] x86 + misc changes for 2022-09-29

2022-09-29 Thread Stefan Hajnoczi
Please see the following check-cfi-x86_64 failure: >>> QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon >>> QTEST_QEMU_IMG=./qemu-img MALLOC_PERTURB_=30 >>> QTEST_QEMU_BINARY=./qemu-system-x86_64 >>> G_TEST_DBUS_DAEMON=/builds/qemu-project/qemu/tests/dbus-vmstate-daemon.sh

Re: [PATCH] arm: re-randomize rng-seed on reboot

2022-09-29 Thread Jason A. Donenfeld
Hi Peter, On Tue, Sep 27, 2022 at 06:07:42PM +0200, Jason A. Donenfeld wrote: > When the system reboots, the rng-seed that the FDT has should be > re-randomized, so that the new boot gets a new seed. Since the FDT is in > the ROM region at this point, we add a hook right after the ROM has been >

[PATCHv3 0/2] qemu direct io alignment fix

2022-09-29 Thread Keith Busch
From: Keith Busch Changes from v2: Split the patch so that the function move is separate from the functional change. This makes it immediately obvious what criteria is changing. (Kevin Wolf) Added received Tested-by tag in the changelog. Keith Busch (2): block: move

[PATCHv3 2/2] block: use the request length for iov alignment

2022-09-29 Thread Keith Busch
From: Keith Busch An iov length needs to be aligned to the logical block size, which may be larger than the memory alignment. Tested-by: Jens Axboe Signed-off-by: Keith Busch --- block/file-posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/file-posix.c

[PATCHv3 1/2] block: move bdrv_qiov_is_aligned to file-posix

2022-09-29 Thread Keith Busch
From: Keith Busch There is only user of bdrv_qiov_is_aligned(), so move the alignment function to there and make it static. Signed-off-by: Keith Busch --- block/file-posix.c | 21 + block/io.c | 21 - include/block/block-io.h | 1 -

Re: [PATCHv2] block: use the request length for iov alignment

2022-09-29 Thread Keith Busch
On Thu, Sep 29, 2022 at 07:59:50PM +0200, Kevin Wolf wrote: > Am 29.09.2022 um 18:09 hat Keith Busch geschrieben: > > On Fri, Sep 23, 2022 at 08:34:51AM -0700, Keith Busch wrote: > > > > > > An iov length needs to be aligned to the logical block size, which may > > > be larger than the memory

Re: [PATCH 1/2] vvfat: allow some writes to bootsector

2022-09-29 Thread Hervé Poussineau
Le 29/09/2022 à 16:10, Kevin Wolf a écrit : Am 03.09.2022 um 18:23 hat Hervé Poussineau geschrieben: 'reserved1' field in bootsector is used to mark volume dirty, or need to verify. Allow writes to bootsector which only changes the 'reserved1' field. This fixes I/O errors on Windows guests.

Re: [PATCH] docs: Update TPM documentation for usage of a TPM 2

2022-09-29 Thread Laurent Vivier
Le 27/09/2022 à 14:21, Stefan Berger a écrit : Update the TPM documentation for usage of a TPM 2 rather than a TPM 1.2. Adjust the command lines and expected outputs inside the VM accordingly. Update the command line to start a TPM 2 with swtpm. Signed-off-by: Stefan Berger ---

Re: [PATCH] Use g_new() & friends where that makes obvious sense

2022-09-29 Thread Laurent Vivier
Le 23/09/2022 à 10:42, Markus Armbruster a écrit : g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only

Re: [PATCH] Drop superfluous conditionals around g_free()

2022-09-29 Thread Laurent Vivier
Le 23/09/2022 à 11:04, Markus Armbruster a écrit : There is no need to guard g_free(P) with if (P): g_free(NULL) is safe. Signed-off-by: Markus Armbruster --- replay/replay.c | 6 ++ target/i386/kvm/kvm.c | 12 target/i386/whpx/whpx-all.c | 14

Re: [PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-29 Thread Laurent Vivier
Le 22/09/2022 à 17:37, Kevin Wolf a écrit : Am 19.09.2022 um 20:27 hat Philippe Mathieu-Daudé geschrieben: Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the set_readonly_helper() GFunc handler, correctly casting the gpointer user_data in both the g_slist_foreach() caller and the

Re: [PATCH] checkpatch: ignore target/hexagon/imported/* files

2022-09-29 Thread Laurent Vivier
Le 20/09/2022 à 15:42, Matheus Tavares Bernardino a écrit : These files come from an external project (the hexagon archlib), so they deliberately do not follow QEMU's coding style. To avoid false positives from checkpatch.pl, let's disable the checking for those. Signed-off-by: Matheus Tavares

Re: [PATCH] mem/cxl_type3: fix GPF DVSEC

2022-09-29 Thread Laurent Vivier
Le 15/09/2022 à 19:59, Tong Zhang a écrit : The structure is for device dvsec not port dvsec. Change type to fix this issue. Signed-off-by: Tong Zhang --- hw/mem/cxl_type3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index

Re: [PATCH] .gitignore: add .cache/ to .gitignore

2022-09-29 Thread Laurent Vivier
Le 07/09/2022 à 17:00, Wang, Lei a écrit : $PROJECT/.cache/clangd/index is the intended location for project index data when using clangd as the language server. Ignore this directory to keep the git status clean. Signed-off-by: Wang, Lei --- .gitignore | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] RISC-V: Add support for Ztso

2022-09-29 Thread Dr. David Alan Gilbert
* Palmer Dabbelt (pal...@rivosinc.com) wrote: > Ztso, the RISC-V extension that provides the TSO memory model, was > recently frozen. This provides support for Ztso on targets that are > themselves TSO. > > Signed-off-by: Palmer Dabbelt > > --- > > diff --git a/tcg/i386/tcg-target.h

Re: [PATCH v2] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-29 Thread Laurent Vivier
Le 10/09/2022 à 17:11, Bernhard Beschow a écrit : GCC issues a false positive warning, resulting in build failure with -Werror: In file included from /usr/include/glib-2.0/glib.h:114, from src/include/glib-compat.h:32, from

Re: [PATCH] MAINTAINERS: step back from PPC

2022-09-29 Thread Greg Kurz
On Thu, 29 Sep 2022 20:09:46 +0200 Cédric Le Goater wrote: > I am not active anymore on the PPC maintainership, degrade my self as > standard Reviewer. Also degrade PowerNV and XIVE status since I am not > funded for this work. > > Signed-off-by: Cédric Le Goater > --- End of an era. Thank

[PATCH] MAINTAINERS: step back from PPC

2022-09-29 Thread Cédric Le Goater
I am not active anymore on the PPC maintainership, degrade my self as standard Reviewer. Also degrade PowerNV and XIVE status since I am not funded for this work. Signed-off-by: Cédric Le Goater --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH] m68k: write bootinfo as rom section and re-randomize on reboot

2022-09-29 Thread Jason A. Donenfeld
Rather than poking directly into RAM, add the bootinfo block as a proper ROM, so that it's restored when rebooting the system. This way, if the guest corrupts any of the bootinfo items, but then tries to reboot, it'll still be restored back to normal as expected. This assumes the bootinfo block

Re: [PATCH v2] hyperv: fix SynIC SINT assertion failure on guest reset

2022-09-29 Thread Maciej S. Szmigiero
On 29.09.2022 19:13, Paolo Bonzini wrote: On 9/28/22 18:17, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Resetting a guest that has Hyper-V VMBus support enabled triggers a QEMU assertion failure: hw/hyperv/hyperv.c:131: synic_reset: Assertion `QLIST_EMPTY(>sint_routes)' failed.

Re: [PATCHv2] block: use the request length for iov alignment

2022-09-29 Thread Kevin Wolf
Am 29.09.2022 um 18:09 hat Keith Busch geschrieben: > On Fri, Sep 23, 2022 at 08:34:51AM -0700, Keith Busch wrote: > > > > An iov length needs to be aligned to the logical block size, which may > > be larger than the memory alignment. And since this is only used with > > file-posix backing

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-09-29 Thread Paolo Bonzini
On 9/29/22 18:39, Christoph Hellwig wrote: On Thu, Sep 29, 2022 at 10:37:22AM -0600, Keith Busch wrote: I am aware, and I've submitted the fix to qemu here: https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00398.html I don't think so. Memory alignment and length granularity are

Re: [PATCH v2] hyperv: fix SynIC SINT assertion failure on guest reset

2022-09-29 Thread Paolo Bonzini
On 9/28/22 18:17, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Resetting a guest that has Hyper-V VMBus support enabled triggers a QEMU assertion failure: hw/hyperv/hyperv.c:131: synic_reset: Assertion `QLIST_EMPTY(>sint_routes)' failed. This happens both on normal guest reboot or

Re: [PATCH v2 0/8] hw/arm/virt: Fix dt-schema warnings

2022-09-29 Thread Peter Maydell
On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker wrote: > > Fix some warnings thrown by dt-validate for the aarch64 virt devicetree. > > Since v1 [1]: > * Submitted more DT bindings changes where appropriate [2]. All of them > applied for Linux v6.1 so I dropped the related QEMU changes. >

RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-29 Thread Dong, Eddie
Using a union can better reflect this. Also, it can avoid the convert from 2 32-bits register to 64 bits, like the above code does. ibex_timer_update_irqs() also does this conversion. It took me a bit of time, but now I think I understand what you mean: a union of 2 uint32_t's (perhaps packed

[PULL 14/14] x86: re-initialize RNG seed when selecting kernel

2022-09-29 Thread Paolo Bonzini
From: "Jason A. Donenfeld" We don't want it to be possible to re-read the RNG seed after ingesting it, because this ruins forward secrecy. Currently, however, the setup data section can just be re-read. Since the kernel is always read after the setup data, use the selection of the kernel as a

[PULL 09/14] meson: require 0.61.3

2022-09-29 Thread Paolo Bonzini
This removes the dependency of dbus-display on --enable-modules. It also allows cleanups in modinfo collection and allows moving C++ compiler detection to meson.build. Because it is now deprecated to use install_subdir to create an empty directory, replace it with install_emptydir. Updating the

[PULL 06/14] configure: do not invoke as/ld directly for pc-bios/optionrom

2022-09-29 Thread Paolo Bonzini
Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini --- configure | 22

[PULL 04/14] x86: re-enable rng seeding via SetupData

2022-09-29 Thread Paolo Bonzini
From: "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

[PULL 03/14] x86: reinitialize RNG seed on system reboot

2022-09-29 Thread Paolo Bonzini
From: "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:

Re: [Virtio-fs] virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-09-29 Thread Vivek Goyal
On Thu, Sep 29, 2022 at 11:47:32AM -0400, Colin Walters wrote: > > > On Thu, Sep 29, 2022, at 10:10 AM, Vivek Goyal wrote: > > > What's your use case. How do you plan to use virtiofs. > > At the current time, the Kubernetes that we run does not support user > namespaces. We want to do the

[PULL 00/14] x86 + misc changes for 2022-09-29

2022-09-29 Thread Paolo Bonzini
The following changes since commit 99d6b11b5b44d7dd64f4cb1973184e40a4a174f8: Merge tag 'pull-target-arm-20220922' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-09-26 13:38:26 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git

Re: [PULL 00/37] qtests fixes

2022-09-29 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] win32: set threads name

2022-09-29 Thread Richard Henderson
On 9/29/22 06:41, marcandre.lur...@redhat.com wrote: void qemu_thread_naming(bool enable) { /* But note we don't actually name them on Windows yet */ name_threads = enable; -fprintf(stderr, "qemu: thread naming not supported on this host\n"); +if (enable &&

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-09-29 Thread Maxim Levitsky
On Thu, 2022-09-29 at 09:48 -0600, Keith Busch wrote: > I am aware, and I've submitted the fix to qemu here: > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00398.html > Thanks for quick response! Question is though, isn't this an kernel ABI breakage? (I myself don't care,

Re: [PATCH v9 07/10] s390x/cpu_topology: CPU topology migration

2022-09-29 Thread Pierre Morel
On 9/28/22 10:34, Pierre Morel wrote: On 9/8/22 20:04, Janis Schoetterl-Glausch wrote: On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote: The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We

Re: [PATCH v1 1/1] hw/arm/xlnx-zynqmp: Connect ZynqMP's USB controllers

2022-09-29 Thread Peter Maydell
On Thu, 29 Sept 2022 at 02:28, Alistair Francis wrote: > > On Tue, Sep 20, 2022 at 6:23 PM Francisco Iglesias > wrote: > > > > From: Francisco Iglesias > > > > Connect ZynqMP's USB controllers. > > > > Signed-off-by: Francisco Iglesias > > Acked-by: Alistair Francis > Applied to

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-09-29 Thread Keith Busch
I am aware, and I've submitted the fix to qemu here: https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00398.html

Re: [PATCH v8 0/4] Enable notify VM exit

2022-09-29 Thread Paolo Bonzini
On 9/29/22 09:03, Chenyi Qiang wrote: Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The detailed info can be seen in Patch 4. The corresponding

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-09-29 Thread Christoph Hellwig
On Thu, Sep 29, 2022 at 10:37:22AM -0600, Keith Busch wrote: > I don't think so. Memory alignment and length granularity are two completely > different concepts. If anything, the kernel's ABI had been that the length > requirement was also required for the memory alignment, not the other way >

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-09-29 Thread Jag Raman
> On Sep 29, 2022, at 2:27 AM, Thomas Huth wrote: > > On 29/09/2022 03.52, Jag Raman wrote: >>> On Aug 29, 2022, at 8:40 AM, Thomas Huth wrote: >>> >>> On 07/08/2022 12.39, John Levon wrote: On Fri, Aug 05, 2022 at 09:24:56AM +0100, Daniel P. Berrangé wrote: >>> [...] > If we do add

[PULL 12/14] configure, meson: move linker flag detection to meson

2022-09-29 Thread Paolo Bonzini
Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 16 meson.build | 13 + 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 3e3c0f36c9..e032bd0a08 100755 --- a/configure +++ b/configure @@

Re: [PATCH 1/2] target/arm: Disable VFPv4-D32 when NEON is not available

2022-09-29 Thread Peter Maydell
On Thu, 29 Sept 2022 at 16:22, Richard Henderson wrote: > > On 9/29/22 04:44, Peter Maydell wrote: > > Architecturally, Neon implies that you must have 32 dp registers, > > but not having Neon does not imply that you must only have 16. > > In particular, the Cortex-A15 always implements VFPv4-D32

Re: Commit 'iomap: add support for dma aligned direct-io' causes qemu/KVM boot failures

2022-09-29 Thread Keith Busch
On Thu, Sep 29, 2022 at 07:16:29PM +0300, Maxim Levitsky wrote: > On Thu, 2022-09-29 at 09:48 -0600, Keith Busch wrote: > > I am aware, and I've submitted the fix to qemu here: > > > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00398.html > > > > > Thanks for quick response!

[PULL 08/14] ui: fix path to dbus-display1.h

2022-09-29 Thread Paolo Bonzini
While the source directory is always included in the include path, the corresponding directory in the build tree is not. Therefore, custom_targets (e.g. ui/dbus-display1.h) must be referred to using the full path. This avoids a build failure when ui/dbus-chardev.c is not built as a module: In

[PULL 01/14] x86: return modified setup_data only if read as memory, not as file

2022-09-29 Thread Paolo Bonzini
From: "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

[PATCH] net: print a more actionable error when slirp is not found

2022-09-29 Thread marcandre . lureau
From: Marc-André Lureau If slirp is not found during compile-time, and not manually disabled, print a friendly error message, as suggested in the "If your networking is failing after updating to the latest git version of QEMU..." thread by various people. Signed-off-by: Marc-André Lureau ---

Re: [PATCH v5 14/17] include/hw/core: Create struct CPUJumpCache

2022-09-29 Thread Alex Bennée
Richard Henderson writes: > On 9/29/22 06:46, Alex Bennée wrote: >> Richard Henderson writes: >> >>> Wrap the bare TranslationBlock pointer into a structure. >>> >>> Reviewed-by: Philippe Mathieu-Daudé >>> Signed-off-by: Richard Henderson >>> --- >>> include/hw/core/cpu.h | 8

[PULL 10/14] meson: multiple names can be passed to dependency()

2022-09-29 Thread Paolo Bonzini
This is new in Meson 0.60.0. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 8c1139a82b..48533ace7b 100644 --- a/meson.build +++ b/meson.build @@ -825,14

Re: [PATCH v2 for-7.2 0/2] pci *_by_mask() coverity fix

2022-09-29 Thread Peter Maydell
Ping! This series has been reviewed. I can take it via target-arm.next if you'd prefer. thanks -- PMM On Thu, 18 Aug 2022 at 14:54, Peter Maydell wrote: > > This patchset fixes a Coverity nit relating to the > pci_set_*_by_mask() helper functions, where we might shift off the > end of a

Re: [PATCH] target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP

2022-09-29 Thread Peter Maydell
On Wed, 28 Sept 2022 at 15:56, Richard Henderson wrote: > > On 9/27/22 05:00, Jerome Forissier wrote: > > SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark > > it with ARM_CP_EL3_NO_EL2_KEEP. > > > > Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL")

[PULL 13/14] target/i386/kvm: fix kvmclock_current_nsec: Assertion `time.tsc_timestamp <= migration_tsc' failed

2022-09-29 Thread Paolo Bonzini
From: Ray Zhang New KVM_CLOCK flags were added in the kernel.(c68dc1b577eabd5605c6c7c08f3e07ae18d30d5d) ``` + #define KVM_CLOCK_VALID_FLAGS \ + (KVM_CLOCK_TSC_STABLE | KVM_CLOCK_REALTIME | KVM_CLOCK_HOST_TSC) case KVM_CAP_ADJUST_CLOCK: -

[PULL 05/14] qboot: rebuild based on latest commit

2022-09-29 Thread Paolo Bonzini
df22fbb751 ("qboot: update to latest submodule") updated the qboot submodule from a5300c49 to 8ca302e8. However, qboot isn't built during the QEMU's build process but rather is included in binary form. So rebuild it here. Cc: Paolo Bonzini Signed-off-by: Jason A. Donenfeld [Rebuilt it myself

Re: [PATCHv2] block: use the request length for iov alignment

2022-09-29 Thread Keith Busch
On Fri, Sep 23, 2022 at 08:34:51AM -0700, Keith Busch wrote: > > An iov length needs to be aligned to the logical block size, which may > be larger than the memory alignment. And since this is only used with > file-posix backing storage, move the alignment function to there, where > the value of

Re: [PATCH 1/2] linux-aio: use LinuxAioState from the running thread

2022-09-29 Thread Kevin Wolf
Am 09.06.2022 um 15:44 hat Emanuele Giuseppe Esposito geschrieben: > From: Paolo Bonzini > > Remove usage of aio_context_acquire by always submitting asynchronous > AIO to the current thread's LinuxAioState. > > Signed-off-by: Paolo Bonzini > Signed-off-by: Emanuele Giuseppe Esposito > --- >

Re: [PATCH v8 6/8] KVM: Update lpage info when private/shared memory are mixed

2022-09-29 Thread Isaku Yamahata
On Thu, Sep 15, 2022 at 10:29:11PM +0800, Chao Peng wrote: > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > index 08abad4f3e6f..a0f198cede3d 100644 > --- a/arch/x86/kvm/mmu/mmu.c > +++ b/arch/x86/kvm/mmu/mmu.c ... > @@ -6894,3 +6899,115 @@ void kvm_mmu_pre_destroy_vm(struct kvm

[PULL 02/14] x86: use typedef for SetupData struct

2022-09-29 Thread Paolo Bonzini
From: "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 Message-Id: <20220921093134.2936487-2-ja...@zx2c4.com> Signed-off-by: Paolo

Re: [PATCH v1 3/7] util: Introduce ThreadContext user-creatable object

2022-09-29 Thread David Hildenbrand
+## +# @ThreadContextProperties: +# +# Properties for thread context objects. +# +# @cpu-affinity: the CPU affinity for all threads created in the thread +#context (default: QEMU main thread affinity) +# +# Since: 7.2 +## +{ 'struct': 'ThreadContextProperties', + 'data': {

Re: [PATCH v1 15/51] vof: add distclean target

2022-09-29 Thread Alex Bennée
BALATON Zoltan writes: > On Thu, 29 Sep 2022, Alex Bennée wrote: >> From: Paolo Bonzini >> >> Signed-off-by: Paolo Bonzini >> Signed-off-by: Alex Bennée >> --- >> pc-bios/vof/Makefile | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/pc-bios/vof/Makefile

Re: [PATCH v1 15/51] vof: add distclean target

2022-09-29 Thread Alex Bennée
BALATON Zoltan writes: > On Thu, 29 Sep 2022, Alex Bennée wrote: >> From: Paolo Bonzini >> >> Signed-off-by: Paolo Bonzini >> Signed-off-by: Alex Bennée >> --- >> pc-bios/vof/Makefile | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/pc-bios/vof/Makefile

Re: [PATCH v5 14/17] include/hw/core: Create struct CPUJumpCache

2022-09-29 Thread Richard Henderson
On 9/29/22 06:46, Alex Bennée wrote: Richard Henderson writes: Wrap the bare TranslationBlock pointer into a structure. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 8 ++-- accel/tcg/cpu-exec.c | 9 ++---

[PULL 11/14] configure, meson: move C++ compiler detection to meson.build

2022-09-29 Thread Paolo Bonzini
The test is slightly weaker than before, because it does not call an extern "C" function from a C source file. However, in practice what we seek to detect is ABI compatibility of the various sanitizer flags, and for that it is enough to compile anything with CC and link it with CXX. Reviewed-by:

  1   2   3   >