[libvirt] [PATCH v6 30/33] qemu_driver: Identify using libvirt as a distinct way to compute baseline

2019-01-12 Thread Chris Venteicher
is generated when no method is available to expand cpu featues. The useQEMU option will be introduced in a future patch for using QEMU to compute baseline rather than using libvirt. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 19 +++ 1 file changed, 15 insertions

[libvirt] [PATCH v6 31/33] qemu_driver: Support baseline calculation using QEMU

2019-01-12 Thread Chris Venteicher
QEMU) in a later patch. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e9f5686dbe..5068805f51 100644 --- a/src/qemu/qemu_driver.c +++ b

[libvirt] [PATCH v6 33/33] qemu_monitor: Default props to migratable when expanding cpu model

2019-01-12 Thread Chris Venteicher
with x86. After this change, immediately default prop->migratable = _YES for all props when we know QEMU only included migratable props in CPU Model. Set model->migratability = true when we have set prop->migratable. Signed-off-by: Chris Venteicher --- src/qemu/qemu_

[libvirt] [PATCH v6 26/33] qemu_capabilities: Introduce virCPUDef to CPUModelInfo function

2019-01-12 Thread Chris Venteicher
virQEMUCapsCPUModelInfoToCPUDef function. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 52 src/qemu/qemu_capabilities.h | 1 + 2 files changed, 53 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2bb56763b0

[libvirt] [PATCH v6 17/33] qemu_process: Cleanup qemuProcessQMPStop function

2019-01-12 Thread Chris Venteicher
qemuProcessQMPStop 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. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu

[libvirt] [PATCH v6 15/33] qemu_process: Stop retaining Monitor config in qemuProcessQMP

2019-01-12 Thread Chris Venteicher
The monitor config data is removed from the qemuProcessQMP 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 v6 11/33] qemu_process: Introduce qemuProcessQMPStart

2019-01-12 Thread Chris Venteicher
the main reason for the static functions. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_process.c | 93 +++- src/qemu/qemu_process.h | 2 +- 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_

[libvirt] [PATCH v6 16/33] qemu_process: Cleanup qemuProcessQMP alloc function

2019-01-12 Thread Chris Venteicher
-by: Chris Venteicher --- src/qemu/qemu_process.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 91532c19ce..58842a0f1c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8220,6

[libvirt] [PATCH v6 19/33] qemu_process: Enter QMP command mode when starting QEMU Process

2019-01-12 Thread Chris Venteicher
qemuMonitorSetCapabilities to send the message to switch to command mode because the test code does not use the qemuProcessQMP command that internally calls qemuMonitorSetCapabilities. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_process.c | 8

[libvirt] [PATCH v6 14/33] qemu_process: Setup paths within qemuProcessQMPInit

2019-01-12 Thread Chris Venteicher
eanup" rather than "error". Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 44 + 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index dc2237f0e6..430136251d 1

[libvirt] [PATCH v6 32/33] qemu_driver: Support feature expansion via QEMU when baselining cpu

2019-01-12 Thread Chris Venteicher
model in architectures where QEMU is used for baseline so no attempt is made to ask for non-migratable features in expansions when using QEMU for baseline. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 25 + src/qemu/qemu_monitor.c | 30

[libvirt] [PATCH v6 29/33] qemu_driver: Decouple code for baseline using libvirt

2019-01-12 Thread Chris Venteicher
into a utility function wrapper. s/cpu/*baseline/ (change output variable name ) and initialize variable "rc" are the only code changes. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 78 -- 1 file changed, 52 insertions(+), 26

[libvirt] [PATCH v6 25/33] qemu_capabilities: Introduce CPUModelInfo to virCPUDef function

2019-01-12 Thread Chris Venteicher
Move existing code to convert between cpu model info structures (qemuMonitorCPUModelInfoPtr into virCPUDef) into a reusable function. The new function is used in this and future patches. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 88

[libvirt] [PATCH v6 23/33] qemu_capabilities: Introduce virQEMuCapsMigratablePropsCalc

2019-01-12 Thread Chris Venteicher
and making the inputs and outputs clearer. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 130 --- 1 file changed, 91 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 02911a2a10

[libvirt] [PATCH v6 08/33] qemu_process: All ProcessQMP errors are fatal

2019-01-12 Thread Chris Venteicher
is updated to make all errors fatal for consistency. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 ++ src/qemu/qemu_process.c | 15 +++ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH v6 21/33] qemu_monitor: Introduce qemuMonitorCPUModelInfoNew

2019-01-12 Thread Chris Venteicher
Use a helper function to allocate and initializes CPU Model Info structs. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_monitor.c | 27 ++- src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 5

[libvirt] [PATCH v6 13/33] qemu_process: Store libDir in qemuProcessQMP struct

2019-01-12 Thread Chris Venteicher
Store libDir path in the qemuProcessQMP struct in anticipation of moving path construction code into qemuProcessQMPInit 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 v6 24/33] qemu_monitor: qemuMonitorGetCPUModelExpansion inputs and outputs CPUModelInfo

2019-01-12 Thread Chris Venteicher
A Full CPUModelInfo structure with props is sent to QEMU for expansion. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 8 +--- src/qemu/qemu_monitor.c | 20 +++- src/qemu/qemu_monitor.h | 5 +++-- src/qemu/qemu_monitor_json.c | 12

[libvirt] [PATCH v6 20/33] qemu_process: Use unique directories for QMP processes

2019-01-12 Thread Chris Venteicher
c to the capabilities usecase and are more generic in terms of being used for any general purpose QMP message exchanges with a QEMU process that is not associated with a domain. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 25 +++-- src/qemu/qemu_process.h | 1

[libvirt] [PATCH v6 18/33] qemu_process: Catch process free before process stop

2019-01-12 Thread Chris Venteicher
Catch execution paths where qemuProcessQMPFree is called before qemuProcessQMPStop 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 | 17 - 1 file changed, 16

[libvirt] [PATCH v6 12/33] qemu_process: Collect monitor code in single function

2019-01-12 Thread Chris Venteicher
-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 48 - 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3b785d64e5..5492ff5a19 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

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

2019-01-12 Thread Chris Venteicher
process to issue multiple different QMP commands. This patch changes the variable naming from cmd to proc to put focus on the process being maintained to issue commands. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 18 ++--- src/qemu/qemu_process.c | 140

[libvirt] [PATCH v6 22/33] qemu_monitor: Introduce qemuMonitorCPUModelInfo / JSON conversion

2019-01-12 Thread Chris Venteicher
emuMonitorJSONGetCPUModelExpansion makes full use of conversions and propAdd in prep to support input of full cpu model in future. Signed-off-by: Chris Venteicher --- src/qemu/qemu_monitor.c | 25 ++ src/qemu/qemu_monitor.h | 5 ++ src/qemu/qemu_monitor_json.c | 152 +

[libvirt] [PATCH v6 09/33] qemu_process: Expose process exit status code

2019-01-12 Thread Chris Venteicher
virQEMUCapsInitQmp where we can detect that the -first- (not subsequent) QEMU process activation failed with nonzero status. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 73 ++-- src/qemu/qemu_process.c | 9 +++-- src/qemu/qemu_process.h | 1 + 3

[libvirt] [PATCH v6 28/33] qemu_driver: Consolidate code to baseline using libvirt

2019-01-12 Thread Chris Venteicher
using qemu qmp command (future) Future patches are easier to follow if the code for using libvirt is consolidated. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_driver.c b

[libvirt] [PATCH v6 05/33] qemu_process: Use consistent name for stop process function

2019-01-12 Thread Chris Venteicher
. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_process.c | 6 +++--- src/qemu/qemu_process.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e062e4daa8

[libvirt] [PATCH v6 27/33] qemu_monitor: Support query-cpu-model-baseline QMP command

2019-01-12 Thread Chris Venteicher
Introduce monitor functions to use QEMU to compute baseline cpu from an input of two cpu models. Signed-off-by: Chris Venteicher --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 6 src/qemu/qemu_monitor_json.c | 60 src

[libvirt] [PATCH v6 00/33] BaselineHypervisorCPU using QEMU QMP exchanges

2019-01-12 Thread Chris Venteicher
and file system footprint. The remaining (non-process) patches in v4 address all issues in v1-v4 of 'BaselineHypervisorCPU using QEMU QMP exchanges' Thanks, Chris *** BLURB HERE *** Chris Venteicher (33): qEmu_process: Move process code from qemu_capabilities to qemu_process qemu_process:

[libvirt] [PATCH v6 07/33] qemu_process: Use qemuProcessQMP struct for a single process

2019-01-12 Thread Chris Venteicher
use KVM) will be passed when the qemuProcessQMP struct is initialized since the qemuProcessQMP struct won't be reused. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 19 +++ src/qemu/qemu_process.c | 9 + src/qemu/qemu_process.h | 7

[libvirt] [PATCH v6 01/33] qemu_process: Move process code from qemu_capabilities to qemu_process

2019-01-12 Thread Chris Venteicher
. ** Then, subsequent patches modify the process code to make function prefixes and variable names match qemu_process, and make the code usable for more than the capabilities usecase. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 218 +-- src/qemu

[libvirt] [PATCH v6 10/33] qemu_process: Persist stderr in qemuProcessQMP struct

2019-01-12 Thread Chris Venteicher
.) The stderr buffer no longer needs to be maintained outside of the qemuProcessQMP structure because the structure is used for a single QEMU process and the structures can be maintained as long as required to retrieve the process error info. Signed-off-by: Chris Venteicher --- src/qemu

[libvirt] [PATCH v6 06/33] qemu_capabilities: Stop QEMU process before freeing

2019-01-12 Thread Chris Venteicher
. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_process.c | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2bacd5e40a..73380fdc2b 100644

[libvirt] [PATCH v6 03/33] qemu_process: Limit qemuProcessQMPNew to const input strings

2019-01-12 Thread Chris Venteicher
Add the const qualifier on non modified strings (string only copied inside qemuProcessQMPNew) so that const strings can be used directly in calls to qemuProcessQMPNew in future patches. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 2 +- 2 files

[libvirt] [PATCH v6 02/33] qemu_process: Use qemuProcessQMP prefix

2019-01-12 Thread Chris Venteicher
s/virQEMUCapsInitQMPCommand/qemuProcessQMP/ No functionality change. Use file 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

Re: [libvirt] [PATCH v5 20/36] qemu_process: Enter QMP command mode when starting QEMU Process

2019-01-12 Thread Chris Venteicher
Quoting Jiri Denemark (2019-01-03 08:54:21) > On Sun, Dec 02, 2018 at 23:10:14 -0600, Chris Venteicher wrote: > > qemuProcessQmpStart starts a QEMU process and monitor connection that > > can be used by multiple functions possibly for multiple QMP commands. > > > &g

Re: [libvirt] [PATCH v5 10/36] qemu_process: Introduce qemuProcessQmpStart

2019-01-12 Thread Chris Venteicher
Quoting Jiri Denemark (2019-01-03 08:18:15) > On Sun, Dec 02, 2018 at 23:10:04 -0600, Chris Venteicher wrote: > > Move a step closer to the function structure used elsewhere in > > qemu_process where qemuProcessStart and qemuProcessStop are the exposed > > functions. > &g

[libvirt] [PATCH v5 34/36] qemu_driver: Support feature expansion via QEMU when baselining cpu

2018-12-02 Thread Chris Venteicher
model in architectures where QEMU is used for baseline so no attempt is made to ask for non-migratable features in expansions when using QEMU for baseline. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src

[libvirt] [PATCH v5 33/36] qemu_driver: Support baseline calculation using QEMU

2018-12-02 Thread Chris Venteicher
QEMU) in a later patch. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4e8a3902d3..8c6838f584 100644 --- a/src/qemu/qemu_driver.c +++ b

[libvirt] [PATCH v5 32/36] qemu_driver: Identify using libvirt as a distinct way to compute baseline

2018-12-02 Thread Chris Venteicher
is generated when no method is available to expand cpu featues. The useQEMU option will be introduced in a future patch for using QEMU to compute baseline rather than using libvirt. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 19 +++ 1 file changed, 15 insertions

[libvirt] [PATCH v5 35/36] qemu_driver: Remove unsupported props in expanded hypervisor baseline output

2018-12-02 Thread Chris Venteicher
of true/false CPUModelInfo props A utility function is created to squash CPU properties list in qemuMonitorCPUmodelInfo structure by removing boolean properties of matching value. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 4 src/qemu/qemu_monitor.c | 30

[libvirt] [PATCH v5 36/36] qemu_monitor: Default props to migratable when expanding cpu model

2018-12-02 Thread Chris Venteicher
with x86. After this change, immediately default prop->migratable = _YES for all props when we know QEMU only included migratable props in CPU Model. Set model->migratability = true when we have set prop->migratable. Signed-off-by: Chris Venteicher --- src/qemu/qemu_

[libvirt] [PATCH v5 30/36] qemu_driver: Consolidate code to baseline using libvirt

2018-12-02 Thread Chris Venteicher
using qemu qmp command (future) Future patches are easier to follow if the code for using libvirt is consolidated. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_driver.c b

[libvirt] [PATCH v5 31/36] qemu_driver: Decouple code for baseline using libvirt

2018-12-02 Thread Chris Venteicher
into a utility function wrapper. s/cpu/*baseline/ (change output variable name ) and initialize variable "rc" are the only code changes. Signed-off-by: Chris Venteicher --- src/qemu/qemu_driver.c | 78 -- 1 file changed, 52 insertions(+), 26

[libvirt] [PATCH v5 27/36] qemu_capabilities: Introduce CPUModelInfo to virCPUDef function

2018-12-02 Thread Chris Venteicher
Move existing code to convert between cpu model info structures (qemuMonitorCPUModelInfoPtr into virCPUDef) into a reusable function. The new function is used in this and future patches. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 84

[libvirt] [PATCH v5 28/36] qemu_capabilities: Introduce virCPUDef to CPUModelInfo function

2018-12-02 Thread Chris Venteicher
virQEMUCapsCPUModelInfoToCPUDef function. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 46 src/qemu/qemu_capabilities.h | 1 + 2 files changed, 47 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 74f670459f

[libvirt] [PATCH v5 25/36] qemu_capabilities: Introduce virQEMuCapsMigratablePropsDiff

2018-12-02 Thread Chris Venteicher
and making the inputs and outputs clearer. The patch also sets cpuData->info = NULL to make sure bad data does not remain in failure cases. Q) Can the right people quickly determine if they should review this? Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c |

[libvirt] [PATCH v5 26/36] qemu_monitor: qemuMonitorGetCPUModelExpansion inputs and outputs CPUModelInfo

2018-12-02 Thread Chris Venteicher
A Full CPUModelInfo structure with props is sent to QEMU for expansion. virQEMUCapsProbeQMPHostCPU migratability logic partitioned into new function for clarity. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 8 +--- src/qemu/qemu_monitor.c | 31

[libvirt] [PATCH v5 24/36] qemu_monitor: Introduce qemuMonitorCPUModelInfo / JSON conversion

2018-12-02 Thread Chris Venteicher
emuMonitorJSONGetCPUModelExpansion makes full use of conversions and propAdd in prep to support input of full cpu model in future. Signed-off-by: Chris Venteicher --- src/qemu/qemu_monitor.c | 24 ++ src/qemu/qemu_monitor.h | 5 ++ src/qemu/qemu_monitor_json.c | 154 +

[libvirt] [PATCH v5 29/36] qemu_monitor: Support query-cpu-model-baseline QMP command

2018-12-02 Thread Chris Venteicher
Introduce monitor functions to use QEMU to compute baseline cpu from an input of two cpu models. Signed-off-by: Chris Venteicher --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 6 src/qemu/qemu_monitor_json.c | 60 src

[libvirt] [PATCH v5 16/36] qemu_process: Cleanup qemuProcessQmp alloc function

2018-12-02 Thread Chris Venteicher
-by: Chris Venteicher --- src/qemu/qemu_process.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 31d41688fe..faf86dac5d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c

[libvirt] [PATCH v5 17/36] qemu_process: Cleanup qemuProcessQmpStop function

2018-12-02 Thread Chris Venteicher
qemuProcessQmpStop 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 --- src/qemu

[libvirt] [PATCH v5 19/36] qemu_monitor: Make monitor callbacks optional

2018-12-02 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 ++-- src

[libvirt] [PATCH v5 18/36] qemu_process: Catch process free before process stop

2018-12-02 Thread Chris Venteicher
Catch execution paths where qemuProcessQmpFree is called before qemuProcessQmpStop 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 | 17 - 1 file changed, 16

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

2018-12-02 Thread Chris Venteicher
qemuMonitorSetCapabilities to send the message to switch to command mode because the test code does not use the qemuProcessQmp command that internally calls qemuMonitorSetCapabilities. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_process.c | 8

[libvirt] [PATCH v5 23/36] qemu_monitor: Introduce qemuMonitorCPUModelInfoNew

2018-12-02 Thread Chris Venteicher
Use a helper function to allocate and initializes CPU Model Info structs. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_monitor.c | 32 +++- src/qemu/qemu_monitor.h | 2 ++ 3 files changed, 30 insertions(+), 6

[libvirt] [PATCH v5 21/36] qemu_process: Use unique directories for QMP processes

2018-12-02 Thread Chris Venteicher
c to the capabilities usecase and are more generic in terms of being used for any general purpose QMP message exchanges with a QEMU process that is not associated with a domain. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 24 ++-- src/qemu/qemu_process.h | 1

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

2018-12-02 Thread Chris Venteicher
with the qemuConnectMonitor code used to establish the monitor when QEMU process is started for domains. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 26ba59143d..b491f9f91a 100644 --- a/src/qemu

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

2018-12-02 Thread Chris Venteicher
will be removed in future patch so we prep for passing NULL for the callback pointer. Set proc->mon to NULL then use VIR_STEAL_PTR if successful to be consistent with other functions. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 29 +++-- 1 file chan

[libvirt] [PATCH v5 12/36] qemu_process: Store libDir in qemuProcessQmp struct

2018-12-02 Thread Chris Venteicher
Store libDir path in the qemuProcessQmp struct in anticipation of moving path construction code into qemuProcessQmpInit 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 v5 11/36] qemu_process: Collect monitor code in single function

2018-12-02 Thread Chris Venteicher
-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 50 - 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 938d328235..a688be7f2c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[libvirt] [PATCH v5 14/36] qemu_process: Stop retaining Monitor config in qemuProcessQmp

2018-12-02 Thread Chris Venteicher
The monitor config data is removed from the qemuProcessQmp 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 v5 06/36] qemu_capabilities: Stop QEMU process before freeing

2018-12-02 Thread Chris Venteicher
. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_process.c | 19 --- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d903fbddf8..a79329a134 100644 --- a/src

[libvirt] [PATCH v5 10/36] qemu_process: Introduce qemuProcessQmpStart

2018-12-02 Thread Chris Venteicher
the main reason for the static functions. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_process.c | 94 +++- src/qemu/qemu_process.h | 2 +- 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_

[libvirt] [PATCH v5 00/36] BaselineHypervisorCPU using QEMU QMP exchanges

2018-12-02 Thread Chris Venteicher
of sockets and file system footprint. The BaselineHypervisorCPU changes (patches 22-36)... - Fix all issues raised in patch sets 1-4. Thanks, Chris Chris Venteicher (36): qemu_process: Move process code from qemu_capabilities to qemu_process qemu_process: Use qemuProcessQmp prefix qemu_proc

[libvirt] [PATCH v5 13/36] qemu_process: Setup paths within qemuProcessQmpInit

2018-12-02 Thread Chris Venteicher
eanup" rather than "error". Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 46 + 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d4025ac1bc..fc15cb1a3c 1

[libvirt] [PATCH v5 08/36] qemu_process: All ProcessQMP errors are fatal

2018-12-02 Thread Chris Venteicher
.) Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 83 src/qemu/qemu_process.c | 24 --- src/qemu/qemu_process.h | 1 + 3 files changed, 45 insertions(+), 63 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH v5 09/36] qemu_process: Persist stderr in qemuProcessQmp struct

2018-12-02 Thread Chris Venteicher
.) The stderr buffer no longer needs to be maintained outside of the qemuProcessQmp structure because the structure is used for a single QEMU process and the structures can be maintained as long as required to retrieve the process error info. Signed-off-by: Chris Venteicher --- src/qemu

[libvirt] [PATCH v5 02/36] qemu_process: Use qemuProcessQmp prefix

2018-12-02 Thread Chris Venteicher
s/virQEMUCapsInitQMPCommand/qemuProcessQmp/ No functionality change. Use file 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

[libvirt] [PATCH v5 07/36] qemu_process: Use qemuProcessQmp struct for a single process

2018-12-02 Thread Chris Venteicher
use KVM) will be passed when the qemuProcessQmp struct is initialized since the qemuProcessQmp struct won't be reused. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 20 src/qemu/qemu_process.c | 10 ++ src/qemu/qemu_process.h | 7

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

2018-12-02 Thread Chris Venteicher
process to issue multiple different QMP commands. This patch changes the variable naming from cmd to proc to put focus on the process being maintained to issue commands. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 18 ++--- src/qemu/qemu_process.c | 138

[libvirt] [PATCH v5 01/36] qemu_process: Move process code from qemu_capabilities to qemu_process

2018-12-02 Thread Chris Venteicher
. ** (Exception: I did change a function prototype in qemu_process.h to be one parameter per line.) Then, subsequent patches modify the process code to make function prefixes and variable names match qemu_process, and make the code usable for more than the capabilities usecase. Signed-off-by: Chris

[libvirt] [PATCH v5 05/36] qemu_process: Use consistent name for stop process function

2018-12-02 Thread Chris Venteicher
. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_process.c | 6 +++--- src/qemu/qemu_process.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 41a0dfa844

[libvirt] [PATCH v5 03/36] qemu_process: Limit qemuProcessQmpNew to const input strings

2018-12-02 Thread Chris Venteicher
Add the const qualifier on non modified strings (string only copied inside qemuProcessQmpNew) so that const strings can be used directly in calls to qemuProcessQmpNew in future patches. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 2 +- src/qemu/qemu_process.h | 2 +- 2 files

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

2018-11-14 Thread Chris Venteicher
Quoting Michal Privoznik (2018-11-14 09:45:06) > On 11/11/2018 08:59 PM, Chris Venteicher wrote: > > Make process code usable outside qemu_capabilities by moving code > > from qemu_capabilities to qemu_process and exposing public functions. > > > > The process cod

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

2018-11-14 Thread Chris Venteicher
Quoting Michal Privoznik (2018-11-14 09:45:07) > On 11/11/2018 08:59 PM, Chris Venteicher wrote: > > Move a step closer to the function structure used elsewhere in > > qemu_process where qemuProcessStart and qemuProcessStop are the exposed > > functions. > > >

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 f

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

2018-11-11 Thread Chris Venteicher
qemuMonitorSetCapabilities to send the message to switch to command mode because the test code does not use the qemuProcess command that internally calls qemuMonitorSetCapabilities. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 -- src/qemu/qemu_process.c | 8 tests

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

2018-11-11 Thread Chris Venteicher
are made. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 55a092ecbb..5ff7d6878c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[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 --- src

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

2018-11-11 Thread Chris Venteicher
used to establish the monitor when QEMU process is started for domains. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 4dbc7038fd..2f9c1701a3 100644 --- a/src/qemu

[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 ++-- src

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

2018-11-11 Thread Chris Venteicher
c to the capabilities usecase and are more generic in terms of being used for any general purpose QMP message exchanges with a QEMU process that is not associated with a domain. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 26 -- src/qemu/qemu_process.h | 1

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

2018-11-11 Thread Chris Venteicher
since the qemuProcess struct won't be reused. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 16 src/qemu/qemu_process.c | 11 +++ src/qemu/qemu_process.h | 6 -- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/qemu

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

2018-11-11 Thread Chris Venteicher
change, however goto is now "cleanup" rather than "error". Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 42 + 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_proces

[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
The same error and log message should be generated, in the same conditions, after this patch as before. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 27 --- src/qemu/qemu_process.c | 12 src/qemu/qemu_process.h | 6 -- 3 fil

[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 a/src

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

2018-11-11 Thread Chris Venteicher
process to issue multiple different QMP commands. This patch changes the variable naming from cmd to proc to put focus on the process being maintained to issue commands. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 ++-- src/qemu/qemu_process.c | 140

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

2018-11-11 Thread Chris Venteicher
rms of sockets and file system footprint. Every patch should compile independently if applied in sequence. Chris Venteicher (22): qemu_process: Move process code from qemu_capabilities to qemu_process qemu_process: Use qemuProcess prefix qemu_process: Limit qemuProcessNew to const input

[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 --- src/qemu

[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
will be removed in future patch so we prep for passing NULL for the callback pointer. Set proc->mon to NULL then use VIR_STEAL_PTR if successful to be consistent with other functions. Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 27 +-- 1 file changed,

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

2018-11-11 Thread Chris Venteicher
until the process data structure is freed. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 73ec8e5c6e..082874082b 100644 --- a/src/qemu/qemu_capabilities.c +++ b

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

2018-11-11 Thread Chris Venteicher
. Improvements in later patch. Only intended functional change in this patch is we don't move (include) code to initiate process stop on failure to create monitor. As comments in qemuProcessStartQmp say... Client must always call qemuProcessStop and qemuProcessFree, even in error cases. Signed-off-by: Chris

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

2018-11-11 Thread Chris Venteicher
subsequent patches will partition code from qemuProcessLaunchQmp. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 4 +- src/qemu/qemu_process.c | 96 +++- src/qemu/qemu_process.h | 2 +- 3 files changed, 97 insertions(+), 5 deletions

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

2018-11-11 Thread Chris Venteicher
is added to the end of qemuProcessStop to differentiate between the Domain and new non-domain version of the functions. qemuProcessStartQmp will be used in a future patch to mirror the qemuProcessStart function with a non-domain equivalent. Signed-off-by: Chris Venteicher --- src/qemu

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

2018-11-11 Thread Chris Venteicher
. This simplifies logic and is more consistent with the operation of existing qemu_process functions. A macro is introduced to easily obtain the monitor pointer from the qemuProcess structure. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 28 ++-- src/qemu

[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
. Following patches modify the process code making it more generic and consistent with qemu_process. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 218 +-- src/qemu/qemu_process.c | 201 src/qemu/qemu_process.h

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

2018-11-09 Thread Chris Venteicher
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 QEMU requires starting the QEMU process and completing one or > more query-cpu-model-baseline QMP exch

  1   2   3   >