[libvirt] [PATCH RESEND 0/4] Introduce Notification VM exit feature (kvm x86 only)

2023-07-02 Thread Lin Ma
Kernel supports Notification VM exit feature since v6.0 under commit 2f4073e0. QEMU supports it as well since v7.2 under commit e2e69f6b. Lin Ma (4): conf: Introduce notify VM exit feature qemu: Validate notify VM exit feature is available only on x86 qemu: Generate command line for notify

[libvirt] [PATCH RESEND 3/4] qemu: Generate command line for notify VM exit feature

2023-07-02 Thread Lin Ma
Signed-off-by: Lin Ma --- src/qemu/qemu_command.c | 20 +--- tests/qemuxml2argvdata/kvm-features.args | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 656cf55c1e..0b72aed72a 100644

[libvirt] [PATCH RESEND 4/4] NEWS: Document notify VM exit feature

2023-07-02 Thread Lin Ma
Signed-off-by: Lin Ma --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5c28a0579d..4d2b43cbd7 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -24,6 +24,14 @@ v9.5.0 (unreleased) image on discard requests. Disabling cluster unrefing decreases

[libvirt] [PATCH RESEND 1/4] conf: Introduce notify VM exit feature

2023-07-02 Thread Lin Ma
VMX(kernel v6.0) supports Notification VM exit feature under commit 2f4073e0. QEMU supports it as well since v7.2 under commit e2e69f6b. Add this feature into libvirt now. An example of Domain XML snippet to configure this feature: Signed-off-by: Lin Ma --- docs

[libvirt] [PATCH RESEND 2/4] qemu: Validate notify VM exit feature is available only on x86

2023-07-02 Thread Lin Ma
Signed-off-by: Lin Ma --- src/qemu/qemu_validate.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a53729d349..6ec5af0028 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -219,8

[libvirt] [PATCH 4/4] NEWS: Document notify VM exit feature

2023-06-11 Thread Lin Ma
From: Lin Ma Signed-off-by: Lin Ma --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index b1cccee4fa..843578d183 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,14 @@ v9.5.0 (unreleased) * **New features** +* Introduce notify vmexit

[libvirt] [PATCH 3/4] qemu: Generate command line for notify VM exit feature

2023-06-11 Thread Lin Ma
From: Lin Ma Signed-off-by: Lin Ma --- src/qemu/qemu_command.c | 20 +--- tests/qemuxml2argvdata/kvm-features.args | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b82ec4508c

[libvirt] [PATCH 2/4] qemu: Validate notify VM exit feature is available only on x86

2023-06-11 Thread Lin Ma
From: Lin Ma Signed-off-by: Lin Ma --- src/qemu/qemu_validate.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 04d0c9df73..126127423d 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c

[libvirt] [PATCH 1/4] conf: Introduce notify VM exit feature

2023-06-11 Thread Lin Ma
From: Lin Ma VMX(kernel v6.0) supports Notification VM exit feature under commit 2f4073e0. QEMU supports it as well since v7.2 under commit e2e69f6b. Add this feature into libvirt now. An example of Domain XML snippet to configure this feature: Signed-off-by: Lin Ma

[libvirt] [PATCH 0/4] Introduce Notification VM exit feature (kvm x86 only)

2023-06-11 Thread Lin Ma
From: Lin Ma Kernel supports Notification VM exit feature since v6.0 under commit 2f4073e0. QEMU supports it as well since v7.2 under commit e2e69f6b. Lin Ma (4): conf: Introduce notify VM exit feature qemu: Validate notify VM exit feature is available only on x86 qemu: Generate command

[libvirt] [PATCH v2 4/5] virsh-volume: Apply virshStorageVolKeyCompleter to vol-{name, pool} commands

2021-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 41b366a833..daa205ea67 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -1552,11 +1552,7 @@ static

[libvirt] [PATCH v2 2/5] virsh-volume: Introduce virshStorageVolKeyCompleter

2021-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-volume.c | 47 ++ tools/virsh-completer-volume.h | 5 2 files changed, 52 insertions(+) diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c index 301ee982a5..a29c5eca41 100644 --- a

[libvirt] [PATCH v2 1/5] virsh-pool: Remove static from virshStoragePoolList{Free, Collect}

2021-06-16 Thread Lin Ma
The functions will be used by next patch. Signed-off-by: Lin Ma --- tools/virsh-pool.c | 10 ++ tools/virsh-pool.h | 11 +++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 34ed86152e..18f3839a4c 100644 --- a/tools

[libvirt] [PATCH v2 5/5] virsh-volume: Apply virshStorageVolNameCompleter to vol-{key, path} commands

2021-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index daa205ea67..1da9b7217f 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -1643,11 +1643,7 @@ static

[libvirt] [PATCH v2 0/5] virsh bash completion improvement

2021-06-16 Thread Lin Ma
v1 -> v2: * 01-08 were merged, So remove them. * Reworked virshStorageVolKeyCompleter to avoid leaking objects. Thanks to Michal Privoznik for helping reviewing these patches. Lin Ma (5): virsh-pool: Remove static from virshStoragePoolList{Free,Collect} virsh-volume: Introd

[libvirt] [PATCH v2 3/5] virsh-volume: Add macros VIRSH_COMMON_OPT_VOL_*

2021-06-16 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index c7d5ab8c3b..41b366a833 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c

[libvirt] [PATCH 10/12] virsh-volume: Add macros VIRSH_COMMON_OPT_VOL_*

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index c7d5ab8c3b..41b366a833 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c

[libvirt] [PATCH 08/12] virsh-pool: Remove static from virshStoragePoolList{Free, Collect}

2021-06-14 Thread Lin Ma
The functions will be used by next patch. Signed-off-by: Lin Ma --- tools/virsh-pool.c | 10 ++ tools/virsh-pool.h | 11 +++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 34ed86152e..18f3839a4c 100644 --- a/tools

[libvirt] [PATCH 06/12] virsh: Add format completion to blockcopy command

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 6 ++ tools/virsh-domain.c | 2 ++ 3 files changed, 28 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 256ac0b593

[libvirt] [PATCH 01/12] virsh: Add comp-methods completion to migrate command

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 17 + tools/virsh-completer-domain.h | 5 + tools/virsh-domain.c | 1 + 3 files changed, 23 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 20d503ff09

[libvirt] [PATCH 12/12] virsh-volume: Apply virshStorageVolNameCompleter to vol-{key, path} commands

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index daa205ea67..1da9b7217f 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -1643,11 +1643,7 @@ static

[libvirt] [PATCH 04/12] virsh: Use VIR_ENUM_* for --target argument in cmdDomPMSuspend

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 10 ++ tools/virsh-domain.h | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 0100652e76..3fb37ea5e6 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt] [PATCH 11/12] virsh-volume: Apply virshStorageVolKeyCompleter to vol-{name, pool} commands

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-volume.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 41b366a833..daa205ea67 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -1552,11 +1552,7 @@ static

[libvirt] [PATCH 00/12] virsh bash completion improvement

2021-06-14 Thread Lin Ma
Lin Ma (12): virsh: Add comp-methods completion to migrate command virsh: Use VIR_ENUM_* for --target argument in cmdNodeSuspend virsh: Add target completion to nodesuspend command virsh: Use VIR_ENUM_* for --target argument in cmdDomPMSuspend virsh: Add target completion to dompmsuspend

[libvirt] [PATCH 05/12] virsh: Add target completion to dompmsuspend command

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3fb37ea5e6..b3aa52b8a8 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -3453,6 +3453,7 @@ static const vshCmdOptDef

[libvirt] [PATCH 09/12] virsh-volume: Introduce virshStorageVolKeyCompleter

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-volume.c | 53 ++ tools/virsh-completer-volume.h | 5 2 files changed, 58 insertions(+) diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c index 301ee982a5..14e9069c5a 100644 --- a

[libvirt] [PATCH 07/12] virsh-pool: Add virshPoolTypeCompleter in macro VIRSH_COMMON_OPT_POOL_X_AS

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-pool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index e8d3c33506..34ed86152e 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -64,6 +64,7 @@ {.name = "type", \ .type = V

[libvirt] [PATCH 02/12] virsh: Use VIR_ENUM_* for --target argument in cmdNodeSuspend

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-host.c | 17 + tools/virsh-host.h | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 1eca0bc231..9d6d2b3645 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c

[libvirt] [PATCH 03/12] virsh: Add target completion to nodesuspend command

2021-06-14 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-host.c | 20 tools/virsh-completer-host.h | 4 tools/virsh-host.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c index 213f029552..d17bc5f5ce

[libvirt] [PATCH 0/2] virsh: Add coredump format completion to dump

2021-06-07 Thread Lin Ma
Lin Ma (2): virsh: Use VIR_ENUM_* for --format argument in doDump virsh: Add coredump format completion to dump command tools/virsh-completer-domain.c | 19 +++ tools/virsh-completer-domain.h | 5 + tools/virsh-domain.c | 28 ++-- tools

[libvirt] [PATCH 2/2] virsh: Add coredump format completion to dump command

2021-06-07 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 19 +++ tools/virsh-completer-domain.h | 5 + tools/virsh-domain.c | 2 ++ 3 files changed, 26 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 1f72b856b4

[libvirt] [PATCH 1/2] virsh: Use VIR_ENUM_* for --format argument in doDump

2021-06-07 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 26 -- tools/virsh-domain.h | 1 + 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e42c4d612d..78276dd847 100644 --- a/tools/virsh-domain.c +++ b/tools

[libvirt] [PATCH 1/2] virsh: Add mountpoint completion to domfsfreeze/domfsthaw command

2021-04-22 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 43 ++ tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 2 ++ 3 files changed, 49 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c

[libvirt] [PATCH 2/2] virsh: Fix completion logic to guestvcpus command

2021-04-22 Thread Lin Ma
efore: # virsh guestvcpus --domain VM --enable --cpulist 2 4 After: # virsh guestvcpus --domain VM --enable --cpulist 4 5 Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 61 -- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/tools/

[libvirt] [PATCH 0/2] virsh completer fixes

2021-04-22 Thread Lin Ma
Lin Ma (2): virsh: Add mountpoint completion to domfsfreeze/domfsthaw command virsh: Fix completion logic to guestvcpus command tools/virsh-completer-domain.c | 104 +++-- tools/virsh-completer-domain.h | 4 ++ tools/virsh-domain.c | 2 + 3 files

Re: [libvirt] [PATCH 13/19] virsh-domain: Introduce 2 macros for domain options 'interface' and 'mac'

2020-11-10 Thread Lin Ma
On 2020-11-02 19:40, Michal Privoznik wrote: On 11/2/20 9:26 AM, Lin Ma wrote: The macro VIRSH_DOMAIN_OPT_INTERFACE for domain option '--interface', The macro VIRSH_DOMAIN_OPT_MAC for domain option '--mac'. Signed-off-by: Lin Ma --- tools/virsh-domain.h | 18 +++

[libvirt] [PATCH v2 02/13] virsh: Add logical CPU IDs completion for nodecpustats command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-host.c | 31 +++ tools/virsh-completer-host.h | 4 tools/virsh-host.c | 1 + 3 files changed, 36 insertions(+) diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c index 339390aa00

[libvirt] [PATCH v2 06/13] virsh: Add interface name completion to iface-bridge command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index ae2b52bfc3..ae234e1e22 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -786,6 +786,7 @@ static const vshCmdOptDef

[libvirt] [PATCH v2 11/13] virsh: Add signal name completion to send-process-signal command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index dc66317561

[libvirt] [PATCH v2 04/13] virsh-interface: Add a static helper virshInterfaceStringHelper

2020-11-10 Thread Lin Ma
It will be helpful to get the desired string of interface name/mac in a consistent way. Signed-off-by: Lin Ma --- tools/virsh-completer-interface.c | 25 - tools/virsh-completer-interface.h | 3 +++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tools

[libvirt] [PATCH v2 05/13] virsh: Add interface mac completion to iface-name command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-interface.c | 9 + tools/virsh-completer-interface.h | 4 tools/virsh-interface.c | 1 + 3 files changed, 14 insertions(+) diff --git a/tools/virsh-completer-interface.c b/tools/virsh-completer-interface.c index 407021485f

[libvirt] [PATCH v2 10/13] virsh: Move/add some of function declarations to virsh-domain.h

2020-11-10 Thread Lin Ma
The upcoming patches introduce completers into virsh-completer-domain.c, They will invoke the functions which are defined in virsh-domain.c, So these functions need to be declared in virsh-domain.h. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 1 - tools/virsh-domain.h | 4 2 files

[libvirt] [PATCH v2 00/13] virsh completion improvement

2020-11-10 Thread Lin Ma
ted some needlessly complicated loops. * Refered to Peter and Michal's comments, I droped the vnc completion patches. * Concentrate on completion itself, Drop all of patches which related to macros to make review easier. Lin Ma (13): virsh: Add vcpu list completion to guestvcpus command virsh

[libvirt] [PATCH v2 03/13] virsh: Add serial/parallel device name completion to console command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 55 ++ tools/virsh-completer-domain.h | 4 +++ tools/virsh-domain.c | 1 + 3 files changed, 60 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index

[libvirt] [PATCH v2 08/13] vsh: Fix completion error in case of multiple mac addresses

2020-11-10 Thread Lin Ma
# virsh detach-interface --domain VM --mac 52\:54\:00\: 52:54:00:80:1b:21 52:54:00:fb:7b:f5 # virsh detach-interface --domain VM --mac 52\:54\:00\: Signed-off-by: Lin Ma --- tools/bash-completion/vsh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bash-completion/vsh b/tools/bash-

[libvirt] [PATCH v2 12/13] virsh: Add lifecycle type completion to set-lifecycle-action command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index b8b6c74f8b

[libvirt] [PATCH v2 13/13] Add lifecycle action completion to set-lifecycle-action command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index b1b670ffc5

[libvirt] [PATCH v2 07/13] virsh: Add interface name completion to iface-mac command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index ae234e1e22..858052d341 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -441,6 +441,7 @@ static const vshCmdOptDef

[libvirt] [PATCH v2 01/13] virsh: Add vcpu list completion to guestvcpus command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 75 ++ tools/virsh-completer-domain.h | 4 ++ tools/virsh-domain.c | 1 + 3 files changed, 80 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index

[libvirt] [PATCH v2 09/13] virsh: Add mac completion to net-dhcp-leases command

2020-11-10 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-network.c | 44 + tools/virsh-completer-network.h | 4 +++ tools/virsh-network.c | 15 +++ 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/tools/virsh-completer-network.c b/tools

[libvirt] [PATCH 16/19] virsh: Move/add some of function declarations to virsh-domain.h

2020-11-02 Thread Lin Ma
The upcoming patches introduce completers into virsh-completer-domain.c, They will invoke the functions which are defined in virsh-domain.c, So these functions need to be declared in virsh-domain.h. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 1 - tools/virsh-domain.h | 4 2 files

[libvirt] [PATCH 18/19] virsh: Add lifecycle type completion to set-lifecycle-action command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index c1151764ff

[libvirt] [PATCH 09/19] virdomainobjlist: Add vnc into filter group to check the vnc existence of guest

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- include/libvirt/libvirt-domain.h | 3 +++ src/conf/virdomainobjlist.c | 15 +++ src/conf/virdomainobjlist.h | 7 ++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt

[libvirt] [PATCH 19/19] virsh: Add lifecycle action completion to set-lifecycle-action command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index d8ea3d62b3

[libvirt] [PATCH 14/19] virsh-domain: Apply macro VIRSH_DOMAIN_OPT_INTERFACE for interface option

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain-monitor.c | 20 +++- tools/virsh-domain-monitor.h | 1 + tools/virsh-domain.c | 14 ++ 3 files changed, 6 insertions(+), 29 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c

[libvirt] [PATCH 15/19] virsh-domain: Apply macro VIRSH_DOMAIN_OPT_MAC for mac option

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d50fdbad26..ed7307cdb6 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -12291,12 +12291,7 @@ static const

[libvirt] [PATCH 00/19] virsh completion improvement

2020-11-02 Thread Lin Ma
Lin Ma (19): virsh: Add current vcpu list completion to guestvcpus command virsh: Add logical CPU IDs completion for nodecpustats command virsh: Add serial/parallel device name completion to console command virsh: Rename virshInterfaceNameCompleter to virshInterfaceCompleter virsh

[libvirt] [PATCH 17/19] virsh: Add signal name completion to send-process-signal command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 20 tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 1 + 3 files changed, 25 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 305711151f

[libvirt] [PATCH 05/19] virsh: create a macro with a _FULL suffix for common --interface option

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index bd57648779..6c47767754 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -18,15

[libvirt] [PATCH 10/19] virsh: Only return domains that have VNC display to vncdisplay command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 3 ++- tools/virsh-domain.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index ab81a0dcfe..305711151f 100644 --- a/tools/virsh-completer

[libvirt] [PATCH 08/19] virsh: Add interface mac completion to iface-name command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-interface.c | 13 + tools/virsh-completer-interface.h | 4 tools/virsh-interface.c | 8 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/tools/virsh-completer-interface.c b/tools/virsh-completer

[libvirt] [PATCH 03/19] virsh: Add serial/parallel device name completion to console command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 54 ++ tools/virsh-completer-domain.h | 4 +++ tools/virsh-domain.c | 1 + 3 files changed, 59 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index

[libvirt] [PATCH 13/19] virsh-domain: Introduce 2 macros for domain options 'interface' and 'mac'

2020-11-02 Thread Lin Ma
The macro VIRSH_DOMAIN_OPT_INTERFACE for domain option '--interface', The macro VIRSH_DOMAIN_OPT_MAC for domain option '--mac'. Signed-off-by: Lin Ma --- tools/virsh-domain.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tools/virsh-domain.h b/

[libvirt] [PATCH 02/19] virsh: Add logical CPU IDs completion for nodecpustats command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-host.c | 35 +++ tools/virsh-completer-host.h | 4 tools/virsh-host.c | 1 + 3 files changed, 40 insertions(+) diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c index

[libvirt] [PATCH 12/19] virsh: Add mac completion to net-dhcp-leases command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-network.c | 45 + tools/virsh-completer-network.h | 4 +++ tools/virsh-network.c | 15 +++ 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/tools/virsh-completer-network.c b/tools

[libvirt] [PATCH 07/19] virsh: Add interface name completion to iface-mac command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 13e120d7a0..df97b74c4c 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -440,11 +440,7 @@ static

[libvirt] [PATCH 04/19] virsh: Rename virshInterfaceNameCompleter to virshInterfaceCompleter

2020-11-02 Thread Lin Ma
Rename the function virshInterfaceNameCompleter to virshInterfaceCompleter to make it a bit more generic. The upcoming patch invokes it for mac completion. Signed-off-by: Lin Ma --- tools/virsh-completer-interface.c | 6 +++--- tools/virsh-completer-interface.h | 6 +++--- tools/virsh

[libvirt] [PATCH 01/19] virsh: Add current vcpu list completion to guestvcpus command

2020-11-02 Thread Lin Ma
Unlike the setvcpu command, The option --cpulist of guestvcpus command means the current vcpus list, rather than the maxvcpus list. Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 36 ++ tools/virsh-completer-domain.h | 4 tools/virsh-domain.c

[libvirt] [PATCH 06/19] virsh: Add interface name completion to iface-bridge command

2020-11-02 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 6c47767754..13e120d7a0 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -785,11 +785,7 @@ static

[libvirt] [PATCH 11/19] vsh: Fix completion error in case of multiple mac addresses

2020-11-02 Thread Lin Ma
# virsh detach-interface --domain VM --mac 52\:54\:00\: 52:54:00:80:1b:21 52:54:00:fb:7b:f5 # virsh detach-interface --domain VM --mac 52\:54\:00\: Signed-off-by: Lin Ma --- tools/bash-completion/vsh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bash-completion/vsh b/tools/bash-

Re: [libvirt] [PATCH v2 0/4] qemu/virsh/docs: various minor fixes

2020-09-16 Thread Lin Ma
On 2020-09-16 10:40, Michal Privoznik wrote: On 9/16/20 9:17 AM, moreca...@gmail.com wrote: From: Lin Ma v1 -> v2: * Remove the merged patches. * Follow Ján and Erik's suggestions. Lin Ma (4): virsh: net-port-create: log errors for non-existent xml file virsh: event: option

Re: [libvirt] [PATCH 03/12] network: Check for active network during networkGetDHCPLeases

2020-09-16 Thread Lin Ma
On 2020-09-11 13:22, Ján Tomko wrote: On a Friday in 2020, Lin Ma wrote: It doesn't make sense querying dhcp leases for interfaces against an inactive network, This patch adds a check to see if the network is active. Why would the network need to be active? the leases are still

Re: [libvirt] [PATCH 04/12] virsh: domid: Error out if domain is not active

2020-09-16 Thread Lin Ma
On 2020-09-12 10:31, Ján Tomko wrote: On a Friday in 2020, Lin Ma wrote: Signed-off-by: Lin Ma --- tools/virsh-domain.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d1d3f8e566..86152a53b1 100644 --- a/tools

[libvirt] [PATCH 16/17] virsh: limit completion of backup-{begin, dumpxml} to active domains

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-backup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-backup.c b/tools/virsh-backup.c index 04464c6bff..9125b7da97 100644 --- a/tools/virsh-backup.c +++ b/tools/virsh-backup.c @@ -36,7 +36,7 @@ static const vshCmdInfo

[libvirt] [PATCH 17/17] virsh: limit completion of checkpoint-{create, delete} to active domains

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-checkpoint.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index c4ff863802..33e70515ad 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -90,7 +90,7

[libvirt] [PATCH 10/17] virsh: Add completion for --iothread argument of attach-disk command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5222bbb566..6f8424ec14 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -243,6 +243,8 @@ static const vshCmdOptDef

[libvirt] [PATCH 09/17] virsh: Add iothread IDs completion to iothread* commands

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 37 ++ tools/virsh-completer-domain.h | 4 tools/virsh-domain.c | 6 ++ 3 files changed, 47 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c

[libvirt] [PATCH 11/17] virsh: Add vcpu IDs completion to vcpupin command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 42 ++ tools/virsh-completer-domain.h | 5 tools/virsh-domain.c | 2 ++ 3 files changed, 49 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c

[libvirt] [PATCH 08/17] virsh: Add domain uuid completion to domname command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 52 ++ tools/virsh-completer-domain.h | 4 +++ tools/virsh-domain.c | 8 +- 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/tools/virsh-completer-domain.c b/tools/virsh

[libvirt] [PATCH 12/17] virsh: Add vcpu list completion to setvcpu command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 46 ++ tools/virsh-completer-domain.h | 5 tools/virsh-domain.c | 2 ++ 3 files changed, 53 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c

[libvirt] [PATCH 15/17] virsh: limit completion of net-port* to active networks

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-network.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 592b08528b..b131851a0d 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -1486,7 +1486,7 @@ static const

[libvirt] [PATCH 14/17] virsh: limit completion of net-dhcp-leases to active networks

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index f488e840ac..592b08528b 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -1373,7 +1373,7 @@ static const

[libvirt] [PATCH 06/17] vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_INT options

2020-09-11 Thread Lin Ma
ges --pagesize 1GiB 2MiB 4KiB Signed-off-by: Lin Ma --- tools/vsh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/vsh.c b/tools/vsh.c index 0e8edcd78c..8b50e20a5a 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2780,6 +2780,7 @@ vshReadlineParse(const char *text, int st

[libvirt] [PATCH 13/17] virsh: Add logical CPU list completion for --cpulist argument

2020-09-11 Thread Lin Ma
Currently this patch works for the commands emulatorpin, iothreadpin and vcpupin. Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 33 + tools/virsh-completer-domain.h | 5 + tools/virsh-domain.c | 3 +++ 3 files changed, 41 insertions

[libvirt] [PATCH 00/17] virsh bash completion improvements

2020-09-11 Thread Lin Ma
Lin Ma (17): virshDomainNameCompleter: Add some of VIR_CONNECT_LIST_DOMAINS_ flags virsh: snapshot: Only return domains that have snapshot images virsh: managedsave-*: Only return domains that have a managed save image virsh: checkpoint: Only return domains that have checkpoints

[libvirt] [PATCH 01/17] virshDomainNameCompleter: Add some of VIR_CONNECT_LIST_DOMAINS_ flags

2020-09-11 Thread Lin Ma
Commit 3b225256 removed unused VIR_CONNECT_LIST_DOMAINS_* flags, But some of them will be used in upcoming patches, So add some of them back. Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/virsh-completer

[libvirt] [PATCH 03/17] virsh: managedsave-*: Only return domains that have a managed save image

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d1d3f8e566..68600d728a 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4848,7 +4848,7 @@ static const

[libvirt] [PATCH 05/17] virsh: Add event completer to --enable/--disable args of perf command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-domain.c | 49 ++ tools/virsh-completer-domain.h | 8 ++ tools/virsh-domain.c | 2 ++ 3 files changed, 59 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c

[libvirt] [PATCH 07/17] virsh: Add network uuid completion to network-name command

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer-network.c | 42 + tools/virsh-completer-network.h | 4 tools/virsh-network.c | 2 ++ 3 files changed, 48 insertions(+) diff --git a/tools/virsh-completer-network.c b/tools/virsh-completer-network.c

[libvirt] [PATCH 02/17] virsh: snapshot: Only return domains that have snapshot images

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-snapshot.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 8b16d77b56..99e3d98c6f 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -511,7 +511,7

[libvirt] [PATCH 04/17] virsh: checkpoint: Only return domains that have checkpoints

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-checkpoint.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 411eac7fc8..c4ff863802 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -332,7

[libvirt] [PATCH 08/12] virsh: domdisplay: options --all and --type are mutually exclusive

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 657a0532db..8d7f45091c 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11526,6 +11526,8 @@ cmdDomDisplay(vshControl *ctl, const

[libvirt] [PATCH 10/12] virsh: pool-list: options --all and --inactive are mutually exclusive

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-pool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 9fac590ec3..634e9ac8cd 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -1146,6 +1146,8 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd

[libvirt] [PATCH 01/12] qemu: qemuDomainPMSuspendForDuration: Check availability of agent

2020-09-11 Thread Lin Ma
It requires a guest agent configured and running in the domain's guest OS, So check qemu agent during qemuDomainPMSuspendForDuration(). Signed-off-by: Lin Ma --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCH 00/12] qemu/virsh/docs: various minor fixes

2020-09-11 Thread Lin Ma
Lin Ma (12): qemu: qemuDomainPMSuspendForDuration: Check availability of agent qemu: Return perf status that affect next boot for shutoff domains network: Check for active network during networkGetDHCPLeases virsh: domid: Error out if domain is not active virsh: net-port-create: log

[libvirt] [PATCH 03/12] network: Check for active network during networkGetDHCPLeases

2020-09-11 Thread Lin Ma
It doesn't make sense querying dhcp leases for interfaces against an inactive network, This patch adds a check to see if the network is active. Signed-off-by: Lin Ma --- src/network/bridge_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH 04/12] virsh: domid: Error out if domain is not active

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d1d3f8e566..86152a53b1 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10458,18 +10458,21

[libvirt] [PATCH 06/12] virsh: event: options --all and --event are mutually exclusive

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 86152a53b1..657a0532db 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13696,6 +13696,8 @@ cmdEvent(vshControl *ctl, const

[libvirt] [PATCH 02/12] qemu: Return perf status that affect next boot for shutoff domains

2020-09-11 Thread Lin Ma
mbmt mbmt : enabled # virsh perf --domain $GUEST cmt: disabled mbmt : enabled mbml : disabled .. Signed-off-by: Lin Ma --- src/qemu/qemu_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driv

[libvirt] [PATCH 09/12] virsh: iface-list: options --all and --inactive are mutually exclusive

2020-09-11 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index a6b52726c9..2bca2483dd 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -351,6 +351,8 @@ cmdInterfaceList

  1   2   3   >