Re: [PATCH 7/8 v2] nss: aiforaf: Decrease stack size by scoping off large buffers

2023-08-30 Thread Kristina Hanicova
986529301 > > > tools/nss/libvirt_nss.c | 87 - > 1 file changed, 51 insertions(+), 36 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 7/8] nss: aiforaf: Decrease stack size by scoping off large buffers.

2023-08-30 Thread Kristina Hanicova
continue; > > +} > > +} while (false); > > > > for (res = res0; res; res = res->ai_next) > > res->ai_flags = pai->ai_flags; > > -- > > 2.41.0 > > > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 5/8] nss: aiforaf: Remove unused 'ret' variable

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > The variable is set but never actually used. > > Signed-off-by: Peter Krempa > --- > tools/nss/libvirt_nss.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 4/8] nss: aiforaf: Format one argument/variable per line

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > Break up the argument and variable declarations to the preferred style. > > Signed-off-by: Peter Krempa > --- > tools/nss/libvirt_nss.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > Reviewed-

Re: [PATCH 8/8] build: Decrease maximum stack frame size to 2048

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > After recent cleanups we can now restrict the maximum stack frame size > to 2k. > > Signed-off-by: Peter Krempa > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 6/8] nss: aiforaf: Drop unused buffer 'port'

2023-08-30 Thread Kristina Hanicova
; --- > tools/nss/libvirt_nss.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 3/8] virHostValidateBhyve: Heap allocate massive 'struct kld_file_stat'

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > tools/virt-host-validate-bhyve.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 2/8] virHostValidateBhyve: Declare one variable per line

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > tools/virt-host-validate-bhyve.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 1/8] bhyve: Don't stack-allocate huge error buffers

2023-08-30 Thread Kristina Hanicova
On Wed, Aug 30, 2023 at 1:59 PM Peter Krempa wrote: > _POSIX2_LINE_MAX is 2048. Allocate the buffers on the heap instead. > > Signed-off-by: Peter Krempa > --- > src/bhyve/bhyve_process.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

[PATCH v3 1/2] conf: add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
usually do not need to change the default setting. Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 6 +- src/conf/domain_conf.c| 19 ++- src/conf/domain_conf.h| 1 + src/conf/domain_validate.c| 3 ++- src/conf/schemas

[PATCH v3 2/2] qemu: add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
This commit adds building of `discard_granularity` disk option for qemu commandline. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1849570 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_command.c | 2 + .../disk-blockio.x86_64-latest.args | 2

[PATCH v3 0/2] add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
v3 of: https://listman.redhat.com/archives/libvir-list/2023-August/241452.html diff to v2 (suggested by Peter): * added note to the first commit * enabled qemuxml2xmltest for blockio * moved one hunk to the first commit Kristina Hanicova (2): conf: add support for discard_granularity qemu

[PATCH v2 2/2] qemu: add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
This commit adds building of `discard_granularity` disk option for qemu commandline. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1849570 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_command.c| 2 ++ src/vz/vz_utils.c

[PATCH v2 0/2] add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
This is v2 (or rather the first 2 patches) of: https://listman.redhat.com/archives/libvir-list/2023-August/241076.html diff to v1: * added ABI stability check (noticed by Peter) * splitting the series into two parts Kristina Hanicova (2): conf: add support for discard_granularity qemu: add

[PATCH v2 1/2] conf: add support for discard_granularity

2023-08-25 Thread Kristina Hanicova
This introduces the ability to set the discard granularity option for a disk. It defines the smallest amount of data that can be discarded in a single operation (useful for managing and optimizing storage). Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 6 +- src

Re: [PATCH 0/6] Fix one corner case when parsing 'mdevctl' output

2023-08-24 Thread Kristina Hanicova
ons(+), 28 deletions(-) > create mode 100644 tests/nodedevmdevctldata/mdevctl-list-empty-array.json > create mode 100644 > tests/nodedevmdevctldata/mdevctl-list-empty-array.out.xml Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 2/6] nodeDeviceParseMdevctlJSON: Accept empty string

2023-08-24 Thread Kristina Hanicova
irJSONValue *obj; > > +if (virStringIsEmpty(jsonstring)) { > +VIR_DEBUG("mdevctl has no defined mediated devices"); > +*devs = NULL; > +return 0; > +} > + > json_devicelist = virJSONValueFromString(jsonstring); > > if (!json_devicelist || !virJSONValueIsArray(json_devicelist)) { > -- > 2.41.0 > > Reviewed-by: Kristina Hanicova Kristina

[PATCH] conf: add virDomainDiskBlockIoCheckABIStability()

2023-08-24 Thread Kristina Hanicova
Add missing ABI stability check for blockio properties for disk devices. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2e60927799..71bd49bf95 100644

Re: [PATCH v2 0/5] Improve closing of FDs for child processes

2023-08-24 Thread Kristina Hanicova
yms | 4 + > src/util/vircommand.c| 160 --- > src/util/virfile.c | 110 +++ > src/util/virfile.h | 5 ++ > tests/commandtest.c | 2 + > 6 files changed, 222 insertions(+), 63 deletions(-) > > Reviewed-by: Kristina Hanicova Kristina

[PATCH 4/5] qemu: Introduce QEMU_CAPS_SCSI_DISK_MAX_UNMAP_SIZE capability

2023-08-02 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml | 1 + tests

[PATCH 1/5] conf: add support for discard_granularity

2023-08-02 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 6 +- src/conf/domain_conf.c| 12 +++- src/conf/domain_conf.h| 1 + src/conf/domain_validate.c| 3 ++- src/conf/schemas/domaincommon.rng | 5 + src/qemu/qemu_domain.c

[PATCH 2/5] qemu: add support for discard_granularity

2023-08-02 Thread Kristina Hanicova
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1849570 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_command.c| 2 ++ src/vz/vz_utils.c | 3 ++- tests/qemuxml2argvdata/disk-blockio.x86_64-latest.args | 2 +- tests

[PATCH 3/5] conf: add support for max_unmap_size

2023-08-02 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 10 ++ src/conf/domain_conf.c| 12 +++- src/conf/domain_conf.h| 1 + src/conf/domain_validate.c| 3 ++- src/conf/schemas/domaincommon.rng | 5 + 5 files changed, 29

[PATCH 5/5] qemu: add support for max_unmap_size

2023-08-02 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/qemu/qemu_command.c | 2 + src/qemu/qemu_domain.c| 2 + src/vz/vz_utils.c | 3 +- ...csi-disk-max_unmap_size.x86_64-latest.args | 37 +++ .../disk-scsi-disk

[PATCH 0/5] introduce support for block device properties

2023-08-02 Thread Kristina Hanicova
into commit messages as well. Kristina Hanicova (5): conf: add support for discard_granularity qemu: add support for discard_granularity conf: add support for max_unmap_size qemu: Introduce QEMU_CAPS_SCSI_DISK_MAX_UNMAP_SIZE capability qemu: add support for max_unmap_size docs/formatdomain.rst

Re: [PATCH] qemu_domain: Partially validate memory amounts when auto-adding NUMA node

2023-07-25 Thread Kristina Hanicova
MEMORY_MODEL_DIMM: > case VIR_DOMAIN_MEMORY_MODEL_NVDIMM: > @@ -4848,6 +4855,8 @@ qemuDomainDefNumaAutoAdd(virDomainDef *def, > } > } > > +virDomainNumaSetNodeMemorySize(def->numa, 0, initialMem); > + > return 0; > } > > -- > 2.41.0 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] qemu: Adapt to new way of specifying PC speaker

2023-07-19 Thread Kristina Hanicova
u/domain--1-QEMUGuest1/master-key.aes"}' > \ > --machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ > +-machine > pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,pcspk-audiodev=audio1,acpi=off > \ > -accel tcg \ > -cpu qemu64 \ > -m 214 \ > @@ -28,7 +28,6 @@ > XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ > -boot strict=on \ > -device > '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ > -audiodev '{"id":"audio1","driver":"none"}' \ > --soundhw pcspk \ > -device > '{"driver":"ES1370","id":"sound1","audiodev":"audio1","bus":"pci.0","addr":"0x2"}' > \ > -device '{"driver":"sb16","id":"sound2","audiodev":"audio1"}' \ > -device > '{"driver":"AC97","id":"sound3","audiodev":"audio1","bus":"pci.0","addr":"0x3"}' > \ > -- > 2.39.3 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] qemu: Add NUMA node automatically for memory hotplug

2023-07-17 Thread Kristina Hanicova
..memory-hotplug-ppc64-nonuma-abi-update.xml | 7 ++- > 3 files changed, 63 insertions(+), 8 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] qemu_domain: Deduplicate targetNode check in qemuDomainDefValidateMemoryHotplugDevice()

2023-07-13 Thread Kristina Hanicova
--- > src/qemu/qemu_domain.c | 9 - > 1 file changed, 9 deletions(-) Reviewed-by: Kristina Hanicova Kristina

Re: [libvirt PATCH] docs: index: Add a quick link to Submitting patches

2023-07-13 Thread Kristina Hanicova
link from the main page. > > Signed-off-by: Erik Skultety > --- > > Feel free to reject this patch if you think it provides absolutely no value > towards mitigating the issue at hand. > > docs/index.rst | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] node_device: Enclose Linux specific code in ifdef __linux__

2023-07-11 Thread Kristina Hanicova
znik > --- > src/node_device/node_device_udev.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] util: don't validate empty params

2023-06-26 Thread Kristina Hanicova
rams == 0 is valid) -> qemuDomainBlockCopy() > > Signed-off-by: Oleg Vasilev > --- > src/util/virtypedparam.c | 4 > 1 file changed, 4 insertions(+) > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 0/2] Fix mocking around networkxml2firewalltest

2023-05-10 Thread Kristina Hanicova
walld.h | 2 ++ > tests/virfirewallmock.c | 16 > 2 files changed, 6 insertions(+), 12 deletions(-) > > -- > 2.39.2 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 11/11] qemuhotplugtest: Verify domain XML on UPDATE

2023-04-24 Thread Kristina Hanicova
muhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-nochange.xml > create mode 100644 > tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-password.xml > > Reviewed-by: Kristina Hanicova thanks for your impact Michal, Kristina

Re: [PATCH 10/11] qemuhotplugtest: use g_autoptr(virDomainDeviceDef)

2023-04-24 Thread Kristina Hanicova
ile changed, 1 insertion(+), 7 deletions(-) > Reviewed-by: Kristina Hanicova making impact, Kristina

Re: [PATCH 09/11] qemuhotplugtest: Don't overwrite vm->def->id in testQemuHotplugCheckResult()

2023-04-21 Thread Kristina Hanicova
h forgot to remove the restoration of the original > dom ID. > > Signed-off-by: Michal Privoznik > --- > tests/qemuhotplugtest.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 08/11] qemuhotplugtest: Fix misleading comment on monitor unlock

2023-04-21 Thread Kristina Hanicova
hanged, 2 insertions(+), 3 deletions(-) > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 07/11] qemu_hotplug.h: Expose less functions

2023-04-21 Thread Kristina Hanicova
> --- > src/qemu/qemu_hotplug.c | 56 + > src/qemu/qemu_hotplug.h | 61 - > 2 files changed, 32 insertions(+), 85 deletions(-) > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 06/11] qemuhotplugtest: Call qemuDomainUpdateDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
--- > 1 file changed, 3 insertions(+), 54 deletions(-) Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 05/11] qemuhotplugtest: Call qemuDomainAttachDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
by: Michal Privoznik > --- > tests/qemuhotplugtest.c | 68 + > 1 file changed, 7 insertions(+), 61 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 04/11] qemuhotplugtest: Call qemuDomainDetachDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
e. Just call > qemuDomainDetachDeviceLive() directly and drop > testQemuHotplugDetach(). > > Signed-off-by: Michal Privoznik > --- > tests/qemuhotplugtest.c | 49 + > 1 file changed, 1 insertion(+), 48 deletions(-) > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 03/11] qemu: Move qemuDomainUpdateDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Kristina Hanicova
t; > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 299 > src/qemu/qemu_hotplug.c | 299 > src/qemu/qemu_hotplug.h | 5 + > 3 files changed, 304 insertions(+), 299 deletions(-)

Re: [PATCH 02/11] qemu: Move qemuDomainAttachDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Kristina Hanicova
t; > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 170 > src/qemu/qemu_hotplug.c | 170 > src/qemu/qemu_hotplug.h | 4 + > 3 files changed, 174 insertions(+), 170 deletions(-)

Re: [PATCH 01/11] qemu: Replace @dom argument with @driver in qemuDomainUpdateDeviceLive()

2023-04-21 Thread Kristina Hanicova
of virDomainPtr. > > This also makes it look like the rest of device hot(un-)plug > functions: qemuDomainAttachDeviceLive() and > qemuDomainUpdateDeviceLive(). > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 delet

Re: [PATCH 0/2] virsh: Introduce --xpath and --wrap to (dom)capabilities

2023-04-17 Thread Kristina Hanicova
> tools/virsh-host.c | 46 ++--- > 2 files changed, 54 insertions(+), 9 deletions(-) > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] qemu_domain: Drop ATTRIBUTE_NONNULL() for non-existent arguments

2023-03-22 Thread Kristina Hanicova
d and > both functions are still annotated as ATTRIBUTE_NONNULL(2) even > though they accept just one argument (@obj). > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] qemu_shim: Require absolute path for root directory

2023-03-22 Thread Kristina Hanicova
ichal Privoznik > --- > src/qemu/qemu_shim.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH v2 00/15] qemuBuildThreadContextProps: Prune .node-afinity wrt

2023-03-15 Thread Kristina Hanicova
odemaskRet argument to qemuBuildMemoryBackendProps() > qemu: Add @nodemask argument to qemuBuildThreadContextProps() > qemuBuildThreadContextProps: Prune .node-affinity wrt > docs: Document memory allocation and emulator pinning limitation > NEWS: Document recent thread-context bug fix > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH v2 13/15] qemuBuildThreadContextProps: Prune .node-affinity wrt

2023-03-15 Thread Kristina Hanicova
-device > '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ > --object > '{"qom-type":"thread-context","id":"tc-memdimm0","node-affinity":[1,2,3]}' \ > +-object > '{"qom-type":"thread-context","id":"tc-memdimm0","node-affinity":[1,2]}' \ > -object > '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":536870912,"host-nodes":[1,2,3],"policy":"bind","prealloc-context":"tc-memdimm0"}' > \ > -device > '{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0,"addr":4294967296}' > \ > -object > '{"qom-type":"memory-backend-ram","id":"memdimm2","size":536870912}' \ > -- > 2.39.2 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 10/14] qemu: Add @nodemaskRet argument to qemuBuildMemoryBackendProps()

2023-03-13 Thread Kristina Hanicova
> --- > src/qemu/qemu_command.c | 40 > src/qemu/qemu_command.h | 4 +++- > src/qemu/qemu_hotplug.c | 2 +- > 3 files changed, 28 insertions(+), 18 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 07/14] qemuxml2argvmock: Drop virNuma* mocks

2023-03-13 Thread Kristina Hanicova
.err | 2 +- > ...umatune-static-nodeset-exceed-hostnode.err | 2 +- > tests/qemuxml2argvmock.c | 41 --- > 5 files changed, 4 insertions(+), 45 deletions(-) > I think you can also drop include of virnuma.h in tests/qemuxml2argvmock.c Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 03/14] virnumamock: Introduce virNumaGetNodeOfCPU() mock

2023-03-13 Thread Kristina Hanicova
./../node/node1 > \ No newline at end of file > diff --git a/tests/virnumamock.c b/tests/virnumamock.c > index 87c9a58c6f..8d5c862fa2 100644 > --- a/tests/virnumamock.c > +++ b/tests/virnumamock.c > @@ -21,6 +21,7 @@ > #include "internal.h" > #include "virnuma.h" > #include "virfile.h" > +#include "virstring.h" > > #define VIR_FROM_THIS VIR_FROM_NONE > > @@ -171,3 +172,44 @@ virNumaGetNodeCPUs(int node, virBitmap **cpus) > > return virBitmapCountBits(*cpus); > } > + > +int > +virNumaGetNodeOfCPU(int cpu) > +{ > +g_autoptr(DIR) cpuDir = NULL; > +g_autofree char *sysfs_cpu_path = NULL; > +struct dirent *ent = NULL; > +int dirErr = 0; > I would prefer naming this variable as 'rc', but that's just my preference. > + > +sysfs_cpu_path = g_strdup_printf("%s/cpu/cpu%d", SYSFS_SYSTEM_PATH, > cpu); > + > +if (virDirOpen(, sysfs_cpu_path) < 0) > +return -1; > + > +while ((dirErr = virDirRead(cpuDir, , sysfs_cpu_path)) > 0) { > +g_autofree char *entPath = NULL; > +const char *number = NULL; > +int node; > + > +if (!(number = STRSKIP(ent->d_name, "node"))) > +continue; > + > +entPath = g_strdup_printf("%s/%s", sysfs_cpu_path, ent->d_name); > + > +if (!virFileIsLink(entPath)) > +continue; > + > +if (virStrToLong_i(number, NULL, 10, ) < 0) { > +errno = EINVAL; > +return -1; > +} > + > +return node; > +} > + > +if (dirErr < 0) > +return -1; > + > +errno = EINVAL; > +return -1; > +} > -- > 2.39.2 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 02/14] virnuma: Introduce virNumaCPUSetToNodeset()

2023-03-13 Thread Kristina Hanicova
. > > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 2 ++ > src/util/virnuma.c | 59 > src/util/virnuma.h | 3 ++ > 3 files changed, 64 insertions(+) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 01/14] virnuma: Move virNumaNodesetToCPUset() our of WITH_NUMACTL

2023-03-13 Thread Kristina Hanicova
> Signed-off-by: Michal Privoznik > --- > src/util/virnuma.c | 115 + > 1 file changed, 53 insertions(+), 62 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH] Use G_N_ELEMENTS() more

2023-03-13 Thread Kristina Hanicova
t-login-shell.c | 3 ++- > 6 files changed, 14 insertions(+), 10 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 0/4] qemu: Fix regression wrt virtio-pmem

2023-02-28 Thread Kristina Hanicova
moryDeviceInfo() > qemu_monitor: Decouple switch()-es in > qemuMonitorJSONGetMemoryDeviceInfo() > > src/libvirt_private.syms | 1 + > src/qemu/qemu_monitor_json.c | 124 +++ > 2 files changed, 67 insertions(+), 58 deletions(-) > > -- > 2.39.2 > > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH 3/4] qemu_monitor: Switch to virDomainMemoryModel enum in qemuMonitorJSONGetMemoryDeviceInfo()

2023-02-28 Thread Kristina Hanicova
On Mon, Feb 27, 2023 at 2:04 PM Michal Prívozník wrote: > On 2/27/23 13:49, Kristina Hanicova wrote: > > > > > > On Mon, Feb 27, 2023 at 12:35 PM Michal Privoznik > <mailto:mpriv...@redhat.com>> wrote: > > > > When processing memory devices (as

Re: [PATCH 3/4] qemu_monitor: Switch to virDomainMemoryModel enum in qemuMonitorJSONGetMemoryDeviceInfo()

2023-02-27 Thread Kristina Hanicova
On Mon, Feb 27, 2023 at 12:35 PM Michal Privoznik wrote: > When processing memory devices (as a reply from QEMU), a bunch of > STREQ()-s is used. Fortunately, the set of strings we process is > the same as virDomainMemoryModel enum. Therefore, we can use > virDomainMemoryModelTypeFromString()

Re: [PATCH 1/4] qemu: Don't error out on 'unknown' memory model in qemuMonitorJSONGetMemoryDeviceInfo()

2023-02-27 Thread Kristina Hanicova
-pmem is to be > ignored). > > Fixes: ddb1bc051959eef4ad7ed6ac47b57056632bdb5e > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_monitor_json.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Reviewed-by: Kristina Hanicova

Re: [PATCH v2 0/6] add support for pvpanic-pci device

2023-02-21 Thread Kristina Hanicova
On Mon, Feb 20, 2023 at 7:17 PM Andrea Bolognani wrote: > On Mon, Feb 20, 2023 at 05:12:53PM +0100, Kristina Hanicova wrote: > > v1 here: > > > https://listman.redhat.com/archives/libvir-list/2023-February/237622.html > > > > diff to v1: > > * reduced test

[PATCH] NEWS: Document new pvpanic-pci device

2023-02-21 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4625a838f8..0302b4f0e1 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -33,6 +33,11 @@ v9.1.0 (unreleased) Support crypto device(virtio crypto only), also add support

[PATCH v2 2/6] conf: add panic model 'pvpanic'

2023-02-20 Thread Kristina Hanicova
This patch introduces optional device pvpanic-pci, validates its address and generates command line. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_command.c

[PATCH v2 0/6] add support for pvpanic-pci device

2023-02-20 Thread Kristina Hanicova
v1 here: https://listman.redhat.com/archives/libvir-list/2023-February/237622.html diff to v1: * reduced test files (thanks Andrea) * removed redundant check for address type (noticed by Peter) * plugging the device directly into pcie.0 if its address was not specified Kristina Hanicova (6

[PATCH v2 4/6] qemu: assign PCI address to device pvpanic-pci

2023-02-20 Thread Kristina Hanicova
It makes sense to accept pvpanic-pci also without specified PCI address and assign one if possible. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1961326 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domain_address.c | 34 +- 1 file changed, 33

[PATCH v2 6/6] docs: document panic device 'pvpanic-pci'

2023-02-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 36c6d87907..638768c18d 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -7940,6 +7940,7 @@ Example: usage of panic

[PATCH v2 5/6] tests: add case for pvpanic-pci without address

2023-02-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- ...pci-no-address-aarch64.aarch64-latest.args | 36 +++ .../pvpanic-pci-no-address-aarch64.xml| 18 ++ tests/qemuxml2argvtest.c | 1 + ...-pci-no-address-aarch64.aarch64-latest.xml | 32

[PATCH v2 3/6] tests: add test cases for device pvpanic-pci

2023-02-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- .../pvpanic-pci-aarch64.aarch64-latest.args | 36 +++ .../qemuxml2argvdata/pvpanic-pci-aarch64.xml | 20 +++ ...invalid-address-aarch64.aarch64-latest.err | 1 + .../pvpanic-pci-invalid-address-aarch64.xml | 20

[PATCH v2 1/6] qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI

2023-02-20 Thread Kristina Hanicova
This capability detects the availability of the pvpanic-pci device that is required in order to use pvpanic on Arm (original pvpanic is an emulated ISA device, for which Arm does not have support). --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

Re: [PATCH] qemuProcessRefreshDisks: Don't skip filling of disk information if tray state didn't change

2023-02-09 Thread Kristina Hanicova
_bug.cgi?id=2166411 > Fixes: 5ef2582646eb98af208ce37355f82bdef39931fa > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_process.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > Reviewed-by: Kristina Hanicova

[PATCH 0/6] add support for pvpanic-pci device

2023-02-08 Thread Kristina Hanicova
*** BLURB HERE *** Kristina Hanicova (6): qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI conf: add panic model 'pvpanic' tests: add test cases for device pvpanic-pci qemu: assign PCI address to device pvpanic-pci tests: add case for pvpanic-pci without address docs: document panic device

[PATCH 5/6] tests: add case for pvpanic-pci without address

2023-02-08 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- ...pci-no-address-aarch64.aarch64-latest.args | 41 ++ .../pvpanic-pci-no-address-aarch64.xml| 18 +++ ...-pci-no-address-aarch64.aarch64-latest.xml | 53 +++ tests/qemuxml2xmltest.c | 1 + 4

[PATCH 6/6] docs: document panic device 'pvpanic-pci'

2023-02-08 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/formatdomain.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 36c6d87907..c62e184169 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -7940,6 +7940,7 @@ Example: usage of panic

[PATCH 4/6] qemu: assign PCI address to device pvpanic-pci

2023-02-08 Thread Kristina Hanicova
It makes sense to accept pvpanic-pci also without specified PCI address and assign one if possible. Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domain_address.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/qemu

[PATCH 3/6] tests: add test cases for device pvpanic-pci

2023-02-08 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- .../pvpanic-pci-aarch64.aarch64-latest.args | 43 .../qemuxml2argvdata/pvpanic-pci-aarch64.xml | 20 ++ ...invalid-address-aarch64.aarch64-latest.err | 1 + .../pvpanic-pci-invalid-address-aarch64.xml | 20 ++ .../pvpanic-pci-x86_64

[PATCH 2/6] conf: add panic model 'pvpanic'

2023-02-08 Thread Kristina Hanicova
This patch introduces optional device pvpanic-pci, validates it's address and generates command line. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c| 1 + src/conf/domain_conf.h| 1 + src/conf/schemas/domaincommon.rng | 1 + src/qemu/qemu_command.c

[PATCH 1/6] qemu: introduce QEMU_CAPS_DEVICE_PANIC_PCI

2023-02-08 Thread Kristina Hanicova
This capability detects the availability of the pvpanic-pci device that is required in order to use pvpanic on Arm (original pvpanic is an emulated ISA device, for which Arm does not have support). --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH] qemu_process: add tray changed event to queue in refresh disks

2022-12-13 Thread Kristina Hanicova
-by: Kristina Hanicova --- src/qemu/qemu_process.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5de55435d2..601e9694b6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8675,6 +8675,7

[PATCH v2 2/2] qemu: refresh state after reboot initiated from the guest

2022-12-06 Thread Kristina Hanicova
Internal domain state needs to be refreshed after reset from the guest side because it may be inconsistent with the internal qemu state. Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 16 src/qemu

[PATCH v2 0/2] qemu: refresh state after reset

2022-12-06 Thread Kristina Hanicova
v1: https://listman.redhat.com/archives/libvir-list/2022-November/235913.html diff to v1: * calling refresh state unconditionally (suggested by Martin) * improved commit message Kristina Hanicova (2): qemu: refresh internal domain state after reset qemu: refresh state after reboot initiated

[PATCH v2 1/2] qemu: refresh internal domain state after reset

2022-12-06 Thread Kristina Hanicova
to closed). The solution is to refresh state after a successful reset to query qemu about the current internal domain state. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1824722 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] conf: report no NUMA nodes when attaching memory device

2022-11-25 Thread Kristina Hanicova
://bugzilla.redhat.com/show_bug.cgi?id=2142519 Signed-off-by: Kristina Hanicova --- src/conf/domain_validate.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 5bc7ea10aa..95b8d9b419 100644 --- a/src/conf/domain_validate.c +++ b

[PATCH 2/2] qemu: refresh state after reboot initiated from the guest

2022-11-23 Thread Kristina Hanicova
Domain state needs to be refreshed after reset from the guest side because it may be inconsistent with the internal qemu state. Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 16 src/qemu

[PATCH 0/2] qemu: refresh state after reset

2022-11-23 Thread Kristina Hanicova
This series implements domain state refreshing after reset from libvirt API and reboot from the guest OS. Kristina Hanicova (2): qemu: refresh state after reset qemu: refresh state after reboot initiated from the guest src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h | 1 + src/qemu

[PATCH 1/2] qemu: refresh state after reset

2022-11-23 Thread Kristina Hanicova
the current domain state. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1824722 Signed-off-by: Kristina Hanicova --- src/qemu/qemu_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ff5a743716..b2060ee843

[PATCH] virdomainjob: check if cb is not NULL before dereferencing

2022-09-30 Thread Kristina Hanicova
The callback struct does not always have to be set which could cause a dereferencing of a NULL pointer. This patch adds check against NULL in missing places before dereferencing. Signed-off-by: Kristina Hanicova --- src/conf/virdomainjob.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] virdomainjob: preserveJob: memdup the cb structure instead of copying it

2022-09-29 Thread Kristina Hanicova
be later safely freed. Signed-off-by: Kristina Hanicova --- src/conf/virdomainjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/virdomainjob.c b/src/conf/virdomainjob.c index aca801af38..0c67e84ef1 100644 --- a/src/conf/virdomainjob.c +++ b/src/conf/virdomainjob.c

[PATCH] qemu_monitor_json: remove unnecessary variable 'rc'

2022-09-07 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/qemu/qemu_monitor_json.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 70fba50e6c..5f7c1a8db9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu

Re: [RFC PATCH 1/6] qemu_monitor: add qemuMonitorQueryStatsSchema

2022-09-07 Thread Kristina Hanicova
Hi, just a few notes on the code quality. On Wed, Sep 7, 2022 at 12:34 PM Amneesh Singh wrote: > Related: https://gitlab.com/libvirt/libvirt/-/issues/276 > > This patch adds a simple API for "query-stats-schemas" QMP command > > Signed-off-by: Amneesh Singh > --- > src/qemu/qemu_monitor.c

Re: [PATCH 0/3] Fix some coding issues

2022-09-06 Thread Kristina Hanicova
files changed, 20 insertions(+), 24 deletions(-) > Reviewed-by: Kristina Hanicova Kristina

Re: [PATCH v2 10/17] CH: use virDomainObjBeginJob()

2022-09-05 Thread Kristina Hanicova
On Mon, Sep 5, 2022 at 6:21 PM Ján Tomko wrote: > On a Monday in 2022, Kristina Hanicova wrote: > >This patch removes virCHDomainObjBeginJob() and replaces it with > >call to the generalized virDomainObjBeginJob(). > > > >Signed-off-by: Kristina Hanicova > &g

[PATCH v2 15/17] qemu & conf: move BeginAgentJob & EndAgentJob into src/conf/virdomainjob

2022-09-05 Thread Kristina Hanicova
Although these and functions in the following two patches are for now just being used by the qemu driver, it makes sense to have all begin job functions in the same file. Signed-off-by: Kristina Hanicova --- docs/kbase/internals/qemu-threads.rst | 10 ++-- src/conf/virdomainjob.c

[PATCH v2 13/17] LXC: use virDomainObjEndJob()

2022-09-05 Thread Kristina Hanicova
This patch removes virLXCDomainObjEndJob() and replaces it with call to the generalized virDomainObjEndJob(). Signed-off-by: Kristina Hanicova --- src/lxc/lxc_domain.c | 20 src/lxc/lxc_domain.h | 4 src/lxc/lxc_driver.c | 57

[PATCH v2 16/17] qemu & conf: move BeginAsyncJob & EndAsyncJob into src/conf

2022-09-05 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- docs/kbase/internals/qemu-threads.rst | 12 +-- src/conf/virdomainjob.c | 30 +++ src/conf/virdomainjob.h | 6 ++ src/libvirt_private.syms | 2 ++ src/qemu/qemu_backup.c

[PATCH v2 07/17] qemu: use virDomainObjBeginJob()

2022-09-05 Thread Kristina Hanicova
This patch moves qemuDomainObjBeginJob() into src/conf/virdomainjob as universal virDomainObjBeginJob(). Signed-off-by: Kristina Hanicova --- docs/kbase/internals/qemu-threads.rst | 8 +- src/conf/virdomainjob.c | 18 +++ src/conf/virdomainjob.h | 4 + src

[PATCH v2 17/17] qemu & conf: move BeginNestedJob & BeginJobNowait into src/conf

2022-09-05 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/virdomainjob.c | 44 +++ src/conf/virdomainjob.h | 6 ++ src/libvirt_private.syms | 2 ++ src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_domainjob.c | 44 --- src

[PATCH v2 10/17] CH: use virDomainObjBeginJob()

2022-09-05 Thread Kristina Hanicova
This patch removes virCHDomainObjBeginJob() and replaces it with call to the generalized virDomainObjBeginJob(). Signed-off-by: Kristina Hanicova --- src/ch/ch_domain.c | 51 +- src/ch/ch_domain.h | 4 src/ch/ch_driver.c | 20

[PATCH v2 14/17] CH: use virDomainObjEndJob()

2022-09-05 Thread Kristina Hanicova
This patch removes virCHDomainObjEndJob() and replaces it with call to the generalized virDomainObjEndJob(). Signed-off-by: Kristina Hanicova --- src/ch/ch_domain.c | 18 -- src/ch/ch_domain.h | 3 --- src/ch/ch_driver.c | 20 ++-- 3 files changed, 10 insertions

[PATCH v2 05/17] conf: extend xmlopt with job config & add job object into domain object

2022-09-05 Thread Kristina Hanicova
the virDomainJobObj Signed-off-by: Kristina Hanicova --- src/bhyve/bhyve_domain.c | 2 +- src/ch/ch_conf.c | 2 +- src/conf/domain_conf.c| 13 - src/conf/domain_conf.h| 16 +++- src/conf/virconftypes.h | 2 ++ src/conf/virdomainjob.c

[PATCH v2 09/17] LXC: use virDomainObjBeginJob()

2022-09-05 Thread Kristina Hanicova
This patch removes virLXCDomainObjBeginJob() and replaces it with call to the generalized virDomainObjBeginJob(). Signed-off-by: Kristina Hanicova --- src/lxc/lxc_domain.c | 57 src/lxc/lxc_domain.h | 6 - src/lxc/lxc_driver.c | 46

[PATCH v2 08/17] libxl: use virDomainObjBeginJob()

2022-09-05 Thread Kristina Hanicova
This patch removes libxlDomainObjBeginJob() and replaces it with generalized virDomainObjBeginJob(). Signed-off-by: Kristina Hanicova --- src/libxl/libxl_domain.c| 62 ++--- src/libxl/libxl_domain.h| 6 src/libxl/libxl_driver.c| 48

  1   2   3   4   5   >