* [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
@ 2019-04-30 3:12 ` Yang Chuanlong
0 siblings, 0 replies; 8+ messages in thread
From: Yang Chuanlong @ 2019-04-30 3:12 UTC (permalink / raw)
To: qemu-devel, gengdongjiu
Currently, the cpuid passed from the device tree may still contain
non-affinity fields, which will cause arm_set_cpu_on failure.
Therefore, we mask the cpuid with affinity fields here to
improve qemu compatibility.
Signed-off-by: Yang Chuanlong <yangchuanlong@huawei.com>
---
target/arm/arm-powerctl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
index f77a950db6..ef9fec0b4d 100644
--- a/target/arm/arm-powerctl.c
+++ b/target/arm/arm-powerctl.c
@@ -31,7 +31,13 @@ CPUState *arm_get_cpu_by_id(uint64_t id)
{
CPUState *cpu;
- DPRINTF("cpu %" PRId64 "\n", id);
+#ifdef TARGET_AARCH64
+ id &= ARM64_AFFINITY_MASK;
+#else
+ id &= ARM32_AFFINITY_MASK;
+#endif
+
+ DPRINTF("cpu %" PRId64 " after mask affinity\n", id);
CPU_FOREACH(cpu) {
ARMCPU *armcpu = ARM_CPU(cpu);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
@ 2019-04-30 3:12 ` Yang Chuanlong
0 siblings, 0 replies; 8+ messages in thread
From: Yang Chuanlong @ 2019-04-30 3:12 UTC (permalink / raw)
To: qemu-devel, gengdongjiu
Currently, the cpuid passed from the device tree may still contain
non-affinity fields, which will cause arm_set_cpu_on failure.
Therefore, we mask the cpuid with affinity fields here to
improve qemu compatibility.
Signed-off-by: Yang Chuanlong <yangchuanlong@huawei.com>
---
target/arm/arm-powerctl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
index f77a950db6..ef9fec0b4d 100644
--- a/target/arm/arm-powerctl.c
+++ b/target/arm/arm-powerctl.c
@@ -31,7 +31,13 @@ CPUState *arm_get_cpu_by_id(uint64_t id)
{
CPUState *cpu;
- DPRINTF("cpu %" PRId64 "\n", id);
+#ifdef TARGET_AARCH64
+ id &= ARM64_AFFINITY_MASK;
+#else
+ id &= ARM32_AFFINITY_MASK;
+#endif
+
+ DPRINTF("cpu %" PRId64 " after mask affinity\n", id);
CPU_FOREACH(cpu) {
ARMCPU *armcpu = ARM_CPU(cpu);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
2019-04-30 3:12 ` Yang Chuanlong
(?)
@ 2019-04-30 12:05 ` Peter Maydell
-1 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2019-04-30 12:05 UTC (permalink / raw)
To: Yang Chuanlong; +Cc: QEMU Developers, gengdongjiu
On Tue, 30 Apr 2019 at 04:22, Yang Chuanlong <yangchuanlong@huawei.com> wrote:
>
> Currently, the cpuid passed from the device tree may still contain
> non-affinity fields, which will cause arm_set_cpu_on failure.
> Therefore, we mask the cpuid with affinity fields here to
> improve qemu compatibility.
>
> Signed-off-by: Yang Chuanlong <yangchuanlong@huawei.com>
> ---
> target/arm/arm-powerctl.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
> index f77a950db6..ef9fec0b4d 100644
> --- a/target/arm/arm-powerctl.c
> +++ b/target/arm/arm-powerctl.c
> @@ -31,7 +31,13 @@ CPUState *arm_get_cpu_by_id(uint64_t id)
> {
> CPUState *cpu;
>
> - DPRINTF("cpu %" PRId64 "\n", id);
> +#ifdef TARGET_AARCH64
> + id &= ARM64_AFFINITY_MASK;
> +#else
> + id &= ARM32_AFFINITY_MASK;
> +#endif
> +
> + DPRINTF("cpu %" PRId64 " after mask affinity\n", id);
>
> CPU_FOREACH(cpu) {
> ARMCPU *armcpu = ARM_CPU(cpu);
Hi -- could you explain what the code path is where we
end up passing a wrong value into this function? I'm
wondering if this is the best place to fix it, or if maybe
the calling function is at fault.
Also, you can't use #ifdef TARGET_AARCH64 here to distinguish
a 64-bit from a 32-bit CPU, because the qemu-system-aarch64
binary (which is built with TARGET_AARCH64) also supports all
the 32-bit CPUs.
thanks
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
2019-04-30 3:12 ` Yang Chuanlong
(?)
(?)
@ 2019-05-01 18:37 ` no-reply
-1 siblings, 0 replies; 8+ messages in thread
From: no-reply @ 2019-05-01 18:37 UTC (permalink / raw)
To: yangchuanlong; +Cc: fam, qemu-devel, gengdongjiu
Patchew URL: https://patchew.org/QEMU/20190430031238.40499-1-yangchuanlong@huawei.com/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===
The full log is available at
http://patchew.org/logs/20190430031238.40499-1-yangchuanlong@huawei.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
2019-04-30 3:12 ` Yang Chuanlong
` (2 preceding siblings ...)
(?)
@ 2019-05-01 18:57 ` no-reply
-1 siblings, 0 replies; 8+ messages in thread
From: no-reply @ 2019-05-01 18:57 UTC (permalink / raw)
To: yangchuanlong; +Cc: fam, qemu-devel, gengdongjiu
Patchew URL: https://patchew.org/QEMU/20190430031238.40499-1-yangchuanlong@huawei.com/
Hi,
This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===
The full log is available at
http://patchew.org/logs/20190430031238.40499-1-yangchuanlong@huawei.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
2019-04-29 6:48 ` Yang Chuanlong
(?)
@ 2019-05-01 1:05 ` no-reply
-1 siblings, 0 replies; 8+ messages in thread
From: no-reply @ 2019-05-01 1:05 UTC (permalink / raw)
To: yangchuanlong; +Cc: fam, qemu-devel
Patchew URL: https://patchew.org/QEMU/20190429064830.12213-1-yangchuanlong@huawei.com/
Hi,
This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===
The full log is available at
http://patchew.org/logs/20190429064830.12213-1-yangchuanlong@huawei.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
@ 2019-04-29 6:48 ` Yang Chuanlong
0 siblings, 0 replies; 8+ messages in thread
From: Yang Chuanlong @ 2019-04-29 6:48 UTC (permalink / raw)
To: qemu-devel
Currently, the cpuid passed from the device tree may still contain
non-affinity fields, which will cause arm_set_cpu_on failure.
Therefore, we mask the cpuid with affinity fields here to
improve qemu compatibility.
Signed-off-by: Yang Chuanlong <yangchuanlong@huawei.com>
---
target/arm/arm-powerctl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
index f77a950db6..ef9fec0b4d 100644
--- a/target/arm/arm-powerctl.c
+++ b/target/arm/arm-powerctl.c
@@ -31,7 +31,13 @@ CPUState *arm_get_cpu_by_id(uint64_t id)
{
CPUState *cpu;
- DPRINTF("cpu %" PRId64 "\n", id);
+#ifdef TARGET_AARCH64
+ id &= ARM64_AFFINITY_MASK;
+#else
+ id &= ARM32_AFFINITY_MASK;
+#endif
+
+ DPRINTF("cpu %" PRId64 " after mask affinity\n", id);
CPU_FOREACH(cpu) {
ARMCPU *armcpu = ARM_CPU(cpu);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu
@ 2019-04-29 6:48 ` Yang Chuanlong
0 siblings, 0 replies; 8+ messages in thread
From: Yang Chuanlong @ 2019-04-29 6:48 UTC (permalink / raw)
To: qemu-devel
Currently, the cpuid passed from the device tree may still contain
non-affinity fields, which will cause arm_set_cpu_on failure.
Therefore, we mask the cpuid with affinity fields here to
improve qemu compatibility.
Signed-off-by: Yang Chuanlong <yangchuanlong@huawei.com>
---
target/arm/arm-powerctl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c
index f77a950db6..ef9fec0b4d 100644
--- a/target/arm/arm-powerctl.c
+++ b/target/arm/arm-powerctl.c
@@ -31,7 +31,13 @@ CPUState *arm_get_cpu_by_id(uint64_t id)
{
CPUState *cpu;
- DPRINTF("cpu %" PRId64 "\n", id);
+#ifdef TARGET_AARCH64
+ id &= ARM64_AFFINITY_MASK;
+#else
+ id &= ARM32_AFFINITY_MASK;
+#endif
+
+ DPRINTF("cpu %" PRId64 " after mask affinity\n", id);
CPU_FOREACH(cpu) {
ARMCPU *armcpu = ARM_CPU(cpu);
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-05-01 18:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 3:12 [Qemu-devel] [PATCH v1] target/arm/arm-powerctl: mask the cpuid with affinity bits when get cpu Yang Chuanlong
2019-04-30 3:12 ` Yang Chuanlong
2019-04-30 12:05 ` Peter Maydell
2019-05-01 18:37 ` no-reply
2019-05-01 18:57 ` no-reply
-- strict thread matches above, loose matches on Subject: below --
2019-04-29 6:48 Yang Chuanlong
2019-04-29 6:48 ` Yang Chuanlong
2019-05-01 1:05 ` no-reply
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.