Re: [libvirt] [PATCH v2] qemu: Fix using guest architecture as lookup key

2015-09-16 Thread Andrea Bolognani
On Tue, 2015-09-15 at 17:34 +0100, Daniel P. Berrange wrote: > > +/* Second attempt: use some arch-specific rules */ > > +archstr = > > virQEMUCapsArchToString(virQEMUCapsFindTarget(hostarch, > > + > > guestarch)); > > Nitpick, we

Re: [libvirt] [PATCH v2] qemu: Fix using guest architecture as lookup key

2015-09-15 Thread Daniel P. Berrange
On Tue, Sep 15, 2015 at 04:44:13PM +0200, Andrea Bolognani wrote: > When looking for a QEMU binary suitable for running ppc64le guests > we have to take into account the fact that we use the QEMU target > as key for the hash, so direct comparison is not good enough. > > Factor out the logic from v

[libvirt] [PATCH v2] qemu: Fix using guest architecture as lookup key

2015-09-15 Thread Andrea Bolognani
When looking for a QEMU binary suitable for running ppc64le guests we have to take into account the fact that we use the QEMU target as key for the hash, so direct comparison is not good enough. Factor out the logic from virQEMUCapsFindBinaryForArch() to a new virQEMUCapsFindTarget() function and