* [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline
@ 2022-01-12 15:21 Ricardo Koller
2022-01-12 15:38 ` Oliver Upton
2022-01-12 15:49 ` Andrew Jones
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Koller @ 2022-01-12 15:21 UTC (permalink / raw)
To: kvm, kvmarm; +Cc: drjones, Paolo Bonzini, maz, oupton, Ricardo Koller
Clang inlines some functions (like test_ss) which define global labels
in inline assembly (e.g., ss_start). This results in:
arm/debug.c:382:15: error: invalid symbol redefinition
asm volatile("ss_start:\n"
^
<inline asm>:1:2: note: instantiated into assembly here
ss_start:
^
1 error generated.
Fix these functions by marking them as "noinline".
Cc: Andrew Jones <drjones@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
---
This applies on top of: "[kvm-unit-tests PATCH 0/3] arm64: debug: add migration tests for debug state"
which is in https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue.
arm/debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arm/debug.c b/arm/debug.c
index 54f059d..e9f8056 100644
--- a/arm/debug.c
+++ b/arm/debug.c
@@ -264,7 +264,7 @@ static void do_migrate(void)
report_info("Migration complete");
}
-static void test_hw_bp(bool migrate)
+static noinline void test_hw_bp(bool migrate)
{
extern unsigned char hw_bp0;
uint32_t bcr;
@@ -310,7 +310,7 @@ static void test_hw_bp(bool migrate)
static volatile char write_data[16];
-static void test_wp(bool migrate)
+static noinline void test_wp(bool migrate)
{
uint32_t wcr;
uint32_t mdscr;
@@ -353,7 +353,7 @@ static void test_wp(bool migrate)
}
}
-static void test_ss(bool migrate)
+static noinline void test_ss(bool migrate)
{
extern unsigned char ss_start;
uint32_t mdscr;
--
2.34.1.575.g55b058a8bb-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline
2022-01-12 15:21 [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline Ricardo Koller
@ 2022-01-12 15:38 ` Oliver Upton
2022-01-12 15:49 ` Andrew Jones
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Upton @ 2022-01-12 15:38 UTC (permalink / raw)
To: Ricardo Koller; +Cc: kvm, kvmarm, drjones, Paolo Bonzini, maz
On Wed, Jan 12, 2022 at 9:22 AM Ricardo Koller <ricarkol@google.com> wrote:
>
> Clang inlines some functions (like test_ss) which define global labels
> in inline assembly (e.g., ss_start). This results in:
>
> arm/debug.c:382:15: error: invalid symbol redefinition
> asm volatile("ss_start:\n"
> ^
> <inline asm>:1:2: note: instantiated into assembly here
> ss_start:
> ^
> 1 error generated.
>
> Fix these functions by marking them as "noinline".
>
> Cc: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline
2022-01-12 15:21 [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline Ricardo Koller
2022-01-12 15:38 ` Oliver Upton
@ 2022-01-12 15:49 ` Andrew Jones
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2022-01-12 15:49 UTC (permalink / raw)
To: Ricardo Koller; +Cc: kvm, kvmarm, Paolo Bonzini, maz, oupton
On Wed, Jan 12, 2022 at 07:21:55AM -0800, Ricardo Koller wrote:
> Clang inlines some functions (like test_ss) which define global labels
> in inline assembly (e.g., ss_start). This results in:
>
> arm/debug.c:382:15: error: invalid symbol redefinition
> asm volatile("ss_start:\n"
> ^
> <inline asm>:1:2: note: instantiated into assembly here
> ss_start:
> ^
> 1 error generated.
>
> Fix these functions by marking them as "noinline".
>
> Cc: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Ricardo Koller <ricarkol@google.com>
> ---
> This applies on top of: "[kvm-unit-tests PATCH 0/3] arm64: debug: add migration tests for debug state"
> which is in https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue.
>
> arm/debug.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arm/debug.c b/arm/debug.c
> index 54f059d..e9f8056 100644
> --- a/arm/debug.c
> +++ b/arm/debug.c
> @@ -264,7 +264,7 @@ static void do_migrate(void)
> report_info("Migration complete");
> }
>
> -static void test_hw_bp(bool migrate)
> +static noinline void test_hw_bp(bool migrate)
> {
> extern unsigned char hw_bp0;
> uint32_t bcr;
> @@ -310,7 +310,7 @@ static void test_hw_bp(bool migrate)
>
> static volatile char write_data[16];
>
> -static void test_wp(bool migrate)
> +static noinline void test_wp(bool migrate)
> {
> uint32_t wcr;
> uint32_t mdscr;
> @@ -353,7 +353,7 @@ static void test_wp(bool migrate)
> }
> }
>
> -static void test_ss(bool migrate)
> +static noinline void test_ss(bool migrate)
> {
> extern unsigned char ss_start;
> uint32_t mdscr;
> --
> 2.34.1.575.g55b058a8bb-goog
>
Applied to arm/queue.
Thanks,
drew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-12 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 15:21 [kvm-unit-tests PATCH v2] arm64: debug: mark test_[bp,wp,ss] as noinline Ricardo Koller
2022-01-12 15:38 ` Oliver Upton
2022-01-12 15:49 ` Andrew Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).