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
-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 --- a/hw/m68k/

[PULL 0/1] M68k for 9.0 patches

2024-03-11 Thread Laurent Vivier
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
quot;execute": "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
t;execute": "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
-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(MachineState *machine

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

2024-02-23 Thread Laurent Vivier
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
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
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
t;execute": "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
quot;execute": "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
quot;execute": "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
t;execute": "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

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

2024-01-10 Thread Laurent Vivier
ze) "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
a1; 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
ntl.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 allows

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

[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

[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-08 Thread Laurent Vivier
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-08 Thread Laurent Vivier
and 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-by: L

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

2023-10-08 Thread Laurent Vivier
-by: 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-08 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-08 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-08 Thread Laurent Vivier
-by: 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-08 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: Laurent Vivier

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

2023-10-08 Thread Laurent Vivier
. 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/trace-

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

2023-10-08 Thread Laurent Vivier
: if the 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-08 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-08 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-08 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-08 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-08 Thread Laurent Vivier
a 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-08 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-08 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

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

2023-10-08 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-08 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-08 Thread Laurent Vivier
to 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-08 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-08 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 Message-ID

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

2023-10-06 Thread Laurent Vivier
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-Ayland [1] https

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

2023-09-26 Thread Laurent Vivier
char *name, unsigned size, uint64_t value) "reg=%d [%s] size=%u value=0x%"PRIx64 swim_iwmctrl_write(int reg, 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
wim_iwm_switch(void) "switch from IWM to SWIM mode" 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
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
le 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
68k/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
hes 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
num 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
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
CHINE, +.instance_init = q800_init, .instance_size = sizeof(Q800MachineState), .class_init = q800_machine_class_init, }; diff --git a/include/hw/m68k/q800.h b/include/hw/m68k/q800.h index 790cf433f3..fbaacd88bd 100644 --- a/include/hw/m68k/q800.h +++ b/include/hw/m68k/q800.h @@ -47,6

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

2023-09-26 Thread Laurent Vivier
di_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
e 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
e_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
: 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.c index c81e8d344486

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

2023-09-25 Thread Laurent Vivier
| 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-user/syscall.c +++ b/linux-user/syscall.c

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

2023-09-25 Thread Laurent Vivier
_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 +++--- 1 file changed, 11 insertions(+),

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

2023-09-25 Thread Laurent Vivier
/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-user/flatload.c index

[PATCH 2/5] linux-user/mmap.c: clean up local variable shadowing

2023-09-25 Thread Laurent Vivier
: note: shadowed declaration is here 871 | int prot; | ^~~~ Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 8eaf57b208b0..8ccaab78590f 100644 --- a/linux-user

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

2023-09-25 Thread Laurent Vivier
Laurent Vivier (5): linux-user/flatload: clean up local variable shadowing linux-user/mmap.c: clean up local variable shadowing linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm() linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu

[PATCH] disas/m68k: clean up local variable shadowing

2023-09-25 Thread Laurent Vivier
: shadowed declaration is here 1093 | int val = 0; | ^~~ Signed-off-by: Laurent Vivier --- disas/m68k.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/disas/m68k.c b/disas/m68k.c index aefaecfbd6cb..1f16e295ab41 100644 --- a/disas/m68k.c +++ b/disas

Re: [PATCH] tests/qtest/netdev-socket: Raise connection timeout to 120 seconds

2023-09-12 Thread Laurent Vivier
hitting a functional race not a timeout. It can also happen if the first QEMU (server) crashes. Do we have some traces from this side? Reviewed-by: Laurent Vivier Thanks, Laurent

Re: [PATCH] tests/qtest/netdev-socket: Avoid variable-length array in inet_get_free_port_multiple()

2023-08-25 Thread Laurent Vivier
) { -int sock[nb]; +g_autofree int *sock = g_new(int, nb); int i; for (i = 0; i < nb; i++) { Reviewed-by: Laurent Vivier

Re: Funny results with long double denorms on m68k

2023-08-21 Thread Laurent Vivier
Le 21/08/2023 à 10:34, Laurent Vivier a écrit : Le 20/08/2023 à 22:55, Keith Packard a écrit : #include #include #define X   0x1p+16383l #define Y   0x1p-16446l static long double build_mul = X * Y; static volatile long double x = X; static volatile long double y = Y; static void

Re: Funny results with long double denorms on m68k

2023-08-21 Thread Laurent Vivier
Le 20/08/2023 à 22:55, Keith Packard a écrit : #include #include #define X 0x1p+16383l #define Y 0x1p-16446l static long double build_mul = X * Y; static volatile long double x = X; static volatile long double y = Y; static void dump_ld(const char *label, long double ld) {

Re: [PATCH] hw: Add compat machines for 8.2

2023-07-21 Thread Laurent Vivier
386/pc.h b/include/hw/i386/pc.h index d54e8b1101e4..0fabece236cf 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -200,6 +200,9 @@ void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); +extern GlobalProperty pc_compat_8_1[]; +extern const size_t pc_compat_8_1_len; + extern GlobalProperty pc_compat_8_0[]; extern const size_t pc_compat_8_0_len; For m68k part: Acked-by: Laurent Vivier

Re: [PATCH] Wrong unpacked structure for epoll_event on qemu-or1k (openrisc user-space)

2023-07-19 Thread Laurent Vivier
Le 18/07/2023 à 17:06, Luca Bonissi a écrit : On 18/07/23 16:40, Peter Maydell wrote: Hi; thanks for this patch. Unfortunately we need patches to include a Signed-off-by: line that says you're legally OK with it being contributed to QEMU, or we can't take them. Sorry for the missing

Re: [PULL 35/47] linux-user: Use page_find_range_empty for mmap_find_vma_reserved

2023-07-18 Thread Laurent Vivier
Hi Richard, thank you for the linux-user PR (I have really no time to do that). I've run the LTP test suite (20230127) on master and found some problems introduced by this patch. With armhf and Debian bionic and stretch, brk01 brk02 recvmsg01 fail: tst_test.c:1560: TINFO: Timeout per run

Re: [PATCH 06/21] q800: allow accesses to RAM area even if less memory is available

2023-07-05 Thread Laurent Vivier
SBState iosb; +MemoryRegion ramio; MemoryRegion macio; MemoryRegion macio_alias; MemoryRegion machine_id; Reviewed-by: Laurent Vivier

Re: [PATCH v2 1/1] vhost-vdpa: mute unaligned memory error report

2023-07-04 Thread Laurent Vivier
On 7/4/23 09:25, David Hildenbrand wrote: On 04.07.23 09:19, Laurent Vivier wrote: With TPM CRM device, vhost-vdpa reports an error when it tries to register a listener for a non aligned memory region:    qemu-system-x86_64: vhost_vdpa_listener_region_add received unaligned region    qemu

[PATCH v2 0/1] vhost-vdpa: skip TPM CRB memory section

2023-07-04 Thread Laurent Vivier
/msg03670.html and from Eric for VFIO: https://lore.kernel.org/all/20220506132510.1847942-1-eric.au...@redhat.com/ https://lore.kernel.org/all/20220524091405.416256-1-eric.au...@redhat.com/ Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2141965 Thanks, Laurent Laurent Vivier (1): vhost-vdpa

[PATCH v2 1/1] vhost-vdpa: mute unaligned memory error report

2023-07-04 Thread Laurent Vivier
the memory region name). Signed-off-by: Laurent Vivier --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 8f8d05cf9b01..9b0d643b9475 100644 --- a/hw/virtio

Re: [PATCH 2/2] tpm_crb: mark memory as protected

2023-07-04 Thread Laurent Vivier
at 9:39 PM Laurent Vivier wrote: On 6/22/23 15:12, Peter Maydell wrote: On Tue, 20 Jun 2023 at 20:51, Laurent Vivier wrote: This memory is not correctly aligned and cannot be registered by vDPA and VFIO. Isn't this a vDPA/VFIO problem? There's no requirement for RAM MemoryRegions

Re: [PATCH 2/2] tpm_crb: mark memory as protected

2023-06-22 Thread Laurent Vivier
On 6/22/23 15:12, Peter Maydell wrote: On Tue, 20 Jun 2023 at 20:51, Laurent Vivier wrote: This memory is not correctly aligned and cannot be registered by vDPA and VFIO. Isn't this a vDPA/VFIO problem? There's no requirement for RAM MemoryRegions to be aligned in any way. Code that doesn't

Re: [PATCH 2/2] tpm_crb: mark memory as protected

2023-06-22 Thread Laurent Vivier
On 6/21/23 11:13, David Hildenbrand wrote: On 20.06.23 21:50, Laurent Vivier wrote: This memory is not correctly aligned and cannot be registered by vDPA and VFIO. An error is reported for vhost-vdpa case: qemu-kvm: vhost_vdpa_listener_region_add received unaligned region To make it ignored

[PULL 22/24] q800: move macfb device to Q800MachineState

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Also change the instantiation of the macfb device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20230621085353.113233-23-mark.cave-ayl...@ilande.co.uk> Sign

[PULL 02/24] q800: add missing space after parent object in GLUEState

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland This brings GLUEState in line with our current QOM guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20230621085353.113233-3-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier -

[PULL 01/24] q800: fix up minor spacing issues in hw_compat_q800 GlobalProperty array

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Ensure there is a space before the final closing brace for all global properties. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230621085353.113233-2-mark.cave-ayl...@ilande.co.uk> Signed-off-by: L

[PULL 21/24] q800: don't access Nubus bus directly from the mac-nubus-bridge device

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Instead use the qdev_get_child_bus() function which is intended for this exact purpose. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230621085353.113233-22-mark.cave-ayl...@ilande.co.uk> Sign

[PULL 09/24] q800: move GLUE device to Q800MachineState

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Also change the instantiation of the GLUE device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20230621085353.113233-10-mark.cave-ayl...@ilande.co.uk> Sign

[PULL 24/24] mac_via: fix rtc command decoding for the PRAM seconds registers

2023-06-22 Thread Laurent Vivier
set the date/time. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20230621085353.113233-25-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/misc/mac_v

[PULL 00/24] Q800 for 8.1 patches

2023-06-22 Thread Laurent Vivier
The following changes since commit 67fe6ae41da64368bc4936b196fee2bf61f8c720: Merge tag 'pull-tricore-20230621-1' of https://github.com/bkoppelmann/qemu into staging (2023-06-21 20:08:48 +0200) are available in the Git repository at: https://github.com/vivier/qemu-m68k.git

[PULL 20/24] q800: move mac-nubus-bridge device to Q800MachineState

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Also change the instantiation of the mac-nubus-bridge device to use object_initialize_child() and map the Nubus address space using memory_region_add_subregion() instead of sysbus_mmio_map(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed

[PULL 07/24] q800: move GLUE device into separate q800-glue.c file

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland This will allow the q800-glue.h header to be included separately so that the GLUE device can be referenced externally. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230621085353.113233-8-mark.cave-

[PULL 15/24] q800: move dp8393x device to Q800MachineState

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland Also change the instantiation of the dp8393x device to use object_initialize_child(). Signed-off-by: Mark Cave-Ayland CC: Jason Wang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20230621085353.113233-16-mark.cave-ayl...@ilande.co

[PULL 08/24] q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro

2023-06-22 Thread Laurent Vivier
From: Mark Cave-Ayland The use of the DEFINE_TYPES() macro will soon be recommended over the use of calling type_init() directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230621085353.113233-9-mark.cave-ayl...@ilande.co.uk> Signed-off-by: L

  1   2   3   4   5   6   7   8   9   10   >