Debugging 16-bit/real mode code in QEMU+GDB is challenging due to
incorrect architecture detection and segmented memory addressing issues.
This patch improves the debugging experience by reporting i8086
architecture to GDB when in real mode and converting segmented addresses
(CS:EIP, SS:ESP) to th
On 2024/12/21 13:14, Nicholas Piggin wrote:
On Thu Dec 19, 2024 at 6:53 PM AEST, Akihiko Odaki wrote:
On 2024/12/18 16:42, Nicholas Piggin wrote:
The e1000e and igb tests don't clear the msix pending bit after waiting
for it, as it is masked so the irq doesn't get sent. Failing to clear
the pen
On Thu Dec 19, 2024 at 7:00 PM AEST, Akihiko Odaki wrote:
> On 2024/12/18 16:42, Nicholas Piggin wrote:
> > The e1000e and igb tests do not clear the ICR/EICR cause bits (or
> > set auto-clear) on seeing queue interrupts, which inhibits the
> > triggering of a new interrupt.
> >
> > Fix this by cl
On Thu Dec 19, 2024 at 6:53 PM AEST, Akihiko Odaki wrote:
> On 2024/12/18 16:42, Nicholas Piggin wrote:
> > The e1000e and igb tests don't clear the msix pending bit after waiting
> > for it, as it is masked so the irq doesn't get sent. Failing to clear
> > the pending interrupt means all subsequen
On Fri Dec 20, 2024 at 7:14 PM AEST, Harsh Prateek Bora wrote:
> Hi Nick,
>
> On 12/19/24 09:10, Nicholas Piggin wrote:
> > The dispatch count is a field in guest memory that the hypervisor
> > increments when preempting and dispatching the guest. This was not
> > being done deterministically with
On Sat Dec 21, 2024 at 9:54 AM AEST, Paolo Bonzini wrote:
> Il ven 20 dic 2024, 11:44 Nicholas Piggin ha scritto:
>
> > Convert aio_bh_schedule_oneshot() to aio_bh_schedule_oneshot_event(),
> > which can specify the clock type, making it compatible with
> > record-replay.
> >
> > Operations on SCS
On Sat Dec 21, 2024 at 2:31 AM AEST, Peter Xu wrote:
> On Fri, Dec 20, 2024 at 08:42:03PM +1000, Nicholas Piggin wrote:
> > Migration reads CLOCK_HOST when not holding the replay_mutex, which
> > asserts when recording a trace. These are not guest visible so should
> > be CLOCK_REALTIME like other
On Fri Dec 20, 2024 at 11:08 PM AEST, Fabiano Rosas wrote:
> Nicholas Piggin writes:
>
> Hi Nick,
>
> I'm ignorant about replay, but we try to know why were taking the BQL in
> the migration code, we move it around sometimes, etc. Can we be a bit
> more strict with documentation here so we don't g
On Fri Dec 20, 2024 at 8:38 PM AEST, Daniel P. Berrangé wrote:
> On Fri, Dec 20, 2024 at 12:46:14PM +1000, Nicholas Piggin wrote:
> > If any pre-cache downloads fail, the entire functional test run
> > is failed.
> >
> > Signed-off-by: Nicholas Piggin
> > ---
> > tests/functional/qemu_test/asset
Il ven 20 dic 2024, 11:44 Nicholas Piggin ha scritto:
> Convert aio_bh_schedule_oneshot() to aio_bh_schedule_oneshot_event(),
> which can specify the clock type, making it compatible with
> record-replay.
>
> Operations on SCSI reqs do affect target machine state, so it should
> use QEMU_CLOCK_VI
On 20/12/2024 21:59, David Hildenbrand wrote:
Good point, I suspect that will be problematic.
Looking at flatview_write_continue I see no early exit, so maybe it
would still try to get through everything and work as we are hoping,
but that's why I'd like to write a test for it.
I'm just not s
On 12/20/24 13:17, Pierrick Bouvier wrote:
Hi Julian,
On 12/20/24 03:47, Julian Ganz wrote:
Hi Pierrick,
December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
On 12/2/24 11:41, Julian Ganz wrote:
+static void insn_exec(unsigned int vcpu_index, void *userdata)
+{
+ struct cpu_state
On 20/12/24 18:24, Peter Xu wrote:
On Fri, Dec 20, 2024 at 12:25:44PM +0100, Philippe Mathieu-Daudé wrote:
On 19/12/24 19:27, Philippe Mathieu-Daudé wrote:
On 19/12/24 19:20, Philippe Mathieu-Daudé wrote:
On 21/11/24 20:21, Peter Xu wrote:
Currently, qdev_get_machine() has a slight misuse on
On 20/12/24 22:08, Michael Tokarev wrote:
13.08.2024 18:10, Philippe Mathieu-Daudé wrote:
Has this change been forgotten, or is it not appropriate anymore?
Not forgotten and still need to be fixed, however unfortunately
this exposed a bug in user-mode SYS_exit_group when using plugins
(see qe
Convert DIRTY_HPTE() macro as hpte_set_dirty() method.
sPAPR data structures including the hash page table are big-endian
regardless of current CPU endian mode, so use the big-endian LD/ST
API to access the hash PTEs.
Reviewed-by: Nicholas Piggin
Signed-off-by: Philippe Mathieu-Daudé
---
hw/pp
Convert HPTE_VALID() macro as hpte_is_valid() method.
sPAPR data structures including the hash page table are big-endian
regardless of current CPU endian mode, so use the big-endian LD/ST
API to access the hash PTEs.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Nicholas Piggin
---
hw/ppc
Convert CLEAN_HPTE() macro as hpte_set_clean() method.
sPAPR data structures including the hash page table are big-endian
regardless of current CPU endian mode, so use the big-endian LD/ST
API to access the hash PTEs.
Reviewed-by: Nicholas Piggin
Signed-off-by: Philippe Mathieu-Daudé
---
hw/pp
Convert HPTE() macro as hpte_get_ptr() method.
Reviewed-by: Nicholas Piggin
Signed-off-by: Philippe Mathieu-Daudé
---
hw/ppc/spapr.c | 38 ++
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3b022e8da9e..be
The ePAPR magic value in $r6 doesn't need to be byte swapped.
See ePAPR-v1.1.pdf chapter 5.4.1 "Boot CPU Initial Register State"
and the following mailing-list threads:
https://lore.kernel.org/qemu-devel/cafeaca_nr4xw5dnl4nq7vnh4xrh5uwbhqcxulykqyk6_fcb...@mail.gmail.com/
https://lore.kernel.org/qe
Convert HPTE_DIRTY() macro as hpte_is_dirty() method.
sPAPR data structures including the hash page table are big-endian
regardless of current CPU endian mode, so use the big-endian LD/ST
API to access the hash PTEs.
Reviewed-by: Nicholas Piggin
Signed-off-by: Philippe Mathieu-Daudé
---
hw/ppc
Since v3:
- Addressed Nick & Harsh review comments
Remove the tswap() calls on ePAPR, and convert
them to big-endian LD/ST API on sPAPR.
Build-tested only.
Philippe Mathieu-Daudé (6):
hw/ppc/spapr: Convert HPTE() macro as hpte_get_ptr() method
hw/ppc/spapr: Convert HPTE_VALID() macro as hpt
On 19/12/24 07:31, Harsh Prateek Bora wrote:
Hi Philippe,
On 12/18/24 23:51, Philippe Mathieu-Daudé wrote:
Convert HPTE() macro as hpte_get() method.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/ppc/spapr.c | 38 ++
1 file changed, 22 insertions(+), 16 d
Hi Julian,
On 12/20/24 03:47, Julian Ganz wrote:
Hi Pierrick,
December 5, 2024 at 12:33 AM, "Pierrick Bouvier" wrote:
On 12/2/24 11:41, Julian Ganz wrote:
+static void insn_exec(unsigned int vcpu_index, void *userdata)
+{
+ struct cpu_state *state = qemu_plugin_scoreboard_find(states, v
01.08.2024 00:25, Philippe Mathieu-Daudé wrote:
Since malicious guest can write invalid addresses to
the ADMASYSADDR register, we need to check whether the
descriptor could be correctly filled or not.
Ping? This has been about the 9.1 release, now 9.2 is out already
and we're working on 10.0..
13.08.2024 18:10, Philippe Mathieu-Daudé wrote:
Has this change been forgotten, or is it not appropriate anymore?
Not forgotten and still need to be fixed, however unfortunately
this exposed a bug in user-mode SYS_exit_group when using plugins
(see qemu_plugin_disable_mem_helpers call in qemu_
11.08.2024 20:47, Michael Tokarev пишет:
12.04.2024 18:25, Eric Blake wrote:
On Fri, Apr 12, 2024 at 10:06:17AM +0200, Stefan Fritsch wrote:
Commit 99868af3d0 changed the hardcoded constant BDRV_SECTOR_SIZE to a
dynamic field 'align' but introduced a bug. qemu_iovec_discard_back()
is now passed
06.11.2024 06:07, Zhao Liu wrote:
In x86_cpu_filter_features(), if host doesn't support AVX10, the
configured avx10_version should be marked as filtered regardless of
whether prefix is NULL or not.
Check prefix before warn_report() instead of checking for
have_filtered_features.
Cc: qemu-sta...
12.09.2024 19:54, Eugenio Pérez wrote:
Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net
structures if peer nic is present") effectively delayed the backend
cleanup, allowing the frontend or the guest to access it resources as
long as the frontend NIC is still visible to the guest
On 20.12.24 20:49, Stefan Zabka wrote:
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/213
Signed-off-by: Stefan Zabka
---
Addressed initial review by David Hildenbrand
The other change made more sense to me, so I'd like to write a test
to verify that an AddressSpace like
0x00..0x0F MMIO
On Fri, 2024-12-13 at 13:07 -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson
> ---
> hw/s390x/3270-ccw.c | 2 +-
> hw/s390x/ccw-device.c | 2 +-
> hw/s390x/css-bridge.c | 2 +-
> hw/s390x/ipl.c| 2 +-
> hw/s390x/s390-pci-bus.c | 2
On Fri, 2024-12-13 at 13:29 -0600, Richard Henderson wrote:
> Signed-off-by: Richard Henderson
> ---
> hw/vfio/ap.c | 2 +-
> hw/vfio/ccw.c | 2 +-
> hw/vfio/pci.c | 4 ++--
> hw/vfio/platform.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Eric Farman
On 12/19/24 20:10, Richard Henderson wrote:
Simply or'ing the an input s_mask with the mask implied by
the sign extension operation may leave disconnected bits
to the right. Use smask_from_smask to canonicalize.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 6 ++
1 file changed,
On 12/19/24 20:10, Richard Henderson wrote:
Merge the two conditions, sign != 0 && !(z_mask & sign),
by testing ~z_mask & sign. If sign == 0, the logical and
will produce false.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
On 12/19/24 20:10, Richard Henderson wrote:
The sign mask is about repetitions, a la clrsb64(), so the lsb
itself can never be a repetition. Thus ~1 not -1 is correct.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
On 12/19/24 20:10, Richard Henderson wrote:
Avoid the use of the OptContext slots.
Be careful not to call fold_masks_zs when the memory operation
is wide enough to require multiple outputs, so split into two
functions: fold_qemu_ld_1reg and fold_qemu_ld_2reg.
Signed-off-by: Richard Henderson
-
On 12/19/24 20:10, Richard Henderson wrote:
The input which overlaps the sign bit of the output can
have its input s_mask propagated to the output s_mask.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/t
On 12/19/24 20:10, Richard Henderson wrote:
Avoid the use of the OptContext slots. Find TempOptInfo once.
Compute s_mask from the union of the maximum count and the
op2 fallback for op1 being zero.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 15 ++-
1 file changed, 10 i
On 12/19/24 20:10, Richard Henderson wrote:
Consider the passed s_mask to be a minimum deduced from
either existing s_mask or from a sign-extension operation.
We may be able to deduce more from the set of known zeros.
Remove identical logic from several opcode folders.
Signed-off-by: Richard Hen
On 12/19/24 20:10, Richard Henderson wrote:
Add a routine to which masks can be passed directly, rather than
storing them into OptContext. To be used in upcoming patches.
Signed-off-by: Richard Henderson
---
tcg/optimize.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(
On 12/19/24 20:10, Richard Henderson wrote:
There are only a few logical operations which can compute
an "affected" mask. Split out handling of this optimization
to a separate function, only to be called when applicable.
Remove the a_mask field from OptContext, as the mask is
no longer stored a
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/213
Signed-off-by: Stefan Zabka
---
Addressed initial review by David Hildenbrand
The other change made more sense to me, so I'd like to write a test
to verify that an AddressSpace like
0x00..0x0F MMIO Device A
0x10..0x1F ROM
0x20..0x2F MMIO
On 12/20/24 02:50, Philippe Mathieu-Daudé wrote:
On 19/12/24 20:47, Pierrick Bouvier wrote:
Hi all,
assets for tests/functional/test_rx_gdbsim.py are not available anymore.
It seems that the directory "https://acc.dl.osdn.jp/users"; vanished from
the web, and it's not a temporary issue.
If som
On 20.12.24 14:31, Ani Sinha wrote:
On Fri, Dec 20, 2024 at 5:03 PM Alexander Graf wrote:
On 20.12.24 11:00, Ani Sinha wrote:
Either add the I386 dependency or don't use PC_MACHINE, because on
non-x86 targets PC_MACHINE(qdev_get_machine()) will crash.
Ah this is where we have a disconnect.
On Fri, 20 Dec, 2024, 7:01 pm Ani Sinha, wrote:
> On Fri, Dec 20, 2024 at 5:03 PM Alexander Graf wrote:
> >
> >
> > On 20.12.24 11:00, Ani Sinha wrote:
> > >>> Either add the I386 dependency or don't use PC_MACHINE, because on
> > >>> non-x86 targets PC_MACHINE(qdev_get_machine()) will crash.
>
On Fri, Dec 20, 2024 at 12:25:44PM +0100, Philippe Mathieu-Daudé wrote:
> On 19/12/24 19:27, Philippe Mathieu-Daudé wrote:
> > On 19/12/24 19:20, Philippe Mathieu-Daudé wrote:
> > > On 21/11/24 20:21, Peter Xu wrote:
> > > > Currently, qdev_get_machine() has a slight misuse on container_get(), as
>
+for (int i = 0; i < size; i += 16) {
+addr = get_address(s, rs1, i);
+if (is_load) {
+tcg_gen_qemu_ld_i128(t16, addr, s->mem_idx,
+MO_LE | MO_128 | atomicity);
+tcg_gen_st_i128(t16, tcg_env, vreg_ofs(s, vd) +
On Fri, Dec 20, 2024, Xiaoyao Li wrote:
> On 12/19/2024 10:33 AM, Sean Christopherson wrote:
> > > > For all other CPUID bits, what the TDX Module thinks and/or presents to
> > > > the guest
> > > > is completely irrelevant, at least as far as KVM cares, and to some
> > > > extent as far
> > > >
On 12/18/24 08:20, Alex Bennée wrote:
From: Pierrick Bouvier
This boot an OP-TEE environment, and launch a nested guest VM inside it
using the Realms feature. We do it for virt and sbsa-ref platforms.
Signed-off-by: Pierrick Bouvier
Message-Id: <20241203213629.2482806-1-pierrick.bouv...@linar
This boot an OP-TEE environment, and launch a nested guest VM inside it
using the Realms feature. We do it for virt and sbsa-ref platforms.
Signed-off-by: Pierrick Bouvier
-
v2:
- move test to its own file
- add sbsa test
- check output of `cca-workload-attestation report`
v3:
- build and
Peter Xu writes:
> On Thu, Dec 19, 2024 at 04:31:04PM -0300, Fabiano Rosas wrote:
>> We shouldn't change stuff that's also used by the rest of the
>> community. People know about QEMU_TEST_FLAKY_TESTS and -m slow. These
>> must continue to work the same.
>
> I see what I overlook; it's used much
On Fri, Dec 20, 2024 at 08:42:03PM +1000, Nicholas Piggin wrote:
> Migration reads CLOCK_HOST when not holding the replay_mutex, which
> asserts when recording a trace. These are not guest visible so should
> be CLOCK_REALTIME like other statistics in MigrationState, which do
> not require the repl
On Thu, Dec 19, 2024 at 03:53:22PM -0300, Fabiano Rosas wrote:
> Stefan Hajnoczi writes:
>
> > Hi Fabiano,
> > Please take a look at this CI failure:
> >
> MALLOC_PERTURB_=61 QTEST_QEMU_BINARY=./qemu-system-s390x
> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_st
On 12/20/24 04:21, Craig Blackmore wrote:
Use atomic load/store functions to access multiple elements from host.
Co-authored-by: Paolo Savini
Signed-off-by: Paolo Savini
Signed-off-by: Craig Blackmore
---
target/riscv/vector_helper.c | 107 +--
1 file chang
In preparation of heterogeneous emulation where cores with
different endianness can run concurrently, replace the pair
of cpu_memory_rw_debug() + tswap() calls by put/get_user_u32()
ones, which still do the same under the hood, but simplify the
code maintenance (having less sites to do endianness c
From: Peter Xu
Drop one use of container_get(), instead switch to the explicit function to
create a container.
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Peter Xu
Message-ID: <20241121192202.4155849-5-pet...@redhat.com>
Signed-off-by: Philippe Mathieu-D
From: Alex Bennée
Purely cosmetic.
Signed-off-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Message-ID: <20241218162104.3493551-17-alex.ben...@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé
---
util/qemu-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/uti
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-7-phi...@linaro.org>
---
accel/tcg/internal-target.h| 1 +
include/exec/translate-all.h | 5 -
include/user/page-protection.h | 20
Move declarations related to page protection under user
emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-14-phi...@linaro.org>
---
bsd-user/qemu.h
"exec/confidential-guest-support.h" is specific to system
emulation, so move it under the system/ namespace.
Mechanical change doing:
$ sed -i \
-e
's,exec/confidential-guest-support.h,sysemu/confidential-guest-support.h,' \
$(git grep -l exec/confidential-guest-support.h)
Signed-o
From: Peter Xu
container_get() is going to become strict on not allowing to return a
non-container.
Switch the e500 user to use object_resolve_path_component() explicitly.
Cc: Bharat Bhushan
Cc: qemu-...@nongnu.org
Reviewed-by: Cédric Le Goater
Reviewed-by: Daniel P. Berrangé
Signed-off-by:
Since commit c4b3f46c151 ("include/exec: Move vaddr defines to
separate file") we only need to include "exec/vaddr.h" to get
the 'vaddr' type definition, no need for "exec/cpu-common.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Reviewed-by: Zhao Liu
Message-Id: <2024
"exec/cpu-defs.h" should be kept as minimal as possible;
besides these includes don't seem necessary. Remove them.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Tested-by: Thomas Huth
Reviewed-by: Richard Henderson
Message-Id: <20241114011310.3615-3-phi...@linaro.org>
---
curr_cflags() is only used within accel/tcg/,
move its declaration to accel/tcg/internal-common.h.
Suggested-by: Richard Henderson
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20241216214030.59393-1-phi...@linaro.org>
---
accel/tcg/internal-common.h | 3 +++
log_pc() is only used within cpu-exec.c, no need to
expose it via "internal-target.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-10-phi...@linaro.org>
---
accel/tcg/internal-target.h | 10 --
acce
Commit 38fc4b11e03 ("accel/tcg: Restrict cpu_io_recompile() to
system emulation") inadvertently restricted cpu_io_recompile()
to SoftMMU. Correct to restrict to system emulation.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20241216160514.56630-1-phi...@linar
Declare cpu_loop() once in "user/cpu_loop.h".
bsd-user gets the G_NORETURN attribute.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-18-phi...@linaro.org>
---
bsd-user/aarch64/target_arch_cpu.h | 2 +-
bsd-use
From: Anton Johansson
Required to compile accel/tcg/translate-all.c once for softmmu targets.
The function gets quite big for some targets so uninlining makes sense.
Reviewed-by: Richard Henderson
Signed-off-by: Anton Johansson
Message-Id: <20240119144024.14289-14-a...@rev.ng>
[PMD: Only take S
CONFIG_DEVICES is not generated on user emulation, so
do not define it.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20241218151256.68625-1-phi...@linaro.org>
---
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meson.build b
"linux-user/cpu_loop-common.h" is generic enough to be used by
bsd-user, so rename it as "user/cpu_loop.h".
Mechanical change running:
$ sed -i -e 's,cpu_loop-common.h,user/cpu_loop.h,' \
$(git grep -l cpu_loop-common.h)
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierr
Commit 3803b6b427 ("target/mips: Fold jazz behaviour into
mips_cpu_do_transaction_failed") removed update on TCGCPUOps
and commit 119065574d ("hw/core: Constify TCGCPUOps") made
it const. Remove the now irrelevant comment.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Peter Maydell
Reviewed
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any
user-visible changes.
signature.asc
Description: PGP signature
Nothing requires definitions from "exec/cpu-common.h",
do not include this header.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Reviewed-by: Zhao Liu
Message-Id: <20241217151305.29196-2-phi...@linaro.org>
---
include/hw/xen/xen.h | 2 --
1 file changed, 2 deletions(-)
Most targets define their restore_state_to_opc() handler in cpu.c.
In order to keep SPARC aligned, move sparc_restore_state_to_opc()
from translate.c to cpu.c.
Suggested-by: Richard Henderson
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Peter Maydell
Message-Id: <20241115152053.66442-4-ph
loongarch_cpu_dump_state() is not used outside of cpu.c,
no need to expose its prototype.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Peter Maydell
Reviewed-by: Richard Henderson
Message-Id: <20241115152053.66442-3-phi...@linaro.org>
---
target/loongarch/internals.h | 2 --
target/loong
The TranslationBlock flags are defined in 'exec/translation-block.h'.
tcg_cflags_has/set() use them, it is more logical to declare them in
the same place. Move them there too.
Suggested-by: Richard Henderson
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20241
At this point "exec/translate-all.h" only declare
tb_check_watchpoint(), which isn't used by any of
cpu-target.c or system/physmem.c, so remove its
inclusion.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-8-ph
From: Alexander Graf
MacOS unconditionally disables interrupts of the physical timer on boot
and then continues to use the virtual one. We don't really want to support
a full physical timer emulation, so let's just ignore those writes.
Signed-off-by: Alexander Graf
Signed-off-by: Phil Dennis-Jo
Include "cpu.h" earlier to get the MMU_USER_IDX definition soon
enough and avoid when refactoring unrelated headers:
In file included from include/exec/translator.h:271,
from ../../accel/tcg/translator.c:13:
include/exec/cpu-all.h: In function ‘cpu_mmu_index’:
include/exec
The next commit will remove "qemu/clang-tsa.h" of "exec/exec-all.h",
however the following files indirectly include it:
$ git grep -L qemu/clang-tsa.h $(git grep -wl TSA_NO_TSA)
block/create.c
include/block/block_int-common.h
tests/unit/test-bdrv-drain.c
tests/unit/test-block-iothread.c
From: Peter Xu
Provide a macro for the container type across QEMU source tree, rather than
hard code it every time.
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Peter Xu
Message-ID: <20241121192202.4155849-2-pet...@redhat.com>
Signed-off-by: Philippe Math
Move various declarations related to user emulation
from "exec/exec-all.h" to "user/cpu_loop.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-19-phi...@linaro.org>
---
include/exec/exec-all.h | 55 +-
"exec/translate-all.h" is only useful to TCG accelerator,
so move it to accel/tcg/, after renaming it 'tb-internal.h'.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-9-phi...@linaro.org>
---
accel/tcg/internal
Remove the single target-specific definition used in
"exec/translator.h" (TARGET_PAGE_MASK) by un-inlining
is_same_page().
Rename the method as translator_is_same_page() and
improve its documentation.
Use it in translator_use_goto_tb().
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard H
In preparation of heterogeneous emulation where cores with
different endianness can run concurrently, we need to remove
the tswap() calls -- which use a fixed per-binary endianness.
Get the endianness of the UHI CPU accessed using
mips_env_is_bigendian() and replace the tswap() calls
by bswap() on
Move declarations related to page protection under user
emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-12-phi...@linaro.org>
---
include/exec/cpu-al
'vaddr' type is declared in "exec/vaddr.h".
"exec/translation-block.h" uses this type without including
the corresponding header. It works because this header is
indirectly included, but won't work when the other headers
are refactored:
include/exec/translation-block.h:56:5: error: unknown type
"exec/ram_addr.h" contains system specific declarations.
Restrict its inclusion to sysemu to avoid build errors
when refactoring.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241114011310.3615-10-phi...@linaro.org>
---
target
TB compile flags, tb_page_addr_t type, tb_cflags() and few
other methods are defined in "exec/translation-block.h".
All these files don't include "exec/translation-block.h" but
include "exec/exec-all.h" which include it. Explicitly include
"exec/translation-block.h" to be able to remove it from
"e
TARGET_PAGE_BITS is defined in each target "cpu-param.h",
itself included by "exec/cpu-defs.h".
Include the latter in order to avoid when refactoring:
In file included from ../../system/watchpoint.c:23:
include/exec/cpu-all.h:356:19: error: use of undeclared identifier
'TARGET_PAGE_BITS'
Match with the page_protect() prototype, use a tb_page_addr_t
argument instead of target_ulong.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-6-phi...@linaro.org>
---
include/exec/translate-all.h | 2 +-
acce
Nothing requires definitions from "exec/cpu-common.h",
do not include this header.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Reviewed-by: Zhao Liu
Message-Id: <20241217151305.29196-3-phi...@linaro.org>
---
include/system/numa.h | 1 -
1 file changed, 1 deletion(-)
d
Move cpu_loop_exit_requested() declaration to "exec/cpu-common.h",
along with the related cpu_loop_exit_noexc(), cpu_loop_exit(),
cpu_loop_exit_atomic() and cpu_loop_exit_restore() methods.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Message-Id:
Move declarations related to page protection under user
emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-13-phi...@linaro.org>
---
bsd-user/bsd-mem.h
Commit 944f3d5dd21 ("coroutine: Add qemu_co_mutex_assert_locked")
added an inline method which uses qatomic_read(), itself declared
in "qemu/atomic.h". Explicitly include it now to avoid issue when
refactoring unrelated headers.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
When moving tb_cflags() in commit 88d4b5138a8 ("tcg: Make
tb_cflags() usable from target-agnostic code") we forgot to
include "qemu/atomic.h", which declares qatomic_read().
Explicitly include it now to avoid issue when refactoring
unrelated headers.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed
Move declarations related to page protection under user
emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-15-phi...@linaro.org>
---
include/exec/cpu-al
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-16-phi...@linaro.org>
---
linux-user/cpu_loop-common.h | 5 -
linux-user/aarch64/cpu_loop.c | 2 +-
linux-user/alpha/cpu_loop.c | 2 +-
linux-us
Move declarations related to TranslationBlock out of the
generic "internal-target.h" to "tb-internal.h".
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard Henderson
Message-Id: <20241212185341.2857-11-phi...@linaro.org>
---
accel/tcg/internal-target.h | 3
On Fri, Dec 20 2024, Kashyap Chamarthy wrote:
> Related tangent on CPU feature discoverability on ARM:
>
> Speaking of "Neoverse-N1", looking at a system that I have access to,
> the `lscpu` output does not say anything about who the integrator is; it
> only says:
>
> ...
> Vendor ID:
abi_ptr is expected to be used in user emulation.
tlb_vaddr_to_host() uses it, but can be used in
system emulation. Replace the type by 'vaddr' which
is equivalent on user emulation but also works on
system.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Pierrick Bouvier
Reviewed-by: Richard
1 - 100 of 204 matches
Mail list logo