Commit graph

16441 commits

Author SHA1 Message Date
fridtjof
4abbc2b163 wip 2026-05-04 14:31:19 +02:00
fridtjof
35dd059fbf translate: don't touch registers in CMPD 2026-05-04 14:31:19 +02:00
fridtjof
a52b787a70 wip! disas: empty insn printers 2026-05-04 14:31:19 +02:00
fridtjof
6291ca5273 wip! cpu: fixup empty restore_state_to_opc 2026-05-04 14:31:19 +02:00
fridtjof
0fcddb1ecf translate: fix popret goto usage 2026-05-04 14:31:19 +02:00
fridtjof
ef4679fca8 decode: fix abs20 remap for load abs 2026-05-04 14:31:19 +02:00
fridtjof
0efe75f98b Revert "wip! maybe??? fix a subtle bug in MOVD imm"
This reverts commit 574767b51e623f6686d3ad70588600b21aa79441.
2026-05-04 14:31:19 +02:00
fridtjof
d97f52906b Revert "wip! some correctness fixes to deal with host register storage vs actual target register size"
This reverts commit e8d1cba15aa8bcd942c87da9e7de3f6ccfd706e3.
2026-05-04 14:31:19 +02:00
fridtjof
42e103ca1b wip! some correctness fixes to deal with host register storage vs actual target register size 2026-05-04 14:31:19 +02:00
fridtjof
2badeffc2e translate: wip lpr/spr (noop still lol) 2026-05-04 14:31:19 +02:00
fridtjof
bfb5c542f1 disas: make buildable for now 2026-05-04 14:31:19 +02:00
fridtjof
010f44408a wip! broken disas, doesnt build right now 2026-05-04 14:31:19 +02:00
fridtjof
83b9b646e8 wip! todo! annotate another source of >16 bit values in backing registers 2026-05-04 14:31:18 +02:00
fridtjof
06f9921116 wip! maybe??? fix a subtle bug in MOVD imm 2026-05-04 14:31:18 +02:00
fridtjof
75a4c5793e wip! translate: implement BR{EQ,NE}0{B,W} 2026-05-04 14:31:18 +02:00
fridtjof
f4503efb20 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-04 14:31:18 +02:00
fridtjof
5b25a18c95 (still necessary?) translate: implement remap behavior for STORi with abs20 2026-05-04 14:31:18 +02:00
fridtjof
7037504166 wip! status register management 2026-05-04 14:31:18 +02:00
fridtjof
ecdcafd570 helper: report exit by guest 2026-05-04 14:31:18 +02:00
fridtjof
2b96aa2f41 wip! implement LPR(D), SPR(D) (stubs only) 2026-05-04 14:31:18 +02:00
fridtjof
3382fc1700 wip! implement BAL, PUSH, POP(RET) 2026-05-04 14:31:18 +02:00
fridtjof
7b0d3b1a53 wip! hack! dump_regs "semihosting" helper through excp dbg 2026-05-04 14:31:18 +02:00
fridtjof
0fc68742a3 wip! cpu: implement some ops that previously crashed because they're not there 2026-05-04 14:31:18 +02:00
fridtjof
d3c73feda0 wip! random debugging stuff, halt/debug on illegal insn 2026-05-04 14:31:18 +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
Paolo Bonzini
f48aaf926e target/i386/tcg: fix a few instructions that do not support VEX.L=1
Match the contents of table 2-17 ("#UD Exception and VEX.L Field Encoding")
in the SDM, for instruction in exception class 5.  They were incorrectly
accepting 256-bit versions that do not exist.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 2eb8d9734355ed86e162dce2a3f265ffee4005ed)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-28 12:01:22 +03:00
Philippe Mathieu-Daudé
4131a1d83c accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu()
Fix typo to avoid the following build failure:

  target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu':
  target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member named 'vcpu_dirty'
    988 |     qcpu->vcpu_dirty = true;
        |         ^~

Cc: qemu-stable@nongnu.org
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 2098164a6b ("accel/nvmm: Replace @dirty field by generic CPUState::vcpu_dirty field")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260113203924.81560-1-philmd@linaro.org>
(cherry picked from commit 7be4256281f430f726366c92ffdea0b72651de8a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 20:29:45 +03:00
Peter Maydell
6bcd958030 target/arm: Correctly trap HCR.TID1 registers in v7A
In v7A HCR.TID1 is defined to trap for TCMTR, TLBTR, REVIDR and AIDR.
We incorrectly use an accessfn for REVIDR and AIDR that only traps on
v8A cores.  Fix this by collapsing access_aa64_tid1() and
access_aa32_tid1() together and never doing a check for v8 vs v7.

The accessfn is also used for SMIDR_EL1, which is fine as this
register is AArch64 only.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20251231170858.254594-4-peter.maydell@linaro.org
(cherry picked from commit b67a35622f9a816544ec094132d8af0debfac7f2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 20:29:45 +03:00
Peter Maydell
5ead00ce11 target/arm: Correctly honour HCR.TID3 for v7A cores
The HCR.TID3 bit defines that we should trap to the hypervisor for
reads to a collection of ID registers. Different architecture versions
have defined this differently:

 * v7A has a set of ID regs that definitely must trap:
    - ID_PFR{0,1}, ID_DFR0, ID_AFR0, ID_MMFR{0,1,2,3},
      ID_ISAR{0,1,2,3,4,5}, MVFR{0,1}
   and somewhat vaguely says that "there is no requirement"
   to trap for registers that are reserved in the ID reg space
   (i.e. which RAZ and might be used for new ID regs in future)
 * v8A adds to this list:
    - ID_PFR2 and MVFR2 must trap
    - ID_MMFR4, ID_MMFR5, ID_ISAR6, ID_DFR1 and reserved registers
      in the ID reg space must trap if FEAT_FGT is implemented,
      and it is IMPDEF if they trap if FEAT_FGT is not implemented

In QEMU we seem to have attempted to implement this distinction
(taking the "we do trap" IMPDEF choice if no FEAT_FGT), with
access_aa64_tid3() always trapping on TID3 and access_aa32_tid3()
trapping only if ARM_FEATURE_V8 is set.  However, we didn't apply
these to the right set of registers: we use access_aa32_tid3() on all
the 32-bit ID registers *except* ID_PFR2, ID_DFR1, ID_MMFR5 and the
RES0 space, which means that for a v7 CPU we don't trap on a lot of
registers that we should trap on, and we do trap on various things
that the v7A Arm ARM says there is "no requirement" to trap on.

Straighten this out by naming the access functions more clearly for
their purpose, and documenting this: access_v7_tid3() is only for the
fixed set of ID registers that v7A traps on HCR.TID3, and
access_tid3() is for any others, including the reserved encoding
spaces and any new registers we add in future.

AArch32 MVFR2 access is handled differently, in check_hcr_el2_trap;
there we already do not trap on TID3 on v7A cores (where MVFR2
doesn't exist), because we in the code-generation function we UNDEF
if ARM_FEATURE_V8 is not set, without generating code to call
check_hcr_el2_trap.

This bug was causing a problem for Xen which (after a recent change
to Xen) expects to be able to trap ID_PFR0 on a Cortex-A15.

The result of these changes is that our v8A behaviour remains
the same, and on v7A we now trap the registers the Arm ARM definitely
requires us to trap, and don't trap the reserved space that "there is
no requirement" to trap.

Cc: qemu-stable@nongnu.org
Fixes: 6a4ef4e5d1 ("target/arm: Honor HCR_EL2.TID3 trapping requirements")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20251231170858.254594-3-peter.maydell@linaro.org
(cherry picked from commit 205ca535abaceda375c54797b1129a54a5ebbe96)
(Mjt: trivial context fix around AA64MMFR4_EL1 definition)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 20:29:05 +03:00
Peter Maydell
bcc7fc8f81 target/arm: Don't specify ID_PFR1 accessfn twice
In the definition of ID_PFR1 we have an ifdef block; we specify the
accessfn once in the common part of the ifdef and once in the
not-user-only part, which is redundant but harmless.

The accessfn will always return success in user-only mode (because
we won't trap to EL2), so specify it only in the not-user-only
half of the ifdef, as was probably the intention.

This is only cc'd to stable to avoid a textual conflict with
the following patch, which is a bug fix.

Cc: qemu-stable@nongnu.org
Fixes: 0f150c8499 ("target/arm: Constify ID_PFR1 on user emulation")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20251231170858.254594-2-peter.maydell@linaro.org
(cherry picked from commit 8da52b8401afa34ea8caa58e1bfb321ae142899b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 19:35:21 +03:00
Song Gao
0b92a8a130 target/loongarch: Fix exception ADEF/ADEM missing to update CSR_BADV
Exception ADEM/ADEF need update CSR_BADV, the value from the virtual
address.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
(cherry picked from commit a7be2e0a3f7d0f35bcc3b17e2b558084efc5d9fe)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 19:35:21 +03:00
Song Gao
7d662d328d target/loongarch: Fix exception BCE missing to update CSR_BADV
Exception BCE need update CSR_BADV, and the value is env->pc.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
(cherry picked from commit e4f0ef58d53eb20056f9f3ca9f21dbbbf25f2530)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 19:35:21 +03:00
Song Gao
b8456254d0 target/loongach: Fix some exceptions failure in updating CSR_BADV
According to Volume 1 Manual 7.4.8 ,exception,SYS,BRK,INE,IPE,PPD
FPE,SXD,ASXD are need't update CSR_BADV, this patch correct it.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
(cherry picked from commit 70cf9b7bf7aff47f8d85ccce35b688dd91335cf0)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-18 19:35:21 +03:00
Paolo Bonzini
11e286fb93 target/i386/tcg: allow VEX in 16-bit protected mode
VEX is only forbidden in real and vm86 mode; 16-bit protected mode supports
it for some unfathomable reason.

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit ed88bdcfbdcf9d411607cd690f93f915feff6a5b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-16 14:29:07 +03:00
Paolo Bonzini
6594e50e7e target/i386/tcg: mask addresses for VSIB
VSIB can have either 32-bit or 64-bit addresses, pass a constant mask to
the helper and apply it before the load.

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 5e3572ef2e94608568b1a73eab9d382b250936eb)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-16 14:28:56 +03:00
Paolo Bonzini
51bc24d427 target/i386/tcg: do not mark all SSE instructions as unaligned
If the vex_special field was not initialized, it was considered to be
X86_VEX_SSEUnaligned (whose value was zero).  Add a new value to
fix that.

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 73dd6e4a36dd8d85548292f382a4d479e2810371)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-16 14:28:45 +03:00
Laurent Vivier
359076c8a0 m68k: fix CAS2 writeback when Dc1==Dc2
According to Programmer's Reference Manual, if Dc1 and Dc2 specify the
same data register and the comparison fails, memory operand 1 is stored
in the data register.

The current helpers wrote Dc1 then Dc2, leaving operand 2 in the shared
register.

Swap the writeback order for cas2w/cas2l so memory operand 1 wins.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251226213707.331741-1-laurent@vivier.eu>
(cherry picked from commit 11dac41f2e830bcd7ba74969dc50f5740e3ce7e7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-16 14:26:44 +03:00
Fabiano Rosas
639ffcbd64 target/ppc: Fix env->quiesced migration
The commit referenced (from QEMU 10.0) has changed the way the pseries
machine marks a cpu as quiesced. Previously, the cpu->halted value
from QEMU common cpu code was (incorrectly) used. With the fix, the
env->quiesced variable starts being used, which improves on the
original situation, but also causes a side effect after migration:

The env->quiesced is set at reset and never migrated, which causes the
destination QEMU to stop delivering interrupts and hang the machine.

To fix the issue from this point on, start migrating the env->quiesced
value.

For QEMU versions < 10.0, sending the new element on the stream would
cause migration to be aborted, so add the appropriate compatibility
property to omit the new subsection.

Independently of this patch, all migrations from QEMU versions < 10.0
would result in a hang since the older QEMU never migrates
env->quiesced. This is bad because it leaves machines already running
on the old QEMU without a migration path into newer versions.

As a workaround, use a few heuristics to infer the new value of
env->quiesced based on cpu->halted, LPCR and PSSCR bits that are
usually set/cleared along with quiesced.

Note that this was tested with -cpu power9 and -machine ic-mode=xive
due to another bug affecting migration of XICS guests. Tested both
forward and backward migration and savevm/loadvm from 9.2 and 10.0.

Also tested loadvm of a savevm image that contains a mix of cpus both
halted and not halted.

Reported-by: Fabian Vogt <fvogt@suse.de>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3079
Fixes: fb802acdc8 ("ppc/spapr: Fix RTAS stopped state")
Acked-by: Chinmay Rath <rathc@linux.ibm.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/qemu-devel/20260109123519.28703-2-farosas@suse.de
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
(cherry picked from commit 628bda1ab7596a7cceb1c5356d23a92001c7a8c5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-13 11:07:34 +03:00
Paolo Bonzini
59c9137156 target/i386/tcg: ignore V3 in 32-bit mode
From the manual: "In 64-bit mode all 4 bits may be used. [...]
In 32-bit and 16-bit modes bit 6 must be 1 (if bit 6 is not 1, the
2-byte VEX version will generate LDS instruction and the 3-byte VEX
version will ignore this bit)."

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 0db1b556e4bcd7a51f222cda9e14850f88fe3f88)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-12-29 10:44:56 +03:00
Andrew Cooper
b33a563281 target/i386: Fix #GP error code for INT instructions
While the (intno << shift) expression is correct for indexing the IDT based on
whether Long Mode is active, the error code itself was unchanged with AMD64,
and is still the index with 3 bits of metadata in the bottom.

Found when running a Xen unit test, all under QEMU.  The unit test objected to
being told there was an error with IDT index 256 when INT $0x80 (128) was the
problem instruction:

  ...
  Error: Unexpected fault 0x800d0802, #GP[IDT[256]]
  ...

Fixes: d2fd1af767 ("x86_64 linux user emulation")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Link: https://lore.kernel.org/r/20250312000603.3666083-1-andrew.cooper3@citrix.com
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3160
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 60efba3c1bff0d78632d45c2dc927c5bc7a17ba8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-12-29 10:44:47 +03:00
Alex Bennée
dd77ef99aa target/arm: handle unaligned PC during tlb probe
PC alignment faults have priority over instruction aborts and we have
code to deal with this in the translation front-ends. However during
tb_lookup we can see a potentially faulting probe which doesn't get a
MemOp set. If the page isn't available this results in
EC_INSNABORT (0x20) instead of EC_PCALIGNMENT (0x22).

As there is no easy way to set the appropriate MemOp in the
instruction fetch probe path lets just detect it in
arm_cpu_tlb_fill_align() ahead of the main alignment check. We also
teach arm_deliver_fault to deliver the right syndrome for
MMU_INST_FETCH alignment issues.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3233
Tested-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251209092459.1058313-5-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-09 16:21:56 +00:00
Alex Bennée
d100193724 target/arm: make HV_EXIT_REASON_CANCELED leave hvf_arch_vcpu_exec
Without this we can spin tightly in the main HVF dispatch loop and
never release the lock long enough. As a result the HMP never gets to
run and shutting down the system deadlocks.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3228
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251209092459.1058313-4-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-09 16:21:35 +00:00
Alex Bennée
2a425aae0b target/arm: ensure PSCI register updates are flushed
When we handle a host call we report state back to the caller via
registers. Set vcpu_dirty to indicate QEMU is currently the reference
and hoist the flush_cpu_state() and make the call unconditional.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3228
Tested-by: Christian Stussak <christian.stussak@imaginary.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251209092459.1058313-3-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-09 16:21:35 +00:00
Alex Bennée
c22e943ea1 Revert "target/arm: Re-use arm_is_psci_call() in HVF"
This breaks a pure HVF (--disable-tcg) build because the fallback stub
will always report false.

This reverts commit 4695daacc0.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Christian Stussak <christian.stussak@imaginary.org>
Message-ID: <20251209092459.1058313-2-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-12-09 16:21:35 +00:00
Richard Henderson
13432ee4c6 Accelerators patches queue
- Fix HVF/x86 build
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkt+X0ACgkQ4+MsLN6t
 wN4YvhAApOrEtlWbMrUIeeHTc8bHMGPi62IEITR299NTtI9vTJLFMq0+tyvUBVLx
 QA2yX0sRmEnlVwIgCA6f4hTYEuoFrSkpOzK3Qojs1tO488m9GymWPMwnUcNEhH9a
 ny7csR01m5rS2Jb6dV3pY8oMddwrVyT5n9rzdi65a6Sq6RAYvMcl0mbYM163qMNY
 nPBj9PnRG3QFk0/YqBpQ9uhjMXw/s8wVYQ4eJI87rWB7QqBPeiFQTyAG4MicATQM
 06LYinS4ZGUSQoRUNr3oKa6dtvI11C+JUql2mUPnZfT1muebF6EbzeQ7tTE7Vds2
 /fqRO3dBlyePipbgkFH1/PpKoRKMv9GDVcOpjebtKIBlxH+II0ps7c2GMNbOFNuu
 HBHcJOAxKGLrcj5PembcGNJlSzzta8UJixlJ5JBXwgjd9qr8QaNeq2XbJ1gBpRiy
 qjZi4vbG5dW2cfcgjeRDKBw188Lh26QxkKjWiTaREXjW4AJttexvDuzXaSPCc2aI
 2fAKqclZNCCOfHymJSpAhgKMOlmXRmoTeZX2+mszRZJVt3zp2MR2pjn5ihR7L8wc
 fes7XjF/GngdbSryLDt3I/N8pNgxZZVQ1qWS/Qxi6m7D5xWPR7FBkDhk47+miNfr
 QulbRWGSC3AyE3Agy1Hfj0s6zi1tZ0D4lmU9VY/ucFWWxCSt1SQ=
 =QV0k
 -----END PGP SIGNATURE-----

Merge tag 'accel-20251201' of https://github.com/philmd/qemu into staging

Accelerators patches queue

- Fix HVF/x86 build

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkt+X0ACgkQ4+MsLN6t
# wN4YvhAApOrEtlWbMrUIeeHTc8bHMGPi62IEITR299NTtI9vTJLFMq0+tyvUBVLx
# QA2yX0sRmEnlVwIgCA6f4hTYEuoFrSkpOzK3Qojs1tO488m9GymWPMwnUcNEhH9a
# ny7csR01m5rS2Jb6dV3pY8oMddwrVyT5n9rzdi65a6Sq6RAYvMcl0mbYM163qMNY
# nPBj9PnRG3QFk0/YqBpQ9uhjMXw/s8wVYQ4eJI87rWB7QqBPeiFQTyAG4MicATQM
# 06LYinS4ZGUSQoRUNr3oKa6dtvI11C+JUql2mUPnZfT1muebF6EbzeQ7tTE7Vds2
# /fqRO3dBlyePipbgkFH1/PpKoRKMv9GDVcOpjebtKIBlxH+II0ps7c2GMNbOFNuu
# HBHcJOAxKGLrcj5PembcGNJlSzzta8UJixlJ5JBXwgjd9qr8QaNeq2XbJ1gBpRiy
# qjZi4vbG5dW2cfcgjeRDKBw188Lh26QxkKjWiTaREXjW4AJttexvDuzXaSPCc2aI
# 2fAKqclZNCCOfHymJSpAhgKMOlmXRmoTeZX2+mszRZJVt3zp2MR2pjn5ihR7L8wc
# fes7XjF/GngdbSryLDt3I/N8pNgxZZVQ1qWS/Qxi6m7D5xWPR7FBkDhk47+miNfr
# QulbRWGSC3AyE3Agy1Hfj0s6zi1tZ0D4lmU9VY/ucFWWxCSt1SQ=
# =QV0k
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Dec 2025 12:24:29 PM PST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'accel-20251201' of https://github.com/philmd/qemu:
  accel/hvf: Fix i386 HVF compilation failures

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-12-02 04:40:54 -08:00
Nguyen Dinh Phi
3bee93b9ab accel/hvf: Fix i386 HVF compilation failures
Recent changes introduced build errors in the i386 HVF backend:

 - ../accel/hvf/hvf-accel-ops.c:163:17: error: no member named 'guest_debug_enabled' in 'struct AccelCPUState'
   163 |     cpu->accel->guest_debug_enabled = false;

 - ../accel/hvf/hvf-accel-ops.c:151:51
   error: no member named 'unblock_ipi_mask' in 'struct AccelCPUState'

 - ../target/i386/hvf/hvf.c:736:5
   error: use of undeclared identifier 'rip'

 - ../target/i386/hvf/hvf.c:737:5
   error: use of undeclared identifier 'env'

This patch corrects the field usage and move identifier to correct
function ensuring successful compilation of the i386 HVF backend.

These issues were caused by:

Fixes: 2ad756383e (“accel/hvf: Restrict ARM-specific fields of AccelCPUState”)
Fixes: 2a21c92447 (“target/i386/hvf: Factor hvf_handle_vmexit() out”)

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251126094601.56403-1-phind.uet@gmail.com>
[PMD: Keep setting vcpu_dirty on AArch64]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Message-Id: <20251128085854.53539-1-phind.uet@gmail.com>
2025-12-01 21:21:16 +01:00