[PULL 0/1] qemu-openbios queue 20240924

2024-09-24 Thread Mark Cave-Ayland
e - Update OpenBIOS images to c3a19c1e built from submodule ---- Mark Cave-Ayland (1): roms/openbios: update OpenBIOS images to c3a19c1e built from submodule pc-bios/openbios-ppc | Bin 677196 -> 677200 bytes pc-bios/openbios-

Re: [PATCH 0/3] Fix WinXP ISO boot using the dc390/am53C974 SCSI device

2024-09-22 Thread Mark Cave-Ayland
On 22/09/2024 15:31, Ricardo Ribalda wrote: Mark Cave-Ayland reported that after landing the pre-computed _PRT, the above mentioned testcase failed to pass. It seems that it is due to WinXP not handling properly a variable package. Let's replace it. Unfortunately, the ASL diff is no

Re: [PATCH v5 0/3] hw/i386/acpi: Pre-compute the _PRT table

2024-09-22 Thread Mark Cave-Ayland
On 22/09/2024 14:11, Ricardo Ribalda wrote: Hi Mark On Sun, 22 Sept 2024 at 13:57, Mark Cave-Ayland wrote: On 21/08/2024 15:45, Igor Mammedov wrote: On Wed, 14 Aug 2024 11:56:08 + Ricardo Ribalda wrote: Today for x86 the _PRT() table is computed in runtime. Under some

Re: [PATCH 6/7] tests/functional: Convert the mac ppc Avocado tests

2024-09-22 Thread Mark Cave-Ayland
/MAINTAINERS +++ b/MAINTAINERS @@ -1474,6 +1474,7 @@ F: include/hw/ppc/mac_dbdma.h F: include/hw/pci-host/uninorth.h F: include/hw/input/adb* F: pc-bios/qemu_vga.ndrv +F: tests/functional/test_ppc_mac.py Old World (g3beige) M: Mark Cave-Ayland @@ -1489,6 +1490,7 @@ F: include/hw/intc

Re: [PATCH 4/7] tests/functional: Convert the SPARCStation Avocado test

2024-09-22 Thread Mark Cave-Ayland
@@ -1693,6 +1693,7 @@ F: include/hw/nvram/sun_nvram.h F: include/hw/sparc/sparc32_dma.h F: include/hw/sparc/sun4m_iommu.h F: pc-bios/openbios-sparc32 +F: tests/functional/test_sparc_sun4m.py Sun4u M: Mark Cave-Ayland diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado

Re: [PATCH v5 0/3] hw/i386/acpi: Pre-compute the _PRT table

2024-09-22 Thread Mark Cave-Ayland
On 21/08/2024 15:45, Igor Mammedov wrote: On Wed, 14 Aug 2024 11:56:08 + Ricardo Ribalda wrote: Today for x86 the _PRT() table is computed in runtime. Under some configurations, computing the _PRT table can take more than 30 seconds and the ACPI timeout is violated. This patchset modifie

[PULL 0/1] qemu-macppc queue 20240918

2024-09-18 Thread Mark Cave-Ayland
The following changes since commit 2b81c046252fbfb375ad30632362fc16e6e22bd5: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2024-09-17 14:02:18 +0100) are available in the Git repository at: https://github.com/mcayland/qemu.git tags/qemu-macppc-20240918 fo

[PULL 1/1] mac_dbdma: Remove leftover `dma_memory_unmap` calls

2024-09-18 Thread Mark Cave-Ayland
Message-Id: <20240916175708.1829059-1-mniss...@rivosinc.com> Fixes: be1e343995 ("macio: switch over to new byte-aligned DMA helpers") Reviewed-by: Mark Cave-Ayland Tested-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 6 -- include/hw/ppc/mac

Re: [PATCH] mac_dbdma: Remove leftover `dma_memory_unmap` calls

2024-09-18 Thread Mark Cave-Ayland
On 17/09/2024 17:31, Peter Xu wrote: On Tue, Sep 17, 2024 at 08:25:06AM +0200, Mattias Nissler wrote: Mark, thanks for testing and confirming that this doesn't cause any obvious breakage. For my curiosity, which path should this patch take to get into master? Peter, are you going to respin you

Re: [PATCH] mac_dbdma: Remove leftover `dma_memory_unmap` calls

2024-09-16 Thread Mark Cave-Ayland
;ve given it a quick spin around various PPC Mac images and it looks good to me, so: Reviewed-by: Mark Cave-Ayland Tested-by: Mark Cave-Ayland My guess is that the current use of dma_memory_unmap() was a misunderstanding/bug when porting the macio IDE device over to use the byte-aligned block DM

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mark Cave-Ayland
On 16/09/2024 12:44, Peter Maydell wrote: On Mon, 16 Sept 2024 at 12:29, Mark Cave-Ayland wrote: On 16/09/2024 09:23, Mattias Nissler wrote: Looking at the code, the dma_memory_unmap calls in hw/ide/macio.c seem to be passing buffer=NULL unconditionally, since the dma_mem field in struct

Re: [PULL 1/9] softmmu: Support concurrent bounce buffers

2024-09-16 Thread Mark Cave-Ayland
On 16/09/2024 09:23, Mattias Nissler wrote: Thanks for the report, and my apologies for the breakage. On Fri, Sep 13, 2024 at 4:47 PM Peter Xu wrote: On Fri, Sep 13, 2024 at 04:35:32PM +0200, Cédric Le Goater wrote: Hello, +Mark (for the Mac devices) On 9/9/24 22:11, Peter Xu wrote: From

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

2024-09-10 Thread Mark Cave-Ayland
On 10/09/2024 15:48, Philippe Mathieu-Daudé wrote: Hi Mark, On 7/9/24 19:37, 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 v4 2/2] hw/char: sifive_uart: Print uart characters async

2024-09-10 Thread Mark Cave-Ayland
On 10/09/2024 05:54, Alistair Francis wrote: The current approach of using qemu_chr_fe_write() and ignoring the return values results in dropped characters [1]. Let's update the SiFive UART to use a async sifive_uart_xmit() function to transmit the characters and apply back pressure to the gues

Re: [PATCH v4 0/5] target/sparc: emulate floating point queue when raising fp traps

2024-09-10 Thread Mark Cave-Ayland
e (so unsure that I have any suitable test cases lying around), but it looks reasonable so: Acked-by: Mark Cave-Ayland ATB, Mark.

[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

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

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

2024-09-06 Thread Mark Cave-Ayland
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 --- hw/mips/jazz.c | 2 +- 1 file

Re: [PATCH v2 0/3] tests/unit: Slightly expand FIFO8 tests

2024-09-06 Thread Mark Cave-Ayland
On 06/09/2024 14:29, Philippe Mathieu-Daudé wrote: Since v1: - Correctly place patch hunks in corresponding patch Mostly add documentation while reviewing them. Based-on: <20240828122258.928947-1-mark.cave-ayl...@ilande.co.uk> Philippe Mathieu-Daudé (3): tests/unit: Strengthen FIFO8 tests

Re: [PATCH v2 3/3] tests/unit: Comment FIFO8 tests

2024-09-06 Thread Mark Cave-Ayland
fifo8_push(&fifo, 0x2); + /* + * head --v ]-- tail used = 2 + * FIFO: { 1 2 . . . . . . } + */ c = fifo8_pop(&fifo); +/* + *head --v]-- tail used = 1 + * FIFO: { 1 2 . . . . . . } + */ g_assert(c == 0x1); c = fifo8_pop(&fifo); +/* + * tail --]v-- head used = 0 + * FIFO: { 1 2 . . . . . . } + */ g_assert(c == 0x2); g_assert(fifo8_num_used(&fifo) == 0); Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH v2 2/3] tests/unit: Expand test_fifo8_peek_buf_wrap() coverage

2024-09-06 Thread Mark Cave-Ayland
== 0xa && + data_out[6] == 0xb && data_out[7] == 0xc); + g_assert(fifo8_num_used(&fifo) == 8); fifo8_destroy(&fifo); } Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH v2 1/3] tests/unit: Strengthen FIFO8 tests

2024-09-06 Thread Mark Cave-Ayland
] = { 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4 }; +uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc }; uint8_t data_out[4]; int count; That's a fair point: otherwise it could be easier for a bug in the Fifo8 implementation to slip through: Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-06 Thread Mark Cave-Ayland
On 04/09/2024 12:19, Mark Cave-Ayland wrote: On 04/09/2024 11:53, Philippe Mathieu-Daudé wrote: On 4/9/24 12:23, Mark Cave-Ayland wrote: Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Note that this conversion adds

Re: [PATCH 0/9] fifo8: add fifo8_peek(), fifo8_peek_buf() and tests

2024-09-06 Thread Mark Cave-Ayland
On 06/09/2024 14:14, Philippe Mathieu-Daudé wrote: Hi Mark, On 28/8/24 14:22, Mark Cave-Ayland wrote: Mark Cave-Ayland (9):    fifo8: rename fifo8_peekpop_buf() to fifo8_peekpop_bufptr()    fifo8: introduce head variable for fifo8_peekpop_bufptr()    fifo8: add skip parameter to

Re: [PATCH 9/9] tests/unit: add test-fifo unit test

2024-09-06 Thread Mark Cave-Ayland
On 28/08/2024 13:22, Mark Cave-Ayland wrote: This tests the Fifo8 implementation for basic operations as well as testing for the correct *_bufptr() including handling wraparound of the internal FIFO buffer. Hmmm this doesn't quite read correctly either - I think perhaps something like:

Re: [PATCH 7/9] fifo8: add fifo8_peek_buf() function

2024-09-06 Thread Mark Cave-Ayland
On 28/08/2024 13:22, Mark Cave-Ayland wrote: This is a wrapper function around fifo8_peekpop_buf() that allows the caller to peek into FIFO, including handling the case where there is a wraparound of the peek into the FIFO Looks like I missed a "the" out in the commit mes

Re: [PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-04 Thread Mark Cave-Ayland
On 04/09/2024 11:53, Philippe Mathieu-Daudé wrote: On 4/9/24 12:23, Mark Cave-Ayland wrote: Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function. Note that this conversion adds extra sunmouse_* members to ESCCChannelState

[PATCH] adb-mouse: convert to use QemuInputHandler

2024-09-04 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(-) diff --git a

[PATCH v3] escc: convert Sun mouse to use QemuInputHandler

2024-09-04 Thread Mark Cave-Ayland
desired in future, the Sun devices should be split into separate devices and added to the migration stream there instead. Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2518 Reviewed-by: Richard Henderson --- hw/char/escc.c | 88

[PATCH v2] escc: convert Sun mouse to use QemuInputHandler

2024-09-03 Thread Mark Cave-Ayland
desired in future, the Sun devices should be split into separate devices and added to the migration stream there instead. Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2518 --- hw/char/escc.c | 88

Re: [PATCH] escc: convert Sun mouse to use QemuInputHandler

2024-09-03 Thread Mark Cave-Ayland
On 03/09/2024 02:33, Carl Hauser via wrote: Well, I was wrong -- it is sending a duplicate mouse packets when the mouse wheel is rotated. The packets correctly represent the mouse buttons state. I just now discovered that one of my Logitech mice sends continuous mouse events when the wheel is

[PATCH] escc: convert Sun mouse to use QemuInputHandler

2024-09-02 Thread Mark Cave-Ayland
desired in future, the Sun devices should be split into separate devices and added to the migration stream there instead. Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2518 --- hw/char/escc.c | 79

Re: [PATCH 3/3] hw/nubus/nubus-device: Range check 'slot' property

2024-09-01 Thread Mark Cave-Ayland
lt; 0 || nd->slot >= NUBUS_SLOT_NB) { +error_setg(errp, + "'slot' value %d out of range (must be between 0 and %d)", + nd->slot, NUBUS_SLOT_NB - 1); +return; +} + /* Super */ slot_offset = nd->slot * NUBUS_SUPER_SLOT_SIZE; Reviewed-by: Mark Cave-Ayland ATB, Mark.

[PATCH 8/9] fifo8: introduce fifo8_peek() function

2024-08-28 Thread Mark Cave-Ayland
This allows uses to peek the byte at the current head of the FIFO. Signed-off-by: Mark Cave-Ayland --- include/qemu/fifo8.h | 11 +++ util/fifo8.c | 6 ++ 2 files changed, 17 insertions(+) diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h index d09984b146

[PATCH 2/9] fifo8: introduce head variable for fifo8_peekpop_bufptr()

2024-08-28 Thread Mark Cave-Ayland
Rather than operate on fifo->head directly, introduce a new head variable which is set to the value of fifo->head and use it instead. This is to allow future adjustment of the head position within the internal FIFO buffer. Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 7 ---

[PATCH 0/9] fifo8: add fifo8_peek(), fifo8_peek_buf() and tests

2024-08-28 Thread Mark Cave-Ayland
tion, will correctly handle FIFO wraparound. This occurs when the FIFO head drifts due to not popping the entire FIFO content in one go, which often happens when trying to send FIFO data to a chardev. Signed-off-by: Mark Cave-Ayland Mark Cave-Ayland (9): fifo8: rename fifo8_peekpo

[PATCH 4/9] fifo8: replace fifo8_pop_bufptr() with fifo8_peekpop_bufptr() in fifo8_pop_buf()

2024-08-28 Thread Mark Cave-Ayland
The upcoming peek functionality will require passing a non-zero value to fifo8_peekpop_bufptr(). Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/fifo8.c b/util/fifo8.c index 62d6430b05..efe0117b1f 100644 --- a/util

[PATCH 9/9] tests/unit: add test-fifo unit test

2024-08-28 Thread Mark Cave-Ayland
This tests the Fifo8 implementation for basic operations as well as testing for the correct *_bufptr() including handling wraparound of the internal FIFO buffer. Signed-off-by: Mark Cave-Ayland --- tests/unit/meson.build | 1 + tests/unit/test-fifo.c | 256

[PATCH 7/9] fifo8: add fifo8_peek_buf() function

2024-08-28 Thread Mark Cave-Ayland
This is a wrapper function around fifo8_peekpop_buf() that allows the caller to peek into FIFO, including handling the case where there is a wraparound of the internal FIFO buffer. Signed-off-by: Mark Cave-Ayland --- include/qemu/fifo8.h | 14 ++ util/fifo8.c | 5 + 2

[PATCH 6/9] fifo8: honour do_pop argument in fifo8_peekpop_buf()

2024-08-28 Thread Mark Cave-Ayland
Pass the do_pop value from fifo8_peekpop_buf() to fifo8_peekpop_bufptr() to allow peeks to the FIFO buffer, including adjusting the skip parameter to handle the case where the internal FIFO buffer wraps around. Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 4 ++-- 1 file changed, 2

[PATCH 1/9] fifo8: rename fifo8_peekpop_buf() to fifo8_peekpop_bufptr()

2024-08-28 Thread Mark Cave-Ayland
This is to emphasise that the function returns a pointer to the internal FIFO buffer. Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/fifo8.c b/util/fifo8.c index 1ffa19d900..61bce9d9a0 100644 --- a/util/fifo8.c

[PATCH 5/9] fifo8: rename fifo8_pop_buf() to fifo8_peekpop_buf()

2024-08-28 Thread Mark Cave-Ayland
The fifo8_pop_buf() function will soon also be used for peek operations, so rename the function accordingly. Create a new fifo8_pop_buf() wrapper function that can be used by existing callers. Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH 3/9] fifo8: add skip parameter to fifo8_peekpop_bufptr()

2024-08-28 Thread Mark Cave-Ayland
The skip parameter specifies the number of bytes to be skipped from the current FIFO head before the peek or pop operation. Signed-off-by: Mark Cave-Ayland --- util/fifo8.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util/fifo8.c b/util/fifo8.c index

Re: [PATCH] mark with for-crc32 in a consistent manner

2024-08-28 Thread Mark Cave-Ayland
On 27/08/2024 18:51, Michael Tokarev wrote: 27.08.2024 15:09, Mark Cave-Ayland wrote: On 27/08/2024 11:02, Michael Tokarev wrote: in many cases, is only included for crc32 function, and in some of them, there's a comment saying that, but in a different way.  In one place (hw/net/rtl8

Re: [PATCH] mark with for-crc32 in a consistent manner

2024-08-27 Thread Mark Cave-Ayland
On 27/08/2024 11:02, Michael Tokarev wrote: in many cases, is only included for crc32 function, and in some of them, there's a comment saying that, but in a different way. In one place (hw/net/rtl8139.c), there was another #include added between the comment and include. Make all such comment

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

2024-08-21 Thread Mark Cave-Ayland
dex 692bede538..b09c89a017 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -10,14 +10,14 @@ config MALTA select MIPS_CPS select PIIX select PFLASH_CFI01 -select SERIAL +select SERIAL_MM select SMBUS_EEPROM config MIPSSIM bool default y d

Re: [PATCH 4/5] hw/char/serial.h: Extract serial-isa.h

2024-08-21 Thread Mark Cave-Ayland
e "hw/char/serial-isa.h" #include "hw/rtc/mc146818rtc.h" #include diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 4ece1ac1ff..a839abbf5d 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -35,6 +35,7 @@ #include "hw/qdev-properties.h" #include "hw/pci-host/sabre.h" #include "hw/char/serial.h" +#include "hw/char/serial-isa.h" #include "hw/char/parallel-isa.h" #include "hw/rtc/m48t59.h" #include "migration/vmstate.h" This appears to be a straightforward substitution and LGTM: Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH 3/5] hw/ppc/Kconfig: Add missing SERIAL_ISA dependency to POWERNV machine

2024-08-21 Thread Mark Cave-Ayland
c235519881..5addad1124 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -39,6 +39,7 @@ config POWERNV select PCI_POWERNV select PCA9552 select PCA9554 +select SERIAL_ISA select SSI select SSI_M25P80 select PNV_SPI Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH 1/5] hw: Remove unused inclusion of hw/char/serial.h

2024-08-21 Thread Mark Cave-Ayland
c b/hw/riscv/sifive_u.c index af5f923f54..efc8443c84 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -43,7 +43,6 @@ #include "hw/irq.h" #include "hw/loader.h" #include "hw/sysbus.h" -#include "hw/char/serial.h" #include "hw/cpu/cluster.h" #include "hw/misc/unimp.h" #include "hw/sd/sd.h" For the PReP machine: Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-21 Thread Mark Cave-Ayland
On 20/08/2024 08:34, Richard Henderson wrote: On 8/20/24 09:18, Carl Hauser wrote: @@ -959,6 +960,15 @@ static void sunmouse_event(void *opaque,   int ch;   trace_escc_sunmouse_event(dx, dy, buttons_state); + +    /* Don't send duplicate events without motion */ +    if (dx == 0 && +  

Re: [PATCH 2/2] hw/char: sifive_uart: Print uart charecters async

2024-08-15 Thread Mark Cave-Ayland
On 15/08/2024 02:54, Alistair Francis wrote: The current approach of using qemu_chr_fe_write() and ignoring the return values results in dropped charecters [1]. Let's update the SiFive UART to use a async sifive_uart_xmit() function to transmit the charecters and apply back preassure to the gue

Re: [PATCH 2/5] hw/char/serial: Remove unused funtion

2024-08-15 Thread Mark Cave-Ayland
On 14/08/2024 22:38, BALATON Zoltan wrote: On Wed, 14 Aug 2024, Bernhard Beschow wrote: The serial port's frequency is set via the "baudbase" property nowadays. Please keep it as some devices might have registers that set this freq and this function will be needed for emulating that even if

Re: [PATCH v2 6/7] util/fifo8: Expose fifo8_pop_buf()

2024-07-22 Thread Mark Cave-Ayland
On 22/07/2024 22:39, Philippe Mathieu-Daudé wrote: Hi Mark, On 22/7/24 23:26, Mark Cave-Ayland wrote: On 22/07/2024 17:07, Philippe Mathieu-Daudé wrote: Extract fifo8_pop_buf() from hw/scsi/esp.c and expose it as part of the API. This function takes care of non-contiguous (wrapped) FIFO

Re: [PATCH v2 7/7] util/fifo8: Introduce fifo8_discard()

2024-07-22 Thread Mark Cave-Ayland
); Perhaps fifo8_drop() is a more descriptive name here? Regardless: Reviewed-by: Mark Cave-Ayland ATB, Mark. /** * fifo8_reset: * @fifo: FIFO to reset diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index cec847b54a..c703fa7351 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -351,7 +351,7

Re: [PATCH v2 6/7] util/fifo8: Expose fifo8_pop_buf()

2024-07-22 Thread Mark Cave-Ayland
fifo8_pop_bufptr() indicating that it returns a pointer to the internal buffer without checking for overflow, and that in general fifo8_pop_buf() is recommended instead? Otherwise: Reviewed-by: Mark Cave-Ayland ATB, Mark. Suggested-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v2 5/7] util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_constbuf()

2024-07-22 Thread Mark Cave-Ayland
pop_bufptr() as before, but still: Reviewed-by: Mark Cave-Ayland ATB, Mark. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/fifo8.h| 4 ++-- chardev/msmouse.c | 2 +- hw/char/goldfish_tty.c | 4 ++-- hw/net/allwinner_emac.c | 2 +- hw/scsi/esp.c | 4 ++--

Re: [PATCH v2 4/7] util/fifo8: Rename fifo8_peek_buf() -> fifo8_peek_constbuf()

2024-07-22 Thread Mark Cave-Ayland
ptr() is a better reflection that it is a pointer to the internal buffer that is being returned here? Still: Reviewed-by: Mark Cave-Ayland ATB, Mark. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/fifo8.h | 4 ++-- hw/scsi/esp.c| 2 +- util/fifo8.c | 2 +- 3 files

Re: [PATCH v2 2/7] util/fifo8: Fix style

2024-07-22 Thread Mark Cave-Ayland
. */ - uint32_t fifo8_num_free(Fifo8 *fifo); /** @@ -170,7 +161,6 @@ uint32_t fifo8_num_free(Fifo8 *fifo); * * Returns: Number of used bytes. */ - uint32_t fifo8_num_used(Fifo8 *fifo); extern const VMStateDescription vmstate_fifo8; Reviewed-by: Mark Cave-Ayland ATB

Re: [RFC PATCH v5 16/16] hw/char/pl011: Implement TX FIFO

2024-07-19 Thread Mark Cave-Ayland
On 19/07/2024 19:10, Philippe Mathieu-Daudé wrote: If the UART back-end chardev doesn't drain data as fast as stdout does or blocks, buffer in the TX FIFO to try again later. This avoids having the IO-thread busy waiting on chardev back-ends, reported recently when testing the Trusted Reference

Re: [PATCH 3/3] util/fifo8: Introduce fifo8_change_capacity()

2024-07-19 Thread Mark Cave-Ayland
On 19/07/2024 16:16, Philippe Mathieu-Daudé wrote: FIFOs can be resized at runtime. Introduce the fifo8_change_capacity() method to do that. When capacity is changed, the FIFO must be reset. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/fifo8.h | 10 ++ util/fifo8.c

Re: [PATCH 2/3] util/fifo8: Use fifo8_reset() in fifo8_create()

2024-07-19 Thread Mark Cave-Ayland
rn fifo8_peekpop_buf(fifo, max, numptr, true); } -void fifo8_reset(Fifo8 *fifo) -{ -fifo->num = 0; -fifo->head = 0; -} - bool fifo8_is_empty(Fifo8 *fifo) { return (fifo->num == 0); Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH 1/3] chardev/char-fe: Document returned value on error

2024-07-19 Thread Mark Cave-Ayland
from the back end. * * Returns: the number of bytes read (0 if no associated Chardev) + * or -1 on error. */ int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len); Reviewed-by: Mark Cave-Ayland ATB, Mark.

Re: [PATCH] esp.c: remove transfer size check from DMA DATA IN and DATA OUT transfers

2024-07-15 Thread Mark Cave-Ayland
On 15/07/2024 07:48, Philippe Mathieu-Daudé wrote: On 14/7/24 00:42, Mark Cave-Ayland wrote: The transfer size check was originally added to prevent consecutive DMA TI commands from causing an assert() due to an existing SCSI request being in progress, but since the last set of updates

[PATCH] esp.c: remove transfer size check from DMA DATA IN and DATA OUT transfers

2024-07-13 Thread Mark Cave-Ayland
that issuing a DMA TI command when there is no data left to transfer does not cause an assert() due to an existing SCSI request being in progress. Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2415 --- hw/scsi/esp.c | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH 2/2] hw/isa/vt82c686.c: Embed i8259 irq in device state instead of allocating

2024-07-01 Thread Mark Cave-Ayland
On 01/07/2024 13:58, Peter Maydell wrote: On Sat, 29 Jun 2024 at 21:01, BALATON Zoltan wrote: To avoid a warning about unfreed qemu_irq embed the i8259 irq in the device state instead of allocating it. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 7 --- 1 file changed, 4 ins

Re: [PATCH] hw/display/tcx: Fix out-of-bounds access in tcx_blit_writel

2024-07-01 Thread Mark Cave-Ayland
On 30/06/2024 14:04, Zheyu Ma wrote: This patch addresses a potential out-of-bounds memory access issue in the tcx_blit_writel function. It adds bounds checking to ensure that memory accesses do not exceed the allocated VRAM size. If an out-of-bounds access is detected, an error is logged using

[PATCH v2] hw/ide/macio.c: switch from using qemu_allocate_irq() to qdev input GPIOs

2024-06-28 Thread Mark Cave-Ayland
This prevents the IRQs from being leaked when the macio IDE device is used. Signed-off-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/ide/macio.c| 10 ++ include/hw/misc/macio/macio.h | 7 +-- 2 files changed, 11 insertions(+), 6 deletions(-) v2: - Delete

Re: [PATCH] hw/ide/macio.c: switch from using qemu_allocate_irq() to qdev input GPIOs

2024-06-28 Thread Mark Cave-Ayland
On 28/06/2024 16:28, Peter Maydell wrote: On Fri, 28 Jun 2024 at 11:55, Mark Cave-Ayland wrote: This prevents the IRQs from being leaked when the macio IDE device is used. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c| 10 ++ include/hw/misc/macio/macio.h

[PATCH] hw/ide/macio.c: switch from using qemu_allocate_irq() to qdev input GPIOs

2024-06-28 Thread Mark Cave-Ayland
This prevents the IRQs from being leaked when the macio IDE device is used. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c| 10 ++ include/hw/misc/macio/macio.h | 5 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide

Re: [PATCH v2 04/15] hw/isa/vt82c686: Define a GPIO line between vt82c686 and i8259

2024-06-28 Thread Mark Cave-Ayland
On 27/06/2024 14:37, Akihiko Odaki wrote: This fixes qemu_irq array leak. Signed-off-by: Akihiko Odaki --- hw/isa/vt82c686.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 8582ac0322eb..629d2d568137 100644 --- a/hw/isa/

Re: [PATCH v2 03/15] hw/ide: Remove internal DMA qemu_irq

2024-06-28 Thread Mark Cave-Ayland
On 27/06/2024 14:37, Akihiko Odaki wrote: A function pointer is sufficient for internal usage. Replacing qemu_irq with one fixes the leak of qemu_irq. Signed-off-by: Akihiko Odaki --- include/hw/ppc/mac_dbdma.h | 5 +++-- hw/ide/macio.c | 11 +++ hw/misc/macio/mac_dbdm

Re: [PATCH v2 02/15] hw/ide: Convert macio ide_irq into GPIO line

2024-06-28 Thread Mark Cave-Ayland
On 27/06/2024 14:37, Akihiko Odaki wrote: macio ide_irq is connected to the IDE bus. This fixes the leak of ide_irq. Signed-off-by: Akihiko Odaki --- hw/ide/macio.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index aca90d04

Re: [PATCH 02/14] hw/ide: Free macio-ide IRQs

2024-06-28 Thread Mark Cave-Ayland
On 26/06/2024 13:59, Peter Maydell wrote: On Wed, 26 Jun 2024 at 12:09, Akihiko Odaki wrote: This suppresses LeakSanitizer warnings. Signed-off-by: Akihiko Odaki --- hw/ide/macio.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index aca90d04

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 20:47, Richard Henderson wrote: On 6/23/24 04:57, Mark Cave-Ayland wrote: +G_NORETURN void m68k_cpu_do_unaligned_access(CPUState *cs, vaddr addr, + MMUAccessType access_type, + int mmu_idx

Re: [PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 16:23, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: Now that do_unaligned_access has been implemented for 68k CPUs, pass the required alignment into the TCG memory load/store routines. This allows the TCG memory core to generate an Address Error exception

Re: [PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
On 23/06/2024 16:11, BALATON Zoltan wrote: On Sun, 23 Jun 2024, Mark Cave-Ayland wrote: For m68k CPUs that do not support unaligned accesses, any such access should cause the CPU to raise an Address Error exception. Signed-off-by: Mark Cave-Ayland --- target/m68k/cpu.c   |  1 + target

[PATCH 1/2] target/m68k: implement do_unaligned_access callback for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
For m68k CPUs that do not support unaligned accesses, any such access should cause the CPU to raise an Address Error exception. Signed-off-by: Mark Cave-Ayland --- target/m68k/cpu.c | 1 + target/m68k/cpu.h | 4 target/m68k/op_helper.c | 11 +++ 3 files changed, 16

[PATCH 0/2] target/m68k: implement unaligned accesses for m68k CPUs

2024-06-23 Thread Mark Cave-Ayland
-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2165 Mark Cave-Ayland (2): target/m68k: implement do_unaligned_access callback for m68k CPUs target/m68k: pass alignment into TCG memory load/store routines target/m68k/cpu.c | 1 + target/m68k/cpu.h

[PATCH 2/2] target/m68k: pass alignment into TCG memory load/store routines

2024-06-23 Thread Mark Cave-Ayland
: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2165 --- target/m68k/translate.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 445966fb6a..661a7b4def 100644 --- a/target/m68k

Re: Examining device state via monitor for debugging

2024-06-11 Thread Mark Cave-Ayland
On 11/06/2024 08:57, Daniel P. Berrangé wrote: On Tue, Jun 11, 2024 at 07:49:12AM +0200, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Officialise the QMP command, use the existing hmp_info_human_readable_text() helper. I'm not sure "officialise" is a word :) Taking a step back.

Re: Examining device state via monitor for debugging

2024-06-11 Thread Mark Cave-Ayland
On 11/06/2024 07:58, Manos Pitsidianakis wrote: On Tue, 11 Jun 2024 at 09:11, Mark Cave-Ayland wrote: On 11/06/2024 06:49, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Officialise the QMP command, use the existing hmp_info_human_readable_text() helper. I'm not

Re: Examining device state via monitor for debugging

2024-06-10 Thread Mark Cave-Ayland
On 11/06/2024 06:49, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Officialise the QMP command, use the existing hmp_info_human_readable_text() helper. I'm not sure "officialise" is a word :) Taking a step back... "info via" and its new QMP counterpart x-query-mos6522-devices du

Re: [PATCH 2/4] target/i386: use gen_writeback() within gen_POP()

2024-06-07 Thread Mark Cave-Ayland
On 06/06/2024 10:53, Mark Cave-Ayland wrote: Instead of directly implementing the writeback using gen_op_st_v(), use the existing gen_writeback() function. Suggested-by: Paolo Bonzini Signed-off-by: Mark Cave-Ayland --- target/i386/tcg/emit.c.inc | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] target/sparc: use signed denominator in sdiv helper

2024-06-06 Thread Mark Cave-Ayland
On 06/06/2024 15:43, Clément Chigot wrote: The result has to be done with the signed denominator (b32) instead of the unsigned value passed in argument (b). Fixes: 1326010322d6 ("target/sparc: Remove CC_OP_DIV") Signed-off-by: Clément Chigot --- target/sparc/helper.c | 2 +- 1 file changed,

[PATCH 0/4] target/i386: fixes for OS/2 Warp

2024-06-06 Thread Mark Cave-Ayland
: Mark Cave-Ayland Mark Cave-Ayland (4): target/i386: use local X86DecodedOp in gen_POP() target/i386: use gen_writeback() within gen_POP() target/i386: fix SP when taking a memory fault during POP target/i386: fix size of EBP writeback in gen_enter() target/i386/tcg/emit.c.inc | 8

[PATCH 4/4] target/i386: fix size of EBP writeback in gen_enter()

2024-06-06 Thread Mark Cave-Ayland
done using MO_16 which can leave junk in the top 16-bits of EBP after executing ENTER. Change the writeback of EBP to use the same size indicated by mo_pushpop() to ensure that the full value is written back. Signed-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues

[PATCH 2/4] target/i386: use gen_writeback() within gen_POP()

2024-06-06 Thread Mark Cave-Ayland
Instead of directly implementing the writeback using gen_op_st_v(), use the existing gen_writeback() function. Suggested-by: Paolo Bonzini Signed-off-by: Mark Cave-Ayland --- target/i386/tcg/emit.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg

[PATCH 3/4] target/i386: fix SP when taking a memory fault during POP

2024-06-06 Thread Mark Cave-Ayland
-off-by: Mark Cave-Ayland Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2198 --- target/i386/tcg/emit.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index 2d5dc11548..f905a67380 100644 --- a/target/i386/tcg

[PATCH 1/4] target/i386: use local X86DecodedOp in gen_POP()

2024-06-06 Thread Mark Cave-Ayland
This will make subsequent changes a little easier to read. Signed-off-by: Mark Cave-Ayland --- target/i386/tcg/emit.c.inc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/emit.c.inc b/target/i386/tcg/emit.c.inc index e990141454..a89f8e0ebb 100644 --- a

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-06-03 Thread Mark Cave-Ayland
On 03/06/2024 12:40, Daniel P. Berrangé wrote: On Thu, May 30, 2024 at 01:22:11PM +0100, Mark Cave-Ayland wrote: On 30/05/2024 12:40, BALATON Zoltan wrote: On Thu, 30 May 2024, Gerd Hoffmann wrote: stdvga is the much better option. Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c

Re: [PATCH v2 00/37] target/sparc: Implement VIS4

2024-06-03 Thread Mark Cave-Ayland
On 28/05/2024 22:29, Mark Cave-Ayland wrote: On 26/05/2024 20:42, Richard Henderson wrote: Now tested with RISU, using a Solaris M8 host as reference. This exposed a few bugs in the existing VIS1 support as well, so fix those before anything else.  It also exposed a few bugs in the

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-05-30 Thread Mark Cave-Ayland
On 30/05/2024 12:40, BALATON Zoltan wrote: On Thu, 30 May 2024, Gerd Hoffmann wrote: stdvga is the much better option. Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 1 + hw/display/cirrus_vga_isa.c | 1 + hw/display/Kconfig  | 1 - 3 files changed, 2 insertions(+), 1 del

Re: [PATCH 3/4] usb/ohci-pci: deprecate, don't build by default

2024-05-28 Thread Mark Cave-Ayland
On 28/05/2024 11:35, Thomas Huth wrote: On 28/05/2024 11.54, Gerd Hoffmann wrote: The xhci host adapter is the much better choice. Signed-off-by: Gerd Hoffmann ---   hw/usb/hcd-ohci-pci.c | 1 +   hw/usb/Kconfig    | 1 -   2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb

Re: [PATCH v2 00/37] target/sparc: Implement VIS4

2024-05-28 Thread Mark Cave-Ayland
On 26/05/2024 20:42, Richard Henderson wrote: Now tested with RISU, using a Solaris M8 host as reference. This exposed a few bugs in the existing VIS1 support as well, so fix those before anything else. It also exposed a few bugs in the implementation of VIS3, so fixes squashed there as well.

Re: [PATCH RISU v2 00/13] ELF and Sparc64 support

2024-05-28 Thread Mark Cave-Ayland
On 26/05/2024 20:36, Richard Henderson wrote: Let risu accept elf test files, adjusted from v1. Adjust risugen to invoke the assembler and linker, with a cross-compiler prefix if needed. Add some sparc64 testing which utilizes this. Changes for v2: - Implement VIS2 through VIS4. There's som

Re: [PATCH 00/41] target/sparc: Implement VIS4

2024-05-16 Thread Mark Cave-Ayland
On 15/05/2024 16:30, Richard Henderson wrote: On 4/29/24 23:02, Richard Henderson wrote: On 4/29/24 13:52, Mark Cave-Ayland wrote: No objections here about the remainder of the series, other than that I don't have an easy/obvious way to test the new instructions... I was thinking

[PULL 10/12] target/sparc: Fix FMULD8*X16

2024-05-06 Thread Mark Cave-Ayland
: Mark Cave-Ayland --- target/sparc/helper.h | 2 -- target/sparc/translate.c | 48 +++ target/sparc/vis_helper.c | 46 - 3 files changed, 44 insertions(+), 52 deletions(-) diff --git a/target/sparc/helper.h b/target

[PULL 12/12] target/sparc: Split out do_ms16b

2024-05-06 Thread Mark Cave-Ayland
hieu-Daudé Message-Id: <20240502165528.244004-8-richard.hender...@linaro.org> Signed-off-by: Mark Cave-Ayland --- target/sparc/vis_helper.c | 78 --- 1 file changed, 24 insertions(+), 54 deletions(-) diff --git a/target/sparc/vis_helper.c b/target/sparc/vi

[PULL 11/12] target/sparc: Fix FPMERGE

2024-05-06 Thread Mark Cave-Ayland
From: Richard Henderson This instruction has f32 inputs, which changes the decode of the register numbers. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240502165528.244004-7-richard.hender...@linaro.org> Signed-off-by: Mark Cave-Ayland --- target

[PULL 08/12] target/sparc: Fix FMUL8x16

2024-05-06 Thread Mark Cave-Ayland
244004-4-richard.hender...@linaro.org> Signed-off-by: Mark Cave-Ayland --- target/sparc/helper.h | 2 +- target/sparc/translate.c | 21 - target/sparc/vis_helper.c | 9 + 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/target/sparc/helper.h b/t

  1   2   3   4   5   6   7   8   9   10   >