QEMU's FreeBSD 13 CI job is failing

2022-09-19 Thread Thomas Huth
Seen here for example: https://gitlab.com/qemu-project/qemu/-/jobs/3050165356#L2543 ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found ERROR: Cannot use '/usr/local/bin/python3', Python >= 3.6 is required. ... looks like the Python binary

Re: [PATCH v6 2/2] i386: Add notify VM exit support

2022-09-19 Thread Chenyi Qiang
On 9/19/2022 11:53 PM, Peter Xu wrote: On Mon, Sep 19, 2022 at 01:46:38PM +0800, Chenyi Qiang wrote: On 9/17/2022 5:57 AM, Peter Xu wrote: On Thu, Sep 15, 2022 at 05:28:39PM +0800, Chenyi Qiang wrote: There are cases that malicious virtual machine can cause CPU stuck (due to event windows

Re: [PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes hav

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 07:15, Philippe Mathieu-Daudé wrote: On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Si

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

2022-09-19 Thread Bernhard Beschow
Am 10. September 2022 15:11:17 UTC schrieb Bernhard Beschow : >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 src/include/qemu/

Re: [PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. I thought about this while reviewing the previous patch, ... Signed-off-by: Bernhard Beschow --- include/exec

Re: [PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and get_s

Re: [PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow --- target/loongarch/cpu.h

Re: [PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. "together", "suggests" Since tere is already a current_machine singleton, all code that accesses the main_system_bus

Re: [PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c 1006

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Philippe Mathieu-Daudé via
On 20/9/22 01:17, Bernhard Beschow wrote: SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is regist

Re: [PATCH] build: remove extra parentheses causing missing rebuilds

2022-09-19 Thread Richard Henderson
On 9/19/22 15:17, Paolo Bonzini wrote: Because of two stray parentheses at the end of the definition of ninja-cmd-goals, the test that is last in the .check-TESTSUITENAME.deps variable will not be rebuilt. Fix that. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 insertio

Re: [PATCH] target/i386: fix INSERTQ implementation

2022-09-19 Thread Richard Henderson
On 9/18/22 09:56, Paolo Bonzini wrote: +else { +if (mod != 3) { +gen_lea_modrm(env, s, modrm); +op2_offset = offsetof(CPUX86State, xmm_t0); +gen_ldq_env_A0(s, offsetof(CPUX86State, xmm_t0.

Re: [PATCH] target/i386: correctly mask SSE4a bit indices in register operands

2022-09-19 Thread Richard Henderson
On 9/18/22 09:18, Paolo Bonzini wrote: SSE4a instructions EXTRQ and INSERTQ have two bit index operands, that can be immediates or taken from an XMM register. In both cases, the fields are 6-bit wide and the top two bits in the byte are ignored. translate.c is doing that correctly for the immed

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

2022-09-19 Thread Jason Wang
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 libvirt or > qemu can call dpdk vdpa vendor driver's ops .get_config through > vhost_net_get_config >

Re: [PATCH 5/5] target/loongarch: div if x/0 set dividend to 0

2022-09-19 Thread Qi Hu
On 2022/9/19 19:45, gaosong wrote: 在 2022/9/17 下午6:12, Richard Henderson 写道: On 9/17/22 11:12, gaosong wrote: 在 2022/9/17 下午4:59, Qi Hu 写道: On 2022/9/17 15:59, Song Gao wrote: div.d, div.du, div,w, div.wu, the LoongArch host if x/0  the result is 0. The message has a typo: "div,w" => "

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

2022-09-19 Thread Jason Wang
On Tue, Sep 20, 2022 at 9:38 AM Jason Wang wrote: > > On Tue, Sep 20, 2022 at 9:10 AM liuhaiwei wrote: > > > > From: liuhaiwei > > > > the limit of maximum of rx_queue_size and tx_queue to 1024 is so small as > > to affect our network performance when using the virtio-net and vhost , > > we ca

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

2022-09-19 Thread Jason Wang
On Tue, Sep 20, 2022 at 9:10 AM liuhaiwei wrote: > > From: liuhaiwei > > the limit of maximum of rx_queue_size and tx_queue to 1024 is so small as to > affect our network performance when using the virtio-net and vhost , > we cannot set the maximum size beyond 1k. > why not enlarge the maximum

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

2022-09-19 Thread liuhaiwei
From: liuhaiwei the limit of maximum of rx_queue_size and tx_queue to 1024 is so small as to affect our network performance when using the virtio-net and vhost , we cannot set the maximum size beyond 1k. why not enlarge the maximum size (such as 4096) when using the vhost backend? Signed-off-b

Re: [PATCH 1/2] include: import virtio_blk headers from linux with zoned device support

2022-09-19 Thread Sam Li
Stefan Hajnoczi 于2022年9月20日周二 03:59写道: > > On Sat, Sep 10, 2022 at 02:50:56PM +0800, Sam Li wrote: > > Add file from Dmitry's "virtio-blk:add support for zoned block devices" > > linux patch using scripts/update-linux-headers.sh. There is a link for > > more information: https://github.com/dmitry-

Re: [PATCH] target/riscv: Check the correct exception cause in vector GDB stub

2022-09-19 Thread Alistair Francis
On Sun, Sep 18, 2022 at 6:29 PM wrote: > > From: Frank Chang > > After RISCVException enum is introduced, riscv_csrrw_debug() returns > RISCV_EXCP_NONE to indicate there's no error. RISC-V vector GDB stub > should check the result against RISCV_EXCP_NONE instead of value 0. > Otherwise, 'E14' pac

Re: [PATCH 0/3] hw/riscv: opentitan: Fixup resetvec issues

2022-09-19 Thread Alistair Francis
On Wed, Sep 14, 2022 at 8:11 PM Alistair Francis wrote: > > The OpenTitan resetvec is dynamic on QEMU as we don't run the full boot > ROM flow. This series makes it more configurguable from the command line > and fixes the default. > > Alistair Francis (3): > target/riscv: Set the CPU resetvec d

Re: [PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Alistair Francis
On Tue, Sep 20, 2022 at 9:18 AM Bernhard Beschow wrote: > > SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to > inherit from TYPE_MACHINE. This is an inconsistency which can cause > undefined behavior such as memory corruption. > > Change SiFiveEState to inherit from Machine

Re: [PATCH] target/riscv: Check the correct exception cause in vector GDB stub

2022-09-19 Thread Alistair Francis
On Sun, Sep 18, 2022 at 6:29 PM wrote: > > From: Frank Chang > > After RISCVException enum is introduced, riscv_csrrw_debug() returns > RISCV_EXCP_NONE to indicate there's no error. RISC-V vector GDB stub > should check the result against RISCV_EXCP_NONE instead of value 0. > Otherwise, 'E14' pac

Re: [PATCH] target/riscv/pmp: fix non-translated page size address checks w/ MPU

2022-09-19 Thread Alistair Francis
On Sat, Sep 10, 2022 at 1:24 AM wrote: > > From: Leon Schuermann > > This commit fixes PMP address access checks with non page-aligned PMP > regions on harts with MPU enabled. Without this change, the presence > of an MPU in the virtual CPU model would influence the PMP address > check behavior w

[PATCH 8/9] softmmu/physmem: Let SysBusState absorb memory region and address space singletons

2022-09-19 Thread Bernhard Beschow
These singletons are actually properties of the system bus but so far it hasn't been modelled that way. Fix this to make this relationship very obvious. The idea of the patch is to restrain futher proliferation of the use of get_system_memory() and get_system_io() which are "temprary interfaces" "

[PATCH 5/9] exec/address-spaces: Wrap address space singletons into functions

2022-09-19 Thread Bernhard Beschow
In the next steps, these singletons will be resolved by turning them into attributes of the system bus. The system bus is already accessible via the global current_machine variable which will be made use of later in the wrapper functions. All changes have been performed with search-and-replace: *

[PATCH 9/9] exec/address-spaces: Inline legacy functions

2022-09-19 Thread Bernhard Beschow
The functions just access a global pointer and perform some pointer arithmetic on top. Allow the compiler to see through this by inlining. Signed-off-by: Bernhard Beschow --- include/exec/address-spaces.h | 30 ++ softmmu/physmem.c | 28 ---

[PATCH 6/9] target/loongarch/cpu: Remove unneeded include directive

2022-09-19 Thread Bernhard Beschow
The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Furthermore, it would cause a compile error in the next commit. Signed-off-by: Bernhard Beschow --- target/loongarch/cpu.h | 1 - 1 file changed, 1 deletion(-) diff -

[PATCH 4/9] hw/ppc/spapr: Fix code style problems reported by checkpatch

2022-09-19 Thread Bernhard Beschow
Signed-off-by: Bernhard Beschow --- include/hw/ppc/spapr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 530d739b1d..04a95669ab 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -848,7 +848,8 @@ sta

[PATCH 3/9] hw/core/sysbus: Resolve main_system_bus singleton

2022-09-19 Thread Bernhard Beschow
In QEMU, a machine and the main_system_bus always go togehter. Usually the bus is part of the machine which suggsts to host it there. Since tere is already a current_machine singleton, all code that accesses the main_system_bus can be changed (behind the scenes) to go through current_machine. This

[PATCH 7/9] hw/sysbus: Introduce dedicated struct SysBusState for TYPE_SYSTEM_BUS

2022-09-19 Thread Bernhard Beschow
With this out of the way, in the next step, SysBusState gains attributes for its memory and address recouces. Signed-off-by: Bernhard Beschow --- hw/core/sysbus.c | 4 ++-- include/hw/boards.h | 3 ++- include/hw/misc/macio/macio.h | 2 +- include/hw/sysbus.h | 8

[PATCH 1/9] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-19 Thread Bernhard Beschow
SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is registered as a machine. Signed-off-by: Bernhard

[PATCH 2/9] exec/hwaddr.h: Add missing include

2022-09-19 Thread Bernhard Beschow
The next commit would not compile w/o the include directive. Signed-off-by: Bernhard Beschow --- include/exec/hwaddr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h index 8f16d179a8..616255317c 100644 --- a/include/exec/hwaddr.h +++ b/include/e

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

2022-09-19 Thread Bernhard Beschow
In address-spaces.h it can be read that get_system_memory() and get_system_io() are temporary interfaces which "should only be used temporarily until a proper bus interface is available". This statement certainly extends to the address_space_memory and address_space_io singletons. This series attem

Re: [PATCH 0/3] Add a host power device

2022-09-19 Thread Philippe Mathieu-Daudé via
Hi Jian, On 19/9/22 19:21, Jian Zhang wrote: This patchset adds a host power device and added it into the g220a mahcine. The BMC have a important is to control the power of the host, usually it is nessary in a hardware platform. The BMC(soc) usually had a output pin to control the power of the

Re: [PATCH] tests/qtest: npcm7xx-emc-test: Skip checking MAC

2022-09-19 Thread Patrick Venture
On Mon, Sep 19, 2022 at 5:44 AM Thomas Huth wrote: > On 06/09/2022 18.31, Patrick Venture wrote: > > The register tests walks all the registers to verify they are initially > > 0 when appropriate. However, if the MAC address is set in the register > >space, this should not be checked against

Re: [PATCH 0/2] target/riscv: improvements to GDB target descriptions

2022-09-19 Thread Alistair Francis
On Wed, Aug 31, 2022 at 6:43 PM Andrew Burgess wrote: > > I was running some GDB tests against QEMU, and noticed some oddities > with the target description QEMU sends, the following two patches > address these issues. > > Thanks, > Andrew > > --- > > Andrew Burgess (2): > target/riscv: remove f

Re: [PATCH v2] disas/riscv.c: rvv: Add disas support for vector instructions

2022-09-19 Thread Alistair Francis
On Fri, Aug 26, 2022 at 1:26 PM Yang Liu wrote: > > Tested with https://github.com/ksco/rvv-decoder-tests > > Expected checkpatch errors for consistency and brevity reasons: > > ERROR: line over 90 characters > ERROR: trailing statements should be on next line > ERROR: braces {} are necessary for

Re: [PATCH v14 0/5] Improve PMU support

2022-09-19 Thread Alistair Francis
On Thu, Aug 25, 2022 at 8:22 AM Atish Patra wrote: > > The latest version of the SBI specification includes a Performance Monitoring > Unit(PMU) extension[1] which allows the supervisor to start/stop/configure > various PMU events. The Sscofpmf ('Ss' for Privileged arch and > Supervisor-level > e

Re: [PATCH 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-09-19 Thread Stefan Hajnoczi
On Sat, Sep 10, 2022 at 02:50:57PM +0800, Sam Li wrote: > This patch extends virtio-blk emulation to handle zoned device commands > by calling the new block layer APIs to perform zoned device I/O on > behalf of the guest. It supports Report Zone, four zone oparations (open, > close, finish, reset),

Re: Fast usermode networking with QEMU

2022-09-19 Thread Stefano Brivio
Hi Anders, On Mon, 23 May 2022 14:51:17 -0600 "Anders Pitman" wrote: > I came across this blog post[0] concerning passt, which is an > alternative usermode networking implementation for QEMU. ...and I just came across your email, entirely by chance. I'm not actively monitoring this list most of

Re: [PATCH] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-19 Thread Nicolin Chen
On Thu, Sep 15, 2022 at 11:18:27AM -0600, Alex Williamson wrote: > External email: Use caution opening links or attachments > > > On error, vfio_get_iommu_info() frees and clears *info, but > vfio_connect_container() continues to use the pointer regardless > of the return value. Restructure the

[PULL 1/2] Hexagon (target/hexagon) remove unused encodings

2022-09-19 Thread Taylor Simpson
Remove encodings guarded by ifdef that is not defined Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220606222327.7682-4-tsimp...@quicinc.com> --- target/hexagon/imported/encode_pp.def | 23 --- 1 file changed, 23 deletions(-) diff --git a/

[PULL 0/2] Hexagon target update

2022-09-19 Thread Taylor Simpson
The following changes since commit d29201ff34a135cdfc197f4413c1c5047e4f58bb: Merge tag 'pull-hmp-20220915a' of https://gitlab.com/dagrh/qemu into staging (2022-09-17 10:31:11 -0400) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20220919

[PULL 2/2] Hexagon (tests/tcg/hexagon): add fmin/fmax tests for signed zero

2022-09-19 Thread Taylor Simpson
From: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Signed-off-by: Taylor Simpson Reviewed-by: Taylor Simpson Tested-by: Taylor Simpson --- tests/tcg/hexagon/usr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/tcg/hexagon/usr.c b/tests/tcg/hexag

Re: [PATCH 1/2] include: import virtio_blk headers from linux with zoned device support

2022-09-19 Thread Stefan Hajnoczi
On Sat, Sep 10, 2022 at 02:50:56PM +0800, Sam Li wrote: > Add file from Dmitry's "virtio-blk:add support for zoned block devices" > linux patch using scripts/update-linux-headers.sh. There is a link for > more information: https://github.com/dmitry-fomichev/virtblk-zbd Hi Sam, Linux headers are im

[PATCH] virtio: add VIRTQUEUE_ERROR QAPI event

2022-09-19 Thread Vladimir Sementsov-Ogievskiy
For now we only log the vhost device error, when virtqueue is actually stopped. Let's add a QAPI event, which makes possible: - collect statistics of such errors - make immediate actions: take coredums or do some other debugging The event could be reused for some other virtqueue problems (not o

Re: [PATCH v3] audio: Add sndio backend

2022-09-19 Thread Brad Smith
On 9/9/2022 2:12 AM, Volker Rümelin wrote: Am 07.09.22 um 15:23 schrieb Alexandre Ratchov: sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). Signed-off-by: Brad Smith Signed-off-by: Alexandre Ratchov -

[RFC PATCH] libvduse: Do not truncate terminating NUL character with strncpy()

2022-09-19 Thread Philippe Mathieu-Daudé via
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. Here the next

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

2022-09-19 Thread Vladimir Sementsov-Ogievskiy
On 9/19/22 21:27, Philippe Mathieu-Daudé wrote: 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 handler. Few commits later (commit 1b6b0562db), the handler i

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-19 Thread Sean Christopherson
+Will, Marc and Fuad (apologies if I missed other pKVM folks) On Mon, Sep 19, 2022, David Hildenbrand wrote: > On 15.09.22 16:29, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > KVM can use memfd-provided memory for guest memory. For normal userspace > > accessible memory, KVM userspace

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

2022-09-19 Thread Philippe Mathieu-Daudé via
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 handler. Few commits later (commit 1b6b0562db), the handler is reused in qcow2_reopen_bitmaps_rw() but missing

Re: [PATCH 7/8] meson-build: Enable CONFIG_REPLICATION only when replication is set

2022-09-19 Thread Thomas Huth
On 02/09/2022 18.51, Juan Quintela wrote: Signed-off-by: Juan Quintela --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 20fddbd707..cab0474d0c 100644 --- a/meson.build +++ b/meson.build @@ -1878,7 +1878,7 @@ config_host_data.s

Re: [PATCH 0/8] tests: Make expliction defaults for tests

2022-09-19 Thread Thomas Huth
On 02/09/2022 19.16, Alexander Bulekov wrote: On 220902 1851, Juan Quintela wrote: Hi For a long, long time I have had local hacks on my tree to be able to run "make tests" when I have a minimal configure guest. This is a first try to upstream some of it. - by default we always setup -display

[PATCH v3] tcg/ppc: Optimize 26-bit jumps

2022-09-19 Thread Leandro Lupori
PowerPC64 processors handle direct branches better than indirect ones, resulting in less stalled cycles and branch misses. However, PPC's tb_target_set_jmp_target() was only using direct branches for 16-bit jumps, while PowerPC64's unconditional branch instructions are able to handle displacements

RE: [PATCH] Hexagon (tests/tcg/hexagon): add fmin/fmax tests for signed zero

2022-09-19 Thread Taylor Simpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Friday, September 16, 2022 10:06 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; Brian Cain > > Subject: [PATCH] Hexagon (tests/tcg/hexagon): add fmin/fmax tests for > signed zero > > Signed-off-by: Matheus Tavares

[PULL 15/21] audio: add help option for -audio and -audiodev

2022-09-19 Thread Paolo Bonzini
From: Claudio Fontana add a simple help option for -audio and -audiodev to show the list of available drivers, and document them. Signed-off-by: Claudio Fontana Message-Id: <20220908081441.7111-1-cfont...@suse.de> Signed-off-by: Paolo Bonzini --- audio/audio.c | 19 +++ audi

Re: [PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

2022-09-19 Thread Thomas Huth
On 02/09/2022 18.51, Juan Quintela wrote: With this change "make check" works when configured with --disable-keyring. Signed-off-by: Juan Quintela --- tests/unit/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build

Re: [PULL 0/9] loongarch-to-apply queue

2022-09-19 Thread Stefan Hajnoczi
The following CI error was reported: ../hw/loongarch/virt.c: In function ‘fdt_add_irqchip_node’: ../hw/loongarch/virt.c:174:32: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] 174 | nodename = g_strdup_printf("/i

Re: [PATCH 1/8] qtest: "-display none" is set in qtest_init()

2022-09-19 Thread Thomas Huth
On 02/09/2022 18.51, Juan Quintela wrote: So we don't need to set anywhere else. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/fuzz-lsi53c895a-test.c | 2 +- tests/qtest/fuzz-megasas-test.c | 2 +- tests/qtest/fuzz-sb16-test.c| 6 +++-

[PULL 11/21] tests/tcg: i386: fix typos in 3DNow! instructions

2022-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/tcg/i386/x86.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcg/i386/x86.csv b/tests/tcg/i386/x86.csv index d5d0c17f1b..c43bf42dd3 100644 --- a/tests/tcg/i386/x86.csv +++ b/tests/tcg/i386/x86.csv @@ -1469,16 +1469,16 @@ "P

Re: [QEMU][PATCH 4/5] tests/qtest: Introduce tests for Xilinx VERSAL CANFD controller

2022-09-19 Thread Thomas Huth
On 10/09/2022 08.12, Vikram Garhwal wrote: The QTests perform three tests on the Xilinx VERSAL CANFD controller: Tests the CANFD controllers in loopback. Tests the CANFD controllers in normal mode with CAN frame. Tests the CANFD controllers in normal mode with CANFD frame. Signed-

Re: Call for Outreachy Dec-Mar internship project ideas

2022-09-19 Thread Stefan Hajnoczi
On Fri, 9 Sept 2022 at 12:41, Stefan Hajnoczi wrote: > The Outreachy open source internship program > (https://www.outreachy.org/) is running again from December-March. If > you have a project idea you'd like to mentor and are a regular > contributor to QEMU or KVM, please reply to this email by S

[PULL 18/21] target/i386: REPZ and REPNZ are mutually exclusive

2022-09-19 Thread Paolo Bonzini
The later prefix wins if both are present, make it show in s->prefix too. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 5f31a59fb8.

Re: Travis CI webhook returns HTTP 500

2022-09-19 Thread Thomas Huth
On 19/09/2022 19.04, Stefan Hajnoczi wrote: GitLab sends qemu.git push event webhooks to Travis CI. Recently the webhooks have been failing with HTTP 500 Internal Server Error. Do you know how to resolve this or who configured Travis CI webhooks for QEMU? I haven't been involved in this, but I

[PULL 10/21] tests: unit: add NULL-pointer check

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

[PULL 03/21] kvm: fix memory leak on failure to read stats descriptors

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

[PULL 20/21] build: remove extra parentheses causing missing rebuilds

2022-09-19 Thread Paolo Bonzini
Because of two stray parentheses at the end of the definition of ninja-cmd-goals, the test that is last in the .check-TESTSUITENAME.deps variable will not be rebuilt. Fix that. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile

[PULL 19/21] target/i386: introduce insn_get_addr

2022-09-19 Thread Paolo Bonzini
The "O" operand type in the Intel SDM needs to load an 8- to 64-bit unsigned value, while insn_get is limited to 32 bits. Extract the code out of disas_insn and into a separate function. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 36 ++

[PULL 21/21] qboot: update to latest submodule

2022-09-19 Thread Paolo Bonzini
Include patch "Place setup_data at location specified by host" from Jason A. Donenfeld. Cc: Jason A. Donenfeld Signed-off-by: Paolo Bonzini --- roms/qboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/qboot b/roms/qboot index a5300c4949..8ca302e86d 16 --- a/roms/q

[PULL 17/21] target/i386: fix INSERTQ implementation

2022-09-19 Thread Paolo Bonzini
INSERTQ is defined to not modify any bits in the lower 64 bits of the destination, other than the ones being replaced with bits from the source operand. QEMU instead is using unshifted bits from the source for those bits. Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h| 10 +-

[PULL 14/21] tests/tcg: remove old SSE tests

2022-09-19 Thread Paolo Bonzini
The new testsuite is much more comprehensive, so remove the old one; it is also buggy (the pinsrw test uses incorrect constraints, with = instead of +, and the golden output for the fxsave tests differs depending on how the C library uses SSE and AVX instructions). Signed-off-by: Paolo Bonzini --

[PULL 04/21] spapr_pci: fix leak in spapr_phb_vfio_get_loc_code

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

[PULL 16/21] target/i386: correctly mask SSE4a bit indices in register operands

2022-09-19 Thread Paolo Bonzini
SSE4a instructions EXTRQ and INSERTQ have two bit index operands, that can be immediates or taken from an XMM register. In both cases, the fields are 6-bit wide and the top two bits in the byte are ignored. translate.c is doing that correctly for the immediate case, but not for the XMM case, so f

[PULL 12/21] tests/tcg: i386: add MMX and 3DNow! tests

2022-09-19 Thread Paolo Bonzini
Adjust the test-avx.py generator to produce tests specifically for MMX and 3DNow. Using a separate generator introduces some code duplication, but is a simpler approach because of test-avx's extra complexity to support 3- and 4-operand AVX instructions. If needed, a common library can be introduc

[PULL 01/21] KVM: use store-release to mark dirty pages as harvested

2022-09-19 Thread Paolo Bonzini
The following scenario can happen if QEMU sets more RESET flags while the KVM_RESET_DIRTY_RINGS ioctl is ongoing on another host CPU: CPU0 CPU1 CPU2 --

[PULL 13/21] tests/tcg: refine MMX support in SSE tests

2022-09-19 Thread Paolo Bonzini
Extend the support to memory operands, and skip MMX instructions that were introduced in SSE times, because they are now covered in test-mmx. Signed-off-by: Paolo Bonzini --- tests/tcg/i386/test-avx.py | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff

[PULL 09/21] tests: test-qga: close socket on failure to connect

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

[PULL 05/21] coverity: add new RISC-V component

2022-09-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/COMPONENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/coverity-scan/COMPONENTS.md index 3aad9cdfaf..fc1608932e 100644 --- a/scripts/coverity-scan/COMPONENTS.md +++ b/scripts/coveri

Re: [PATCH v3 2/2] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-09-19 Thread Paolo Bonzini
Hi, I will merge this patch already, but with simpler code that doesn't look at PREFIX_VEX. The changes to the helpers and the addition of the aligned argument help with the new decoder as well, and I will build on top of them in the next submission of the AVX patches. Thanks! Paolo On Sat, Sep

[PULL 07/21] smbios: sanitize type from external type before checking have_fields_bitmap

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

[PULL 08/21] tests: unit: simplify test-visitor-serialization list tests

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

[PULL 02/21] target/i386: Raise #GP on unaligned m128 accesses when required.

2022-09-19 Thread Paolo Bonzini
Many instructions which load/store 128-bit values are supposed to raise #GP when the memory operand isn't 16-byte aligned. This includes: - Instructions explicitly requiring memory alignment (Exceptions Type 1 in the "AVX and SSE Instruction Exception Specification" section of the SDM) - Le

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-19 Thread Christian Schoenebeck
On Freitag, 9. September 2022 15:10:48 CEST Christian Schoenebeck wrote: > On Donnerstag, 8. September 2022 13:23:53 CEST Linus Heckemann wrote: > > The previous implementation would iterate over the fid table for > > lookup operations, resulting in an operation with O(n) complexity on > > the numb

[PULL 06/21] coverity: put NUBus under m68k component

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

Re: [PATCH v3 1/2] target/i386: Read 8 bytes from cvttps2pi/cvtps2pi memory operands

2022-09-19 Thread Paolo Bonzini
Hi, I think this is broken for big endian systems because ldq expects a pointer to xmm_t0.L(0) while ldo expects a pointer xmm_t0. I will fix the bug in my new AVX decoder though, where it is also present. So thanks for the report! Paolo On Tue, Aug 30, 2022 at 5:48 AM Ricky Zhou wrote: > > Bef

[PULL 00/21] Misc patches for 2022-09-19

2022-09-19 Thread Paolo Bonzini
The following changes since commit d29201ff34a135cdfc197f4413c1c5047e4f58bb: Merge tag 'pull-hmp-20220915a' of https://gitlab.com/dagrh/qemu into staging (2022-09-17 10:31:11 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fet

[PATCH 3/3] hw/arm/aspeed: g220a: Add host-power device

2022-09-19 Thread Jian Zhang
Add power-button/power-good gpio connect between g220a BMC machind(soc gpio) and host. Tested: In qemu, use g220a image ~# ipmitool power status Chassis Power is off ~# ipmitool power on Chassis Power Control: Up/On ~# ipmitool power status Chassis Power is on ~# ipmitool power off Chassis Pow

[PATCH 2/3] hw/misc/host_power: Add a simple host power device

2022-09-19 Thread Jian Zhang
This Host Power device privide a simple power control logic for a host, like use a bmc to control the power of a host. This device has 2 gpio, one is input named "button", another gpio is output named "power-good", when button have a falling edge, invert the "power-good" gpio. Signed-off-by: Jian

[PATCH 1/3] hw/gpio/aspeed_gpio: Add gpios in/out init

2022-09-19 Thread Jian Zhang
Add gpios in/out init for aspeed gpio to add the ability to connect to other gpio devices. Based the qdev-core.h comments, If you want to connect a GPIO to other devices, you need to call qdev_init_gpio_in() or qdev_init_gpio_out(). ``` For input gpios: * * Outbound GPIO lines can be connected

[PATCH 0/3] Add a host power device

2022-09-19 Thread Jian Zhang
This patchset adds a host power device and added it into the g220a mahcine. The BMC have a important is to control the power of the host, usually it is nessary in a hardware platform. The BMC(soc) usually had a output pin to control the power of the host, and a input pin to get the power status of

Re: [PATCH v7 for-7.2 00/15] block: cleanup backing and file handling

2022-09-19 Thread Vladimir Sementsov-Ogievskiy
ping. Seems, all patches are reviewed On 7/26/22 23:11, Vladimir Sementsov-Ogievskiy wrote: Hi all! That's the first part of "[PATCH v5 00/45] Transactional block-graph modifying API", updated and is fully reviewed by Hanna. v7: add r-bs and rebase on master Vladimir Sementsov-Ogievskiy (15):

Re: [PATCH v2 00/11] iotests: use vm.cmd()

2022-09-19 Thread Vladimir Sementsov-Ogievskiy
ping On 6/6/22 10:27, Vladimir Sementsov-Ogievskiy wrote: Hi all! Let's get rid of pattern result = self.vm.qmp(...) self.assert_qmp(result, 'return', {}) And switch to just self.vm.cmd(...) Supersedes: <20220408170214.45585-1-vsement...@openvz.org> ([RFC 0/2] introduce Q

Travis CI webhook returns HTTP 500

2022-09-19 Thread Stefan Hajnoczi
GitLab sends qemu.git push event webhooks to Travis CI. Recently the webhooks have been failing with HTTP 500 Internal Server Error. Do you know how to resolve this or who configured Travis CI webhooks for QEMU? Thanks, Stefan

Re: [PULL 0/9] loongarch-to-apply queue

2022-09-19 Thread Stefan Hajnoczi
Hi Song Gao, Please push your GPG public key to a key server using "gpg --send-keys 0x40A2FFF239263EDF". That way others can search for and download your public key. Thanks, Stefan

Re: [PATCH v4 for 7.2 00/22] virtio-gpio and various virtio cleanups

2022-09-19 Thread Stefan Hajnoczi
On Fri, Sep 16, 2022 at 07:51:40AM +0100, Alex Bennée wrote: > > Alex Bennée writes: > > > Hi, > > > > This is an update to the previous series which fixes the last few > > niggling CI failures I was seeing. > > > >Subject: [PATCH v3 for 7.2 00/21] virtio-gpio and various virtio cleanups > >

Re: [PATCH v6 2/2] i386: Add notify VM exit support

2022-09-19 Thread Peter Xu
On Mon, Sep 19, 2022 at 01:46:38PM +0800, Chenyi Qiang wrote: > > > On 9/17/2022 5:57 AM, Peter Xu wrote: > > On Thu, Sep 15, 2022 at 05:28:39PM +0800, Chenyi Qiang wrote: > > > There are cases that malicious virtual machine can cause CPU stuck (due > > > to event windows don't open up), e.g., in

Re: [kvm-unit-tests PATCH v4 07/12] arm: pmu: Basic event counter Tests

2022-09-19 Thread Andrew Jones
On Mon, Sep 19, 2022 at 10:30:01PM +0800, Zenghui Yu wrote: > Hi Eric, > > A few comments when looking through the PMU test code (2 years after > the series was merged). Yes, these patches were merged long ago. Now you need to send patches, not comments. Thanks, drew

Re: [PATCH v3 2/5] tests/x86: Add 'q35' machine type to ivshmem-test

2022-09-19 Thread Michael Labiuk
On 9/19/22 16:13, Denis V. Lunev wrote: On 9/15/22 15:14, Michael Labiuk wrote: diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index 9611d05eb5..0f9755abc6 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -378,6 +378,32 @@ static void test_ivshmem

  1   2   >