[PATCH trivial] linux-user/syscall.c: replace function pointer with a helper macro for fcntl/flock case

2024-09-07 Thread Michael Tokarev
There's a slight difference in fcntl locking handling on arm and others: arm has 2 variants of struct flock argument handling, with and without eabi. For this reason, we currently take address of the conversion function into a variable, and for arm without eabi case, assign a different conversion f

Re: [PATCH] ppc: fix incorrect spelling of PowerMac

2024-09-07 Thread Michael Tokarev
05.08.2024 10:01, Tejas Vipin wrote: PowerMac is spelled as PowerMAC (Media Access Control) in some places. This is misleading. Applied to my trivial-patches tree, thanks! /mjt

Re: [PATCH] tests/qtest/fuzz/virtio_net_fuzz.c: fix virtio_net_fuzz_multi

2024-09-07 Thread Michael Tokarev
23.05.2024 13:28, Dmitry Frolov wrote: If QTestState was already CLOSED due to error, calling qtest_clock_step() afterwards makes no sense and only raises false-crash with message: "assertion timer != NULL failed". So, can we have any Reviewed-by tags here? :) Thanks, /mjt

Re: [PATCH] fix SSE2/SSSE3 feature detection in tcg/decode-new.c.inc

2024-09-07 Thread Michael Tokarev
17.06.2024 15:51, Michael Tokarev wrote: Adding Cc's. A friendly ping? This patch does not apply directly currently, but the change is still relevant (I can fix context at apply time). Before it can be applied to trivial-patches tree I'd love to have some Reviewed-by tag(s). Or drop it :) T

[PATCH] hw/loongarch: Add acpi SPCR table support

2024-09-07 Thread Bibo Mao
Serial port console redirection table can be used for default serial port selection, like chosen stdout-path selection with FDT method. With acpi SPCR table added, early debug console can be parsed from SPCR table with simple kernel parameter earlycon rather than earlycon=uart,mmio,0x1fe001e0 Sig

Re: [EXTERNAL] [PATCH] hw/mips/jazz: fix typo in in-built NIC alias

2024-09-07 Thread David Woodhouse
On Sat, 2024-09-07 at 06:08 +0200, Philippe Mathieu-Daudé wrote: > On 7/9/24 01:01, Mark Cave-Ayland wrote: > > Commit e104edbb9d ("hw/mips/jazz: use qemu_find_nic_info()") contained a > > typo > > in the NIC alias which caused initialisation of the in-built dp83932 NIC to > > fail > > when using

Re: [PATCH v5 00/16] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop

2024-09-07 Thread Peter Maydell
On Sat, 7 Sept 2024 at 06:42, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 19/7/24 20:10, Philippe Mathieu-Daudé wrote: > > > Philippe Mathieu-Daudé (16): > > >hw/char/pl011: Remove unused 'readbuff' field > >hw/char/pl011: Move pl011_put_fifo() earlier > >hw/char/pl011: Move pl0

Re: Build failure due to xen

2024-09-07 Thread Peter Maydell
On Sat, 7 Sept 2024 at 07:39, Michael Tokarev wrote: > > 07.09.2024 02:59, Kenneth Adam Miller wrote: > > Hello, > > > > I'm on commit bd80b59 and my host is: > > $ git desc bd80b59 > v2.4.0-rc3-9-gbd80b5963f > > Date: Mon Aug 3 11:44:07 2015 +0100 Wow, that is very old. So the answer, in order

Re: [PULL 0/5] ufs queue

2024-09-07 Thread Peter Maydell
On Fri, 6 Sept 2024 at 11:58, Jeuk Kim wrote: > > From: Jeuk Kim > > The following changes since commit 7b87a25f49a301d3377f3e71e0b4a62540c6f6e4: > > Merge tag 'edgar/xen-queue-2024-09-04.for-upstream' of > https://gitlab.com/edgar.iglesias/qemu into staging (2024-09-05 13:02:26 > +0100) > >

Re: [PATCH] hw/mips/jazz: fix typo in in-built NIC alias

2024-09-07 Thread Michael Tokarev
07.09.2024 02:01, Mark Cave-Ayland wrote: Commit e104edbb9d ("hw/mips/jazz: use qemu_find_nic_info()") contained a typo in the NIC alias which caused initialisation of the in-built dp83932 NIC to fail when using the normal -nic user,model=dp83932 command line. Signed-off-by: Mark Cave-Ayland

Re: [PATCH] fix SSE2/SSSE3 feature detection in tcg/decode-new.c.inc

2024-09-07 Thread Frank Mehnert
Hi Michael, the patch is no longer required. The fix was applied with da7c95920d027dbb00c6879c1da0216b19509191 I don't know if this was done independent of my proposal or not, but anyway, I'm satisfied :-) Thanks! Frank [1] https://github.com/qemu/qemu/commit/da7c95920d027dbb00c6879c1da0216

Re: [PATCH] adb-mouse: convert to use QemuInputHandler

2024-09-07 Thread Mark Cave-Ayland
On 07/09/2024 06:40, Philippe Mathieu-Daudé wrote: Hi Mark, On 4/9/24 12:40, Mark Cave-Ayland wrote: Update the ADB mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Signed-off-by: Mark Cave-Ayland ---   hw/input/adb-mouse.c | 56

Re: [PATCH trivial] linux-user/syscall.c: replace function pointer with a helper macro for fcntl/flock case

2024-09-07 Thread Peter Maydell
On Sat, 7 Sept 2024 at 08:00, Michael Tokarev wrote: > > There's a slight difference in fcntl locking handling on arm and others: > arm has 2 variants of struct flock argument handling, with and without eabi. > For this reason, we currently take address of the conversion function into > a variable

[PATCH v3] hw/loongarch: virt: support up to 4 serial ports

2024-09-07 Thread Jason A. Donenfeld
In order to support additional channels of communication using `-serial`, add several serial ports, up to the standard 4 generally supported by the 8250 driver. Signed-off-by: Jason A. Donenfeld --- hw/loongarch/acpi-build.c | 23 +++ hw/loongarch/virt.c| 23

Re: [PATCH v2] hw/loongarch: virt: support up to 4 serial ports

2024-09-07 Thread Jason A. Donenfeld
On Sat, Sep 07, 2024 at 11:37:09AM +0800, maobibo wrote: > Hi Jason, > > It works well with ELF kernel, however it fails to boot with UEFI BIOS. > Maybe it is problem of UEFI BIOS, can we create UART in reverse order? > so that it can work well on both ELF kernel and UEFI BIOS. > > Also for dev

Re: [PATCH v2] hw/loongarch: virt: support up to 4 serial ports

2024-09-07 Thread Jason A. Donenfeld
On Sat, Sep 07, 2024 at 04:44:45PM +0200, Jason A. Donenfeld wrote: > On Sat, Sep 07, 2024 at 11:37:09AM +0800, maobibo wrote: > > Hi Jason, > > > > It works well with ELF kernel, however it fails to boot with UEFI BIOS. > > Maybe it is problem of UEFI BIOS, can we create UART in reverse order?

[PATCH v2] adb-mouse: convert to use QemuInputHandler

2024-09-07 Thread Mark Cave-Ayland
Update the ADB mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Signed-off-by: Mark Cave-Ayland --- hw/input/adb-mouse.c | 56 1 file changed, 46 insertions(+), 10 deletions(-) v2: - Rebase o

Re: [PATCH v2] hw/acpi/ich9: Add periodic and swsmi timer

2024-09-07 Thread Dominic Prinz
Second ping https://patchew.org/QEMU/1e4d59a49e7f2e02cf522e799a7bf5f3fa3fba1f.1722414006.git@dprinz.de/ https://lore.kernel.org/qemu-devel/1e4d59a49e7f2e02cf522e799a7bf5f3fa3fba1f.1722414006.git@dprinz.de/ On Wed Aug 21, 2024 at 3:00 PM CEST, Dominic Prinz wrote: > Ping > > https://patch

Re: [RFC PATCH 00/16] Implements RISC-V WorldGuard extension v0.4

2024-09-07 Thread Pavel Skripkin
Dear, Jim Shu Thank you for your work! Do you plan to work futher on this series? Seems like current version is no longer applicable to current master. Also, I really wonder how did you test these changes? Like is there a way I could build some binary and run it in trusted mode? Should there b

Re: [PATCH] hw/char/stm32l4x5_usart.c: Fix ACK and min access size

2024-09-07 Thread Jacob Abrams
On 9/6/24 09:12, Peter Maydell wrote: > On Mon, 2 Sept 2024 at 14:38, Jacob Abrams wrote: >> >> These changes allow the official STM32L4xx HAL UART driver to function >> properly with the b-l475e-iot01a machine. >> >> Modifying USART_CR1 TE bit should alter USART_ISR TEACK bit, and >> likewise for

Re: Build failure due to xen

2024-09-07 Thread Kenneth Adam Miller
I got this to build following option 2 listed and it built with ubuntu 18.04. On Sat, Sep 7, 2024 at 4:45 AM Peter Maydell wrote: > On Sat, 7 Sept 2024 at 07:39, Michael Tokarev wrote: > > > > 07.09.2024 02:59, Kenneth Adam Miller wrote: > > > Hello, > > > > > > I'm on commit bd80b59 and my hos

How to run qemu

2024-09-07 Thread Kenneth Adam Miller
Hello, I've got qemu built and now I need to figure out how to run it with what I've got. I have a vmlinux and a bzImage that I want to serve as the kernel that QEMU runs with, and a single binary, let's just call it literally `program`, that I want to issue a command to run once QEMU boots with t

Re: How to run qemu

2024-09-07 Thread Kenneth Adam Miller
I found this: https://qemu-project.gitlab.io/qemu/system/linuxboot.html and this: https://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/ So I now have serial output. But I still need to know how to put a binary in the image so I can run i

[PATCH v2] hw/char/stm32l4x5_usart.c: Fix ACK and min access size

2024-09-07 Thread Jacob Abrams
These changes allow the official STM32L4xx HAL UART driver to function properly with the b-l475e-iot01a machine. Modifying USART_CR1 TE bit should alter USART_ISR TEACK bit, and likewise for RE and REACK bit. USART registers may be accessed via 16-bit instructions. Reseting USART_CR1 UE bit shou

Re: [PATCH v2 3/3] hw/char: Extract serial-mm

2024-09-07 Thread Bernhard Beschow
Am 5. September 2024 12:26:35 UTC schrieb BALATON Zoltan : >On Thu, 5 Sep 2024, Bernhard Beschow wrote: >> hw/char/serial currently contains the implementation of both TYPE_SERIAL and >> TYPE_SERIAL_MM. According to serial_class_init(), TYPE_SERIAL is an internal >> class while TYPE_SERIAL_MM is

[PATCH 03/12] tcg/i386: Split out tcg_out_vex_modrm_type

2024-09-07 Thread Richard Henderson
Helper function to handle setting of VEXL based on the type of the operation. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-targe

[PATCH 09/12] tcg/i386: Optimize cmpsel with constant 0 arguments

2024-09-07 Thread Richard Henderson
These can be simplified to and/andc, avoiding the load of the zero into a register. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target-con-set.h | 2 +- tcg/i386/tcg-target-con-str.h | 1 + tcg/i386/tcg-target.c.inc | 26 +++--- 3 files changed, 25 insertions(+),

[PATCH 12/12] tcg/i386: Implement cmpsel_vec with avx512 insns

2024-09-07 Thread Richard Henderson
The avx512 vpblendm* instructions exactly implement cmpsel, using a predicate input. Of course this matches nicely with the avx512 predicate comparison instructions. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 46 +++ 1 file changed, 46 i

[PATCH 11/12] tcg/i386: Add predicate parameters to tcg_out_evex_opc

2024-09-07 Thread Richard Henderson
Extend tcg_out_evex_opc to handle the predicate and zero-merging parameters of the evex prefix. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 839

[PATCH 00/12] tcg: Improve support for cmpsel_vec

2024-09-07 Thread Richard Henderson
The patches to optimize cmp_vec and cmpsel_vec -- particularly canonicalizing immediate operands -- are directed toward helping the in flight tcg/riscv vector backend. In order for that to happen, the tcg/i386 backend must be changed so that it does not rely upon choices that it made during early

[PATCH 05/12] tcg/i386: Do not expand cmpsel_vec early

2024-09-07 Thread Richard Henderson
Expand during output instead of during opcode generation. Remove x86_vpblendvb_vec opcode, this this removes the only user. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target-con-set.h | 1 + tcg/i386/tcg-target.h | 2 +- tcg/i386/tcg-target.opc.h | 1 - tcg/i386/tcg-target.

[PATCH 01/12] tcg: Fix iteration step in 32-bit gvec operation

2024-09-07 Thread Richard Henderson
From: TANG Tiancheng The loop in the 32-bit case of the vector compare operation was incorrectly incrementing by 8 bytes per iteration instead of 4 bytes. This caused the function to process only half of the intended elements. Cc: qemu-sta...@nongnu.org Fixes: 9622c697d1 (tcg: Add gvec compare w

[PATCH 04/12] tcg/i386: Do not expand cmp_vec early

2024-09-07 Thread Richard Henderson
Move most of expansion to opcode generation, leaving the conversion of unsigned to signed to be done in the early phase. Small inefficiencies, but not incorrect results, are introduced until cmpsel_vec is converted in the next patch. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc

[PATCH 10/12] tcg/i386: Implement cmp_vec with avx512 insns

2024-09-07 Thread Richard Henderson
The sse/avx instruction set only has EQ and GT as direct comparisons. Other signed comparisons can be generated from swapping and inversion. However unsigned comparisons are not available and must be transformed to signed comparisons by biasing the inputs. The avx512 instruction set has a complete

[PATCH 02/12] tcg: Export vec_gen_6

2024-09-07 Thread Richard Henderson
Add declaration to tcg-internal.h, making it available for use from tcg backend vector expanders. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 2 ++ tcg/tcg-op-vec.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h in

[PATCH 08/12] tcg/optimize: Optimize bitsel_vec

2024-09-07 Thread Richard Henderson
Fold matching true/false operands. Fold true/false operands with 0/-1 to simpler logicals. Signed-off-by: Richard Henderson --- tcg/optimize.c | 58 ++ 1 file changed, 58 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index f11f576fd4.

[PATCH 07/12] tcg/optimize: Optimize cmp_vec and cmpsel_vec

2024-09-07 Thread Richard Henderson
Place immediate values second in the comparison. Place destination matches first in the true/false values. All of this mirrors what we do for integer setcond and movcond. Signed-off-by: Richard Henderson --- tcg/optimize.c | 36 1 file changed, 36 insertions(

[PATCH 06/12] tcg/optimize: Fold movcond with true and false values identical

2024-09-07 Thread Richard Henderson
Fold "x = cond ? y : y" to "x = y". Signed-off-by: Richard Henderson --- tcg/optimize.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index ba16ec27e2..cf311790e0 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1851,6 +1851,11 @@ static bool fold_m

[PATCH v2] hw/openrisc/openrisc_sim: keep serial@90000000 as default

2024-09-07 Thread Stafford Horne
From: Ahmad Fatoum We used to only have a single UART on the platform and it was located at address 0x9000. When the number of UARTs was increased to 4, the first UART remained at it's location, but instead of being the first one to be registered, it became the last. This caused QEMU to pick

Re: How to run qemu

2024-09-07 Thread Donald R Laster Jr
Ken, Lookup starting the gvncviewer tool after you start the virtual machine. To get the display for the VMs I run gvncviewer and sometimes spicec. Don Kenneth Adam Miller wrote on 9/7/24 4:58 PM: Hello, I've got qemu built and now I need to figure out how to run it with what I've got.