[libvirt][PATCH v4 2/3] schema: add 'restrictive' config option for mode in numatune

2021-03-22 Thread Luyao Zhong
support 'restrictive' mode in memory element and memnode element in numatune: ... ... Reviewed-by: Daniel Henrique Barboza Signed-off-by: Luyao Zhong --- docs/schemas/domaincommon.rng | 2 ++ 1 file changed, 2 insertions(+) diff --git

[libvirt][PATCH v4 1/3] docs: add docs for 'restrictive' option for mode in numatune

2021-03-22 Thread Luyao Zhong
When user would like use cgroups to restrict the allowed memory nodes, and require not setting any specific memory policy, then 'restrictive' mode is useful. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Luyao Zhong --- docs/formatdomain.rst | 7 +-- 1 file changed, 5 insertions(+),

[libvirt][PATCH v4 3/3] qemu: add parser and formatter for 'restrictive' mode in numatune

2021-03-22 Thread Luyao Zhong
Reviewed-by: Daniel Henrique Barboza Signed-off-by: Luyao Zhong --- include/libvirt/libvirt-domain.h | 1 + src/conf/numa_conf.c | 9 src/qemu/qemu_command.c | 6 ++- src/qemu/qemu_process.c | 27

[libvirt][PATCH v4 0/3] introduce 'restrictive' mode in numatune

2021-03-22 Thread Luyao Zhong
Before this patch set, numatune only has three memory modes: static, interleave and prefered. These memory policies are ultimately set by mbind() system call. Memory policy could be 'hard coded' into the kernel, but none of above policies fit our requirment under this case. mbind() support

[libvirt PATCH] conf: allow for a partial match when searching for an

2021-03-22 Thread Laine Stump
Commit 114e3b42 modified virDomainNetFindIdx() to compare the alias name of the being matched (in addition to already-existing match of MAC address and PCI/CCW address). This was done in response to https://bugzilla.redhat.com/1926190 which complained that it wasn't possible to unplug an

[PATCH 1/1] domain_cgroup.c: update domain after setting blkio.weight

2021-03-22 Thread Daniel Henrique Barboza
Commit ac87d3520ad5 consolidated common cgroup code between the QEMU and lxc drivers in domain_cgroup.c. In this process, in virDomainCgroupSetupDomainBlkioParameters(), a call to virCgroupGetBlkioWeight() went missing. The result is that 'virsh blkiotune' is setting the blkio.weight for the

[libvirt PATCH 3/5] vsh: setmem: Mark '--kilobytes' as deprecated

2021-03-22 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 7db88f700a..32bd048d26 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8986,6 +8986,7 @@ static const vshCmdOptDef

[libvirt PATCH 5/5] vsh: secret-set-value: Mark '--base64' as deprecated

2021-03-22 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tools/virsh-secret.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index 7ca3e864da..5a1c4d7bf6 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -192,6 +192,7 @@ static const

[libvirt PATCH 4/5] vsh: setmaxmem: Mark '--kilobytes' as deprecated

2021-03-22 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 32bd048d26..9f0e3e1a5e 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9065,6 +9065,7 @@ static const vshCmdOptDef

[libvirt PATCH 1/5] vsh: Set default log level to "warning"

2021-03-22 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tools/vsh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.h b/tools/vsh.h index 39f70913fe..e83e0eca9e 100644 --- a/tools/vsh.h +++ b/tools/vsh.h @@ -60,7 +60,7 @@ typedef enum { VSH_ERR_ERROR } vshErrorLevel; -#define

[libvirt PATCH 2/5] vsh: Introduce flag for deprecated options

2021-03-22 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- tools/vsh.c | 11 +-- tools/vsh.h | 9 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 8fb033249e..8b58db8896 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -321,7 +321,8 @@

[libvirt PATCH 0/5] Formalize the deprecation of arguments in virsh

2021-03-22 Thread Tim Wiederhake
virsh has several arguments that are better not used. This series introduces a formal way of marking them as deprecated. Tim Wiederhake (5): vsh: Set default log level to "warning" vsh: Introduce flag for deprecated options vsh: setmem: Mark '--kilobytes' as deprecated vsh: setmaxmem:

Re: [PULL 0/2] MIPS patches for 2021-03-22

2021-03-22 Thread Peter Maydell
available in the Git repository at: > > https://github.com/philmd/qemu.git tags/mips-fixes-20210322 > > for you to fetch changes up to 83bbc537a151730741c04e40d23711067330dab9: > > target/mips: Deprecate Trap-and-Emul

[PATCH 2/2] virDomainCheckpointRedefinePrep: Assign default bitmap names when domain XML is missing

2021-03-22 Thread Peter Krempa
Previously we'd assign the default checkpoint bitmap names in virDomainCheckpointAlignDisks. In cases when the checkpoint is redefined without a domain XML virDomainCheckpointAlignDisks is not called. Add an explicit call to virDomainCheckpointDefAssignBitmapNames to restore functionality.

[PATCH 1/2] qemuCheckpointDiscardBitmaps: Refuse to delete checkpoint with NULL bitmap name

2021-03-22 Thread Peter Krempa
When a checkpoint is redefined without providing the domain XML, we might end up with a definition where the per-disk bitmap name is not set. Trying to delete such checkpoint would lead to a crash. Refuse such deletion. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1941600 Signed-off-by:

[PATCH 0/2] qemu: fix crash when deleting a dedefined

2021-03-22 Thread Peter Krempa
Peter Krempa (2): qemuCheckpointDiscardBitmaps: Refuse to delete checkpoint with NULL bitmap name virDomainCheckpointRedefinePrep: Assign default bitmap names when domain XML is missing src/conf/checkpoint_conf.c | 3 +++ src/qemu/qemu_checkpoint.c | 7 +++ 2 files changed, 10

[PULL 1/2] target/mips/mxu_translate.c: Fix array overrun for D16MIN/D16MAX

2021-03-22 Thread Philippe Mathieu-Daudé
From: Peter Maydell Coverity reported (CID 1450831) an array overrun in gen_mxu_D16MAX_D16MIN(): 1103 } else if (unlikely((XRb == 0) || (XRa == 0))) { 1112 if (opc == OPC_MXU_D16MAX) { 1113 tcg_gen_smax_i32(mxu_gpr[XRa - 1], t0, t1); 1114 } else {

[PULL 2/2] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-22 Thread Philippe Mathieu-Daudé
From: Jiaxun Yang Upstream kernel had removed both host[1] and guest[2] support. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 [2]:

[PULL 0/2] MIPS patches for 2021-03-22

2021-03-22 Thread Philippe Mathieu-Daudé
The following changes since commit bdee969c0e65d4d509932b1d70e3a3b2ffbff6d5: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-03-19 18:01:17 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/mips-fixes-20210322

Re: [libvirt PATCH v3 16/51] virxml: Add virXMLPropTristateSwitch

2021-03-22 Thread Tim Wiederhake
On Mon, 2021-03-22 at 12:31 +, Daniel P. Berrangé wrote: > On Mon, Mar 22, 2021 at 01:23:28PM +0100, Michal Privoznik wrote: > > On 3/19/21 4:57 PM, Tim Wiederhake wrote: > > > Convenience function to return value of an on / off attribute. > > > > > > Signed-off-by: Tim Wiederhake > > > ---

Re: [libvirt PATCH v3 16/51] virxml: Add virXMLPropTristateSwitch

2021-03-22 Thread Daniel P . Berrangé
On Mon, Mar 22, 2021 at 01:23:28PM +0100, Michal Privoznik wrote: > On 3/19/21 4:57 PM, Tim Wiederhake wrote: > > Convenience function to return value of an on / off attribute. > > > > Signed-off-by: Tim Wiederhake > > --- > > src/libvirt_private.syms | 1 + > > src/util/virxml.c| 41

Re: [libvirt PATCH v3 00/51] Refactor XML parsing boilerplate code

2021-03-22 Thread Michal Privoznik
On 3/19/21 4:56 PM, Tim Wiederhake wrote: This series replaces some recurring boilerplate code in src/conf/ regarding the extraction of a virTristate(Switch|Bool) XML attribute. The boilerplate code looks roughly like this, g_autofree char *str = NULL; if (str = virXMLPropString(node,

Re: [libvirt PATCH v3 16/51] virxml: Add virXMLPropTristateSwitch

2021-03-22 Thread Michal Privoznik
On 3/19/21 4:57 PM, Tim Wiederhake wrote: Convenience function to return value of an on / off attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 41 src/util/virxml.h| 6 +- 3 files

Re: [libvirt PATCH v3 17/51] domain_conf: Use virXMLPropTristateXXX in virDomainKeyWrapCipherDefParseXML

2021-03-22 Thread Michal Privoznik
On 3/19/21 4:57 PM, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9e106b8846..7dfbca12e5 100644 ---

Re: [libvirt PATCH] qemu: Update asyncOwnerAPI when entering async job phase

2021-03-22 Thread Jiri Denemark
On Mon, Mar 22, 2021 at 11:17:12 +0100, Michal Privoznik wrote: > On 3/19/21 10:42 PM, Jiri Denemark wrote: > > In case an async job spans multiple APIs (e.g., incoming migration) the > > API that started the job is recorded as the asyncOwnerAPI even though it > > is no longer running and the

Re: [PATCH v1 01/12] libxl: add API wrapper for libxl_domain_create_restore

2021-03-22 Thread Daniel P . Berrangé
On Thu, Mar 18, 2021 at 09:51:18PM -0600, Jim Fehlig wrote: > On 3/18/21 5:00 PM, Olaf Hering wrote: > > Am Thu, 18 Mar 2021 16:26:14 -0600 > > schrieb Jim Fehlig : > > > > > Maybe libxlDomainCreateRestoreWrap? > > > The 'Wrap' suffix compliments the libxl_api_wrap.h name suggestion. > > > >

Re: [libvirt PATCH 3/3] syntax-check: Run flake8 on all Python scripts

2021-03-22 Thread Erik Skultety
On Mon, Mar 22, 2021 at 10:29:32AM +0100, Andrea Bolognani wrote: > On Mon, 2021-03-22 at 07:50 +0100, Erik Skultety wrote: > > On Fri, Mar 19, 2021 at 06:39:31PM +0100, Andrea Bolognani wrote: > > > sc_flake8: > > > @if [ -n "$(FLAKE8)" ]; then \ > > > - $(VC_LIST_EXCEPT) | $(GREP)

Re: [PATCH v2] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-22 Thread Philippe Mathieu-Daudé
On 3/17/21 2:12 AM, Jiaxun Yang wrote: > Upstream kernel had removed both host[1] and guest[2] support. > > [1]: > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 > [2]: >

Re: [libvirt PATCH] qemu: Update asyncOwnerAPI when entering async job phase

2021-03-22 Thread Michal Privoznik
On 3/19/21 10:42 PM, Jiri Denemark wrote: In case an async job spans multiple APIs (e.g., incoming migration) the API that started the job is recorded as the asyncOwnerAPI even though it is no longer running and the owner thread is updated properly to the one currently handling the job. Let's

Re: [libvirt PATCH 0/7] Change reallocation APIs to return void

2021-03-22 Thread Michal Privoznik
On 3/20/21 12:36 AM, Jiri Denemark wrote: They can never return anything but zero anyway. Jiri Denemark (7): util: Drop G_GNUC_WARN_UNUSED_RESULT from reallocation APIs Do not check return value of VIR_RESIZE_N util: Make virResizeN return void Do not check return value of

Re: [libvirt PATCH] qemu: Update asyncOwnerAPI when entering async job phase

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 10:42:25PM +0100, Jiri Denemark wrote: > In case an async job spans multiple APIs (e.g., incoming migration) the > API that started the job is recorded as the asyncOwnerAPI even though it > is no longer running and the owner thread is updated properly to the one > currently

Re: [libvirt PATCH 3/3] syntax-check: Run flake8 on all Python scripts

2021-03-22 Thread Andrea Bolognani
On Mon, 2021-03-22 at 07:50 +0100, Erik Skultety wrote: > On Fri, Mar 19, 2021 at 06:39:31PM +0100, Andrea Bolognani wrote: > > sc_flake8: > > @if [ -n "$(FLAKE8)" ]; then \ > > - $(VC_LIST_EXCEPT) | $(GREP) '\.py$$' | xargs \ > > - $(FLAKE8) --ignore

Re: [libvirt PATCH 0/2] qemu: Use g_auto* in a few more places

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 11:28:36PM +0100, Jiri Denemark wrote: > I'll be touching these functions soon, let's modernize them first. Reviewed-by: Erik Skultety

Re: [libvirt PATCH] qemu: Drop redundant checks for qemuCaps before virQEMUCapsGet

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 11:30:24PM +0100, Jiri Denemark wrote: > virQEMUCapsGet checks for qemuCaps itself, no need to do it explicitly. > > Signed-off-by: Jiri Denemark > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH] ci: Drop prefix from Dockerfiles

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 04:19:16PM +0100, Andrea Bolognani wrote: > Since the string "ci" is already contained in the path, it > seems unnecessary to include it into the filename too: in fact, > we only do that for Dockerfiles and not for files in ci/cirrus, > even though those are generated the

Re: [libvirt PATCH 2/3] tests: Fix flake8 errors in virsh-auth

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 06:39:30PM +0100, Andrea Bolognani wrote: > Specifically > > E111 indentation is not a multiple of four > > This commit is better viewed with 'git show -w'. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety

Re: [libvirt PATCH 1/3] gitignore: Ignore __pycache__ directory

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 06:39:29PM +0100, Andrea Bolognani wrote: > Unfortunately running Python scripts causes this directory to > be created in the *source* directory, and there doesn't seem > to be a way to prevent that from happening. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by:

Re: [libvirt PATCH 3/3] syntax-check: Run flake8 on all Python scripts

2021-03-22 Thread Erik Skultety
On Fri, Mar 19, 2021 at 06:39:31PM +0100, Andrea Bolognani wrote: > Currenty we only check files that end in .py, but we have at > least a couple of scripts that don't have that suffix and we > nonetheless want to keep compliant with the code style. > > Extend the sc_flake8 syntax-check rule so