All of lore.kernel.org
 help / color / mirror / Atom feed
* [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
@ 2014-06-30 17:19 Dario Faggioli
  2014-06-30 21:11 ` Jim Fehlig
  0 siblings, 1 reply; 9+ messages in thread
From: Dario Faggioli @ 2014-06-30 17:19 UTC (permalink / raw)
  To: libvir-list; +Cc: xen-devel, Ian Jackson, Ian Campbell

libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
libxl_set_vcpuaffinity() now wants one more parameter. That is
representative of 'VCPU soft affinity', which libvirt does not use.

To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
defined. Use it as a gate and, if present, re-#define the calls from
the old to the new interface, to avoid breaking the build.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 src/libxl/libxl_conf.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
index 6aa36d2..da66b4e 100644
--- a/src/libxl/libxl_conf.h
+++ b/src/libxl/libxl_conf.h
@@ -55,6 +55,17 @@
 # define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
 # define LIBXL_BOOTLOADER_PATH BINDIR "/pygrub"
 
+/* libxl interface for setting VCPU affinity changed in 4.5. In fact, a new
+ * parameter has been added, representative of 'VCPU soft affinity'. If one
+ * does not care about it (and that's libvirt case), passing NULL is the
+ * right thing to do. To mark that change, LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
+ * is defined. */
+# ifdef LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
+#  define libxl_set_vcpuaffinity(ctx, domid, vcpuid, map) \
+    libxl_set_vcpuaffinity((ctx), (domid), (vcpuid), (map), NULL)
+#  define libxl_set_vcpuaffinity_all(ctx, domid, max_vcpus, map) \
+    libxl_set_vcpuaffinity_all((ctx), (domid), (max_vcpus), (map), NULL)
+# endif
 
 typedef struct _libxlDriverPrivate libxlDriverPrivate;
 typedef libxlDriverPrivate *libxlDriverPrivatePtr;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-06-30 17:19 [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity() Dario Faggioli
@ 2014-06-30 21:11 ` Jim Fehlig
  2014-06-30 21:23   ` [libvirt] " Eric Blake
  0 siblings, 1 reply; 9+ messages in thread
From: Jim Fehlig @ 2014-06-30 21:11 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: libvir-list, xen-devel, Ian Jackson, Ian Campbell

Dario Faggioli wrote:
> libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
> libxl_set_vcpuaffinity() now wants one more parameter. That is
> representative of 'VCPU soft affinity', which libvirt does not use.
>
> To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
> defined. Use it as a gate and, if present, re-#define the calls from
> the old to the new interface, to avoid breaking the build.
>   

Thanks, looks good.  I was about to push, but wanted to check with other
libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
push this?  It fixes a libxl driver build failure against xen-unstable.

Regards,
Jim

> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Cc: Jim Fehlig <jfehlig@suse.com>
> Cc: Ian Campbell <Ian.Campbell@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
>  src/libxl/libxl_conf.h |   11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
> index 6aa36d2..da66b4e 100644
> --- a/src/libxl/libxl_conf.h
> +++ b/src/libxl/libxl_conf.h
> @@ -55,6 +55,17 @@
>  # define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
>  # define LIBXL_BOOTLOADER_PATH BINDIR "/pygrub"
>  
> +/* libxl interface for setting VCPU affinity changed in 4.5. In fact, a new
> + * parameter has been added, representative of 'VCPU soft affinity'. If one
> + * does not care about it (and that's libvirt case), passing NULL is the
> + * right thing to do. To mark that change, LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
> + * is defined. */
> +# ifdef LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
> +#  define libxl_set_vcpuaffinity(ctx, domid, vcpuid, map) \
> +    libxl_set_vcpuaffinity((ctx), (domid), (vcpuid), (map), NULL)
> +#  define libxl_set_vcpuaffinity_all(ctx, domid, max_vcpus, map) \
> +    libxl_set_vcpuaffinity_all((ctx), (domid), (max_vcpus), (map), NULL)
> +# endif
>  
>  typedef struct _libxlDriverPrivate libxlDriverPrivate;
>  typedef libxlDriverPrivate *libxlDriverPrivatePtr;
>
>
>
>   

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-06-30 21:11 ` Jim Fehlig
@ 2014-06-30 21:23   ` Eric Blake
  2014-06-30 21:32     ` Jim Fehlig
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Blake @ 2014-06-30 21:23 UTC (permalink / raw)
  To: Jim Fehlig, Dario Faggioli
  Cc: libvir-list, xen-devel, Ian Jackson, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --]

On 06/30/2014 03:11 PM, Jim Fehlig wrote:
> Dario Faggioli wrote:
>> libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
>> libxl_set_vcpuaffinity() now wants one more parameter. That is
>> representative of 'VCPU soft affinity', which libvirt does not use.
>>
>> To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
>> defined. Use it as a gate and, if present, re-#define the calls from
>> the old to the new interface, to avoid breaking the build.
>>   
> 
> Thanks, looks good.  I was about to push, but wanted to check with other
> libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
> push this?  It fixes a libxl driver build failure against xen-unstable.

Yes, fixing a build failure is an acceptable fix during hard freeze.  Go
ahead and push.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-06-30 21:23   ` [libvirt] " Eric Blake
@ 2014-06-30 21:32     ` Jim Fehlig
  2014-07-01  6:52       ` Dario Faggioli
  0 siblings, 1 reply; 9+ messages in thread
From: Jim Fehlig @ 2014-06-30 21:32 UTC (permalink / raw)
  To: Eric Blake
  Cc: libvir-list, Dario Faggioli, xen-devel, Ian Jackson, Ian Campbell

Eric Blake wrote:
> On 06/30/2014 03:11 PM, Jim Fehlig wrote:
>   
>> Dario Faggioli wrote:
>>     
>>> libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
>>> libxl_set_vcpuaffinity() now wants one more parameter. That is
>>> representative of 'VCPU soft affinity', which libvirt does not use.
>>>
>>> To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
>>> defined. Use it as a gate and, if present, re-#define the calls from
>>> the old to the new interface, to avoid breaking the build.
>>>   
>>>       
>> Thanks, looks good.  I was about to push, but wanted to check with other
>> libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
>> push this?  It fixes a libxl driver build failure against xen-unstable.
>>     
>
> Yes, fixing a build failure is an acceptable fix during hard freeze.  Go
> ahead and push.
>   

Thanks Eric, pushed now.

Regards,
Jim

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-06-30 21:32     ` Jim Fehlig
@ 2014-07-01  6:52       ` Dario Faggioli
  2014-07-01  8:01         ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Dario Faggioli @ 2014-07-01  6:52 UTC (permalink / raw)
  To: Jim Fehlig; +Cc: libvir-list, Ian Jackson, xen-devel, Eric Blake, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 773 bytes --]

On lun, 2014-06-30 at 15:32 -0600, Jim Fehlig wrote:
> Eric Blake wrote:
>        
> >> Thanks, looks good.  I was about to push, but wanted to check with other
> >> libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
> >> push this?  It fixes a libxl driver build failure against xen-unstable.
> >>     
> >
> > Yes, fixing a build failure is an acceptable fix during hard freeze.  Go
> > ahead and push.
> >   
> 
> Thanks Eric, pushed now.
> 
Cool! Thanks Everyone,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-07-01  6:52       ` Dario Faggioli
@ 2014-07-01  8:01         ` Ian Campbell
  2014-07-01  9:03           ` Dario Faggioli
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-07-01  8:01 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: libvir-list, Ian Jackson, xen-devel

On Tue, 2014-07-01 at 08:52 +0200, Dario Faggioli wrote:
> On lun, 2014-06-30 at 15:32 -0600, Jim Fehlig wrote:
> > Eric Blake wrote:
> >        
> > >> Thanks, looks good.  I was about to push, but wanted to check with other
> > >> libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
> > >> push this?  It fixes a libxl driver build failure against xen-unstable.
> > >>     
> > >
> > > Yes, fixing a build failure is an acceptable fix during hard freeze.  Go
> > > ahead and push.
> > >   
> > 
> > Thanks Eric, pushed now.
> > 
> Cool! Thanks Everyone,

And thanks Dario for the quick fix.

WRT Xen's automated testing the new libvirt should get tested today and
the result be picked up for a xen-unstable run shortly after, so staging
ought to be unblocked by ~tomorrow, barring any other failures.

I've added "does libvirt need a peemptive update?" to my mental
checklist for things involved LIBXL_API_VERSION changes.

Cheers,
Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-07-01  8:01         ` Ian Campbell
@ 2014-07-01  9:03           ` Dario Faggioli
  2014-07-01 17:00             ` Jim Fehlig
  0 siblings, 1 reply; 9+ messages in thread
From: Dario Faggioli @ 2014-07-01  9:03 UTC (permalink / raw)
  To: Ian Campbell; +Cc: libvir-list, Ian Jackson, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1718 bytes --]

On mar, 2014-07-01 at 09:01 +0100, Ian Campbell wrote:
> On Tue, 2014-07-01 at 08:52 +0200, Dario Faggioli wrote:
> > On lun, 2014-06-30 at 15:32 -0600, Jim Fehlig wrote:
> > > Eric Blake wrote:
> > >        
> > > >> Thanks, looks good.  I was about to push, but wanted to check with other
> > > >> libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
> > > >> push this?  It fixes a libxl driver build failure against xen-unstable.
> > > >>     
> > > >
> > > > Yes, fixing a build failure is an acceptable fix during hard freeze.  Go
> > > > ahead and push.
> > > >   
> > > 
> > > Thanks Eric, pushed now.
> > > 
> > Cool! Thanks Everyone,
> 
> And thanks Dario for the quick fix.
> 
Well, it could (and should!) have been quicker, but it collapsed with an
update of the test box I devote to Xen+libvirt hack/testing...

I've added "keep that box in a more good shape" to my menta
checklist. :-)

> I've added "does libvirt need a peemptive update?" to my mental
> checklist for things involved LIBXL_API_VERSION changes.
>
Me too, and actually, looking at things from this perspective, I think
the push gate did a good job _as_it_is_ in highlighting how much careful
we should be with the libxl interface, and that things either get fixed
quickly or changes be reverted.

Just thinking out loud here but, if we did not get the push failure,
when would have we discovered this?

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-07-01  9:03           ` Dario Faggioli
@ 2014-07-01 17:00             ` Jim Fehlig
  2014-07-02  9:14               ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Jim Fehlig @ 2014-07-01 17:00 UTC (permalink / raw)
  To: Dario Faggioli
  Cc: libvir-list, Ian Jackson, xen-devel, Eric Blake, Ian Campbell

Dario Faggioli wrote:
> Just thinking out loud here but, if we did not get the push failure,
> when would have we discovered this?
>   

Good question.  I could have been days (or even weeks) before I stumbled
across it.  ATM, I don't have any automated builds of libvirt.git master
against xen.git master :-/.  Adding it to my list...

Thanks for your work on the push gate Ian!

Regards,
Jim

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()
  2014-07-01 17:00             ` Jim Fehlig
@ 2014-07-02  9:14               ` Ian Campbell
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-07-02  9:14 UTC (permalink / raw)
  To: Jim Fehlig; +Cc: libvir-list, Ian Jackson, Dario Faggioli, xen-devel

On Tue, 2014-07-01 at 11:00 -0600, Jim Fehlig wrote:
> Dario Faggioli wrote:
> > Just thinking out loud here but, if we did not get the push failure,
> > when would have we discovered this?
> >   
> 
> Good question.  I could have been days (or even weeks) before I stumbled
> across it.  ATM, I don't have any automated builds of libvirt.git master
> against xen.git master :-/.  Adding it to my list...

FWIW I think this effectively already exists in the osstest flights.

[xen-unstable test] is testing new Xen against gated libvirt
[libvirt test] is testing new libvirt against gated Xen-unstable

(where "gated X" means the last successfully tested version of X from
the other flight)

What's not tested is newest Xen against newest libvirt, but I think any
issue should show up in one or the other of the existing flights.

> Thanks for your work on the push gate Ian!

No problem, glad it's actually flagging useful stuff already!

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-02  9:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 17:19 [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity() Dario Faggioli
2014-06-30 21:11 ` Jim Fehlig
2014-06-30 21:23   ` [libvirt] " Eric Blake
2014-06-30 21:32     ` Jim Fehlig
2014-07-01  6:52       ` Dario Faggioli
2014-07-01  8:01         ` Ian Campbell
2014-07-01  9:03           ` Dario Faggioli
2014-07-01 17:00             ` Jim Fehlig
2014-07-02  9:14               ` Ian Campbell

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.