Re: [PATCH] icount: don't adjust virtual time backwards after warp

2023-06-27 Thread Paolo Bonzini
On 6/27/23 08:14, Nicholas Piggin wrote: The icount-based QEMU_CLOCK_VIRTUAL runs ahead of the RT clock at times. When warping, it is possible it is still ahead at the end of the warp, which causes icount adaptive mode to adjust it backward. This can result in the machine observing time going bac

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2023-06-27 Thread Paolo Bonzini
On 6/26/23 23:19, Olaf Hering wrote: I need advice on how to debug this. One thing that stands out is uhci_irq(). It reads a u16 from the USBSTS register. On the qemu side, this read is served from bmdma_read. Since the read size is 2, the result is ~0, and uhci_irq() turns the controller off.

Re: [PATCH 0/4] fpu: Add float64_to_int{32,64}_modulo

2023-06-27 Thread Richard Henderson
On 6/21/23 11:12, Richard Henderson wrote: On 5/27/23 16:19, Richard Henderson wrote: Extract some common code from Alpha and Arm, and which will shortly also be required by the RISC-V Zfa extension. Added a new test for Alpha; I already had a RISU test for Arm. r~ Richard Henderson (4):   

[PATCH v2 2/5] test-throttle: use enum ThrottleType

2023-06-27 Thread zhenwei pi
Use enum ThrottleType instead in the throttle test codes. Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index 7adb5e6652..a60b5fe22e 100644 --- a/tests/uni

[PATCH v2 3/5] throttle: support read-only and write-only

2023-06-27 Thread zhenwei pi
Only one direction is necessary in several scenarios: - a read-only disk - operations on a device are considered as *write* only. For example, encrypt/decrypt/sign/verify operations on a cryptodev use a single *write* timer(read timer callback is defined, but never invoked). Allow a single dir

[PATCH v2 1/5] throttle: introduce enum ThrottleType

2023-06-27 Thread zhenwei pi
Use enum ThrottleType instead of number index. Signed-off-by: zhenwei pi --- include/qemu/throttle.h | 11 --- util/throttle.c | 16 +--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 05f634613

[PATCH v2 0/5] Misc fixes for throttle

2023-06-27 Thread zhenwei pi
v1 -> v2: - rename 'ThrottleTimerType' to 'ThrottleType' - add assertion to throttle_schedule_timer Something remained: - 'bool is_write' is no longer appropriate, the related functions need to use 'ThrottleType throttle' instead. To avoid changes from other subsystems in this series, do this

[PATCH v2 4/5] test-throttle: test read only and write only

2023-06-27 Thread zhenwei pi
Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 66 ++ 1 file changed, 66 insertions(+) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index a60b5fe22e..5547837a58 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test-t

[PATCH v2 5/5] cryptodev: use NULL throttle timer cb for read direction

2023-06-27 Thread zhenwei pi
Operations on a crytpodev are considered as *write* only, the callback of read direction is never invoked. Use NULL instead of an unreachable path(cryptodev_backend_throttle_timer_cb on read direction). Signed-off-by: zhenwei pi --- backends/cryptodev.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v2 6/6] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Juan Quintela
Alex Bennée wrote: > We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers > as an overly wide shift attempt. > > Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela

Re: [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Juan Quintela
Alex Bennée wrote: > An update to the clang tooling detects more issues with the code > including a memory leak from the g_string_new() allocation. Clean up > the code with g_autoptr and use ARRAY_SIZE while we are at it. > > Signed-off-by: Alex Bennée > --- > tests/qtest/fuzz/generic_fuzz.c | 1

[PATCH v2 1/4] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-27 Thread Thomas Huth
start.S is currently indented with a mixture of spaces and tabs, which is quite ugly. QEMU coding style says indentation should be 4 spaces, and this is also what we are using in the assembler files in the tests/tcg/s390x/ folder already, so let's adjust start.S accordingly. Reviewed-by: Cédric Le

[PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Thomas Huth
Providing the space of a stack frame is the duty of the caller, so we should reserve 160 bytes before jumping into the main function. Otherwise the main() function might write past the stack array. While we're at it, add a proper STACK_SIZE macro for the stack size instead of using magic numbers (

[PATCH v2 0/4] pc-bios/s390-ccw: Fixes and improvements for start.S

2023-06-27 Thread Thomas Huth
Main motivation of this series was a bug that showed up when compiling with Clang 16 and binutils 2.40 (which has been reported in Fedora ELN, see https://bugzilla.redhat.com/show_bug.cgi?id=2216662). This is fixed in the fourth patch. I checked with "objdump" that the change is fine, indeed. Whil

[PATCH v2 4/4] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-27 Thread Thomas Huth
start.S currently cannot be compiled with Clang 16 and binutils 2.40: ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for relocation R_390_PC32DBL According to the built-in linker script of ld, the symbol __bss_start can actually point *before* the .bss section and does not

[PATCH v2 3/4] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-27 Thread Thomas Huth
The stack array is only referenced from the start-up code (which is shared between the s390-ccw.img and the s390-netboot.img), but it is currently declared twice, once in main.c and once in netmain.c. It makes more sense to declare this in start.S instead - which will also be helpful in the next pa

Re: [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Alexander Bulekov
On 230626 2259, Alex Bennée wrote: > An update to the clang tooling detects more issues with the code > including a memory leak from the g_string_new() allocation. Clean up > the code with g_autoptr and use ARRAY_SIZE while we are at it. > > Signed-off-by: Alex Bennée Reviewed-by: Alexander Bule

Re: [PATCH 3/3] vfio/migration: Make VFIO migration non-experimental

2023-06-27 Thread Avihai Horon
On 26/06/2023 20:27, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 26 Jun 2023 17:26:42 +0200 Cédric Le Goater wrote: On 6/26/23 15:40, Joao Martins wrote: On 26/06/2023 14:20, Cédric Le Goater wrote: Hello Avihai, On 6/26/23 10:23, Avihai Horon

Re: [PATCH v4 16/19] target/riscv/cpu.c: create KVM mock properties

2023-06-27 Thread Andrew Jones
On Mon, Jun 26, 2023 at 07:02:06PM -0300, Daniel Henrique Barboza wrote: > KVM-specific properties are being created inside target/riscv/kvm.c. But > at this moment we're gathering all the remaining properties from TCG and > adding them as is when running KVM. This creates a situation where > non-K

Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses

2023-06-27 Thread Mark Cave-Ayland
On 26/06/2023 14:35, Cédric Le Goater wrote: On 6/23/23 14:37, Cédric Le Goater wrote: On 6/23/23 11:10, Peter Maydell wrote: On Fri, 23 Jun 2023 at 09:21, Nicholas Piggin wrote: ppc has always silently ignored access to real (physical) addresses with nothing behind it, which can make debug

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Marc Hartmayer
Thomas Huth writes: > Providing the space of a stack frame is the duty of the caller, > so we should reserve 160 bytes before jumping into the main function. > Otherwise the main() function might write past the stack array. > > While we're at it, add a proper STACK_SIZE macro for the stack size >

Re: [PATCH 1/7] target/i386: Add FEAT_7_1_EDX to adjust feature level

2023-06-27 Thread Igor Mammedov
On Tue, 27 Jun 2023 12:27:19 +0800 Tao Su wrote: > On Mon, Jun 26, 2023 at 02:39:15PM +0200, Igor Mammedov wrote: > > On Fri, 16 Jun 2023 11:23:05 +0800 > > Tao Su wrote: > > > > > Considering the case of FEAT_7_1_EAX being 0 and FEAT_7_1_EDX being > > > non-zero, > > Can you clarify when/w

Re: [PATCH 5/7] target/i386: Add few security fix bits in ARCH_CAPABILITIES into SapphireRapids CPU model

2023-06-27 Thread Igor Mammedov
On Tue, 27 Jun 2023 14:10:17 +0800 Xiaoyao Li wrote: > On 6/26/2023 9:15 PM, Igor Mammedov wrote: > > On Fri, 16 Jun 2023 11:23:09 +0800 > > Tao Su wrote: > > > >> From: Lei Wang > >> > >> Latest stepping (8) of SapphireRapids has bit 13, 14 and 15 of > >> MSR_IA32_ARCH_CAPABILITIES enabled,

Re: [PATCH 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-06-27 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is > used. While 'hv-passthrough' is a debug only feature, this significantly > limit its usefullness. While debugging the problem, I found that there are > two loosely connected issues: > - 'hv-passthr

Re: [PATCH 6/7] target/i386: Add new CPU model EmeraldRapids

2023-06-27 Thread Igor Mammedov
On Tue, 27 Jun 2023 13:54:23 +0800 Xiaoyao Li wrote: > On 6/26/2023 8:56 PM, Igor Mammedov wrote: > > On Fri, 16 Jun 2023 11:23:10 +0800 > > Tao Su wrote: > > > >> From: Qian Wen > >> > >> Emerald Rapids (EMR) is the next generation of Xeon server processor > >> after Sapphire Rapids (SPR). >

Re: [PATCH] vdpa: Increase out buffer size for CVQ commands

2023-06-27 Thread Hawkins Jiawei
On 2023/6/26 17:08, Eugenio Perez Martin wrote: > On Mon, Jun 26, 2023 at 10:26 AM Hawkins Jiawei wrote: >> >> On 2023/6/25 18:48, Eugenio Perez Martin wrote: >>> On Thu, Jun 22, 2023 at 3:07 AM Hawkins Jiawei wrote: According to the VirtIO standard, "Since there are no guarantees,

Re: [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/6/23 09:43, Juan Quintela wrote: Alex Bennée wrote: An update to the clang tooling detects more issues with the code including a memory leak from the g_string_new() allocation. Clean up the code with g_autoptr and use ARRAY_SIZE while we are at it. Signed-off-by: Alex Bennée --- tests

Re: [RESEND PATCH v5 4/5] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test

2023-06-27 Thread Igor Mammedov
On Mon, 26 Jun 2023 21:42:43 +0530 Ani Sinha wrote: > The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci > bridge > on slot 0 on the same pcie-root-port. Since a downstream device can be > attached > to a pcie-root-port only on slot 0, the above test configuration is not

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-06-27 Thread Stefan Hajnoczi
Can multiple VMs share a host netdev by filtering incoming traffic based on each VM's MAC address and directing it to the appropriate XSK? If yes, then I think AF_XDP is interesting when SR-IOV or similar hardware features are not available. The idea of an AF_XDP passthrough device seems interesti

Re: [PATCH v2 3/8] target/sparc: Drop inline markers from translate.c

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: Let the compiler decide about inlining. Should we clean that automatically with scripts and forbid via checkpatch? Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/translate.c | 237 ++

Re: [RESEND PATCH v5 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-27 Thread Igor Mammedov
On Mon, 26 Jun 2023 21:42:44 +0530 Ani Sinha wrote: > PCI Express ports only have one slot, so PCI Express devices can only be > plugged into slot 0 on a PCIE port. Enforce it. btw, previously you mentioned ARI. So if we turn it on, wouldn't this patch actually become regression? > > CC: jus..

Re: [PATCH 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-06-27 Thread Daniel P . Berrangé
On Mon, Jun 26, 2023 at 03:22:10PM -0300, Fabiano Rosas wrote: > From: Nikolay Borisov > > Add basic tests for file-based migration. > > Signed-off-by: Nikolay Borisov > Signed-off-by: Fabiano Rosas > --- > tests/qtest/migration-test.c | 66 > 1 file chang

Re: [PATCH v2 4/8] target/sparc: Introduce DYNAMIC_PC_LOOKUP

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: Create a new artificial "next pc" which also indicates that nothing has changed within the cpu state which requires returning to the main loop. Pipe this new value though all pc/npc checks. Do not produce this new value yet. Signed-off-by: Richard Hend

Re: [PATCH v2 5/8] target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: When resolving JUMP_PC, we know this is for a plain branch with no other side effects. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 7/8] target/sparc: Use DYNAMIC_PC_LOOKUP for v9 RETURN

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: After the register window unwind, this is for a plain indirect branch with no further side effects. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-D

Re: [PATCH 1/6] migration: Set migration status early in incoming side

2023-06-27 Thread Juan Quintela
Fabiano Rosas wrote: > We are sending a migration event of MIGRATION_STATUS_SETUP at > qemu_start_incoming_migration but never actually setting the state. > > This creates a window between qmp_migrate_incoming and > process_incoming_migration_co where the migration status is still > MIGRATION_STAT

Re: [PATCH v2 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: During translation, npc == address, DYNAMIC_PC, or JUMP_PC. It is only the encoding between here and sparc_restore_state_to_opc that considers JUMP_PC to be a bit within a larger value. Signed-off-by: Richard Henderson --- target/sparc/translate.c |

Re: [PATCH v2 6/8] target/sparc: Use DYNAMIC_PC_LOOKUP for JMPL

2023-06-27 Thread Philippe Mathieu-Daudé
On 21/6/23 20:06, Richard Henderson wrote: This is for a plain indirect branch with no other side effects. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 00/30] Next patches

2023-06-27 Thread Juan Quintela
Richard Henderson wrote: > On 6/22/23 18:54, Juan Quintela wrote: >> The following changes since commit b455ce4c2f300c8ba47cba7232dd03261368a4cb: >>Merge tag 'q800-for-8.1-pull-request' >> ofhttps://github.com/vivier/qemu-m68k into staging (2023-06-22 >> 10:18:32 +0200) >> are available in th

Re: [PATCH 2/6] tests/qtest: migration: Expose migrate_set_capability

2023-06-27 Thread Juan Quintela
Fabiano Rosas wrote: > The following patch will make use of this function from within > migrate-helpers.c, so move it there. > > Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/6/23 10:26, Marc Hartmayer wrote: Thomas Huth writes: Providing the space of a stack frame is the duty of the caller, so we should reserve 160 bytes before jumping into the main function. Otherwise the main() function might write past the stack array. While we're at it, add a proper STA

Re: [PATCH 4/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-06-27 Thread Juan Quintela
Fabiano Rosas wrote: > Use the new migrate_incoming_qmp helper in the places that currently > open-code calling migrate-incoming. > > Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela

Re: [PATCH v2 1/4] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/6/23 09:47, Thomas Huth wrote: start.S is currently indented with a mixture of spaces and tabs, which is quite ugly. QEMU coding style says indentation should be 4 spaces, and this is also what we are using in the assembler files in the tests/tcg/s390x/ folder already, so let's adjust start

Re: [PATCH v2 09/26] tests/docker: add test-fuzz

2023-06-27 Thread Alexander Bulekov
On 230626 2259, Alex Bennée wrote: > Running the fuzzer requires some hoop jumping and some problems only > show up in containers. This basically replicates the build-oss-fuzz > job from our CI so we can run in the same containers we use in CI. > > Signed-off-by: Alex Bennée Reviewed-by: Alexand

Re: [RESEND PATCH v5 4/5] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test

2023-06-27 Thread Ani Sinha
> On 27-Jun-2023, at 2:24 PM, Igor Mammedov wrote: > > On Mon, 26 Jun 2023 21:42:43 +0530 > Ani Sinha wrote: > >> The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci >> bridge >> on slot 0 on the same pcie-root-port. Since a downstream device can be >> attached >> to a

Re: [PATCH 3/4] target/alpha: Use float64_to_int64_modulo for CVTTQ

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/5/23 16:19, Richard Henderson wrote: For the most part we can use the new generic routine, though exceptions need some post-processing to sort invalid from integer overflow. Signed-off-by: Richard Henderson --- target/alpha/fpu_helper.c | 85 +-- 1 f

Re: [PATCH v2 1/3] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F

2023-06-27 Thread Yang, Weijiang
On 6/13/2023 9:19 PM, Xiaoyao Li wrote: Decrease array index cpuid_i when CPUID leaf 1F is skipped, otherwise it will get an all zero'ed CPUID entry with leaf 0 and subleaf 0. It conflicts with correct leaf 0. Maybe change the commit log like this: Exiting code misses a decrement of cpuid_i

Re: [PATCH v2 2/3] i386/cpuid: Remove subleaf constraint on CPUID leaf 1F

2023-06-27 Thread Yang, Weijiang
On 6/13/2023 9:19 PM, Xiaoyao Li wrote: No such constraint that subleaf index needs to be less than 64. Signed-off-by: Xiaoyao Li --- target/i386/kvm/kvm.c | 4 1 file changed, 4 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index afa97799d89a..d7e235ce35a6 1

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Claudio Imbrenda
On Tue, 27 Jun 2023 09:47:01 +0200 Thomas Huth wrote: > Providing the space of a stack frame is the duty of the caller, > so we should reserve 160 bytes before jumping into the main function. > Otherwise the main() function might write past the stack array. > > While we're at it, add a proper ST

Re: [PATCH v2 3/3] i386/cpuid: Move leaf 7 to correct group

2023-06-27 Thread Yang, Weijiang
On 6/13/2023 9:19 PM, Xiaoyao Li wrote: CPUID leaf 7 was grouped together with SGX leaf 0x12 by commit b9edbadefb9e ("i386: Propagate SGX CPUID sub-leafs to KVM") by mistake. SGX leaf 0x12 has its specific logic to check if subleaf (starting from 2) is valid or not by checking the bit 0:3 of c

Re: [PATCH v2 4/4] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-27 Thread Claudio Imbrenda
On Tue, 27 Jun 2023 09:47:03 +0200 Thomas Huth wrote: > start.S currently cannot be compiled with Clang 16 and binutils 2.40: > > ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for > relocation R_390_PC32DBL > > According to the built-in linker script of ld, the symbol _

Re: [PATCH v2 1/4] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-27 Thread Claudio Imbrenda
On Tue, 27 Jun 2023 09:47:00 +0200 Thomas Huth wrote: > start.S is currently indented with a mixture of spaces and tabs, which > is quite ugly. QEMU coding style says indentation should be 4 spaces, > and this is also what we are using in the assembler files in the > tests/tcg/s390x/ folder alrea

Re: [PATCH v2 3/4] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-27 Thread Claudio Imbrenda
On Tue, 27 Jun 2023 09:47:02 +0200 Thomas Huth wrote: > The stack array is only referenced from the start-up code (which is > shared between the s390-ccw.img and the s390-netboot.img), but it is > currently declared twice, once in main.c and once in netmain.c. > It makes more sense to declare thi

Re: [PATCH v2 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/6/23 08:46, Mark Cave-Ayland wrote: On 22/06/2023 13:26, Mark Cave-Ayland wrote: On 21/06/2023 19:05, Richard Henderson wrote: Changes from v1:    * Split into teeny weeny pieces.    * It turns out the sparc_tr_tb_stop hunk of v1 was buggy, in that things that are not simple branc

Re: [RESEND PATCH v5 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-27 Thread Ani Sinha
> On 27-Jun-2023, at 2:32 PM, Igor Mammedov wrote: > > On Mon, 26 Jun 2023 21:42:44 +0530 > Ani Sinha wrote: > >> PCI Express ports only have one slot, so PCI Express devices can only be >> plugged into slot 0 on a PCIE port. Enforce it. > > btw, previously you mentioned ARI. > So if we tur

Re: [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Alex Bennée
Richard Henderson writes: > On 6/26/23 23:59, Alex Bennée wrote: >> We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers >> as an overly wide shift attempt. >> Signed-off-by: Alex Bennée >> --- >> qemu-keymap.c | 24 >> 1 file changed, 16 insertion

Re: [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-27 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 27/6/23 09:43, Juan Quintela wrote: >> Alex Bennée wrote: >>> An update to the clang tooling detects more issues with the code >>> including a memory leak from the g_string_new() allocation. Clean up >>> the code with g_autoptr and use ARRAY_SIZE while we ar

RE: [PATCH 1/8] colo: Only support the same qemu version on source and destination

2023-06-27 Thread Zhang, Chen
> -Original Message- > From: Dong, Eddie > Sent: Friday, June 23, 2023 1:17 AM > To: Lukas Straub ; qemu-devel de...@nongnu.org> > Cc: Zhang, Hailiang ; Juan Quintela > ; Peter Xu ; Leonardo Bras > ; Zhang, Chen > Subject: RE: [PATCH 1/8] colo: Only support the same qemu version on >

Re: [PATCH v2 1/4] pc-bios/s390-ccw: Fix indentation in start.S

2023-06-27 Thread Eric Farman
On Tue, 2023-06-27 at 09:47 +0200, Thomas Huth wrote: > start.S is currently indented with a mixture of spaces and tabs, > which > is quite ugly. QEMU coding style says indentation should be 4 spaces, > and this is also what we are using in the assembler files in the > tests/tcg/s390x/ folder alrea

Re: [PATCH 1/4] fpu: Add float64_to_int{32,64}_modulo

2023-06-27 Thread Alex Bennée
Richard Henderson writes: > Add versions of float64_to_int* which do not saturate the result. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Eric Farman
On Tue, 2023-06-27 at 11:14 +0200, Philippe Mathieu-Daudé wrote: > On 27/6/23 10:26, Marc Hartmayer wrote: > > Thomas Huth writes: > > > > > Providing the space of a stack frame is the duty of the caller, > > > so we should reserve 160 bytes before jumping into the main > > > function. > > > Othe

Re: [PATCH 2/4] tests/tcg/alpha: Add test for cvttq

2023-06-27 Thread Alex Bennée
Richard Henderson writes: > Test for invalid, integer overflow, and inexact. > Test for proper result, modulo 2**64. > > Signed-off-by: Richard Henderson Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-06-27 Thread Richard Henderson
On 6/27/23 11:37, Philippe Mathieu-Daudé wrote: On 27/6/23 08:46, Mark Cave-Ayland wrote: On 22/06/2023 13:26, Mark Cave-Ayland wrote: On 21/06/2023 19:05, Richard Henderson wrote: Changes from v1:    * Split into teeny weeny pieces.    * It turns out the sparc_tr_tb_stop hunk of v1 was bug

Re: [PATCH v2 3/4] pc-bios/s390-ccw: Move the stack array into start.S

2023-06-27 Thread Eric Farman
On Tue, 2023-06-27 at 09:47 +0200, Thomas Huth wrote: > The stack array is only referenced from the start-up code (which is > shared between the s390-ccw.img and the s390-netboot.img), but it is > currently declared twice, once in main.c and once in netmain.c. > It makes more sense to declare this

Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize

2023-06-27 Thread Joao Martins
>>> out_deregister: >>> pci_device_set_intx_routing_notifier(&vdev->pdev, NULL); >>> if (vdev->irqchip_change_notifier.notify) { >>> kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier); >>> } >>> +vfio_disable_interrupts(vdev); >>> +if (vdev->intx.mma

Re: [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Peter Maydell
On Tue, 27 Jun 2023 at 10:57, Alex Bennée wrote: > Ahh in the other thread. No change, it looks like AltGr just doesn't > exist for some keymaps: > > 🕙21:20:36 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?] > ➜ diff -ub gb.before gb.after > 🕙21:20:43 alex@zen:qemu.git/builds/

Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses

2023-06-27 Thread Howard Spoelstra
On Tue, Jun 27, 2023 at 10:15 AM Mark Cave-Ayland < mark.cave-ayl...@ilande.co.uk> wrote: > On 26/06/2023 14:35, Cédric Le Goater wrote: > > > On 6/23/23 14:37, Cédric Le Goater wrote: > >> On 6/23/23 11:10, Peter Maydell wrote: > >>> On Fri, 23 Jun 2023 at 09:21, Nicholas Piggin > wrote: >

RE: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize

2023-06-27 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Sent: Tuesday, June 27, 2023 6:22 PM >To: Duan, Zhenzhong >Cc: alex.william...@redhat.com; c...@redhat.com; qemu-devel@nongnu.org; >avih...@nvidia.com; Peng, Chao P >Subject: Re: [PATCH v3 1/3] vfio/pci: Fix resource leak in vfio_realize > o

Re: [PATCH 4/4] target/arm: Use float64_to_int32_modulo for FJCVTZS

2023-06-27 Thread Alex Bennée
Richard Henderson writes: > The standard floating point results are provided by the generic routine. > We only need handle the extra Z flag result afterward. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] gdbstub: Permit reverse step/break to provide stop response

2023-06-27 Thread Alex Bennée
Nicholas Piggin writes: > The final part of the reverse step and break handling is to bring > the machine back to a debug stop state. gdb expects a response. > > A gdb 'rsi' command hangs forever because the gdbstub filters out > the response (also observable with reverse_debugging.py avocado >

Re: [PATCH v2 4/4] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-27 Thread Eric Farman
On Tue, 2023-06-27 at 09:47 +0200, Thomas Huth wrote: > start.S currently cannot be compiled with Clang 16 and binutils 2.40: > >  ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for > relocation R_390_PC32DBL > > According to the built-in linker script of ld, the symbol __b

Re: [PATCH] gdbstub: Permit reverse step/break to provide stop response

2023-06-27 Thread Peter Maydell
On Fri, 23 Jun 2023 at 13:19, Matheus Tavares Bernardino wrote: > > > Nicholas Piggin wrote: > > > > The final part of the reverse step and break handling is to bring > > the machine back to a debug stop state. gdb expects a response. > > > > A gdb 'rsi' command hangs forever because the gdbstub

Re: [PATCH v2 4/4] pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

2023-06-27 Thread Thomas Huth
On 27/06/2023 11.29, Claudio Imbrenda wrote: On Tue, 27 Jun 2023 09:47:03 +0200 Thomas Huth wrote: start.S currently cannot be compiled with Clang 16 and binutils 2.40: ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for relocation R_390_PC32DBL According to the buil

Re: [PATCH v3 3/3] vfio/migration: vfio/migration: Refactor and fix print of "Migration disabled"

2023-06-27 Thread Joao Martins
On 27/06/2023 03:55, Duan, Zhenzhong wrote: >> I guess it makes sense -- the thing that was tieing him was the global >> migration >> blocker, which is now consolidated into the main migration blocker. >> >> My vIOMMU series will relax this condition yes (still same per-device scope). >> And I wil

[RFC PATCH] gdbstub: clean-up vcont handling to avoid goto

2023-06-27 Thread Alex Bennée
We can handle all the error exit cases by using g_autofree() for the one thing that needs cleaning up on the exit. Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstu

Re: [PATCH] gdbstub: fixes cases where wrong threads were reported to GDB on SIGINT

2023-06-27 Thread Alex Bennée
Matheus Branco Borella writes: > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1725 > > This fix is implemented by having the vCont handler set the value of > `gdbserver_state.c_cpu` if any threads are to be resumed. The specific CPU > is picked arbitrarily from the ones to be resumed

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2023-06-27 Thread Bernhard Beschow
Am 27. Juni 2023 07:11:33 UTC schrieb Paolo Bonzini : >On 6/26/23 23:19, Olaf Hering wrote: >> I need advice on how to debug this. >> >> One thing that stands out is uhci_irq(). >> It reads a u16 from the USBSTS register. >> >> On the qemu side, this read is served from bmdma_read. Since the r

Re: [RFC PATCH] gdbstub: clean-up vcont handling to avoid goto

2023-06-27 Thread Philippe Mathieu-Daudé
On 27/6/23 13:05, Alex Bennée wrote: We can handle all the error exit cases by using g_autofree() for the one thing that needs cleaning up on the exit. Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) Revie

Re: [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-27 Thread Alex Bennée
Peter Maydell writes: > On Tue, 27 Jun 2023 at 10:57, Alex Bennée wrote: >> Ahh in the other thread. No change, it looks like AltGr just doesn't >> exist for some keymaps: >> >> 🕙21:20:36 alex@zen:qemu.git/builds/all (399fc0c) (REBASING 2/22) [$!?] >> ➜ diff -ub gb.before gb.after >> 🕙

Re: [PATCH v2 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-06-27 Thread Mark Cave-Ayland
On 27/06/2023 10:37, Philippe Mathieu-Daudé wrote: On 27/6/23 08:46, Mark Cave-Ayland wrote: On 22/06/2023 13:26, Mark Cave-Ayland wrote: On 21/06/2023 19:05, Richard Henderson wrote: Changes from v1:    * Split into teeny weeny pieces.    * It turns out the sparc_tr_tb_stop hunk of v1 was

Re: [PATCH v2 1/2] qmp: remove virtio_list, search QOM tree instead

2023-06-27 Thread Jonah Palmer
On 6/26/23 08:16, Michael S. Tsirkin wrote: On Mon, Jun 26, 2023 at 08:08:28AM -0400, Jonah Palmer wrote: On 6/23/23 01:47, Michael S. Tsirkin wrote: On Fri, Jun 09, 2023 at 09:20:39AM -0400, Jonah Palmer wrote: The virtio_list duplicates information about virtio devices that

Re: [PATCH 0/4] target/ppc: Catch invalid real address accesses

2023-06-27 Thread Mark Cave-Ayland
On 27/06/2023 11:28, Howard Spoelstra wrote: On Tue, Jun 27, 2023 at 10:15 AM Mark Cave-Ayland > wrote: On 26/06/2023 14:35, Cédric Le Goater wrote: > On 6/23/23 14:37, Cédric Le Goater wrote: >> On 6/23/23 11:10, Peter Maydell wrote: >>

Re: [PATCH 6/7] target/i386: Add new CPU model EmeraldRapids

2023-06-27 Thread Xiaoyao Li
On 6/27/2023 4:49 PM, Igor Mammedov wrote: On Tue, 27 Jun 2023 13:54:23 +0800 Xiaoyao Li wrote: On 6/26/2023 8:56 PM, Igor Mammedov wrote: On Fri, 16 Jun 2023 11:23:10 +0800 Tao Su wrote: From: Qian Wen Emerald Rapids (EMR) is the next generation of Xeon server processor after Sapphire

Re: [PULL 28/53] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-06-27 Thread Peter Maydell
On Mon, 26 Jun 2023 at 13:29, Michael S. Tsirkin wrote: > > From: Eugenio Pérez > > Evaluating it at start time instead of initialization time may make the > guest capable of dynamically adding or removing migration blockers. > > Also, moving to initialization reduces the number of ioctls in the

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2023-06-27 Thread Olaf Hering
Mon, 26 Jun 2023 23:19:01 +0200 Olaf Hering : > So far I was unable to decipher how the pci_set_word calls can > possibly affect the outcome and the owner of memory_region_ops_read. It is enough to return from piix_ide_reset right after pci_set_word(pci_conf + PCI_COMMAND, 0) to trigger the issue

Re: [PATCH 6/7] target/i386: Add new CPU model EmeraldRapids

2023-06-27 Thread Daniel P . Berrangé
On Tue, Jun 27, 2023 at 07:25:21PM +0800, Xiaoyao Li wrote: > On 6/27/2023 4:49 PM, Igor Mammedov wrote: > > On Tue, 27 Jun 2023 13:54:23 +0800 > > Xiaoyao Li wrote: > > > > > On 6/26/2023 8:56 PM, Igor Mammedov wrote: > > > > On Fri, 16 Jun 2023 11:23:10 +0800 > > > > Tao Su wrote: > > > > > Fr

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2023-06-27 Thread Olaf Hering
Tue, 27 Jun 2023 10:12:50 + Bernhard Beschow : > Bits 4..15 represent the BAR address, and pci_set_byte() only clears bits > 4..7, leaving bits 8..15 unchanged. Perhaps this causes the BAR to be moved > into the UHCI region? Does changing the call to pci_set_long() fix the > problem? Thank

[PATCH] pc-bios/s390-ccw: Get rid of the the __u* types

2023-06-27 Thread Thomas Huth
Using types starting with double underscores should be avoided since these names are marked as reserved by the C standard. The corresponding Linux kernel header file has also been changed accordingly a long time ago: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers

[PATCH v3 1/6] target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h'

2023-06-27 Thread Philippe Mathieu-Daudé
"kvm_ppc.h" declares: int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run); 'struct kvm_run' is declared in "sysemu/kvm.h", include it. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/kvm_ppc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm

[PATCH v3 2/6] target/ppc: Reorder #ifdef'ry in kvm_ppc.h

2023-06-27 Thread Philippe Mathieu-Daudé
Keep a single if/else/endif block checking CONFIG_KVM. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/kvm_ppc.h | 62 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 2e395416f0..4

[PATCH v3 0/6] target/ppc: Few cleanups in kvm_ppc.h

2023-06-27 Thread Philippe Mathieu-Daudé
PPC specific changes of a bigger KVM cleanup, remove "kvm_ppc.h" from user emulation. Mostly trivial IMO. Philippe Mathieu-Daudé (6): target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h' target/ppc: Reorder #ifdef'ry in kvm_ppc.h target/ppc: Move CPU QOM definitions to cpu-qom.h target/ppc:

[PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h

2023-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu-qom.h | 5 + target/ppc/cpu.h | 6 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 9666f54f65..c2bff349cc 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu

[PATCH v3 4/6] target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h

2023-06-27 Thread Philippe Mathieu-Daudé
TYPE_HOST_POWERPC_CPU is used in various places of cpu_init.c, in order to restrict "kvm_ppc.h" to sysemu, move this QOM-related definition to cpu-qom.h. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu-qom.h | 2 ++ target/ppc/kvm_ppc.h | 2 -- 2 files changed, 2 insertions(+), 2 deleti

[PATCH v3 6/6] target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h'

2023-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/kvm_ppc.h | 5 - 1 file changed, 5 deletions(-) diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h index 901e188c9a..6a4dd9c560 100644 --- a/target/ppc/kvm_ppc.h +++ b/target/ppc/kvm_ppc.h @@ -42,7 +42,6 @@ int kvmppc_booke_watchdog_

[PATCH v3 5/6] target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c

2023-06-27 Thread Philippe Mathieu-Daudé
User emulation shouldn't need any of the KVM prototypes declared in "kvm_ppc.h". Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index aeff71d063..f2afb539eb 100644 -

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S

2023-06-27 Thread Thomas Huth
On 27/06/2023 11.14, Philippe Mathieu-Daudé wrote: On 27/6/23 10:26, Marc Hartmayer wrote: Thomas Huth writes: Providing the space of a stack frame is the duty of the caller, so we should reserve 160 bytes before jumping into the main function. Otherwise the main() function might write past t

Re: [RESEND PATCH v5 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-27 Thread Michael S. Tsirkin
On Tue, Jun 27, 2023 at 03:23:04PM +0530, Ani Sinha wrote: > > > > On 27-Jun-2023, at 2:32 PM, Igor Mammedov wrote: > > > > On Mon, 26 Jun 2023 21:42:44 +0530 > > Ani Sinha wrote: > > > >> PCI Express ports only have one slot, so PCI Express devices can only be > >> plugged into slot 0 on a P

Re: [PATCH 7/7] target/i386: Add new CPU model GraniteRapids

2023-06-27 Thread Igor Mammedov
On Fri, 16 Jun 2023 11:23:11 +0800 Tao Su wrote: > The GraniteRapids CPU model mainly adds the following new features based > on SapphireRapids: > > - PREFETCHITI CPUID.(EAX=7,ECX=1):EDX[bit 14] > - AMX-FP16 CPUID.(EAX=7,ECX=1):EAX[bit 21] > - MCDT_NO CPUID.(EAX=7,ECX=2):EDX[bit 5] > - SBDR_SSDP

Re: [RESEND PATCH v5 5/5] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port

2023-06-27 Thread Ani Sinha
> On 27-Jun-2023, at 3:23 PM, Ani Sinha wrote: > > > >> On 27-Jun-2023, at 2:32 PM, Igor Mammedov wrote: >> >> On Mon, 26 Jun 2023 21:42:44 +0530 >> Ani Sinha wrote: >> >>> PCI Express ports only have one slot, so PCI Express devices can only be >>> plugged into slot 0 on a PCIE port. En

Re: [PATCH v2 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr

2023-06-27 Thread Richard Henderson
On 6/27/23 13:19, Mark Cave-Ayland wrote: On 27/06/2023 10:37, Philippe Mathieu-Daudé wrote: On 27/6/23 08:46, Mark Cave-Ayland wrote: On 22/06/2023 13:26, Mark Cave-Ayland wrote: On 21/06/2023 19:05, Richard Henderson wrote: Changes from v1:    * Split into teeny weeny pieces.    * It tu

  1   2   3   4   >