[PATCH 2/6] linux-user,openrisc: move to syscalltbl file

2024-09-20 Thread Laurent Vivier
from linux v6.11 using updated scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- configs/targets/or1k-linux-user.mak | 2 + linux-user/meson.build | 1 + linux-user/openrisc/meson.build | 5 + linux-user/openrisc/syscall.tbl | 405

[PATCH 6/6] linux-user: update syscall.tbl to Linux v6.11

2024-09-20 Thread Laurent Vivier
Updated running scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- linux-user/arm/syscall.tbl | 1 + linux-user/i386/syscall_32.tbl | 7 --- linux-user/x86_64/syscall_64.tbl | 8 +--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/linux-user/arm

[PATCH 3/6] linux-user,riscv: move to syscalltbl file

2024-09-20 Thread Laurent Vivier
6.11 using updated scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- configs/targets/riscv32-linux-user.mak | 3 + configs/targets/riscv64-linux-user.mak | 3 + linux-user/riscv/cpu_loop.c| 2 +- linux-user/riscv/meson.build | 6 + linux-user/riscv/s

[PATCH 4/6] linux-user,hexagon: move to syscalltbl file

2024-09-20 Thread Laurent Vivier
6.11 using updated scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- configs/targets/hexagon-linux-user.mak | 2 + linux-user/hexagon/meson.build | 6 + linux-user/hexagon/syscall.tbl | 405 + linux-user/hexagon/syscall_nr.h

[PATCH 1/6] linux-user,aarch64: move to syscalltbl file

2024-09-20 Thread Laurent Vivier
from linux v6.11 using updated scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- configs/targets/aarch64-linux-user.mak| 2 + configs/targets/aarch64_be-linux-user.mak | 2 + linux-user/aarch64/meson.build| 6 + linux-user/aarch64/syscall_64.tbl

[PATCH 0/6] linux-user: move all remaining archs to syscalltbl

2024-09-20 Thread Laurent Vivier
linux v6.11 has moved all the remaining archs to syscalltbl, update QEMU accordingly. Remove scripts/gensyscalls.sh that is now useless. Update headers to v6.11 Based-on: <20240918074256.720617-1-laur...@vivier.eu> Laurent Vivier (6): linux-user,aarch64: move to syscalltbl file linu

[PATCH 5/6] linux-user,loongarch: move to syscalltbl file

2024-09-20 Thread Laurent Vivier
inux v6.11 using updated scripts/update-syscalltbl.sh Remove scripts/gensyscalls.sh that is now useless. Signed-off-by: Laurent Vivier --- configs/targets/loongarch64-linux-user.mak | 2 + linux-user/loongarch64/meson.build | 7 + linux-user/loongarch64/syscall.tbl

Re: [PATCH v6 1/1] linux-user: add openat2 support in linux-user

2024-09-20 Thread Laurent Vivier
ned-off-by: Michael Vogt Buglink: https://github.com/osbuild/bootc-image-builder/issues/619 --- linux-user/syscall.c | 108 +- linux-user/syscall_defs.h | 7 +++ 2 files changed, 113 insertions(+), 2 deletions(-) Reviewed-by: Laurent Vivier

Re: [PATCH v5 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Le 19/09/2024 à 21:46, Michael Vogt a écrit : This commit adds support for the `openat2()` syscall in the `linux-user` userspace emulator. It is implemented by extracting a new helper `maybe_do_fake_open()` out of the exiting `do_guest_openat()` and share that with the new `do_guest_openat2()`.

Re: [PATCH v5 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Hi, your PATCH 1/1 doesn't appear to be a reply of PATCH 0/1 (mail header tag "In-Reply-To:"/"Reference") so it is not correctly collected by patchew.org. Do you have the 'thread' parameter for git-send-email? See my comments below: Le 19/09/2024 à 21:46, Michael Vogt a écrit : This commit

Re: [PATCH v4 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Le 06/09/2024 à 09:39, Michael Vogt a écrit : This commit adds support for the `openat2()` syscall in the `linux-user` userspace emulator. It is implemented by extracting a new helper `maybe_do_fake_open()` out of the exiting `do_guest_openat()` and share that with the new `do_guest_openat2()`.

Re: [PATCH 1/3] linux-user: update syscall_nr.h to Linux v6.10

2024-09-19 Thread Laurent Vivier
Le 18/09/2024 à 17:41, Brian Cain a écrit : On 9/18/2024 2:42 AM, Laurent Vivier wrote: Automatically generated using scripts/gensyscalls.sh Signed-off-by: Laurent Vivier ---   linux-user/aarch64/syscall_nr.h | 19 ++-   linux-user/hexagon/syscall_nr.h | 20

[PATCH 1/3] linux-user: update syscall_nr.h to Linux v6.10

2024-09-18 Thread Laurent Vivier
Automatically generated using scripts/gensyscalls.sh Signed-off-by: Laurent Vivier --- linux-user/aarch64/syscall_nr.h | 19 ++- linux-user/hexagon/syscall_nr.h | 20 ++-- linux-user/loongarch64/syscall_nr.h | 14 +- linux-user/openrisc

[PATCH 2/3] linux-user, mips: update syscall-args-o32.c.inc to Linux v6.10

2024-09-18 Thread Laurent Vivier
Updated running scripts/update-mips-syscall-args.sh Signed-off-by: Laurent Vivier --- linux-user/mips/syscall-args-o32.c.inc | 20 1 file changed, 20 insertions(+) diff --git a/linux-user/mips/syscall-args-o32.c.inc b/linux-user/mips/syscall-args-o32.c.inc index

[PATCH 3/3] linux-user: update syscall.tbl to Linux v6.10

2024-09-18 Thread Laurent Vivier
Updated running scripts/update-syscalltbl.sh Signed-off-by: Laurent Vivier --- linux-user/alpha/syscall.tbl | 28 +--- linux-user/arm/syscall.tbl| 24 +-- linux-user/hppa/syscall.tbl | 41 -- linux-user/i386/syscall_32.tbl| 28

[PATCH 0/3] linux-user: Update syscall numbers

2024-09-18 Thread Laurent Vivier
Run scripts/gensyscalls.sh, scripts/update-mips-syscall-args.sh and scripts/update-syscalltbl.sh to update syscall numbers to linux v6.10 Laurent Vivier (3): linux-user: update syscall_nr.h to Linux v6.10 linux-user, mips: update syscall-args-o32.c.inc to Linux v6.10 linux-user: update

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-30 Thread Laurent Vivier
On 24/07/2024 12:51, Michael S. Tsirkin wrote: with max-bytes set to 0, quota is 0 and so device does not work. block this to avoid user confusion Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-rng.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/virtio/v

Re: [PATCH v2 0/4] net: update netdev stream/dgram man page

2024-07-24 Thread Laurent Vivier
On 04/07/2024 14:48, Laurent Vivier wrote: Add the description of "-netdev stream" and "-netdev dgram" in the QEMU manpage. Add some examples on how to use them, including a way to use "-netdev stream" and "passt" in place of "-netdev user&quo

Re: [PATCH] virtio-rng: block max-bytes=0

2024-07-24 Thread Laurent Vivier
error_setg(errp, "'max-bytes' parameter must be positive, " "and less than 2^63"); return; } Reviewed-by: Laurent Vivier

[PATCH v2 2/4] net: update netdev stream man page with unix socket

2024-07-04 Thread Laurent Vivier
d translation proxy between layer-2, like "-netdev stream", and layer-4 on host, like TCP, UDP, ICMP/ICMPv6 echo) Fixes: 13c6be96618c ("net: stream: add unix socket") Signed-off-by: Laurent Vivier --- qemu-options.hx | 40 1 file changed,

[PATCH v2 3/4] net: update netdev dgram man page with unix socket

2024-07-04 Thread Laurent Vivier
Add the description of "-netdev dgram" with a unix domain socket. The code has been added but the man page has not been updated. Fixes: 784e7a253104 ("net: dgram: add unix socket") Signed-off-by: Laurent Vivier --- qemu-options.hx | 23 +++ 1 file ch

[PATCH v2 4/4] net: update netdev stream man page with the reconnect parameter

2024-07-04 Thread Laurent Vivier
"-netdev stream" supports a reconnect parameter that attempts to reconnect automatically the socket if it is disconnected. The code has been added but the man page has not been updated. Fixes: 148fbf0d58a6 ("net: stream: add a new option to automatically reconnect" Signed-of

[PATCH v2 0/4] net: update netdev stream/dgram man page

2024-07-04 Thread Laurent Vivier
on proxy between layer-2, like "-netdev stream", and layer-4 on host, like TCP, UDP, ICMP/ICMPv6 echo) v2: - split patch - update unix socket description with stream and datagram words. Laurent Vivier (4): net: update netdev stream/dgram man page net: update netdev stream m

[PATCH v2 1/4] net: update netdev stream/dgram man page

2024-07-04 Thread Laurent Vivier
Add the description of "-netdev stream" and "-netdev dgram" in the QEMU manpage. Add some examples on how to use them. Fixes: 5166fe0ae46d ("qapi: net: add stream and dgram netdevs") Signed-off-by: Laurent Vivier --- qemu-options.hx | 114 +

Re: [PATCH] net: update netdev stream/dgram man page

2024-07-04 Thread Laurent Vivier
Hi Marc-André, thank you for your comments, you're right I should not mix TCP/UDP and unix socket. I'm going to fix that. Thanks, Laurent On 02/07/2024 09:39, Marc-André Lureau wrote: Hi On Wed, Jun 26, 2024 at 7:53 PM Laurent Vivier <mailto:lviv...@redhat.com>> w

Re: [PATCH] net: update netdev stream/dgram man page

2024-07-02 Thread Laurent Vivier
On 02/07/2024 10:08, Marc-André Lureau wrote: Hi On Wed, Jun 26, 2024 at 7:53 PM Laurent Vivier <mailto:lviv...@redhat.com>> wrote: Add the description of "-netdev stream" and "-netdev dgram" in the QEMU manpage. Add some examples on how to use

[PATCH] net: update netdev stream/dgram man page

2024-06-26 Thread Laurent Vivier
socket") Fixes: 148fbf0d58a6 ("net: stream: add a new option to automatically reconnect" Signed-off-by: Laurent Vivier --- qemu-options.hx | 189 1 file changed, 189 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx in

Re: [PATCH 0/4] hw/m68k/virt: Add some devices

2024-06-20 Thread Laurent Vivier
Le 27/05/2024 à 19:15, Jiaxun Yang a écrit : Hi all, This series added some devices that I found lacking when I was trying to port U-Boot to m68k virt machine. I have a branch with a bootloader based on petitboot. See https://github.com/vivier/qemu-m68k/commits/m68k-virt/ Thanks Laurent P

Re: [PULL 0/4] Trivial patches for 2024-04-02

2024-04-02 Thread Laurent Vivier
Le 02/04/2024 à 12:41, Michael Tokarev a écrit : Author: Stefan Weil via *SIGH*  This happened *again*. (you'll need to tell git log "--no-mailmap" to not get confused by the mapping we have for the last time one of these slipped through...) Now this is interesting.  And this is exactly

[PULL 1/1] virt: set the CPU type in BOOTINFO

2024-03-11 Thread Laurent Vivier
ned-off-by: Laurent Vivier Reviewed-by: Mark Cave-Ayland Message-ID: <20240223155742.2790252-1-laur...@vivier.eu> --- hw/m68k/virt.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index e2792ef46d93..b8e5e102e6b9 100644 ---

[PULL 0/1] M68k for 9.0 patches

2024-03-11 Thread Laurent Vivier
k 20240311 ---- Laurent Vivier (1): virt: set the CPU type in BOOTINFO hw/m68k/virt.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- 2.43.2

Re: [PATCH v3 2/2] e1000e: fix link state on resume

2024-03-08 Thread Laurent Vivier
On 3/8/24 09:56, Laurent Vivier wrote: On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it. The problem can be reproduced starting qemu in paused state (-S) and then set the link to down

[PATCH v3 1/2] igb: fix link state on resume

2024-03-08 Thread Laurent Vivier
ecute": "cont" } To fix the problem, merge the content of igb_vm_state_change() into igb_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Suggested-by: Akihiko Odaki Signed-off-by: Laurent Vivier --- hw/net/igb_core.c | 47 +++

[PATCH v3 2/2] e1000e: fix link state on resume

2024-03-08 Thread Laurent Vivier
te": "cont" } To fix the problem, merge the content of e1000e_vm_state_change() into e1000e_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Suggested-by: Akihiko Odaki Signed-off-by: Laurent Vivier --- hw/net/e1000e_core.c | 56 +++-

Re: [PATCH v2 2/2] e1000e: fix link state on resume

2024-03-08 Thread Laurent Vivier
On 3/8/24 09:09, Jason Wang wrote: On Tue, Mar 5, 2024 at 6:07 PM Laurent Vivier wrote: On 2/1/24 06:45, Jason Wang wrote: On Wed, Jan 24, 2024 at 6:40 PM Laurent Vivier wrote: On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus

Re: [PATCH v2 2/2] e1000e: fix link state on resume

2024-03-05 Thread Laurent Vivier
On 2/1/24 06:45, Jason Wang wrote: On Wed, Jan 24, 2024 at 6:40 PM Laurent Vivier wrote: On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it. The problem can be reproduced starting qemu

[PATCH] virt: set the CPU type in BOOTINFO

2024-02-23 Thread Laurent Vivier
ned-off-by: Laurent Vivier --- hw/m68k/virt.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index e2792ef46d93..b8e5e102e6b9 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -239,9 +239,20 @@ static void virt_init(MachineStat

Re: [PATCH v3 0/3] nubus: add nubus-virtio-mmio device

2024-02-23 Thread Laurent Vivier
, 154 insertions(+), 5 deletions(-) create mode 100644 hw/nubus/nubus-virtio-mmio.c create mode 100644 include/hw/nubus/nubus-virtio-mmio.h Series Reviewed-by: Laurent Vivier

Re: [PATCH] target/m68k: Fix exception frame format for 68010

2024-02-23 Thread Laurent Vivier
RMAT_VEC)) { /* all except 68000 */ CPUState *cs = env_cpu(env); switch (format) { Reviewed-by: Laurent Vivier

Re: [PATCH] iothread: Simplify expression in qemu_in_iothread()

2024-02-08 Thread Laurent Vivier
: true; +return qemu_get_current_aio_context() != qemu_get_aio_context(); } Reviewed-by: Laurent Vivier

Re: [PATCH trivial 1/2] close_all_open_fd(): move to oslib-posix.c

2024-01-25 Thread Laurent Vivier
Le 25/01/2024 à 23:29, Michael Tokarev a écrit : Initially in async-teardown.c, but the same construct is used elsewhere too. Signed-off-by: Michael Tokarev --- include/sysemu/os-posix.h | 1 + system/async-teardown.c | 37 + util/oslib-posix.c

[PATCH v2 2/2] e1000e: fix link state on resume

2024-01-24 Thread Laurent Vivier
te": "cont" } To fix the problem, merge the content of e1000e_vm_state_change() into e1000e_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Fixes: 6f3fbe4ed06a ("net: Introduce e1000e device emulation") Suggested-by: Akihiko Odaki Sig

[PATCH v2 1/2] igb: fix link state on resume

2024-01-24 Thread Laurent Vivier
ecute": "cont" } To fix the problem, merge the content of igb_vm_state_change() into igb_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Fixes: 3a977deebe6b ("Intrdocue igb device emulation") Cc: akihiko.od...@daynix.com Suggested-by: Akihiko Odaki

[PATCH 1/2] igb: fix link state on resume

2024-01-23 Thread Laurent Vivier
ecute": "cont" } To fix the problem, merge the content of igb_vm_state_change() into igb_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Suggested-by: Akihiko Odaki Signed-off-by: Laurent Vivier --- hw/net/igb_core.c | 47 +++

[PATCH 2/2] e1000e: fix link state on resume

2024-01-23 Thread Laurent Vivier
te": "cont" } To fix the problem, merge the content of e1000e_vm_state_change() into e1000e_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Suggested-by: Akihiko Odaki Signed-off-by: Laurent Vivier --- hw/net/e1000e_core.c | 50 +++-

Re: Goldfish TTY enhancement

2024-01-12 Thread Laurent Vivier
Hi Jason, Le 11/01/2024 à 19:58, Jason Thorpe a écrit : On Jan 10, 2024, at 8:01 AM, Philippe Mathieu-Daudé wrote: IIUC Goldfish virtual HW is maintained externally by Google https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT I suppose the sp

Re: [PATCH] hw/timer: fix systick trace message

2024-01-10 Thread Laurent Vivier
"systick write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" Reviewed-by: Laurent Vivier

Re: [PATCH] q800: move dp8393x_prom memory region to Q800MachineState

2023-12-28 Thread Laurent Vivier
MOS6522Q800VIA1State via1; MOS6522Q800VIA2State via2; dp8393xState dp8393x; +MemoryRegion dp8393x_prom; ESCCState escc; OrIRQState escc_orgate; SysBusESPState esp; Reviewed-by: Laurent Vivier

Re: [PATCH 1/2] linux-user: Define TARGET_O_LARGEFILE for aarch64

2023-12-03 Thread Laurent Vivier
generic/fcntl.h" #endif Reviewed-by: Laurent Vivier

Re: [RFC 1/2] qapi/virtio: introduce the "show-bits" argument for x-query-virtio-status

2023-12-01 Thread Laurent Vivier
On 12/1/23 16:21, Markus Armbruster wrote: Laurent Vivier writes: On 11/21/23 08:58, Markus Armbruster wrote: Laurent, there's a question for you at the end. Yong Huang writes: On Thu, Nov 16, 2023 at 10:44 PM Markus Armbruster wrote: Hyman Huang writes: This patch allo

Re: [RFC 1/2] qapi/virtio: introduce the "show-bits" argument for x-query-virtio-status

2023-12-01 Thread Laurent Vivier
On 11/21/23 08:58, Markus Armbruster wrote: Laurent, there's a question for you at the end. Yong Huang writes: On Thu, Nov 16, 2023 at 10:44 PM Markus Armbruster wrote: Hyman Huang writes: This patch allows to display feature and status bits in virtio-status. An optional argument is in

[PULL 2/4] macfb: rename DAFB_RESET to DAFB_LUT_INDEX

2023-11-06 Thread Laurent Vivier
to reflect its true purpose. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231026085650.917663-3-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/display/macfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/d

[PULL 4/4] macfb: allow reads from the DAFB_LUT register

2023-11-06 Thread Laurent Vivier
From: Mark Cave-Ayland This enables A/UX to correctly retrieve the LUT entries when used with applications that use the MacOS Device Manager Status (GetEntries) call. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231026085650.917663-5-mark.cave-ayl...@ilande.co

[PULL 3/4] macfb: allow larger write accesses to the DAFB_LUT register

2023-11-06 Thread Laurent Vivier
write the correct value to the color_palette array. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231026085650.917663-4-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/display/macfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PULL 0/4] Q800 for 8.2 patches

2023-11-06 Thread Laurent Vivier
The following changes since commit d762bf97931b58839316b68a570eecc6143c9e3e: Merge tag 'pull-target-arm-20231102' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-11-03 10:04:12 +0800) are available in the Git repository at: https://github.com/vivier/qemu-m68k.git tags

[PULL 1/4] macfb: don't clear interrupts when writing to DAFB_RESET

2023-11-06 Thread Laurent Vivier
From: Mark Cave-Ayland Traces from A/UX suggest that this register is only used to reset the framebuffer LUT (colour lookup table) and not any other device state. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231026085650.917663-2-mark.cave-ayl...@ilande.co

Re: [PATCH 4/4] macfb: allow reads from the DAFB_LUT register

2023-11-05 Thread Laurent Vivier
val = s->regs[addr >> 2]; Reviewed-by: Laurent Vivier

Re: [PATCH 2/4] macfb: rename DAFB_RESET to DAFB_LUT_INDEX

2023-11-05 Thread Laurent Vivier
f) * 3; break; case DAFB_LUT: s->color_palette[s->palette_current] = val; Reviewed-by: Laurent Vivier

Re: [PATCH 3/4] macfb: allow larger write accesses to the DAFB_LUT register

2023-11-05 Thread Laurent Vivier
rrent] = val & 0xff; s->palette_current = (s->palette_current + 1) % ARRAY_SIZE(s->color_palette); if (s->palette_current % 3) { Reviewed-by: Laurent Vivier

Re: [PATCH 1/4] macfb: don't clear interrupts when writing to DAFB_RESET

2023-11-05 Thread Laurent Vivier
t;regs[DAFB_INTR_STAT >> 2] &= ~DAFB_INTR_VBL; -macfb_update_irq(s); break; case DAFB_LUT: s->color_palette[s->palette_current] = val; Reviewed-by: Laurent Vivier

[PULL 14/20] mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK

2023-10-07 Thread Laurent Vivier
A and TimeSCCDB taken from real hardware with a suitable scaling factor. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-15-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/misc/mac_via.h | 3 + hw/misc/mac_via.c

[PULL 15/20] mac_via: workaround NetBSD ADB bus enumeration issue

2023-10-07 Thread Laurent Vivier
send the next command written to SR after a ADB_BUSRESET onto the bus regardless, even if we don't detect a state transition to ADB_STATE_NEW. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-16-mark.cave-ayl...@ilande.co.uk> Signed-off-

[PULL 07/20] audio: add Apple Sound Chip (ASC) emulation

2023-10-07 Thread Laurent Vivier
: Laurent Vivier Co-developed-by: Volker Rümelin Signed-off-by: Mark Cave-Ayland Message-ID: <20231004083806.757242-8-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- MAINTAINERS| 2 + include/hw/audio/asc.h | 84 + hw/audio/asc.c

[PULL 10/20] q800: add easc bool machine class property to switch between ASC and EASC

2023-10-07 Thread Laurent Vivier
as an developer aid for testing and migrating code from ASC to EASC. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-11-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/m68k/

[PULL 03/20] q800: add machine id register

2023-10-07 Thread Laurent Vivier
Model Lower 16 bits of ID ... Quadra/Centris 610/650/800 0x2BAD" Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231004083806.757242-4-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier

[PULL 16/20] mac_via: implement ADB_STATE_IDLE state if shift register in input mode

2023-10-07 Thread Laurent Vivier
: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-17-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 9f9c2815d0e9..3c41d6

[PULL 01/20] q800-glue.c: convert to Resettable interface

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland Convert the GLUE device to 3-phase reset. The legacy method doesn't do anything that's invalid in the hold phase, so the conversion is simple and not a behaviour change. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laur

[PULL 12/20] swim: split into separate IWM and ISM register blocks

2023-10-07 Thread Laurent Vivier
dware. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-13-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/block/swim.h | 15 +++- hw/block/swim.c | 85 - hw/block/t

[PULL 08/20] asc: generate silence if FIFO empty but engine still running

2023-10-07 Thread Laurent Vivier
FIFO remains empty for half a cycle (~23ms) then continuously fill the generated buffer with empty silence. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-9-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/audio/asc.

[PULL 06/20] q800: allow accesses to RAM area even if less memory is available

2023-10-07 Thread Laurent Vivier
to detect the memory size without faulting. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-7-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/m68k/q800.h | 1 + hw/m68k/

[PULL 05/20] q800: add IOSB subsystem

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland It is needed because it defines the BIOSConfig area. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: BALATON Zoltan Message-ID: <20231004083806.757242-6-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- MAINT

[PULL 09/20] q800: add Apple Sound Chip (ASC) audio to machine

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland The Quadra 800 has the enhanced ASC (EASC) audio chip which supports both the legacy IRQ routing through VIA2 and also "A/UX" mode routing direct to the CPU. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Message-ID: <20231004083806.757242

[PULL 02/20] q800: add djMEMC memory controller

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland The djMEMC controller is used to store information related to the physical memory configuration. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231004083806.757242-3-mark.cave-ayl...@ilande.co

[PULL 18/20] q800: add ESCC alias at 0xc000

2023-10-07 Thread Laurent Vivier
fatal error when running the MacOS booter. Add a single memory region alias at 0xc000 to enable NetBSD kernels to start booting under QEMU. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-19-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent

[PULL 20/20] mac_via: extend timer calibration hack to work with A/UX

2023-10-07 Thread Laurent Vivier
is to randomly add 0x500 to the T2 counter value during calibration to enable it to eventually succeed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-21-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.

[PULL 00/20] Q800 for 8.2 patches

2023-10-07 Thread Laurent Vivier
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://github.com/vivier/qemu-m68k.git tags/q800-for-8.

[PULL 04/20] q800: implement additional machine id bits on VIA1 port A

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231004083806.757242-5-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 14 +- 1 file chang

[PULL 13/20] swim: update IWM/ISM register block decoding

2023-10-07 Thread Laurent Vivier
Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-14-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/block/swim.h | 8 +- hw/block/swim.c | 212 +--- hw/block/trace-even

[PULL 19/20] q800: add alias for MacOS toolbox ROM at 0x40000000

2023-10-07 Thread Laurent Vivier
succeed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-20-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- include/hw/m68k/q800.h | 1 + hw/m68k/q800.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/h

[PULL 11/20] swim: add trace events for IWM and ISM registers

2023-10-07 Thread Laurent Vivier
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-12-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/block/swim.c | 14 ++ hw/block/trace-events | 7 +++ 2 files chang

[PULL 17/20] mac_via: always clear ADB interrupt when switching to A/UX mode

2023-10-07 Thread Laurent Vivier
is busy and refuses to send ADB commands unless it is clear. To ensure that this doesn't happen, always clear the ADB interrupt when switching to A/UX mode to ensure that the bus enumeration always occurs. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Messa

Re: [PATCH v4 00/20] q800: add support for booting MacOS Classic - part 2

2023-10-06 Thread Laurent Vivier
ering questions about MacOS Classic internals and helping to diagnose and fix bugs in the 68k emulation. In particular thanks go to Laurent Vivier, Finn Thain, Howard Spoelstra, Volker Rümelin, Richard Henderson, Martin Husemann, Rin Okuyama, Elliot Nunn, and SolraBizna. Signed-off-by: Mark Cave-Ayl

Re: [PATCH v2 13/20] swim: update IWM/ISM register block decoding

2023-09-26 Thread Laurent Vivier
const char *name, unsigned size, uint64_t value) "reg=%d [%s] size=%u value=0x%"PRIx64 -swim_iwm_switch(void) "switch from IWM to SWIM mode" +swim_switch_to_ism(void) "switch from IWM to ISM mode" +swim_switch_to_iwm(void) "switch from ISM to IWM mode" diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h index 1bc7635d02..5f567e8d59 100644 --- a/include/hw/block/swim.h +++ b/include/hw/block/swim.h @@ -50,13 +50,15 @@ struct SWIMCtrl { int mode; /* IWM mode */ int iwm_switch; -uint8_t iwmregs[16]; -uint8_t iwm_data; -uint8_t iwm_mode; +uint8_t iwm_latches; +uint8_t iwmregs[8]; /* SWIM mode */ uint8_t ismregs[16]; uint8_t swim_phase; uint8_t swim_mode; +uint8_t swim_status; +uint8_t pram[16]; +uint8_t pram_idx; SWIMBus bus; }; Reviewed-by: Laurent Vivier

Re: [PATCH v2 12/20] swim: split into separate IWM and ISM register blocks

2023-09-26 Thread Laurent Vivier
quot; diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h index 9b3dcb029d..1bc7635d02 100644 --- a/include/hw/block/swim.h +++ b/include/hw/block/swim.h @@ -43,23 +43,18 @@ typedef struct FDrive { } FDrive; struct SWIMCtrl { -MemoryRegion iomem; +MemoryRegion swim; +MemoryRegion iwm; +MemoryRegion ism; FDrive drives[SWIM_MAX_FD]; int mode; /* IWM mode */ int iwm_switch; -uint16_t regs[8]; -#define IWM_PH0 0 -#define IWM_PH1 1 -#define IWM_PH2 2 -#define IWM_PH3 3 -#define IWM_MTR 4 -#define IWM_DRIVE 5 -#define IWM_Q66 -#define IWM_Q77 +uint8_t iwmregs[16]; uint8_t iwm_data; uint8_t iwm_mode; /* SWIM mode */ +uint8_t ismregs[16]; uint8_t swim_phase; uint8_t swim_mode; SWIMBus bus; Reviewed-by: Laurent Vivier

Re: [PATCH v2 19/20] q800: add alias for MacOS toolbox ROM at 0x40000000

2023-09-26 Thread Laurent Vivier
M68kCPU cpu; MemoryRegion rom; +MemoryRegion rom_alias; GLUEState glue; MOS6522Q800VIA1State via1; MOS6522Q800VIA2State via2; Reviewed-by: Laurent Vivier

Re: [PATCH v2 20/20] mac_via: extend timer calibration hack to work with A/UX

2023-09-26 Thread Laurent Vivier
enable it to + * eventually succeed. + */ +now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); +if (now & 1) { +ret += 0x5; + } +} +break; } return ret; } Reviewed-by: Laurent Vivier

Re: [PATCH v2 18/20] q800: add ESCC alias at 0xc000

2023-09-26 Thread Laurent Vivier
de/hw/m68k/q800.h +++ b/include/hw/m68k/q800.h @@ -67,6 +67,7 @@ struct Q800MachineState { MemoryRegion macio; MemoryRegion macio_alias; MemoryRegion machine_id; +MemoryRegion escc_alias; }; #define TYPE_Q800_MACHINE MACHINE_TYPE_NAME("q800") Reviewed-by: Laurent Vivier

Re: [PATCH v2 17/20] mac_via: always clear ADB interrupt when switching to A/UX mode

2023-09-26 Thread Laurent Vivier
itches to the so-called + * "A/UX" interrupt mode after it initialises, so we can use this as + * a convenient place to clear the ADB interrupt for now. + */ +s->b |= VIA1B_vADBInt; } } Reviewed-by: Laurent Vivier

Re: [PATCH v2 16/20] mac_via: implement ADB_STATE_IDLE state if shift register in input mode

2023-09-26 Thread Laurent Vivier
& VIA1B_vADBInt) ? "+" : "-"); + return; } Reviewed-by: Laurent Vivier

Re: [PATCH v2 15/20] mac_via: workaround NetBSD ADB bus enumeration issue

2023-09-26 Thread Laurent Vivier
g NetBSD enum hack" via1_auxmode(int mode) "setting auxmode to %d" via1_timer_hack_state(int state) "setting timer_hack_state to %d" Did you ask NetBSD to fix their code? Reviewed-by: Laurent Vivier

Re: [PATCH v2 14/20] mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK

2023-09-26 Thread Laurent Vivier
"PRIx64" size:%u data:0x%08x" diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 422da43bf9..63cdcf7c69 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -74,6 +74,9 @@ struct MOS6522Q800VIA1State { int64_t next_second; QEMUTimer *sixty_hz_timer; int64_t next_sixty_hz; + +/* SETUPTIMEK hack */ +int timer_hack_state; }; Reviewed-by: Laurent Vivier

Re: [PATCH v2 11/20] swim: add trace events for IWM and ISM registers

2023-09-26 Thread Laurent Vivier
quot;[%p] Binding to IF_MTD drive" m25p80_binding_no_bdrv(void *s) "[%p] No BDRV - binding to RAM" + +# swim.c +swim_swimctrl_read(int reg, const char *name, unsigned size, uint64_t value) "reg=%d [%s] size=%u value=0x%"PRIx64 +swim_swimctrl_write(int reg, const char *name, unsigned size, uint64_t value) "reg=%d [%s] size=%u value=0x%"PRIx64 +swim_iwmctrl_read(int reg, unsigned size, uint64_t value) "reg=%d size=%u value=0x%"PRIx64 +swim_iwmctrl_write(int reg, unsigned size, uint64_t value) "reg=%d size=%u value=0x%"PRIx64 +swim_iwm_switch(void) "switch from IWM to SWIM mode" Reviewed-by: Laurent Vivier

Re: [PATCH v2 10/20] q800: add easc bool machine class property to switch between ASC and EASC

2023-09-26 Thread Laurent Vivier
68k/q800.h +++ b/include/hw/m68k/q800.h @@ -47,6 +47,7 @@ struct Q800MachineState { MachineState parent_obj; +bool easc; M68kCPU cpu; MemoryRegion rom; GLUEState glue; Reviewed-by: Laurent Vivier

Re: [PATCH] m68k: Silence -Wshadow=local warnings in the m68k code

2023-09-26 Thread Laurent Vivier
tcg_gen_addi_i32(tmp2, reg, 2); } else { -tcg_gen_addi_i32(tmp, reg, opsize_bytes(opsize)); +tcg_gen_addi_i32(tmp2, reg, opsize_bytes(opsize)); } -delay_set_areg(s, reg0, tmp, true); + delay_set_areg(s, reg0, tmp2, true); } return result; case 4: /* Indirect predecrememnt. */ "inc" would be a better name than "val2". Otherwise: Reviewed-by: Laurent Vivier Thanks, Laurent

Re: [PATCH v2 08/20] asc: generate silence if FIFO empty but engine still running

2023-09-25 Thread Laurent Vivier
Time when we were last able to generate samples */ int64_t fifo_empty_ns; If it's specific to Windows why not using "#if defined(CONFIG_WIN32) && defined(CONFIG_AUDIO_DSOUND)" to clearly identify this piece of code as specific to a windows bug with dsound? Anyway, code looks good: Reviewed-by: Laurent Vivier

Re: [PATCH v2 01/20] q800-glue.c: convert to Resettable interface

2023-09-25 Thread Laurent Vivier
device_class_set_props(dc, glue_properties); +rc->phases.hold = glue_reset_hold; nc->nmi_monitor_handler = glue_nmi; } Reviewed-by: Laurent Vivier

[PATCH 4/5] linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu

2023-09-25 Thread Laurent Vivier
call.c:8963:15: note: shadowed declaration is here 8963 | CPUState *cpu = env_cpu(cpu_env); | ^~~ Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.

[PATCH 5/5] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls

2023-09-25 Thread Laurent Vivier
note: shadowed declaration is here 8975 | void *p; | ^ Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 6139c00ddceb..fe228f7db3a7 100644 --- a/linux-u

[PATCH 3/5] linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm()

2023-09-25 Thread Laurent Vivier
argtype arg_type[] = { MK_STRUCT(STRUCT_dm_target_versions) }; | ^~~~ .../linux-user/syscall.c:4991:20: note: shadowed declaration is here 4991 | const argtype *arg_type = ie->arg_type; |^~~~ Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 22

[PATCH 1/5] linux-user/flatload: clean up local variable shadowing

2023-09-25 Thread Laurent Vivier
ects/qemu/linux-user/flatload.c:722:15: note: shadowed declaration is here 722 | abi_ulong p; | ^ Signed-off-by: Laurent Vivier --- linux-user/flatload.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/flatload.c b/linux-u

  1   2   3   4   5   6   7   8   9   10   >