Re: [PATCH v3 2/8] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-06-12 Thread Aaron Lindsay
On Jun 09 13:51, Richard Henderson wrote: > On 6/9/23 10:23, Aaron Lindsay wrote: > > +static inline int isar_feature_pauth_get_features(const ARMISARegisters > > *id) > > +{ > > +if (isar_feature_aa64_pauth_arch_qarma5(id)) { > > +return FIELD_EX64(id

Re: [PATCH v3 1/8] target/arm: Add ID_AA64ISAR2_EL1

2023-06-12 Thread Aaron Lindsay
On Jun 09 13:49, Richard Henderson wrote: > On 6/9/23 10:23, Aaron Lindsay wrote: > > --- a/target/arm/hvf/hvf.c > > +++ b/target/arm/hvf/hvf.c > > @@ -847,6 +847,7 @@ static bool > > hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) > >

[PATCH v3 0/8] Implement Most ARMv8.3 Pointer Authentication Features

2023-06-09 Thread Aaron Lindsay
decoding PAC branch instructions) [0] - https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg06494.html Aaron Lindsay (8): target/arm: Add ID_AA64ISAR2_EL1 target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection target/arm: Implement v8.3 QARMA3 PAC cipher target/arm: Implement v8.3

[PATCH v3 2/8] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 65 +-- target/arm/tcg/pauth_helper.c | 2 +- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index df04c9a9ab..22dd898577 100644 --- a/target/arm

[PATCH v3 7/8] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/syndrome.h | 7 +++ target/arm/tcg/pauth_helper.c | 16 2 files changed, 23 insertions(+) diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h index d27d1bc31f..bf79c539d9 100644 --- a/target/arm/syndrome.h +++ b

[PATCH v3 3/8] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 54 --- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index

[PATCH v3 5/8] target/arm: Implement v8.3 Pauth2

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index

[PATCH v3 8/8] target/arm: Add CPU property for QARMA3, enable FPACCombined by default

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 1 + target/arm/cpu64.c | 48 +++--- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 22dd898577..0c4c6c9c82 100644 --- a/target/arm/cpu.h

[PATCH v3 4/8] target/arm: Implement v8.3 EnhancedPAC

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index 68942015e1

[PATCH v3 1/8] target/arm: Add ID_AA64ISAR2_EL1

2023-06-09 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 1 + target/arm/helper.c | 4 ++-- target/arm/hvf/hvf.c | 1 + target/arm/kvm64.c | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 36c608f0e6..df04c9a9ab 100644 --- a/target

[PATCH v3 6/8] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-06-09 Thread Aaron Lindsay
. Signed-off-by: Aaron Lindsay Reviewed-by: Richard Henderson --- target/arm/tcg/helper-a64.h| 4 ++ target/arm/tcg/pauth_helper.c | 71 +++--- target/arm/tcg/translate-a64.c | 12 +++--- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/target/arm/tcg

Re: [PATCH v2 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-03-22 Thread Aaron Lindsay
On Feb 22 12:14, Richard Henderson wrote: > On 2/22/23 09:35, Aaron Lindsay wrote: > > +static Property arm_cpu_pauth2_property = > > +DEFINE_PROP_BOOL("pauth2", ARMCPU, prop_pauth2, false); > > +static Property arm_cpu_pauth_fpac_property = > > +

Re: [PATCH v2 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-03-22 Thread Aaron Lindsay
On Feb 22 11:37, Richard Henderson wrote: > On 2/22/23 09:35, Aaron Lindsay wrote: > > @@ -406,6 +421,16 @@ static uint64_t pauth_auth(CPUARMState *env, uint64_t > > ptr, uint64_t modifier, > > uint64_t xor_mask = MAKE_64BIT_MASK(bot_bit, top_b

[PATCH v3 4/8] target/arm: Implement v8.3 EnhancedPAC

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index 122c208de2

[PATCH v3 1/8] target/arm: Add ID_AA64ISAR2_EL1

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 1 + target/arm/helper.c | 4 ++-- target/arm/hvf/hvf.c | 1 + target/arm/kvm64.c | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c097cae988..f0f27f259d 100644 --- a/target

[PATCH v3 8/8] target/arm: Add CPU property for QARMA3, enable FPACCombined by default

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 1 + target/arm/cpu64.c | 48 +++--- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 868d844d5a..80683c428f 100644 --- a/target/arm/cpu.h

[PATCH v3 7/8] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/syndrome.h | 7 +++ target/arm/tcg/pauth_helper.c | 16 2 files changed, 23 insertions(+) diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h index d27d1bc31f..bf79c539d9 100644 --- a/target/arm/syndrome.h +++ b

[PATCH v3 5/8] target/arm: Implement v8.3 Pauth2

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index

[PATCH v3 3/8] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/pauth_helper.c | 54 --- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index

[PATCH v3 0/8] Implement Most ARMv8.3 Pointer Authentication Features

2023-03-22 Thread Aaron Lindsay
formatting fixes and logic simplifications [0] - https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg06494.html Aaron Lindsay (8): target/arm: Add ID_AA64ISAR2_EL1 target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection target/arm: Implement v8.3 QARMA3 PAC cipher target/arm

[PATCH v3 2/8] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-03-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 65 +-- target/arm/tcg/pauth_helper.c | 2 +- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index f0f27f259d..868d844d5a 100644 --- a/target/arm

[PATCH v3 6/8] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-03-22 Thread Aaron Lindsay
. Signed-off-by: Aaron Lindsay Reviewed-by: Richard Henderson --- target/arm/helper-a64.h| 4 ++ target/arm/tcg/pauth_helper.c | 71 +++--- target/arm/tcg/translate-a64.c | 20 +- 3 files changed, 72 insertions(+), 23 deletions(-) diff --git a/target/arm

[PATCH v2 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 35 ++- target/arm/syndrome.h | 7 +++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index 96770d7860..db6cf9b5bc 100644

[PATCH v2 3/7] target/arm: Implement v8.3 EnhancedPAC

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell --- target/arm/pauth_helper.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index f525ef7fad..a83956652f 100644 --- a/target/arm/pauth_helper.c

[PATCH v2 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 5 +++ target/arm/cpu64.c | 81 ++ 2 files changed, 72 insertions(+), 14 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9c3cbc9a29..40b4631f11 100644 --- a/target/arm/cpu.h

[PATCH v2 2/7] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell --- target/arm/pauth_helper.c | 50 +++ 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index e5206453f6..f525ef7fad 100644

[PATCH v2 0/7] Implement Most ARMv8.3 Pointer Authentication Features

2023-02-22 Thread Aaron Lindsay
to await further discussion about the appropriate way to organize them before making those changes and particularly welcome further review there. -Aaron [0] https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg00660.html Aaron Lindsay (7): target/arm: v8.3 PAC ID_AA64ISAR[12] feature-de

[PATCH v2 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-02-22 Thread Aaron Lindsay
. Signed-off-by: Aaron Lindsay --- target/arm/helper-a64.h| 4 +++ target/arm/pauth_helper.c | 71 +++--- target/arm/translate-a64.c | 20 +-- 3 files changed, 72 insertions(+), 23 deletions(-) diff --git a/target/arm/helper-a64.h b/target/arm/helper-a64

[PATCH v2 4/7] target/arm: Implement v8.3 Pauth2

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell --- target/arm/pauth_helper.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index a83956652f..c4ee040da7 100644 --- a/target/arm

[PATCH v2 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 61 +-- target/arm/helper.c | 4 +-- target/arm/pauth_helper.c | 2 +- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8cf70693be

Re: [PATCH 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-21 Thread Aaron Lindsay
On Feb 13 16:01, Peter Maydell wrote: > On Thu, 2 Feb 2023 at 21:13, Aaron Lindsay > wrote: > > +static inline bool isar_feature_aa64_pauth_epac(const ARMISARegisters *id) > > +{ > > +return isar_feature_pauth_get_features(id) == 0b0010; > > Thi

Re: [PATCH 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-02-21 Thread Aaron Lindsay
On Feb 13 17:11, Peter Maydell wrote: > On Thu, 2 Feb 2023 at 21:12, Aaron Lindsay > wrote: > > > > Signed-off-by: Aaron Lindsay > > --- > > target/arm/cpu.h | 5 +++ > > target/arm/cpu64.c | 81 ++ > &

[PATCH 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 26 ++ target/arm/syndrome.h | 6 ++ 2 files changed, 32 insertions(+) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index 66dc90a289..3a2772de0e 100644 --- a/target/arm

[PATCH 4/7] target/arm: Implement v8.3 Pauth2

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index a83956652f..6ebf6df75c 100644 --- a/target/arm/pauth_helper.c +++ b/target

[PATCH 2/7] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 48 +++ 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index a0c9bea06b..f525ef7fad 100644 --- a/target/arm/pauth_helper.c +++ b

[PATCH 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 57 --- target/arm/helper.c | 4 +-- target/arm/pauth_helper.c | 4 +-- 3 files changed, 58 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8cf70693be

[PATCH 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 5 +++ target/arm/cpu64.c | 81 ++ 2 files changed, 72 insertions(+), 14 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9be59163ff..a9420bae67 100644 --- a/target/arm/cpu.h

[PATCH 0/7] Implement Most ARMv8.3 Pointer Authentication Features

2023-02-02 Thread Aaron Lindsay
Hello, I've taken a first pass at implementing many of the ARMv8.3 Pointer Authentication features and welcome your review. Thanks! -Aaron Aaron Lindsay (7): target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection target/arm: Implement v8.3 QARMA3 PAC cipher target/arm: Implement v8.3

[PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-02-02 Thread Aaron Lindsay
. Signed-off-by: Aaron Lindsay --- target/arm/helper-a64.h| 4 +++ target/arm/pauth_helper.c | 63 -- target/arm/translate-a64.c | 20 ++-- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/target/arm/helper-a64.h b/target/arm/helper-a64

[PATCH 3/7] target/arm: Implement v8.3 EnhancedPAC

2023-02-02 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index f525ef7fad..a83956652f 100644 --- a/target/arm/pauth_helper.c +++ b/target/arm/pauth_helper.c

Re: [PATCH 1/4] plugins: fix optimization in plugin_gen_disable_mem_helpers

2023-01-10 Thread Aaron Lindsay
> Related: #1381 > > Signed-off-by: Emilio Cota > --- > accel/tcg/plugin-gen.c | 26 ++ > include/qemu/plugin.h | 7 +++ > 2 files changed, 25 insertions(+), 8 deletions(-) Tested-by: Aaron Lindsay

Re: [PATCH 2/4] translator: always pair plugin_gen_insn_{start,end} calls

2023-01-10 Thread Aaron Lindsay
On Jan 08 11:47, Emilio Cota wrote: > Related: #1381 > > Signed-off-by: Emilio Cota > --- > accel/tcg/translator.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) Tested-by: Aaron Lindsay

Re: Plugin Memory Callback Debugging

2022-12-19 Thread Aaron Lindsay
Emilio, On Dec 18 00:24, Emilio Cota wrote: > On Tue, Nov 29, 2022 at 15:37:51 -0500, Aaron Lindsay wrote: > (snip) > > > Does this hint that there are cases where reset cpu->plugin_mem_cbs to > > > NULL is > > > getting optimized away, but not t

Re: Plugin Memory Callback Debugging

2022-11-29 Thread Aaron Lindsay via
On Nov 22 10:57, Aaron Lindsay wrote: > On Nov 21 18:22, Richard Henderson wrote: > > On 11/21/22 13:51, Alex Bennée wrote: > > > > > > Aaron Lindsay writes: > > > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > > Aaron Lindsa

Re: Plugin Memory Callback Debugging

2022-11-22 Thread Aaron Lindsay via
On Nov 21 22:02, Alex Bennée wrote: > > Aaron Lindsay writes: > > > Sorry, left off the very end of my timeline: > > > > On Nov 18 16:58, Aaron Lindsay wrote: > >> I have, so far, discovered the following timeline: > >> 1. My plugin receive

Re: Plugin Memory Callback Debugging

2022-11-22 Thread Aaron Lindsay via
On Nov 21 18:22, Richard Henderson wrote: > On 11/21/22 13:51, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > I believe the code *shou

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Aaron Lindsay via
On Nov 15 22:36, Alex Bennée wrote: > Aaron Lindsay writes: > > I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at > > the > > end of an instruction/TB's execution, so its not exactly clear to me how > > this > > is occurring. However,

Re: Plugin Memory Callback Debugging

2022-11-18 Thread Aaron Lindsay via
On Nov 15 22:36, Alex Bennée wrote: > > Aaron Lindsay writes: > > > Hello, > > > > I have been wrestling with what might be a bug in the plugin memory > > callbacks. The immediate error is that I hit the > > `g_assert_not_reached()` in the 'defaul

Re: Plugin Memory Callback Debugging

2022-11-18 Thread Aaron Lindsay
Sorry, left off the very end of my timeline: On Nov 18 16:58, Aaron Lindsay wrote: > I have, so far, discovered the following timeline: > 1. My plugin receives a instruction execution callback for a load >instruction. At this time, cpu->plugin_mem_cbs points to the same >

Plugin Memory Callback Debugging

2022-11-15 Thread Aaron Lindsay
Hello, I have been wrestling with what might be a bug in the plugin memory callbacks. The immediate error is that I hit the `g_assert_not_reached()` in the 'default:' case in qemu_plugin_vcpu_mem_cb, indicating the callback type was invalid. When breaking on this assertion in gdb, the contents of

Re: [BUG] AArch64 boot hang with -icount and -smp >1 (iothread locking issue?)

2022-10-21 Thread Aaron Lindsay
On Oct 21 17:00, Peter Maydell wrote: > On Fri, 21 Oct 2022 at 16:48, Aaron Lindsay > wrote: > > > > Hello, > > > > I am encountering one or more bugs when using -icount and -smp >1 that I am > > attempting to sort out. My current theory is that it is an

[BUG] AArch64 boot hang with -icount and -smp >1 (iothread locking issue?)

2022-10-21 Thread Aaron Lindsay
rite async event handling" commit [2]. Commits prior to that one boot successfully (neither assertions nor hangs) with `-icount 0 -smp 2`. I've looked over these two commits ([1], [2]), but it is not obvious to me how/why they might be interacting to produce the boot hangs I'm seeing and I welcome

Re: Plugins Not Reporting AArch64 SVE Memory Operations

2022-03-29 Thread Aaron Lindsay via
On Mar 28 16:30, Alex Bennée wrote: > > Aaron Lindsay writes: > > > Hi folks, > > > > I see there has been some previous discussion [1] about 1.5 years ago > > around the fact that AArch64 SVE instructions do not emit any memory > > operations via the plu

Plugins Not Reporting AArch64 SVE Memory Operations

2022-03-24 Thread Aaron Lindsay
Hi folks, I see there has been some previous discussion [1] about 1.5 years ago around the fact that AArch64 SVE instructions do not emit any memory operations via the plugin interface, as one might expect them to. I am interested in being able to more accurately trace the memory operations of

Re: [PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)

2022-02-02 Thread Aaron Lindsay via
On Feb 01 15:29, Alex Bennée wrote: > > Aaron Lindsay writes: > > > On Jan 24 20:15, Alex Bennée wrote: > >> Signed-off-by: Alex Bennée > >> Cc: Aaron Lindsay > >> Message-ID: > >> > >> --- > >> [AJB] this was for testing,

Re: [PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)

2022-02-01 Thread Aaron Lindsay via
On Jan 25 09:17, Thomas Huth wrote: > On 24/01/2022 21.15, Alex Bennée wrote: > > Signed-off-by: Alex Bennée > > Cc: Aaron Lindsay > > Message-ID: > > > > --- > > [AJB] this was for testing, I think you can show the same stuff with > > the much mor

Re: [PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)

2022-02-01 Thread Aaron Lindsay via
On Jan 24 20:15, Alex Bennée wrote: > Signed-off-by: Alex Bennée > Cc: Aaron Lindsay > Message-ID: > > --- > [AJB] this was for testing, I think you can show the same stuff with > the much more complete execlog now. Is it true that execlog can also reproduce the

Re: plugins: Missing Store Exclusive Memory Accesses

2021-10-21 Thread Aaron Lindsay via
On Oct 21 13:28, Alex Bennée wrote: > It's a bit clearer if you use the contrib/execlog plugin: > > ./qemu-aarch64 -plugin contrib/plugins/libexeclog.so -d plugin > ./tests/tcg/aarch64-linux-user/stxp > > 0, 0x400910, 0xf9800011, "prfm pstl1strm, [x0] > 0, 0x400914, 0xc87f4410, "ldxp

Re: plugins: Missing Store Exclusive Memory Accesses

2021-10-20 Thread Aaron Lindsay via
On Oct 20 18:54, Alex Bennée wrote: > Have you got a test case you are using so I can try and replicate the > failure you are seeing? So far by inspection everything looks OK to me. I took some time today to put together a minimal(ish) reproducer using usermode. The source files used are below, I

Re: plugins: Missing Store Exclusive Memory Accesses

2021-10-20 Thread Aaron Lindsay via
On Sep 22 16:22, Aaron Lindsay wrote: > On Sep 21 16:28, Aaron Lindsay wrote: > > On Sep 17 12:05, Alex Bennée wrote: > > > Aaron Lindsay writes: > > > > I recently noticed that the plugin interface does not appear to be > > > > emit

Re: plugins: Missing Store Exclusive Memory Accesses

2021-09-22 Thread Aaron Lindsay via
On Sep 21 16:28, Aaron Lindsay wrote: > On Sep 17 12:05, Alex Bennée wrote: > > Aaron Lindsay writes: > > > I recently noticed that the plugin interface does not appear to be > > > emitting callbacks to functions registered via > > > `qemu_plugin_register_vcpu_

Re: plugins: Missing Store Exclusive Memory Accesses

2021-09-21 Thread Aaron Lindsay via
On Sep 17 12:05, Alex Bennée wrote: > Aaron Lindsay writes: > > I recently noticed that the plugin interface does not appear to be > > emitting callbacks to functions registered via > > `qemu_plugin_register_vcpu_mem_cb` for AArch64 store exclusives. This > > would incl

Re: plugins: Missing Store Exclusive Memory Accesses

2021-09-17 Thread Aaron Lindsay via
On Sep 17 12:05, Alex Bennée wrote: > Aaron Lindsay writes: > > In looking at QEMU's source, I *think* this is because the > > `gen_store_exclusive` function in translate-a64.c is not making the same > > calls to `plugin_gen_mem_callbacks` & company that are being ma

plugins: Missing Store Exclusive Memory Accesses

2021-09-16 Thread Aaron Lindsay
Hello, I recently noticed that the plugin interface does not appear to be emitting callbacks to functions registered via `qemu_plugin_register_vcpu_mem_cb` for AArch64 store exclusives. This would include instructions like `stxp w16, x2, x3, [x4]` (encoding: 0xc8300c82). Seeing as how I'm only

Re: [PATCH] plugins: Fix physical address calculation for IO regions

2021-07-20 Thread Aaron Lindsay
On Jul 20 15:57, Aaron Lindsay wrote: > The address calculation for IO regions introduced by > > commit 787148bf928a54b5cc86f5b434f9399e9737679c > Author: Aaron Lindsay > plugins: Expose physical addresses instead of device offsets > > is not always accurate.

[PATCH] plugins: Fix physical address calculation for IO regions

2021-07-20 Thread Aaron Lindsay
The address calculation for IO regions introduced by commit 787148bf928a54b5cc86f5b434f9399e9737679c Author: Aaron Lindsay plugins: Expose physical addresses instead of device offsets is not always accurate. Use the more correct MemoryRegionSection.offset_within_address_space. --- plugins

Re: Plugin virtual-to-physical translation incorrect for some IO accesses

2021-07-07 Thread Aaron Lindsay via
On Jul 07 07:35, Aaron Lindsay wrote: > On Jul 07 09:53, Philippe Mathieu-Daudé wrote: > > On 7/6/21 11:56 PM, Aaron Lindsay wrote: > > > On Jul 06 23:10, Philippe Mathieu-Daudé wrote: > > >> +Peter/Paolo > > >> > > >> On 7/6/21 10:47 PM,

Re: Plugin virtual-to-physical translation incorrect for some IO accesses

2021-07-07 Thread Aaron Lindsay via
On Jul 07 09:53, Philippe Mathieu-Daudé wrote: > On 7/6/21 11:56 PM, Aaron Lindsay wrote: > > On Jul 06 23:10, Philippe Mathieu-Daudé wrote: > >> +Peter/Paolo > >> > >> On 7/6/21 10:47 PM, Aaron Lindsay wrote: > >>> Hello, > >>> &

Re: Plugin virtual-to-physical translation incorrect for some IO accesses

2021-07-06 Thread Aaron Lindsay via
On Jul 06 23:10, Philippe Mathieu-Daudé wrote: > +Peter/Paolo > > On 7/6/21 10:47 PM, Aaron Lindsay wrote: > > Hello, > > > > I previously supplied a patch which modified the plugin interface such > > that it will return physical addresses for IO regions [0]. How

Plugin virtual-to-physical translation incorrect for some IO accesses

2021-07-06 Thread Aaron Lindsay
Hello, I previously supplied a patch which modified the plugin interface such that it will return physical addresses for IO regions [0]. However, I have now found a case where the interface does not appear to correctly return the full physical addresses. In particular, when in

Re: [RFC] tcg plugin: Additional plugin interface

2021-04-28 Thread Aaron Lindsay
> >> > >> Yes the implementation would be a simple helper which could be called > >> from a callback - I don't think we need to limit it to just insn_exec. I > >> think the challenge is proving a non-ugly API that works cleanly across > >>

Re: [PATCH v1 11/14] plugins: expand kernel-doc for instruction query and instrumentation

2021-03-16 Thread Aaron Lindsay via
On Mar 16 13:48, Alex Bennée wrote: > Aaron Lindsay writes: > > On Mar 12 17:28, Alex Bennée wrote: > >> + * @insn: opaque instruction handle from qemu_plugin_tb_get_insn() > >> + * > >> + * Returns: hardware (physical) address of instruction > >>

Re: [PATCH v1 08/14] plugins: add qemu_plugin_cb_flags to kernel-doc

2021-03-16 Thread Aaron Lindsay via
On Mar 16 13:40, Alex Bennée wrote: > > Aaron Lindsay writes: > > > On Mar 12 17:28, Alex Bennée wrote: > >> Also add a note to explain currently they are unused. > >> > >> Signed-off-by: Alex Bennée > > > > I'm personally

Re: [PATCH v1 12/14] plugins: expand kernel-doc for memory query and instrumentation

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée Small comment below, but otherwise: Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 35 --- > 1 file changed, 28 insertions(+), 7 deletions(-) > > diff --git a

Re: [PATCH v1 09/14] plugins: add qemu_plugin_id_t to kernel-doc

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h > index c98866a6

Re: [PATCH v1 08/14] plugins: add qemu_plugin_cb_flags to kernel-doc

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Also add a note to explain currently they are unused. > > Signed-off-by: Alex Bennée I'm personally interested in one clarification below, but don't think that affects my: Reviewed-by: Aaron Lindsay > --- > include/qemu/qem

Re: [PATCH v1 06/14] plugins: expand the callback typedef kernel-docs

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée One nit below, but otherwise: Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 25 ++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > > diff --git a/include/qe

Re: [PATCH v1 11/14] plugins: expand kernel-doc for instruction query and instrumentation

2021-03-12 Thread Aaron Lindsay via
A few clarifications inline: On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > include/qemu/qemu-plugin.h | 52 -- > 1 file changed, 50 insertions(+), 2 deletions(-) > > diff --git a/include/qemu/qemu-plugin.h

Re: [PATCH v1 10/14] plugins: expand inline exec kernel-doc documentation.

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Remove the extraneous @cb parameter and document the non-atomic nature > of the INLINE_ADD_U64 operation. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 12 +++- > 1 file c

Re: [PATCH v1 07/14] plugins: expand the typedef kernel-docs for translation

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qem

Re: [PATCH v1 05/14] plugins: cleanup kernel-doc for qemu_plugin_install

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > kernel-doc doesn't like multiple Note sections. Also add an explicit > Return. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 12 ++-- > 1 file changed, 6 insertions(+), 6 d

Re: [PATCH v1 04/14] plugins: expand kernel-doc for qemu_info_t

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > It seems kernel-doc struggles a bit with typedef structs but with > enough encouragement we can get something out of it. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 22 ++

Re: [PATCH v1 03/14] docs/devel: include the plugin API information from the headers

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > We have kerneldoc tags for the headers so we might as well extract > them into our developer documentation whilst we are at it. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > docs/devel/tcg-plugins.rst | 5 + &g

[PATCH v2] plugins: Expose physical addresses instead of device offsets

2021-03-09 Thread Aaron Lindsay
This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay --- contrib/plugins/hotpages.c

Re: [PATCH] plugins: Expose physical addresses instead of device offsets

2021-03-09 Thread Aaron Lindsay via
On Mar 09 17:45, Alex Bennée wrote: > Aaron Lindsay writes: > > On Mar 09 10:08, Peter Maydell wrote: > >> On Mon, 8 Mar 2021 at 20:14, Aaron Lindsay > >> wrote: > >> > > >> > This allows plugins to query for full virtual-to-physical address

Re: [PATCH] plugins: Expose physical addresses instead of device offsets

2021-03-09 Thread Aaron Lindsay
On Mar 09 10:08, Peter Maydell wrote: > On Mon, 8 Mar 2021 at 20:14, Aaron Lindsay > wrote: > > > > This allows plugins to query for full virtual-to-physical address > > translation for a given `qemu_plugin_hwaddr` and stops exposing the > > offset within the device

[PATCH] plugins: Expose physical addresses instead of device offsets

2021-03-08 Thread Aaron Lindsay
This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay --- contrib/plugins/hotpages.c

Re: [PATCH] plugins: Expose physical addresses instead of device offsets

2021-03-08 Thread Aaron Lindsay
Alex, I've now tested this change, and it is giving what appear to be valid and correct physical addresses for both RAM and IO accesses in all the cases I've thrown at it. My main concern with this patch at this point is that I am concerned I may be breaking your new plugin here: > +++

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-03-02 Thread Aaron Lindsay via
On Mar 02 16:06, Alex Bennée wrote: > > Aaron Lindsay writes: > > > On Feb 23 15:53, Aaron Lindsay wrote: > >> On Feb 22 15:48, Aaron Lindsay wrote: > >> > On Feb 22 19:30, Alex Bennée wrote: > >> > > Aaron Lindsay writes: > >

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-03-02 Thread Aaron Lindsay via
On Feb 23 15:53, Aaron Lindsay wrote: > On Feb 22 15:48, Aaron Lindsay wrote: > > On Feb 22 19:30, Alex Bennée wrote: > > > Aaron Lindsay writes: > > > That said I think we could add an additional helper to translate a > > > hwaddr to a global address sp

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-02-23 Thread Aaron Lindsay via
On Feb 22 15:48, Aaron Lindsay wrote: > On Feb 22 19:30, Alex Bennée wrote: > > Aaron Lindsay writes: > > That said I think we could add an additional helper to translate a > > hwaddr to a global address space address. I'm open to suggestions of the > > best way to s

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-02-22 Thread Aaron Lindsay via
On Feb 22 19:30, Alex Bennée wrote: > Aaron Lindsay writes: > > If I call (inside a memory callback): > > > > `uint64_t pa = qemu_plugin_hwaddr_device_offset(hwaddr);` > > > > I see that `pa` takes the value 0xe0e58760. If, however, I plumb > > `cpu_get

Plugin Address Translations Inconsistent/Incorrect?

2021-02-22 Thread Aaron Lindsay
Hello, I've been doing some more work with plugins and found something I didn't expect with regards to address translation. If I call (inside a memory callback): `uint64_t pa = qemu_plugin_hwaddr_device_offset(hwaddr);` I see that `pa` takes the value 0xe0e58760. If, however, I plumb

Re: [PATCH v3 20/23] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-17 Thread Aaron Lindsay via
O load and store instructions, as expected. Tested-by: Aaron Lindsay Thanks! -Aaron > > --- > v3 > - s/CF_NOINSTR/CF_MEMI_ONY/ > - Limit instrumentation at API call sites instead of skipping altogether > - clean-up commit log message > --- > include/exec/exec

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-17 Thread Aaron Lindsay via
On Feb 16 10:34, Alex Bennée wrote: > > Aaron Lindsay writes: > > > On Feb 12 16:04, Alex Bennée wrote: > >> Do you see two stores or one store? I think I got the sense the wrong > >> way around because the store is instrumented before the mmu code, >

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-12 Thread Aaron Lindsay via
On Feb 12 16:00, Alex Bennée wrote: > > Alex Bennée writes: > > > Aaron Lindsay writes: > > > >> On Feb 10 22:10, Alex Bennée wrote: > >>> When icount is enabled and we recompile an MMIO access we end up > >>> double counting

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-12 Thread Aaron Lindsay via
the store and the instruction callback for the subsequent instruction. -Aaron > On Fri, 12 Feb 2021 at 15:41, Aaron Lindsay > wrote: > > > > On Feb 12 14:43, Alex Bennée wrote: > > > Aaron Lindsay writes: > > > > On Feb 10 22:10, Alex Bennée wrote: > >

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-12 Thread Aaron Lindsay via
On Feb 12 14:43, Alex Bennée wrote: > Aaron Lindsay writes: > > On Feb 10 22:10, Alex Bennée wrote: > >> When icount is enabled and we recompile an MMIO access we end up > >> double counting the instruction execution. To avoid this we introduce > >>

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-12 Thread Aaron Lindsay via
On Feb 12 11:22, Alex Bennée wrote: > Aaron Lindsay writes: > > On Feb 10 22:10, Alex Bennée wrote: > >> When icount is enabled and we recompile an MMIO access we end up > >> double counting the instruction execution. To avoid this we introduce > >>

Re: [PATCH v2 20/21] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-11 Thread Aaron Lindsay via
might as well keep the > translation handy as it's likely you will repeatedly hit it on each > MMIO access. > > Reported-by: Aaron Lindsay > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson > Message-Id: <20210209182749.31323-12-alex.ben...@linaro.org

  1   2   3   4   >