Skip to contentSkip to conversation

[4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build

PATCH Superseded Jan Beulich 2 participants 4 messages Oct 12, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build

The backport didn't adapt to the earlier function prototype taking more (unused here) arguments.

Fixes c5215044578e ("xen/arm, libxl: Implement XEN_DOMCTL_shadow_op for Arm")

---
Also applicable to 4.14 and 4.13.

tools/libs/light/libxl_arm.c +1 -1
@@ -136,7 +136,7 @@ int libxl__arch_domain_create(libxl__gc *gc,
 
     int r = xc_shadow_control(ctx->xch, domid,
                               XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION,
-                              &shadow_mb, 0);
+                              NULL, 0, &shadow_mb, 0, NULL);
     if (r) {
         LOGED(ERROR, domid,
               "Failed to set %u MiB shadow allocation", shadow_mb);
#1 lore raw

Hi Jan,

I thought to send my patch for fixing this issue tomorrow, but since you are sending...

Quoted 17 lines

-----Original Message-----
From: Jan Beulich <[email protected]>
Subject: [PATCH][4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build

The backport didn't adapt to the earlier function prototype taking more (unused here) arguments.

Fixes c5215044578e ("xen/arm, libxl: Implement XEN_DOMCTL_shadow_op

for Arm")

---
Also applicable to 4.14 and 4.13.

tools/libs/light/libxl_arm.c int libxl__arch_domain_create(libxl__gc *gc, · line 136

Quoted 1 line
tools/libs/light/libxl_arm.c +0 -0
@@ -136,7 +136,7 @@ int libxl__arch_domain_create(libxl__gc *gc,
 

The definition of shadow_mb should also be changed to unsigned long, and...

tools/libs/light/libxl_arm.c int libxl__arch_domain_create(libxl__gc *gc, · line 142

Quoted 7 lines
tools/libs/light/libxl_arm.c +1 -1
     int r = xc_shadow_control(ctx->xch, domid,
                               XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION,
-                              &shadow_mb, 0);
+                              NULL, 0, &shadow_mb, 0, NULL);
     if (r) {
         LOGED(ERROR, domid,
               "Failed to set %u MiB shadow allocation", shadow_mb);

...here should be %lu.

Kind regards,
Henry

#2 lore raw
Quoted 2 lines · Henry Wang

I thought to send my patch for fixing this issue tomorrow, but since you are sending...

Well, I was hoping to get something in before the day closes.

Quoted 30 lines
Quoted 17 lines

-----Original Message-----
From: Jan Beulich <[email protected]>
Subject: [PATCH][4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build

The backport didn't adapt to the earlier function prototype taking more (unused here) arguments.

Fixes c5215044578e ("xen/arm, libxl: Implement XEN_DOMCTL_shadow_op

for Arm")

---
Also applicable to 4.14 and 4.13.

tools/libs/light/libxl_arm.c int libxl__arch_domain_create(libxl__gc *gc, · line 136

Quoted 1 line
tools/libs/light/libxl_arm.c +0 -0
@@ -136,7 +136,7 @@ int libxl__arch_domain_create(libxl__gc *gc,
 

The definition of shadow_mb should also be changed to unsigned long, and...

tools/libs/light/libxl_arm.c int libxl__arch_domain_create(libxl__gc *gc, · line 142

Quoted 7 lines
tools/libs/light/libxl_arm.c +1 -1
     int r = xc_shadow_control(ctx->xch, domid,
                               XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION,
-                              &shadow_mb, 0);
+                              NULL, 0, &shadow_mb, 0, NULL);
     if (r) {
         LOGED(ERROR, domid,
               "Failed to set %u MiB shadow allocation", shadow_mb);
Quoted 1 line

...here should be %lu.

Oh, indeed. Why did I not pay attention when looking at the reverse x86 change in 4.16? Thanks for pointing out.

Jan

#3 lore raw

Hi Jan,

Quoted 10 lines

-----Original Message-----
From: Jan Beulich <[email protected]>
Subject: Re: [PATCH][4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build

Quoted 2 lines · Henry Wang

I thought to send my patch for fixing this issue tomorrow, but since you are sending...

Well, I was hoping to get something in before the day closes.

Nono I was not complaining, sorry for misunderstanding. Actually thanks for your effort here.

Quoted 17 lines
Quoted 17 lines

tools/libs/light/libxl_arm.c int libxl__arch_domain_create(libxl__gc *gc, · line 136

Quoted 5 lines
tools/libs/light/libxl_arm.c +0 -0
@@ -136,7 +136,7 @@ int libxl__arch_domain_create(libxl__gc *gc,
 

The definition of shadow_mb should also be changed to unsigned long, and...

Quoted 7 lines
tools/libs/light/libxl_arm.c +1 -1
     int r = xc_shadow_control(ctx->xch, domid,
                               XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION,
-                              &shadow_mb, 0);
+                              NULL, 0, &shadow_mb, 0, NULL);
     if (r) {
         LOGED(ERROR, domid,
               "Failed to set %u MiB shadow allocation", shadow_mb);
Quoted 4 lines
Quoted 1 line

...here should be %lu.

Oh, indeed. Why did I not pay attention when looking at the reverse x86 change in 4.16? Thanks for pointing out.

Well I made the exact same mistake here before I did my local testing so I think this is quite easy to ignore :)))

Kind regards,
Henry

Quoted 2 lines

Jan