[libvirt] [PATCH 0/3] Couple of build fixes after latest cpu changes

Michal Privoznik posted 3 patches 1 week ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1555303284.git.mprivozn@redhat.com
src/cpu/cpu_x86.c     | 68 ++++++++++++++++++++++---------------------
src/util/virhostcpu.c | 34 ++++++++++++----------
2 files changed, 54 insertions(+), 48 deletions(-)

[libvirt] [PATCH 0/3] Couple of build fixes after latest cpu changes

Posted by Michal Privoznik 1 week ago
I've successfully tested these on mingw, arm and x86_64.

Almost trivial, but not pushed yet. I'll wait for review.

Michal Prívozník (3):
  virhostcpu.c: Fix misalignment in virHostCPUGetMSRFromKVM comment
  virhostcpu: Make virHostCPUGetMSR() work only on x86
  cpu_x86: Fix placement of *CheckFeature functions

 src/cpu/cpu_x86.c     | 68 ++++++++++++++++++++++---------------------
 src/util/virhostcpu.c | 34 ++++++++++++----------
 2 files changed, 54 insertions(+), 48 deletions(-)

-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/3] Couple of build fixes after latest cpu changes

Posted by Jiri Denemark 6 days ago
On Mon, Apr 15, 2019 at 06:50:16 +0200, Michal Privoznik wrote:
> I've successfully tested these on mingw, arm and x86_64.
> 
> Almost trivial, but not pushed yet. I'll wait for review.
> 
> Michal Prívozník (3):
>   virhostcpu.c: Fix misalignment in virHostCPUGetMSRFromKVM comment
>   virhostcpu: Make virHostCPUGetMSR() work only on x86
>   cpu_x86: Fix placement of *CheckFeature functions
> 
>  src/cpu/cpu_x86.c     | 68 ++++++++++++++++++++++---------------------
>  src/util/virhostcpu.c | 34 ++++++++++++----------
>  2 files changed, 54 insertions(+), 48 deletions(-)

Oops, thanks for fixing the issues.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/3] Couple of build fixes after latest cpu changes

Posted by Bjoern Walk 1 week ago
Michal Privoznik <mprivozn@redhat.com> [2019-04-15, 06:50AM +0200]:
> I've successfully tested these on mingw, arm and x86_64.

Fixes S390 as well, thanks.

> Almost trivial, but not pushed yet. I'll wait for review.

I got another incidential build error that doesn't seem related though:

	../../examples/domtop/domtop.c: In function 'print_cpu_usage':
	../../examples/domtop/domtop.c:242:28: error: 'pos' may be used uninitialized in this function [-Werror=maybe-uninitialized]
			 usage = (now_params[pos].value.ul - then_params[pos].value.ul) /
								^
	cc1: all warnings being treated as errors

GCC is 8.2.1. Here's a patch:

	diff --git a/examples/domtop/domtop.c b/examples/domtop/domtop.c
	index c9b51aed..e463e287 100644
	--- a/examples/domtop/domtop.c
	+++ b/examples/domtop/domtop.c
	@@ -206,7 +206,7 @@ print_cpu_usage(size_t cpu,
		 }

		 for (i = 0; i < ncpus; i++) {
	-        size_t pos;
	+        size_t pos = 0;
			 double usage;

			 /* check if the vCPU is in the maps */
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/3] Couple of build fixes after latest cpu changes

Posted by Michal Privoznik 6 days ago
On 4/15/19 8:12 AM, Bjoern Walk wrote:
> Michal Privoznik <mprivozn@redhat.com> [2019-04-15, 06:50AM +0200]:
>> I've successfully tested these on mingw, arm and x86_64.
> 
> Fixes S390 as well, thanks.
> 
>> Almost trivial, but not pushed yet. I'll wait for review.
> 
> I got another incidential build error that doesn't seem related though:

Yep, it's unrelated.

> 
> 	../../examples/domtop/domtop.c: In function 'print_cpu_usage':
> 	../../examples/domtop/domtop.c:242:28: error: 'pos' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 			 usage = (now_params[pos].value.ul - then_params[pos].value.ul) /
> 								^
> 	cc1: all warnings being treated as errors
> 
> GCC is 8.2.1. Here's a patch:
> 
> 	diff --git a/examples/domtop/domtop.c b/examples/domtop/domtop.c
> 	index c9b51aed..e463e287 100644
> 	--- a/examples/domtop/domtop.c
> 	+++ b/examples/domtop/domtop.c
> 	@@ -206,7 +206,7 @@ print_cpu_usage(size_t cpu,
> 		 }
> 
> 		 for (i = 0; i < ncpus; i++) {
> 	-        size_t pos;
> 	+        size_t pos = 0;
> 			 double usage;
> 
> 			 /* check if the vCPU is in the maps */
> 

This is a false positive. Either the control cannot get to line 242 or 
if it will then @pos was set. But if this patch helps you to compile 
cleanly then I'm up for taking it. Mind sending it as a proper patch?

Thanks,
Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list