Commit graph

125880 commits

Author SHA1 Message Date
fridtjof
ce117c008f wip! sc14445 (sort of 14443, unknown) dummy 2026-05-13 14:54:07 +02:00
fridtjof
3918b2c050 CR16C: monitor register definitions
this enables printing registers with the print command
2026-05-13 14:53:32 +02:00
fridtjof
a84c408062 fixup! lpr/spr 2026-05-13 14:52:50 +02:00
fridtjof
90ff09bc10 add runtime printing for call/return
this makes it easier to follow execution and figure out what's currently running
2026-05-10 19:57:29 +02:00
fridtjof
de26285433 wip! JAL 2026-05-10 19:57:29 +02:00
fridtjof
74294f281d wip! lprd implementation 2026-05-10 19:57:29 +02:00
fridtjof
cce6a52db9 CR16C: dump regs on unimplemented instruction 2026-05-10 19:57:29 +02:00
fridtjof
2caff442c2 CR16C: add more address registers
INTBASE, ISP, USP
2026-05-10 19:57:29 +02:00
fridtjof
6912d9f1c4 wip! soc/device definition, interrupts 2026-05-10 19:57:29 +02:00
fridtjof
040340e2ee wip! untested: rust uart 2026-05-08 19:09:18 +02:00
fridtjof
2969a14433 translate: don't touch registers in CMPD 2026-05-08 13:31:39 +02:00
fridtjof
f1353ec20d wip! disas: empty insn printers 2026-05-08 13:31:39 +02:00
fridtjof
cfeb4c0ab8 decode: fix abs20 remap for load abs 2026-05-08 13:31:39 +02:00
fridtjof
4e77cebf9a Revert "wip! maybe??? fix a subtle bug in MOVD imm"
This reverts commit 574767b51e623f6686d3ad70588600b21aa79441.
2026-05-08 13:31:39 +02:00
fridtjof
a17a21fb5f Revert "wip! some correctness fixes to deal with host register storage vs actual target register size"
This reverts commit e8d1cba15aa8bcd942c87da9e7de3f6ccfd706e3.
2026-05-08 13:31:39 +02:00
fridtjof
e6f6f74b2d wip! tests: future branch tests 2026-05-08 13:31:39 +02:00
fridtjof
6f7af5fd86 tests: add cmp register width confusion test 2026-05-08 13:31:39 +02:00
fridtjof
3aff7a63fa wip! some correctness fixes to deal with host register storage vs actual target register size 2026-05-08 13:31:39 +02:00
fridtjof
6505518c4a translate: wip lpr/spr (noop still lol) 2026-05-08 13:31:39 +02:00
fridtjof
1f998b1d0d disas: make buildable for now 2026-05-08 13:31:39 +02:00
fridtjof
20b904fcf6 wip! useless gdb target xml (untested, needs actual gdb support) 2026-05-08 13:31:39 +02:00
fridtjof
98107395f2 wip! broken disas, doesnt build right now 2026-05-08 13:31:39 +02:00
fridtjof
3e5e7010fd wip! catch writes to >16M memory which is not a part of standard cr16c but is present on some implementations 2026-05-08 13:31:39 +02:00
fridtjof
8129d6a2c9 wip! todo! annotate another source of >16 bit values in backing registers 2026-05-08 13:31:39 +02:00
fridtjof
1cb4e6c4b3 wip! maybe??? fix a subtle bug in MOVD imm 2026-05-08 13:31:39 +02:00
fridtjof
9197270d0e wip! translate: implement BR{EQ,NE}0{B,W} 2026-05-08 13:31:39 +02:00
fridtjof
84bb304f4b CR16C: translate: fix pop edge case for CFG.SR=1
e.g. popret 0x2, RA_L is valid, but raised illegal instruction here
2026-05-08 13:31:39 +02:00
fridtjof
45b6226c77 (still necessary?) translate: implement remap behavior for STORi with abs20 2026-05-08 13:31:39 +02:00
fridtjof
0ff2912690 virt: add MMIO region as unimpl device for r/w logging 2026-05-08 13:31:39 +02:00
fridtjof
f433d49e72 wip! status register management 2026-05-08 13:31:39 +02:00
fridtjof
5fd1a5c394 helper: report exit by guest 2026-05-08 13:31:39 +02:00
fridtjof
21973755c3 wip! implement LPR(D), SPR(D) (stubs only) 2026-05-08 13:31:39 +02:00
fridtjof
d1a92d8531 wip! pushpop bal tests 2026-05-08 13:31:39 +02:00
fridtjof
c1e37c61dc wip! implement BAL, PUSH, POP(RET) 2026-05-08 13:31:39 +02:00
fridtjof
bb9afdeac3 wip! hack! dump_regs "semihosting" helper through excp dbg 2026-05-08 13:31:39 +02:00
fridtjof
d87215ebb7 wip! CR16C: cpu: implement some ops that previously crashed because they're not there 2026-05-08 13:31:39 +02:00
fridtjof
107e07aa61 wip! random debugging stuff, halt/debug on illegal insn 2026-05-08 13:27:03 +02:00
fridtjof
90129130ed CR16C: configure: add cr16c toolchain prefix
this matches the prefix as built by https://aur.archlinux.org/packages/cr16-elf-gcc-git
2026-05-08 13:27:03 +02:00
fridtjof
22697cd1d5
CR16C: Rename f_* to psr_* 2026-05-04 14:27:42 +02:00
Jonas Bewig
d585386a0f
CR16C: Add missing cbit/sbit flag side effect
Co-authored-by: fridtjof <fridtjof@das-labor.org>
2026-05-03 23:40:28 +02:00
Jonas Bewig
38769badc2
CR16C: Implement bit operations 2026-05-03 20:46:10 +02:00
Jonas Bewig
92b96a26c8
CR16C: Fix abs24 and disp20 rel load/stor insns 2026-04-22 22:52:12 +02:00
Jonas Bewig
c3d65261db v10.2.1 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmmNxEkACgkQgqpKJDse
 lHg2gA/+MhKW6VuQGeOISkufRgYv2d8YdZqxV9u/iuqfCBniNoWfQ59oCMCy0lG7
 Pz/j8DQn3r8Da4EICxbuEAT9IIppMfzJNns60inm1mmp9jNvUQoT6M8pIWBC2CH3
 DKQygiwClFKRfmZuagyGUr213WThQ0lEmZCmJxP457zT2xA2ogEBfyIq0Qk2fYmN
 Z9pAfXiZ5bVDwk1PL9zhfyub8t09COp3kPWAZhVwzbDfkPXvdHy/hMXwz5tZ2COw
 e7PhA8R1IMEGXc6WOzE8c0eboSs+pU8R88b1SGZlTfxD3Cv7WGvji5unvsC1a5nZ
 FC6kVql/aDs56kso1NGVLZdCRwKP+9Qjej+w78W9wJI2lBodx3flTXv3XUdK+7Hz
 Tc8BJ/88oRkG3Az7vP7q+WSN2OsHumY7KENAeJE9BEEqiHqdpI2WoIG9pmCaRfrG
 7KNJtpVr6C8+nPHcudroLx0EhwQz1csRUWem0ko7pRECYOMe27/2dPvo6QNsng82
 sCy8k0GoV0DgrSRMjFX0ahi8AtKZ0xv2h71BWgNYtuI9USW7RY9aPEYlvvVVfUoa
 4Y0ZeR67+CyMJ36gGmDCuGHfYsJGzXft5m4gsEiHh5PEQIiytEV3GZ8+XS3syGfY
 XDR6CYSkFAhx68j8bBOHtwBSYTbOWPJ5vo14ZQ6BYlGGAq0KUp8=
 =X7O5
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQc1ZFRpfysT1VCnEeNmYZ3l6SIbwUCabiRVgAKCRCNmYZ3l6SI
 b+sPAQCmnnkEKBNVBNRnpje0dsIuOgoANrCm97vulk4siFDVqwD+KYnBILtUH/RP
 ZMlhIqKkK7T62a2wzt2bITXi4dCWLgw=
 =Za5B
 -----END PGP SIGNATURE-----

Merge tag 'v10.2.1' into cr16-wip

v10.2.1 release
2026-03-17 00:24:55 +01:00
Michael Tokarev
2d3df8abca Update version for 10.2.1 release
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-12 15:15:05 +03:00
Andrey Drobyshev
63a76e0123 scripts/qemugdb: timers: Fix KeyError in 'qemu timers' command
Currently invoking 'qemu timers' command results into: "gdb.error: There
is no member named last".  Let's remove the legacy 'last' field from
QEMUClock, as it was removed in v4.2.0 by the commit 3c2d4c8aa6
("timer: last, remove last bits of last").

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20251204105019.455060-3-andrey.drobyshev@virtuozzo.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 80c97930a93c32e2e666f5420af2d5734021a135)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-10 12:46:22 +03:00
Paolo Bonzini
b5ce6809b4 Revert "tcg/user: do not set exit_request gratuitously"
This reverts commit b422a7bff6.

The reporter says "The commit breaks go; if you run go build in a loop,
it eventually hangs uninterruptible (except -9) with a couple of zombie
children left over".

Reported-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260202091753.28459-1-pbonzini@redhat.com>
(cherry picked from commit 251a3d4ca3c961d95cd624252a178a33066455a2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-10 12:44:50 +03:00
Aleksandr Sergeev
1af5215667 linux-user/syscall.c: Prevent acquiring clone_lock while fork()
By the spec, fork() copies only the thread which executes it.
So it may happen, what while one thread is doing a fork,
another thread is holding `clone_lock` mutex
(e.g. doing a `fork()` or `exit()`).
So the child process is born with the mutex being held,
and there are nobody to release it.

As the thread executing do_syscall() is not considered running,
start_exclusive() does not protect us from the case.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3226
Signed-off-by: Aleksandr Sergeev <sergeev0xef@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260126151612.2176451-1-sergeev0xef@gmail.com>
(cherry picked from commit d22e9aec572396836782e993cb18d598e6012688)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-10 12:42:54 +03:00
Jonathan Cameron
ba31a6fca7 hw/cxl: Take into account how many media operations are requested for param check
Whilst the spec doesn't speak to it directly my assumption is that
a request for more operations than exist should result in an invalid
input error return.

Fixes: 77a8e9fe0e ("hw/cxl/cxl-mailbox-utils: Add support for Media operations discovery commands cxl r3.2 (8.2.10.9.5.3)")
Closes: https://lore.kernel.org/qemu-devel/CAFEAcA-p5wZkNxK7wNVq_3PAzEE-muOd1Def-0O-FSpck4DrBQ@mail.gmail.com/
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260102154731.474859-3-Jonathan.Cameron@huawei.com>
(cherry picked from commit 25465c0e1fd74d2118dfec03912f2595eeb497d7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-06 01:12:25 +03:00
Jonathan Cameron
fd0abbb386 hw/cxl: Check for overflow on santize media as both base and offset 64bit.
The both the size and base of a media sanitize operation are both provided
by the VM, an overflow is possible which may result in checks on valid
range passing when they should not.  Close that by checking for overflow
on the addition.

Fixes: 40ab4ed107 ("hw/cxl/cxl-mailbox-utils: Media operations Sanitize and Write Zeros commands CXL r3.2(8.2.10.9.5.3)")
Closes: https://lore.kernel.org/qemu-devel/CAFEAcA8Rqop+ju0fuxN+0T57NBG+bep80z45f6pY0ci2fz_G3A@mail.gmail.com/
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260102154731.474859-2-Jonathan.Cameron@huawei.com>
(cherry picked from commit 87f8e5a71d061964c9bfa4d6e02db47f54dd61f7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-06 01:12:25 +03:00
Honglei Huang
e5628119e1 virtio-gpu: fix error handling in virgl_cmd_resource_create_blob
Fix inverted error check in virgl_cmd_resource_create_blob() that causes
the function to return error when virtio_gpu_create_mapping_iov() succeeds.

virtio_gpu_create_mapping_iov() returns 0 on success and negative values
on error. The check 'if (!ret)' incorrectly treats success (ret=0) as an
error condition, causing the function to fail when it should succeed.

Change the condition to 'if (ret != 0)' to properly detect errors.

Fixes: 7c092f17cc ("virtio-gpu: Handle resource blob commands")
Signed-off-by: Honglei Huang <honghuan@amd.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260113015203.3643608-2-honghuan@amd.com>
(cherry picked from commit 3560b51979577afc3ab937fd8b02597515bdfbae)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-02-06 01:07:26 +03:00