Re: [libvirt] [PATCH 2/2] qemu: Set identity for the reconnect all thread

2018-11-11 Thread Peter Krempa
On Fri, Nov 09, 2018 at 19:39:37 -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1631622 > > If polkit authentication is enabled, an attempt to open > the connection failed during virAccessDriverPolkitGetCaller > when the call to virIdentityGetCurrent returned NULL

Re: [libvirt] [PATCH 1/2] util: Fix VIR_ERR_ACCESS_DENIED formatting

2018-11-11 Thread Peter Krempa
On Fri, Nov 09, 2018 at 19:39:36 -0500, John Ferlan wrote: > In commit ccc72d5cb I thought I had the brilliant idea that I > could alter an error message in virErrorMsg to take two arguments > "drivername" and NULL. Then passing the failed drivername for > VIR_ERR_ACCESS_DENIED users would

[libvirt] [PATCH v3 10/10] news: Cold(un)plug and hot(un)plug support for usb hub

2018-11-11 Thread Han Han
Signed-off-by: Han Han --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 88774c55ae..b677f52efc 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,16 @@ + + + Qemu: Add active and

[libvirt] [PATCH v3 04/10] qemu: Make qemuBuildHubDevStr global

2018-11-11 Thread Han Han
Make function qemuBuildHubDevStr global for reuse on hub hotplug. Signed-off-by: Han Han --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH v3 09/10] qemu: Implement usb hub device hotunplug

2018-11-11 Thread Han Han
https://bugzilla.redhat.com/show_bug.cgi?id=1375423 Signed-off-by: Han Han --- src/qemu/qemu_driver.c | 5 ++- src/qemu/qemu_hotplug.c | 81 - src/qemu/qemu_hotplug.h | 4 ++ 3 files changed, 88 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v3 00/10] Cold(un)plug and hot(un)plug support for hub

2018-11-11 Thread Han Han
Changes from v2: - Add codes to check if hub is busy before hotunplug. (I am not sure if I covered all the usb devices in qemuDomainHubIsBusy. Please help to review it :) ) - Remove wrongly pasted codes - Update titles of commit msgs - Update news.xml v2:

[libvirt] [PATCH v3 05/10] conf: Add virDomainHubDefFree to libvirt_private.syms

2018-11-11 Thread Han Han
Add virDomainHubDefFree to for the preparation of usb hub hotplug. Signed-off-by: Han Han --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 6245927673..b29c2bf62b 100644 --- a/src/libvirt_private.syms +++

[libvirt] [PATCH v3 08/10] qemu: Check whether hub device is busy

2018-11-11 Thread Han Han
qemuDomainHubIsBusy is to check whether a usb device are attached to the hub device. It will be used for hotunplugging and live device update of hub device. Signed-off-by: Han Han --- src/qemu/qemu_hotplug.c | 64 + 1 file changed, 64 insertions(+) diff

[libvirt] [PATCH v3 03/10] qemu: Refactor hub alias assignment for hotplug

2018-11-11 Thread Han Han
Make qemuAssignDeviceHubAlias global and allow alias generating for reuse on hotplug. Signed-off-by: Han Han --- src/qemu/qemu_alias.c | 22 ++ src/qemu/qemu_alias.h | 4 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_alias.c

[libvirt] [PATCH v3 07/10] conf: Add function virDomainUSBAddressIsAttachedToHub

2018-11-11 Thread Han Han
Add this function to check if the a usb address is attached to a hub device. Signed-off-by: Han Han --- src/conf/domain_addr.c | 22 ++ src/conf/domain_addr.h | 5 + src/libvirt_private.syms | 1 + 3 files changed, 28 insertions(+) diff --git

[libvirt] [PATCH v3 01/10] qemu: Allow coldplugging of hub device

2018-11-11 Thread Han Han
https://bugzilla.redhat.com/show_bug.cgi?id=1375423 Signed-off-by: Han Han --- 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 9f71641dfa..1e5a69358b 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH v3 02/10] qemu: Allow coldunplugging of hub device

2018-11-11 Thread Han Han
https://bugzilla.redhat.com/show_bug.cgi?id=1375423 Signed-off-by: Han Han --- src/conf/domain_conf.c | 30 ++ src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 10 +- 4 files changed, 43 insertions(+), 1

[libvirt] [PATCH v3 06/10] qemu: Implement usb hub device hotplug

2018-11-11 Thread Han Han
https://bugzilla.redhat.com/show_bug.cgi?id=1375423 Signed-off-by: Han Han --- src/qemu/qemu_driver.c | 9 ++- src/qemu/qemu_hotplug.c | 58 + src/qemu/qemu_hotplug.h | 4 +++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH v4 00/37] BaselineHypervisorCPU using QEMU QMP exchanges

2018-11-11 Thread Chris Venteicher
Quoting Collin Walling (2018-11-09 10:44:41) > Hi Chris, > > On 11/9/18 11:27 AM, Chris Venteicher wrote: > > Quoting Chris Venteicher (2018-11-02 22:13:01) > >> Some architectures (S390) depend on QEMU to compute baseline CPU model and > >> expand a models feature set. > >> > >> Interacting with

[libvirt] [PATCH RFC 20/22] qemu_process: Enter QMP command mode when starting QEMU Process

2018-11-11 Thread Chris Venteicher
qemuProcessStartQmp starts a QEMU process and monitor connection that can be used by multiple functions possibly for multiple QMP commands. The QMP exchange to exit capabilities negotiation mode and enter command mode can only be performed once after the monitor connection is established. Move

[libvirt] [PATCH RFC 16/22] qemu_process: Cleanup qemuProcess alloc function

2018-11-11 Thread Chris Venteicher
qemuProcessNew is one of the 4 public functions used to create and manage a qemu process for QMP command exchanges outside of domain operations. Add descriptive comment block, Debug statement and make source consistent with the cleanup / VIR_STEAL_PTR format used elsewhere. No functional changes

[libvirt] [PATCH RFC 14/22] qemu_process: Stop retaining Qemu Monitor config in qemuProcess

2018-11-11 Thread Chris Venteicher
The monitor config data is removed from the qemuProcess struct. The monitor config data can be initialized immediately before call to qemuMonitorOpen and does not need to be maintained after the call because qemuMonitorOpen copies any strings it needs. Signed-off-by: Chris Venteicher ---

[libvirt] [PATCH RFC 22/22] qemu_process: Stop locking QMP process monitor immediately

2018-11-11 Thread Chris Venteicher
Locking the monitor object immediately after call to qemuMonitorOpen doesn't make sense now that we have expanded the QEMU process code to cover more than the original capabilities usecase. Removing the monitor lock makes the qemuConnectMonitorQmp code consistent with the qemuConnectMonitor code

[libvirt] [PATCH RFC 19/22] qemu_monitor: Make monitor callbacks optional

2018-11-11 Thread Chris Venteicher
Qemu process code for capababilities doesn't use monitor callbacks and defines empty callback functions. Allow NULL to be passed to qemuMonitorOpen for callbacks and remove the empty functions from the QMP process code. Signed-off-by: Chris Venteicher --- src/qemu/qemu_monitor.c | 4 ++--

[libvirt] [PATCH RFC 21/22] qemu_process: Use unique directories for QMP processes

2018-11-11 Thread Chris Venteicher
Multiple QEMU processes for QMP commands can operate concurrently. Use a unique directory under libDir for each QEMU processes to avoid pidfile and unix socket collision between processes. The pid file name is changed from "capabilities.pidfile" to "qmp.pid" because we no longer need to avoid a

[libvirt] [PATCH RFC 07/22] qemu_process: Use qemuProcess struct for a single process

2018-11-11 Thread Chris Venteicher
In new process code, move from model where qemuProcess struct can be used to activate a series of Qemu processes to model where one qemuProcess struct is used for one and only one Qemu process. The forceTCG parameter (use / don't use KVM) will be passed when the qemuProcess struct is initialized

[libvirt] [PATCH RFC 13/22] qemu_process: Setup paths within qemuProcessInitQmp

2018-11-11 Thread Chris Venteicher
Move code for setting paths and prepping file system from qemuProcessNew to qemuProcessInitQmp. This keeps qemuProcessNew limited to structure initialization and most closely mirrors pattern established in qemuProcessInit within qemuProcessInitQmp. The patch is a non-functional, cut / paste

[libvirt] [PATCH RFC 12/22] qemu_process: Store libDir in qemuProcess struct

2018-11-11 Thread Chris Venteicher
Store libDir path in the qemuProcess struct in anticipation of moving path construction code into qemuProcessInitQmp function. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 8 +--- src/qemu/qemu_process.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH RFC 08/22] qemu_process: Persist stderr in qemuProcess struct

2018-11-11 Thread Chris Venteicher
A qemuProcess struct tracks the entire lifespan of a single QEMU Process including storing error output when the process terminates or activation fails. Error output remains available until qemuProcessFree is called. The qmperr buffer no longer needs to be maintained outside of the qemuProcess

[libvirt] [PATCH RFC 03/22] qemu_process: Limit qemuProcessNew to const input strings

2018-11-11 Thread Chris Venteicher
Prevent compile errors due to trying to use a const string as a non-const input to qemuProcessNew. No functionality change. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH RFC 04/22] qemu_process: Refer to proc not cmd in process code

2018-11-11 Thread Chris Venteicher
s/cmd/proc/ in process code imported from qemu_capabilities. No functionality is changed. Just variable renaming. Process code imported from qemu_capabilities was oriented around starting a process to issue a single QMP command. Future usecases (ex. baseline, compare) expect to use a single

[libvirt] [PATCH RFC 00/22] Move process code to qemu_process

2018-11-11 Thread Chris Venteicher
Make process code usable outside qemu_capabilities by moving code from qemu_capabilities to qemu_process and exposing public functions. The process code is used to activate a non domain QEMU process for QMP message exchanges. This patch set modifies capabilities to use the new public functions.

[libvirt] [PATCH RFC 17/22] qemu_process: Cleanup qemuProcessStopQmp function

2018-11-11 Thread Chris Venteicher
qemuProcessStopQmp is one of the 4 public functions used to create and manage a Qemu process for QMP command exchanges. Add comment header and debug message. Other minor code formatting cleanup. No change in functionality is intended. Signed-off-by: Chris Venteicher ---

[libvirt] [PATCH RFC 18/22] qemu_process: Catch process free before process stop

2018-11-11 Thread Chris Venteicher
Catch execution paths where qemuProcessFree is called before qemuProcessStopQmp then report error and force stop before proceeding. Also added public function header and debug message. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 19 --- 1 file changed, 16

[libvirt] [PATCH RFC 15/22] qemu_process: Don't open monitor if process failed

2018-11-11 Thread Chris Venteicher
Gracefully handle case when proc activation failed prior to calling. Consistent with the existing code for qemuConnectMonitor (for domains) in qemu_process.c... - Handle qemMonitorOpen failure with INFO message and NULL ptr - Identify parameters passed to qemuMonitorOpen Monitor callbacks

[libvirt] [PATCH RFC 06/22] qemu_capabilities: Stop QEMU process before freeing

2018-11-11 Thread Chris Venteicher
Follow the convention established in qemu_process of 1) alloc process structure 2) start process 3) use process 4) stop process 5) free process data structure The process data structure persists after the process activation fails or the process dies or is killed so stderr strings can be retrieved

[libvirt] [PATCH RFC 11/22] qemu_process: Collect monitor code in single function

2018-11-11 Thread Chris Venteicher
qemuMonitor code lives in qemuConnectMonitorQmp rather than in qemuProcessNew and qemuProcessLaunchQmp. This is consistent with existing structure in qemu_process.c where qemuConnectMonitor function contains monitor code for domain process activation. Simple code moves in this patch.

[libvirt] [PATCH RFC 10/22] qemu_process: Introduce qemuProcessStartQmp

2018-11-11 Thread Chris Venteicher
Move a step closer to the function structure used elsewhere in qemu_process where qemuProcessStart and qemuProcessStop are the exposed functions. qemuProcessStartQmp mirrors qemuProcessStart in calling sub functions to intialize, launch the process and connect the monitor to the QEMU process.

[libvirt] [PATCH RFC 05/22] qemu_process: Use consistent name for stop process function

2018-11-11 Thread Chris Venteicher
s/qemuProcessAbort/qemuProcessStopQmp/ applied to change function name used to stop QEMU processes in process code moved from qemu_capabilities. No functionality change. The new name, qemuProcessStopQmp, is consistent with the existing function qemuProcessStop used to stop Domain processes. Qmp

[libvirt] [PATCH RFC 09/22] qemu_capabilities: Detect caps probe failure by checking monitor ptr

2018-11-11 Thread Chris Venteicher
Failure to connect to QEMU to probe capabilities is not considered a error case and does not result in a negative return value. Check for a NULL monitor connection pointer before trying to send capabilities commands to QEMU rather than depending on a special positive return value. This

[libvirt] [PATCH RFC 02/22] qemu_process: Use qemuProcess prefix

2018-11-11 Thread Chris Venteicher
s/virQEMUCapsInitQMPCommand/qemuProcess/ No functionality change. Use appropriate prefix in moved code. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 +++--- src/qemu/qemu_process.c | 28 ++-- src/qemu/qemu_process.h | 22

[libvirt] [PATCH RFC 01/22] qemu_process: Move process code from qemu_capabilities to qemu_process

2018-11-11 Thread Chris Venteicher
Qemu process code in qemu_capabilities.c is moved to qemu_process.c in order to make the code usable outside the original capabilities usecases. This process code activates and manages Qemu processes without establishing a guest domain. This patch is a straight cut/paste move between files.

Re: [libvirt] [PATCH v3] lxc: Include support to lxc version 3.0 or higher.

2018-11-11 Thread Julio Faracco
Em sáb, 10 de nov de 2018 às 11:17, John Ferlan escreveu: > > > > On 11/9/18 12:30 PM, Julio Faracco wrote: > > This patch introduce the new settings for LXC 3.0 or higher. The older > > versions keep the compatibility to deprecated settings for LXC, but > > after release 3.0, the compatibility