Re: [PATCH libvirt v1 2/7] nodedev: Detect AP Queues

2020-11-04 Thread Daniel Henrique Barboza
Same thing I mentioned in patch 01 (split the docs, conf and logic in separated patches) applies to this patch and patch 04. Thanks, DHB On 10/21/20 7:59 AM, Shalini Chellathurai Saroja wrote: From: Farhan Ali Each AP Card device can support upto 256 AP Queues. AP Queues are also detected

Re: [PATCH libvirt v1 1/7] nodedev: Detect AP Card device

2020-11-04 Thread Daniel Henrique Barboza
This patch is doing multiple things in a single punch: - docs/ changes - parse code in src/conf - added logic in node_device_udev.c - test changes I suggest you split this one in at least 3 patches: changes in 'docs', changes in 'src/conf' with nodedevxml2xmltest.c changes, another patch with

Re: [PATCH 08/10] schema: refactor mdev_types out of PCI nodedev schema

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Refactor mdev_types into standalone define for later reuse. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- docs/schemas/nodedev.rng | 48 ++-- 1 file changed, 27 insertions(+), 21 deletions(-)

Re: [PATCH 09/10] conf: node_device: cleanup virNodeDevCapCCWParseXML

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Make use of g_autofree Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH 07/10] conf: node_device: refactor CSS formating

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Move XML formating code into a new method. Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-)

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-04 Thread Daniel P . Berrangé
On Wed, Nov 04, 2020 at 07:00:16PM +0100, Dario Faggioli wrote: > On Wed, 2020-11-04 at 13:11 +, Daniel P. Berrangé wrote: > > On Mon, Nov 02, 2020 at 09:14:22AM +0100, Christian Ehrhardt wrote: > > > > > > Looking at my todo notes I wondered if while touching it we should > > > right > > >

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-04 Thread Dario Faggioli
On Wed, 2020-11-04 at 13:11 +, Daniel P. Berrangé wrote: > On Mon, Nov 02, 2020 at 09:14:22AM +0100, Christian Ehrhardt wrote: > > > > Looking at my todo notes I wondered if while touching it we should > > right > > away also > > add host-phys-bits-limit in the same spot? > > See

Re: [PATCH 06/10] conf: node_device: refactor mdev_types XML parsing

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Extract PCI code from virNodeDevPCICapMdevTypesParseXML to make method virNodeDevCapMdevTypesParseXML generic for later reuse. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 141

Re: [PATCH 05/10] conf: node_device: refactor capability mdev_types formating

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Extract the XML formating for mdev_types from PCI capability into a generic standalone method for later reuse. s/formating/formatting/g Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 55

Re: [PATCH 04/10] conf: node_devive: refactor GetPCIMdevTypesCaps into GetMdevTypeCapes

2020-11-04 Thread Ján Tomko
s/devive/device/ in the commit summary On a Friday in 2020, Boris Fiuczynski wrote: Extracting PCI from virNodeDeviceGetPCIMdevTypesCaps creating virNodeDeviceGetMdevTypesCaps to make later reuse possible. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk ---

Re: [PATCH 03/10] util: refactor mdev_types methods return code usage

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Remove mix of array length and error code in the return code. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 10 -- src/util/virmdev.c | 14 -- src/util/virmdev.h | 3

Re: [PATCH 02/10] util: refactor mdev_types method from PCI to mdev

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: Extract virPCIGetMdevTypes from PCI as virMediatedDeviceGetMdevTypes into mdev for later reuse. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c | 2 +- src/libvirt_private.syms| 2 +- src/util/virmdev.c

Re: [PATCH 01/10] conf: node_device: fix mdev_types format and XML parsing code to match schema

2020-11-04 Thread Ján Tomko
On a Friday in 2020, Boris Fiuczynski wrote: The nodedev schema defines that a mdev_types capability must have one or more type elements. The XML parsing and the format allows to accept and to write mdev_types capability without any type element. This patches fixes this. Signed-off-by: Boris

Re: [libvirt PATCH v4 4/4] qemu: add docs for 'fmode' and 'dmode' options

2020-11-04 Thread Ján Tomko
On a Thursday in 2020, Brian Turek wrote: Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options. Signed-off-by: Brian Turek --- docs/formatdomain.rst | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index

Re: [libvirt PATCH v4 3/4] qemu: add support for 'fmode' and 'dmode'

2020-11-04 Thread Ján Tomko
On a Thursday in 2020, Brian Turek wrote: Add logic to validate and then pass through 'fmode' and 'dmode' to the QEMU call. Signed-off-by: Brian Turek --- src/qemu/qemu_command.c | 6 +++ src/qemu/qemu_validate.c | 18

Re: [libvirt PATCH v4 2/4] qemu: add 'fmode' and 'dmode' options

2020-11-04 Thread Ján Tomko
On a Thursday in 2020, Brian Turek wrote: Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the 'filesystem' node in the domain XML. These options control the creation mode of files and directories, respectively, when using accessmode=mapped. Signed-off-by: Brian Turek ---

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-04 Thread Dario Faggioli
On Mon, 2020-11-02 at 09:14 +0100, Christian Ehrhardt wrote: > > On Thu, Oct 29, 2020 at 5:07 PM Dario Faggioli > wrote: > > This patch maps /domain/cpu/maxphysaddr into -cpu parameters: > > > >   - becomes host-phys-bits=on > >   - becomes phys-bits=42 > > > > I can't thank you enough

[PATCH v2 11/12] util: hash: Add deprecation notices for functions which have g_hash_table replacements

2020-11-04 Thread Peter Krempa
For functions which have reasonable replacement, let's encourage usage of g_hash_table_ alternatives. Signed-off-by: Peter Krempa --- src/util/virhash.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/util/virhash.c b/src/util/virhash.c

[PATCH v2 12/12] tests: Remove 'virhashtest'

2020-11-04 Thread Peter Krempa
There's no much sense to test the remnants of the functions which just NULL-check prior to handing off to g_hash_table* functions. Signed-off-by: Peter Krempa --- tests/meson.build | 1 - tests/virhashdata.h | 284 --- tests/virhashtest.c | 539

[PATCH v2 07/12] util: hash: Use virHashForEachSafe in places which might delete the element

2020-11-04 Thread Peter Krempa
Convert all calls to virHashForEach where it's not obvious that the callback is _not_ deleting the current element from the hash to virHashForEachSafe which will be deemed safe to do such operation. Now that no iterator used with virHashForEach deletes current element we can document that

[PATCH v2 10/12] util: hash: Retire 'virHashTable' in favor of 'GHashTable'

2020-11-04 Thread Peter Krempa
Don't hide our use of GHashTable behind our typedef. This will also promote the use of glibs hash function directly. Signed-off-by: Peter Krempa --- src/conf/backup_conf.c| 2 +- src/conf/domain_addr.h| 2 +- src/conf/domain_conf.c|

[PATCH v2 05/12] tests: remove virdeterministichashmock.so

2020-11-04 Thread Peter Krempa
Code which is sensitive to ordering now uses deterministic iterator functions, so we can remove the mock override. Signed-off-by: Peter Krempa --- tests/meson.build| 1 - tests/qemublocktest.c| 2 +- tests/qemumonitorjsontest.c | 2 +- tests/qemuxml2xmltest.c

[PATCH v2 06/12] util: hash: Add delete-safe hash iterator

2020-11-04 Thread Peter Krempa
'virHashForEach' historically allowed deletion of the current element as 'virHashRemoveSet' didn't exits. To prevent us from having to deepy analyse all iterators add virHashForEachSafe which first gets a list of elements and iterates them outside of the hash table. This will allow replace the

[PATCH v2 09/12] util: hash: Reimplement virHashTable using GHashTable

2020-11-04 Thread Peter Krempa
Glib's hash table provides basically the same functionality as our hash table. In most cases the only thing that remains in the virHash* wrappers is NULL-checks of '@table' argument as glib's hash functions don't tolerate NULL. In case of iterators, we adapt the existing API of iterators to

[PATCH v2 03/12] util: hash: Introduce virHashForEachSorted

2020-11-04 Thread Peter Krempa
Iterate the hash elements sorted by key. This is useful to provide a stable ordering such as in cases when the output is checked in tests. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virhash.c | 39 +++ src/util/virhash.h

[PATCH v2 00/12] Replace virHashTable by GHashTable

2020-11-04 Thread Peter Krempa
Our hash table API was surprisingly close to glibs. v2: - pushed ACK'd patch - typo fix - rebased on current master - hashing function not replaced as our has random initialization Peter Krempa (12): virhashtest: testHashGetItems: Remove test case for sorting by value util: hash: Rewrite

[PATCH v2 08/12] util: hash: Don't use 'const' with virHashTablePtr

2020-11-04 Thread Peter Krempa
We didn't use it rigorously and some helpers even cast it away. Remove const from all hash utility functions. Signed-off-by: Peter Krempa --- src/conf/nwfilter_params.c | 2 +- src/conf/nwfilter_params.h | 2 +- src/util/virhash.c | 17 - src/util/virhash.h |

[PATCH v2 04/12] Use virHashForEachSorted in tested code

2020-11-04 Thread Peter Krempa
The simplest way to write tests is to check the output against expected output, but we must ensure that the output is stable. We can use virHashForEachSorted as a hash iterator to ensure stable ordering. This patch fixes 3 instances of hash iteration which is tested in various parts, including

[PATCH v2 02/12] util: hash: Rewrite sorting of elements in virHashGetItems

2020-11-04 Thread Peter Krempa
All but one of the callers either use the list in arbitrary order or sorted by key. Rewrite the function so that it supports sorting by key natively and make it return the element count. This in turn allows to rewrite the only caller to sort by value internally. This allows to remove multiple

[PATCH v2 01/12] virhashtest: testHashGetItems: Remove test case for sorting by value

2020-11-04 Thread Peter Krempa
Upcoming patch will rewrite virHashGetItems to remove the sorting function since the prevalent mode is to order by keys. Remove the test for it. Signed-off-by: Peter Krempa --- tests/virhashtest.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/tests/virhashtest.c

Re: [libvirt PATCH v4 1/4] qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE

2020-11-04 Thread Ján Tomko
On a Thursday in 2020, Brian Turek wrote: The QEMU 9pfs 'fmode' and 'dmode' options have existed since QEMU 2.10. Probe QEMU's command line set to check whether these options are available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE capability on libvirt side. Signed-off-by: Brian

[PATCH 9/9] docs: kbase: Reorder some articles in the 'Usage' section

2020-11-04 Thread Peter Krempa
Historically we've added them in chronological order, but certain articles are more likely to be needed and thus are easier to find when placed earlier. Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 38 +++--- 1 file changed, 19 insertions(+), 19

[PATCH 7/9] docs: xsl: Unify stylability of main container element

2020-11-04 Thread Peter Krempa
page.xsl was adding '' wrapper for the content picked up from the element from the original input file. Optionally class="$DOCNAME" was added for some documents taken from . Since docs generated from RST by docutils have a ' --- docs/docs.html.in| 2 +- docs/index.html.in | 2 +-

[PATCH 4/9] docs: kbase: Move index page to docs/kbase

2020-11-04 Thread Peter Krempa
Move docs/kbase.rst to docs/kbase/index.rst so that the directory itself shows our index page rather than the autogenerated list of files by the webserver. Signed-off-by: Peter Krempa --- docs/docs.html.in | 2 +- docs/index.html.in | 2 +- docs/{kbase.rst

[PATCH 6/9] docs: kbase: Split articles into sections

2020-11-04 Thread Peter Krempa
Split the existing list of kbase articles into a 'Usage' category and into 'Internals/Debugging'. This will later represent the two columns on the web page. Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 5/9] docs: kbase: Remove extra container from index page

2020-11-04 Thread Peter Krempa
The container was used to apply CSS classes to the content, so the looks are degraded. The idea is to have a similar layout to the 'docs.html' page with multiple columns, which will be added later. Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 70

[PATCH 8/9] docs: css: Modify appearance of the kbase directory page

2020-11-04 Thread Peter Krempa
Re-style the knowledge base to look like the 'docs.html' page. We still have room to add one more column. Signed-off-by: Peter Krempa --- docs/libvirt.css | 38 -- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/docs/libvirt.css

[PATCH 3/9] docs: css: Add a gray box around table of contents of RST based docs

2020-11-04 Thread Peter Krempa
Emphasise the table of contents visually. Signed-off-by: Peter Krempa --- docs/libvirt.css | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/libvirt.css b/docs/libvirt.css index d323b6ec0f..227b9ebed6 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -598,8

[PATCH 0/9] docs: kbase style change and cleanups

2020-11-04 Thread Peter Krempa
Some patches are taken from an older series where we've discussed that the kbase page should look more like 'docs.html' as more articles appear, this series delivers that: https://www.redhat.com/archives/libvir-list/2020-August/msg00172.html ... and a few other changes. Final output:

[PATCH 1/9] docs: Fix title of 'docs' page

2020-11-04 Thread Peter Krempa
XSLT transformation generates the page title from the topmost element which is not present in 'docs.html.in'. Add it and hide it in the CSS. Signed-off-by: Peter Krempa --- docs/docs.html.in | 1 + docs/libvirt.css | 4 2 files changed, 5 insertions(+) diff --git a/docs/docs.html.in

[PATCH 2/9] docs: xslt: Use 'Link' rather than 'Permalink' in header links

2020-11-04 Thread Peter Krempa
The anchors are based on the article or chapter headers, thus they are not 100% permanent. Especially with pages generated from RST. Signed-off-by: Peter Krempa --- docs/page.xsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/page.xsl b/docs/page.xsl index

Re: [PATCH 0/3] IPV6 filters example.

2020-11-04 Thread Ján Tomko
On a Thursday in 2020, Aleksandr Alekseev wrote: Add nwfilter examples for ipv6 similar to existing ip filters. Add appropriate docs for them and for some previously undocumented, but existing filters. Also fix a typo and some formatting. Aleksandr Alekseev (3): example: fix typo and

Re: [PATCH 8/9] qemu: checkpoint: Implement VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Validate that the bitmaps are present when redefining a checkpoint. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 52 +- 1 file changed, 46 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko

Re: [PATCH v2] cpu_ppc64: compare CPU function is ignoring return value

2020-11-04 Thread Ján Tomko
On a Tuesday in 2020, Julio Faracco wrote: Function to compare CPU on 64-bits PowerPC is ignoring the flag to avoid failure in case of CPUs (host and guest) are incompatible. Basically, the function is returning -1 even if it is set to continue. Signed-off-by: Julio Faracco ---

Re: [PATCH 7/9] conf: checkpoint: Split virDomainCheckpointRedefinePrep into two functions

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: First one prepares and validates the definition, the second one actually either updates an existing checkpoint or assigns definition for the new one. This will allow driver code to add extra validation between those steps. Signed-off-by: Peter Krempa

Re: [PATCH 9/9] qemu: backup: Add partial validation of incremental backup checkpoint

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Verify that the checkpoint requested by an incremental backup exists. Unfortunately validating whether the checkpoint configuration actually matches the disk may not be reasonably feasible as the disk may have been renamed/snapshotted/etc. We still

Re: [PATCH 3/9] error: Introduce VIR_ERR_CHECKPOINT_INCONSISTENT error code

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: This code will be used to signal cases when the checkpoint is broken either during backup or other operations where a user might want to make decision based on the presence of the checkpoint, such as do a full backup instead of an incremental one.

Re: [PATCH 5/9] checkpoint: Introduce VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE flag

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Introduce a flag which will allow users to perform hypervisor-specific valdiation when redefining the checkpoint metadata. This will allow to *validation s/allow to check/allow checking/ check metadata which is stored e.g. in disk images when

Re: [PATCH 4/9] qemu: backup: Use VIR_ERR_CHECKPOINT_INCONSISTENT when starting a backup

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: If we don't have a consistent chain of bitmaps for the backup to proceed we'd report VIR_ERR_INVALID_ARG error code, which makes it hard to decide whether an incremental backup makes even sense. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c

Re: [PATCH 2/9] man: virsh: Mention that '--size' for 'checkpoint-dumpxml' may require running vm

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Separate the docs for the '--size' flag into it's own paragraph and add *its Also: s/add a mention that/mention that/ would sound better to me, but I'm not English. a mention that the domain may be required to be running. Signed-off-by: Peter

Re: [PATCH 6/9] virsh: checkpoint-create: Add support for VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 7 ++- tools/virsh-checkpoint.c | 8 2 files changed, 14 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 1/9] checkpoint: Mention that VIR_DOMAIN_CHECKPOINT_XML_SIZE may require running vm

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: The qemu implementation requires that the VM associated with the checkpoint is running when checking the size. Mention this possibility with the flag. Signed-off-by: Peter Krempa --- src/libvirt-domain-checkpoint.c | 4 +++- 1 file changed, 3

Re: [PATCH v2 9/9] virCPUDefFormatBufFull: Use virXMLFormatElement

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: The function was basically open-coding it. Signed-off-by: Peter Krempa --- src/conf/cpu_conf.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH v2 8/9] qemumigrationcookiexmltest: Add synthetic test case

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Add a test case attempting to excercise the most of the cookie XML * exercise parsing/formatting infra. Note that the data is not based on any real case. Signed-off-by: Peter Krempa --- .../full-xml2xml-in.xml | 221

Re: [PATCH v2 7/9] tests: Add testing of qemu migration cookie

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Migration cookie transports a lot of information but there are no tests for it. The test supports both xml2xml testing and also testing of the population of the migration cookie data from a domain object, although that option is not very useful as

Re: [libvirt PATCH 21/25] vircgroup: drop @create from virCgroupNewDomainPartition

2020-11-04 Thread John Ferlan
On 11/3/20 7:41 AM, Pavel Hrdina wrote: > All callers pass true. > > Signed-off-by: Pavel Hrdina > --- > src/util/vircgroup.c | 5 + > src/util/vircgrouppriv.h | 1 - > tests/vircgrouptest.c| 4 ++-- > 3 files changed, 3 insertions(+), 7 deletions(-) > [...] > diff --git

Re: [PATCH v2 6/9] qemu_migration_cookie: Make cookie parsing robust against missing domain job

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: In testing code we don't properly populate the job sometimes. If it isn't populated we should not touch it though in the migration cookie code. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 5/9] tests: Add mock library for virGetHostname and virGetHostUUID

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: The 'qemu_migration_cookie' module uses these. Provide a stable override for tests. Signed-off-by: Peter Krempa --- src/util/virutil.h | 2 +- src/util/viruuid.h | 2 +- tests/hostidmock.c | 36 tests/meson.build

Re: [PATCH v2 4/9] qemu_migration_cookie: Export qemuMigrationCookieXMLFormat for tests

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 2 +- src/qemu/qemu_migration_cookie.h | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH v2 3/9] qemu_migration_cookie: Make header standalone

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Include qemu_domain.h and qemu_domainjob.h as the types from those headers are used by this header. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.h | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Ján Tomko Jano

Re: [PATCH v2 2/9] qemuxml2xmltest: Split out status XML testing to qemustatusxml2xmltest.c

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: Separate the test files. Signed-off-by: Peter Krempa --- tests/meson.build | 1 + tests/qemustatusxml2xmltest.c | 155 ++ tests/qemuxml2xmltest.c | 84 -- 3 files changed, 156

Re: [PATCH v2 1/9] qemuxml2xmltest: Remove 'WITH_QEMU' conditional

2020-11-04 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: The test is compiled only when the qemu driver is enabled so we don't need the conditional code. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 54 - 1 file changed, 21 insertions(+), 33 deletions(-)

[PATCH v2 6/9] qemu_migration_cookie: Make cookie parsing robust against missing domain job

2020-11-04 Thread Peter Krempa
In testing code we don't properly populate the job sometimes. If it isn't populated we should not touch it though in the migration cookie code. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 4/9] qemu_migration_cookie: Export qemuMigrationCookieXMLFormat for tests

2020-11-04 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.c | 2 +- src/qemu/qemu_migration_cookie.h | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 39445ef8de..9ede125cfd 100644 ---

[PATCH v2 3/9] qemu_migration_cookie: Make header standalone

2020-11-04 Thread Peter Krempa
Include qemu_domain.h and qemu_domainjob.h as the types from those headers are used by this header. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_cookie.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu/qemu_migration_cookie.h index

[PATCH v2 1/9] qemuxml2xmltest: Remove 'WITH_QEMU' conditional

2020-11-04 Thread Peter Krempa
The test is compiled only when the qemu driver is enabled so we don't need the conditional code. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 54 - 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/tests/qemuxml2xmltest.c

[PATCH v2 5/9] tests: Add mock library for virGetHostname and virGetHostUUID

2020-11-04 Thread Peter Krempa
The 'qemu_migration_cookie' module uses these. Provide a stable override for tests. Signed-off-by: Peter Krempa --- src/util/virutil.h | 2 +- src/util/viruuid.h | 2 +- tests/hostidmock.c | 36 tests/meson.build | 1 + 4 files changed, 39 insertions(+),

[PATCH v2 9/9] virCPUDefFormatBufFull: Use virXMLFormatElement

2020-11-04 Thread Peter Krempa
The function was basically open-coding it. Signed-off-by: Peter Krempa --- src/conf/cpu_conf.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 7778e01131..5cf7716b12 100644 --- a/src/conf/cpu_conf.c +++

[PATCH v2 2/9] qemuxml2xmltest: Split out status XML testing to qemustatusxml2xmltest.c

2020-11-04 Thread Peter Krempa
Separate the test files. Signed-off-by: Peter Krempa --- tests/meson.build | 1 + tests/qemustatusxml2xmltest.c | 155 ++ tests/qemuxml2xmltest.c | 84 -- 3 files changed, 156 insertions(+), 84 deletions(-) create mode 100644

[PATCH v2 8/9] qemumigrationcookiexmltest: Add synthetic test case

2020-11-04 Thread Peter Krempa
Add a test case attempting to excercise the most of the cookie XML parsing/formatting infra. Note that the data is not based on any real case. Signed-off-by: Peter Krempa --- .../full-xml2xml-in.xml | 221 ++ .../full-xml2xml-out.xml |

[PATCH v2 0/9] tests: Add testing of qemu migration cookie

2020-11-04 Thread Peter Krempa
Add testing of migration cookie as we don't have any schema or examples of it to prevent breakage and help with development. v2: - no longer depends on the somewhat controversial GHashTable refactor - removed leftover commented out code in patch 2 Peter Krempa (9): qemuxml2xmltest: Remove

[PATCH v2 7/9] tests: Add testing of qemu migration cookie

2020-11-04 Thread Peter Krempa
Migration cookie transports a lot of information but there are no tests for it. The test supports both xml2xml testing and also testing of the population of the migration cookie data from a domain object, although that option is not very useful as many things are collected from running qemu and

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-04 Thread Daniel P . Berrangé
On Mon, Nov 02, 2020 at 09:14:22AM +0100, Christian Ehrhardt wrote: > On Thu, Oct 29, 2020 at 5:07 PM Dario Faggioli wrote: > > > This patch maps /domain/cpu/maxphysaddr into -cpu parameters: > > > > - becomes host-phys-bits=on > > - becomes phys-bits=42 > > > > I can't thank you enough

Re: [RFC PATCH 1/2] Add support for specifying max physical address size.

2020-11-04 Thread Daniel P . Berrangé
On Thu, Oct 29, 2020 at 03:55:36PM +, Dario Faggioli wrote: > This patch introduces the: > > > > > sub element of /domain/cpu. That makes sense as a location. > > Purpose is being able to have a guest see the physical address size > exactly as the host does (if

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-04 Thread Daniel P . Berrangé
On Thu, Oct 29, 2020 at 03:55:42PM +, Dario Faggioli wrote: > This patch maps /domain/cpu/maxphysaddr into -cpu parameters: > > - becomes host-phys-bits=on > - becomes phys-bits=42 > > Passthrough mode can only be used if the chosen CPU model is > 'host-passthrough'. > > The feature

[PATCH 4/9] qemu: backup: Use VIR_ERR_CHECKPOINT_INCONSISTENT when starting a backup

2020-11-04 Thread Peter Krempa
If we don't have a consistent chain of bitmaps for the backup to proceed we'd report VIR_ERR_INVALID_ARG error code, which makes it hard to decide whether an incremental backup makes even sense. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 5/9] checkpoint: Introduce VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE flag

2020-11-04 Thread Peter Krempa
Introduce a flag which will allow users to perform hypervisor-specific valdiation when redefining the checkpoint metadata. This will allow to check metadata which is stored e.g. in disk images when populating the libvirt metadata. Signed-off-by: Peter Krempa ---

[PATCH 1/9] checkpoint: Mention that VIR_DOMAIN_CHECKPOINT_XML_SIZE may require running vm

2020-11-04 Thread Peter Krempa
The qemu implementation requires that the VM associated with the checkpoint is running when checking the size. Mention this possibility with the flag. Signed-off-by: Peter Krempa --- src/libvirt-domain-checkpoint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 6/9] virsh: checkpoint-create: Add support for VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

2020-11-04 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 7 ++- tools/virsh-checkpoint.c | 8 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 40b7dce093..6fc17e38cd 100644 --- a/docs/manpages/virsh.rst +++

[PATCH 7/9] conf: checkpoint: Split virDomainCheckpointRedefinePrep into two functions

2020-11-04 Thread Peter Krempa
First one prepares and validates the definition, the second one actually either updates an existing checkpoint or assigns definition for the new one. This will allow driver code to add extra validation between those steps. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 30

[PATCH 0/9] qemu: backup/checkpoint: Error reporting and handling fixes

2020-11-04 Thread Peter Krempa
Peter Krempa (9): checkpoint: Mention that VIR_DOMAIN_CHECKPOINT_XML_SIZE may require running vm man: virsh: Mention that '--size' for 'checkpoint-dumpxml' may require running vm error: Introduce VIR_ERR_CHECKPOINT_INCONSISTENT error code qemu: backup: Use

[PATCH 9/9] qemu: backup: Add partial validation of incremental backup checkpoint

2020-11-04 Thread Peter Krempa
Verify that the checkpoint requested by an incremental backup exists. Unfortunately validating whether the checkpoint configuration actually matches the disk may not be reasonably feasible as the disk may have been renamed/snapshotted/etc. We still rely on bitmap presence. Signed-off-by: Peter

[PATCH 3/9] error: Introduce VIR_ERR_CHECKPOINT_INCONSISTENT error code

2020-11-04 Thread Peter Krempa
This code will be used to signal cases when the checkpoint is broken either during backup or other operations where a user might want to make decision based on the presence of the checkpoint, such as do a full backup instead of an incremental one. Signed-off-by: Peter Krempa ---

[PATCH 2/9] man: virsh: Mention that '--size' for 'checkpoint-dumpxml' may require running vm

2020-11-04 Thread Peter Krempa
Separate the docs for the '--size' flag into it's own paragraph and add a mention that the domain may be required to be running. Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/manpages/virsh.rst

[PATCH 8/9] qemu: checkpoint: Implement VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE

2020-11-04 Thread Peter Krempa
Validate that the bitmaps are present when redefining a checkpoint. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 52 +- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c

Re: [RFC PATCH 0/2] Handle physical address bits

2020-11-04 Thread Daniel P . Berrangé
On Thu, Oct 29, 2020 at 03:55:30PM +, Dario Faggioli wrote: > Hello everyone, > > These patches let one specify how wide the physical addresses are, in > bits. > > Using current QEMU's default of 40 may limit the amount of RAM the guest > can see (which is the reason why, in our packages, we

Re: [libvirt][RFC PATCH] add a new 'default' option for attribute mode in numatune

2020-11-04 Thread Martin Kletzander
On Fri, Oct 16, 2020 at 10:38:51PM +0800, Zhong, Luyao wrote: On 10/16/2020 9:32 PM, Zang, Rui wrote: How about if “migratable” is set, “mode” should be ignored/omitted? So any setting of “mode” will be rejected with an error indicating an invalid configuration. We can say in the doc that

Re: [libvirt PATCH 0/2] quieten virSCSIHostGetUniqueId

2020-11-04 Thread Erik Skultety
On Wed, Nov 04, 2020 at 01:00:59PM +0100, Ján Tomko wrote: > Suppress some possible errors if the device was unplugged > during our probing. > > https://bugzilla.redhat.com/show_bug.cgi?id=1692100 Reviewed-by: Erik Skultety

[libvirt PATCH 0/2] quieten virSCSIHostGetUniqueId

2020-11-04 Thread Ján Tomko
Suppress some possible errors if the device was unplugged during our probing. https://bugzilla.redhat.com/show_bug.cgi?id=1692100 Ján Tomko (2): util: use g_autofree in virSCSIHostGetUniqueId util: quieten virSCSIHostGetUniqueId src/util/virscsihost.c | 24 +--- 1 file

[libvirt PATCH 2/2] util: quieten virSCSIHostGetUniqueId

2020-11-04 Thread Ján Tomko
The only caller of this function ignores failure and just sets the unique_id to -1. Failing to read the file is likely to the device no longer being present, not a real error. Stop reporting errors in this function. https://bugzilla.redhat.com/show_bug.cgi?id=1692100 Signed-off-by: Ján Tomko

[libvirt PATCH 1/2] util: use g_autofree in virSCSIHostGetUniqueId

2020-11-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virscsihost.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/util/virscsihost.c b/src/util/virscsihost.c index c259e63000..4d314c3ceb 100644 --- a/src/util/virscsihost.c +++ b/src/util/virscsihost.c @@ -46,17 +46,16

Re: [PULL 0/6] Mips fixes patches

2020-11-04 Thread Peter Maydell
On Tue, 3 Nov 2020 at 17:33, Philippe Mathieu-Daudé wrote: > > The following changes since commit 83851c7c60c90e9fb6a23ff48076387a77bc33cd: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-10-27-v3-ta= > g' into staging (2020-11-03 12:47:58 +) > > are available in the Git

Re: Hyper-V CPU details

2020-11-04 Thread Daniel P . Berrangé
On Thu, Oct 22, 2020 at 10:58:28PM -0400, Matt Coleman wrote: > Hello, > > I'm implementing domainGetVcpus and could use some guidance on what > value to use for virVcpuInfo->cpu. > > Hyper-V does not allow the user to pin vCPUs to host CPUs and doesn't > allow the user to see which host CPU a

Re: [PATCH v2 0/3] tests: Fix issues on macOS

2020-11-04 Thread Andrea Bolognani
On Tue, 2020-11-03 at 17:26 +0300, Roman Bolshakov wrote: > The series continues effort of fixing libvirt test suite on macOS [1] > and combines previous patches sent a week ago [2][3]. > > The tests have been fixed: > qemuhotplugtest > qemumemlocktest > qemuxml2xmltest >

[libvirt PATCH v3 1/2] cpu_map: Add script to sync from QEMU i386 cpu models

2020-11-04 Thread Tim Wiederhake
This script is intended to help in synchronizing i386 QEMU cpu model definitions with libvirt. As the QEMU cpu model definitions are post processed by QEMU and not meant to be consumed by third parties directly, parsing this information is imperfect. Additionally, the libvirt models contain

[libvirt PATCH v3 2/2] [DONTMERGE] Sample output of new sync script

2020-11-04 Thread Tim Wiederhake
Do not merge this commit. This commit contains the changes that would be suggested by the cpu_map sync script (see last commit): ./sync_qemu_i386.py ~/git/qemu/target/i386/cpu.c . Note: * Some models have "signature" / "vendor" added. * Models with multiple "signature"s lose all but one. *

[libvirt PATCH v3 0/2] Add script to sync from QEMU i386 cpu models

2020-11-04 Thread Tim Wiederhake
This hopefully makes synchronization with QEMU faster and less error prone. Patch #2 showcases the changes to the cpu models the script suggests for qemu 8d90bfc5c31ad60f6049dd39be636b06bc00b652. V1: https://www.redhat.com/archives/libvir-list/2020-October/msg01008.html V2:

Re: [PATCH 0/4] Couple of qemusecuritytest and security_util improvements

2020-11-04 Thread Andrea Bolognani
On Tue, 2020-11-03 at 14:13 +0100, Michal Privoznik wrote: > These were sparked by a discussion on the list where the test is failing > on macOS. > > Michal Prívozník (4): > security_util: Don't error on macOS when getting/setting/moving XATTRs > qemusecuritytest: Test SELinux too >

Re: [PATCH 2/4] qemusecuritytest: Test SELinux too

2020-11-04 Thread Andrea Bolognani
On Tue, 2020-11-03 at 14:13 +0100, Michal Privoznik wrote: > +++ b/tests/qemusecuritymock.c > @@ -71,6 +82,10 @@ virHashTablePtr xattr_paths = NULL; > * the lower half is UID and the higher is GID. */ > virHashTablePtr chown_paths = NULL; > > +/* The SELinux label is stored in a hash table.

Re: [libvirt PATCH] rpm: more fixes for disabling features

2020-11-04 Thread Pavel Hrdina
On Wed, Nov 04, 2020 at 09:44:39AM +, Daniel P. Berrangé wrote: > On Mon, Nov 02, 2020 at 02:13:41PM +0100, Pavel Hrdina wrote: > > On Mon, Nov 02, 2020 at 12:45:21PM +, Daniel P. Berrangé wrote: > > > The %meson macro sets "--auto-features=enabled", so it is not enough to > > > disable

  1   2   >