diff mbox series

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

Message ID 805d66fe-e116-254f-015a-59a760639653@suse.com (mailing list archive)
State Superseded
Headers show
Series [4.15] libxl/Arm: correct xc_shadow_control() invocation to fix build | expand

Commit Message

Jan Beulich Oct. 12, 2022, 1:05 p.m. UTC
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")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Also applicable to 4.14 and 4.13.

Comments

Henry Wang Oct. 12, 2022, 1:07 p.m. UTC | #1
Hi Jan,

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

> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> 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")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Also applicable to 4.14 and 4.13.
> 
> --- a/tools/libs/light/libxl_arm.c
> +++ b/tools/libs/light/libxl_arm.c
> @@ -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...

>      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
Jan Beulich Oct. 12, 2022, 1:13 p.m. UTC | #2
On 12.10.2022 15:07, Henry Wang wrote:
> 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.

>> -----Original Message-----
>> From: Jan Beulich <jbeulich@suse.com>
>> 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")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> Also applicable to 4.14 and 4.13.
>>
>> --- a/tools/libs/light/libxl_arm.c
>> +++ b/tools/libs/light/libxl_arm.c
>> @@ -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...
> 
>>      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.

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

Jan
Henry Wang Oct. 12, 2022, 1:16 p.m. UTC | #3
Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Subject: Re: [PATCH][4.15] libxl/Arm: correct xc_shadow_control() invocation
> to fix build
> 
> On 12.10.2022 15:07, Henry Wang wrote:
> > 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.

> 
> >> --- a/tools/libs/light/libxl_arm.c
> >> +++ b/tools/libs/light/libxl_arm.c
> >> @@ -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...
> >
> >>      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.
> 
> 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

> 
> Jan
diff mbox series

Patch

--- a/tools/libs/light/libxl_arm.c
+++ b/tools/libs/light/libxl_arm.c
@@ -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);