Re: [Libguestfs] [PATCH v2v 3/3] -o qemu: Always use -cpu host unless overridden by source hypervisor

2023-02-16 Thread Laszlo Ersek
On 2/15/23 15:12, Richard W.M. Jones wrote: > As with the prior commit, prefer -cpu host for all guests (except when > we have more information from the source hypervisor). Although there > is the disadvantage that -cpu host is non-migratable, in practice it > would be very difficult to live

Re: [Libguestfs] [PATCH v2v 1/3] v2v: Rename gcaps_default_cpu to gcaps_arch_min_version

2023-02-16 Thread Laszlo Ersek
On 2/15/23 15:12, Richard W.M. Jones wrote: > Some guests require not just a specific architecture, but cannot run > on qemu's default CPU model, eg. requiring x86_64-v2. Since we > anticipate future guests requiring higher versions, let's encode the > minimum architecture version instead of a

Re: [Libguestfs] [PATCH 1/2] python: Avoid crash if callback parameters cannot be built

2023-02-16 Thread Richard W.M. Jones
On Thu, Feb 16, 2023 at 03:09:02PM +0100, Laszlo Ersek wrote: > On 2/14/23 19:51, Richard W.M. Jones wrote: > > In the case that building the parameters to the Python event callback > > fails, args was returned as NULL. We immediately tried to call > > Py_INCREF on this which crashed. Returning

[Libguestfs] [PATCH] python: Avoid leaking py_array along error paths

2023-02-16 Thread Richard W.M. Jones
Tested by reverting bbf396fc5562b4f so that the error path is used, and re-running the reproducer supplied by Google. Rich. ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH] python: Avoid leaking py_array along error paths

2023-02-16 Thread Richard W.M. Jones
See-also: https://listman.redhat.com/archives/libguestfs/2023-February/030730.html Fixes: commit 6ef5837e2d8c5d4d83eff51c0201eb2e08f719de Thanks: Laszlo Ersek --- python/handle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/python/handle.c b/python/handle.c index bf639b5789..717eee83ed

Re: [Libguestfs] [PATCH 2/2] python: Use bytes instead of str for event callback buffer

2023-02-16 Thread Laszlo Ersek
On 2/14/23 19:51, Richard W.M. Jones wrote: > The event callback gets a buffer parameter which is usually something > like a log message. However as it comes from C it is not necessarily > well-formed (eg) UTF-8 but could contain any old byte sequence. > > In the test case provided by the

Re: [Libguestfs] [PATCH 1/2] python: Avoid crash if callback parameters cannot be built

2023-02-16 Thread Laszlo Ersek
On 2/14/23 19:51, Richard W.M. Jones wrote: > In the case that building the parameters to the Python event callback > fails, args was returned as NULL. We immediately tried to call > Py_INCREF on this which crashed. Returning NULL means the Python > function threw an exception, so print the