tools: Fix ifdef for aarch64 that should include also arm
PATCH 1/2 tools: Fix ifdef for aarch64 that should include also arm
Commit 56a7aaa16bfe introduced some SVE related code that is protected by '#if defined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.
So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
--- tools/include/xen-tools/arm-arch-capabilities.h | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/xl/xl_info.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tools/include/xen-tools/arm-arch-capabilities.h +1 -1
@@ -14,7 +14,7 @@static inline unsigned int arch_capabilities_arm_sve (unsigned int arch_capabilities) { -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)unsigned int sve_vl =MASK_EXTR (arch_capabilities,XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK );
tools/python/xen/lowlevel/xc/xc.c +1 -1
@@ -911,7 +911,7 @@ static PyObject *pyxc_physinfo(XcObject *self)"hw_caps" , cpu_cap, "virt_caps", virt_caps); -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)if ( objret ) {unsigned int sve_vl_bits;PyObject *py_arm_sve_vl;
tools/xl/xl_info.c +1 -1
@@ -226,7 +226,7 @@ static void output_physinfo(void) );/* Print arm SVE vector length only on ARM platforms */ -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)maybe_printf ("arm_sve_vector_length : %u\n" ,arch_capabilities_arm_sve (info.arch_capabilities) );
Signature · 1 line
2.34.1
PATCH 2/2 tools/python: Fix memory leak on error path
Commit 56a7aaa16bfe introduced a memory leak on the error path for a Py_BuildValue built object that on some newly introduced error path has not the correct reference count handling, fix that by decrementing the refcount in these path.
--- tools/python/xen/lowlevel/xc/xc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/python/xen/lowlevel/xc/xc.c +7 -2
@@ -919,11 +919,16 @@ static PyObject *pyxc_physinfo(XcObject *self) sve_vl_bits =arch_capabilities_arm_sve (pinfo.arch_capabilities); py_arm_sve_vl =PyLong_FromUnsignedLong (sve_vl_bits); -if ( !py_arm_sve_vl ) +if ( !py_arm_sve_vl ) { +Py_DECREF (objret);return NULL ; + } -if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) +if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) { +Py_DECREF (py_arm_sve_vl); +Py_DECREF (objret);return NULL ; + } }#endif
Signature · 1 line
2.34.1
Re: [PATCH 2/2] tools/python: Fix memory leak on error path
Quoted 9 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced a memory leak on the error path for aPy_BuildValuebuilt object that on some newly introduced error path has not the correct reference count handling, fix that by decrementing the refcount in these path.
Quoted 4 lines
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>---
Hi all,
Is there any chance to have this one reviewed by the end of the month? I’m asking because I have a Jira task attached to this patch and my PM is chasing me :)
If it’s not possible it’s fine either and I’ll have just to report that.
Cheers,
Luca
Quoted 30 lines
tools/python/xen/lowlevel/xc/xc.c| 9 +++++++--1 file changed, 7 insertions(+), 2 deletions(-)tools/python/xen/lowlevel/xc/xc.c +7
-2@@ -919,11 +919,16 @@ static PyObject *pyxc_physinfo(XcObject *self) sve_vl_bits =arch_capabilities_arm_sve (pinfo.arch_capabilities); py_arm_sve_vl =PyLong_FromUnsignedLong (sve_vl_bits); -if ( !py_arm_sve_vl ) +if ( !py_arm_sve_vl ) { +Py_DECREF (objret);return NULL ; + } -if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) +if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) { +Py_DECREF (py_arm_sve_vl); +Py_DECREF (objret);return NULL ; + } }#endif Signature · 1 line
2.34.1
Re: [PATCH 2/2] tools/python: Fix memory leak on error path
In reply to Luca FancelluQuoted 8 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced a memory leak on the error path for aPy_BuildValuebuilt object that on some newly introduced error path has not the correct reference count handling, fix that by decrementing the refcount in these path.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>
Quoted 30 lines
--- tools/python/xen/lowlevel/xc/xc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)tools/python/xen/lowlevel/xc/xc.c +7
-2@@ -919,11 +919,16 @@ static PyObject *pyxc_physinfo(XcObject *self) sve_vl_bits =arch_capabilities_arm_sve (pinfo.arch_capabilities); py_arm_sve_vl =PyLong_FromUnsignedLong (sve_vl_bits); -if ( !py_arm_sve_vl ) +if ( !py_arm_sve_vl ) { +Py_DECREF (objret);return NULL ; + } -if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) +if (PyDict_SetItemString (objret,"arm_sve_vl" , py_arm_sve_vl) ) { +Py_DECREF (py_arm_sve_vl); +Py_DECREF (objret);return NULL ; + } }#endif Signature · 1 line
2.34.1
Signature · 3 lines
Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
Re: [PATCH 2/2] tools/python: Fix memory leak on error path
Quoted 11 lines · Marek Marczykowski-Górecki
Quoted 8 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced a memory leak on the error path for aPy_BuildValuebuilt object that on some newly introduced error path has not the correct reference count handling, fix that by decrementing the refcount in these path.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>
Oh, and BTW, in relation to the discussion on the summit about committing process, the buggy version was committed without my ack, after waiting for my review for about two weeks.
Signature · 3 lines
Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
Re: [PATCH 2/2] tools/python: Fix memory leak on error path
Hi Marek,
Quoted 11 lines · Marek Marczykowski-Górecki
Quoted 10 lines · Marek Marczykowski-Górecki
Quoted 8 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced a memory leak on the error path for aPy_BuildValuebuilt object that on some newly introduced error path has not the correct reference count handling, fix that by decrementing the refcount in these path.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>
Quoted 5 lines
Quoted 1 line
Oh, and BTW, in relation to the discussion on the summit about committing process, the buggy version was committed without my ack, after waiting for my review for about two weeks.
I was the committer for the series. In this case, this was not a case of committing because I thought the patch was uncontroversial. Instead, this was a lack of my side to properly check the acks on the patch. Sorry for that.
In general, as I mentioned during the design session, I don't commit with missing acks without explicitly saying so on the mailing list and this is often after consulting with others on IRC.
On a similar topic. So far, checking the ack is a manual process for me. So this is not entirely an error-free process (in particular for patch requiring multiple maintainers acks). I would love to have a script that could tell me if a patch is fully approved and/or what acks are missing.
Cheers,
Signature · 1 line
Julien Grall
Quoted 10 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced some SVE related code that is protected by '#ifdefined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.
Quoted 7 lines
So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>---
Hi all,
Is there any chance to have this one reviewed by the end of the month? I’m asking because I have a Jira task attached to this patch and my PM is chasing me :)
If it’s not possible it’s fine either and I’ll have just to report that.
Cheers,
Luca
Quoted 48 lines
tools/include/xen-tools/arm-arch-capabilities.h | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/xl/xl_info.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)tools/include/xen-tools/arm-arch-capabilities.h +0
-0@@ -14,7 +14,7 @@static inline
unsigned intarch_capabilities_arm_sve(unsigned int arch_capabilities){tools/include/xen-tools/arm-arch-capabilities.h +1
-1-#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)unsigned int sve_vl =MASK_EXTR (arch_capabilities,XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK );tools/python/xen/lowlevel/xc/xc.c +1
-1@@ -911,7 +911,7 @@ static PyObject *pyxc_physinfo(XcObject *self)"hw_caps" , cpu_cap, "virt_caps", virt_caps); -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)if ( objret ) {unsigned int sve_vl_bits;PyObject *py_arm_sve_vl;tools/xl/xl_info.c +1
-1@@ -226,7 +226,7 @@ static void output_physinfo(void) );/* Print arm SVE vector length only on ARM platforms */ -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)maybe_printf ("arm_sve_vector_length : %u\n" ,arch_capabilities_arm_sve (info.arch_capabilities) );Signature · 1 line
2.34.1
Quoted 6 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced some SVE related code that is protected by '#ifdefined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.
Quoted 6 lines
So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>
Quoted 48 lines
--- tools/include/xen-tools/arm-arch-capabilities.h | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/xl/xl_info.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)tools/include/xen-tools/arm-arch-capabilities.h +1
-1@@ -14,7 +14,7 @@static inline unsigned int arch_capabilities_arm_sve (unsigned int arch_capabilities) { -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)unsigned int sve_vl =MASK_EXTR (arch_capabilities,XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK );tools/python/xen/lowlevel/xc/xc.c +1
-1@@ -911,7 +911,7 @@ static PyObject *pyxc_physinfo(XcObject *self)"hw_caps" , cpu_cap, "virt_caps", virt_caps); -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)if ( objret ) {unsigned int sve_vl_bits;PyObject *py_arm_sve_vl;tools/xl/xl_info.c +1
-1@@ -226,7 +226,7 @@ static void output_physinfo(void) );/* Print arm SVE vector length only on ARM platforms */ -#if defined(__aarch64__) +#if defined(__arm__) || defined(__aarch64__)maybe_printf ("arm_sve_vector_length : %u\n" ,arch_capabilities_arm_sve (info.arch_capabilities) );Signature · 1 line
2.34.1
Signature · 3 lines
Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
Quoted 6 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced some SVE related code that is protected by '#ifdefined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.
Quoted 6 lines
So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>
Thanks,
Signature · 1 line
Anthony PERARD
Hi,
Replying here because there is no cover letter (in the future please add one if you have more than two patches bundled together).
Quoted 7 lines · Anthony PERARD
Quoted 6 lines · Luca Fancellu
Commit
56a7aaa16bfeintroduced some SVE related code that is protected by '#ifdefined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.
Quoted 8 lines
Quoted 6 lines
So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>Acked-by Anthony PERARD <[email protected]>
I have now committed the series.
Cheers,
Signature · 1 line
Julien Grall
Quoted 7 lines · Julien Grall
Hi,
Replying here because there is no cover letter (in the future please add one if you have more than two patches bundled together).
Sure I will
Quoted 12 lines · Anthony PERARD
Quoted 10 lines · Luca Fancellu
Quoted 9 lines
Commit
56a7aaa16bfeintroduced some SVE related code that is protected by '#ifdefined(__aarch64__)', the issue is that this doesn't take into consideration when the toolstack is compiled for an arm32 Dom0 running on an arm64 platform, it should be able to create SVE enabled guests but with the current code it's not.So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64.
Quoted 6 lines
Quoted 4 lines
Quoted 3 lines
Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Luca Fancellu <[email protected]>Reported-by Andrew Cooper <[email protected]>Acked-by Anthony PERARD <[email protected]>I have now committed the series.
Thank you
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall