[libvirt] [PATCHv1 7/7] qemu_driver: Baseline CPU model using QEMU

2018-05-05 Thread Chris Venteicher
virsh cpu-baseline determines baseline from QEMU for some architectures and libvirt for others. Skip the QEMU attempt to save time on architectures QEMU baseline does not support. --- src/qemu/qemu_driver.c | 29 + 1 file changed, 29 insertions(+) diff --git

[libvirt] [PATCHv1 6/7] qemu_capabilities: qmperr pointer tracked in QMPCommand

2018-05-05 Thread Chris Venteicher
Allow QEMU process to be started without requirement for caller to maintain handle to qmperr pointer. The handle to qmperr pointer can be stored in QMPCommand structure (new way) stored in calling function's stack (original way). --- src/qemu/qemu_capabilities.c | 7 ++- 1 file changed, 6

[libvirt] [PATCHv1 2/7] qemu_capabilities: CPUModelInfo: XML/QMP format conversion

2018-05-05 Thread Chris Venteicher
Functions converting directly between virsh XML and QMEU QMP forms of CPUModelInfo. --- src/qemu/qemu_capabilities.c | 159 +++ 1 file changed, 159 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCHv1 5/7] qemu_capabilities: Find QEMU binary for S390 arch

2018-05-05 Thread Chris Venteicher
S390 uses qemu-kvm in /usr/libexec. --- src/qemu/qemu_capabilities.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9ffbf91a90..ac7569679c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@

[libvirt] [PATCHv1 3/7] qemu_capabilities: Start and connect to QEMU

2018-05-05 Thread Chris Venteicher
Start and connect to QEMU so QMP commands can be performed. Isolates code for starting QEMU and establishing Monitor connections from code for obtaining capabilities so that arbitrary QMP commands can be exchanged with QEMU. --- src/qemu/qemu_capabilities.c | 59

[libvirt] [PATCHv1 1/7] qemu_monitor_json: Properties optional in QMP JSON for CPUModelInfo

2018-05-05 Thread Chris Venteicher
Allow case where props not present in JSON for CPUModelInfo. Check for NULL input. Update comments to show JSON examples for more typical S390x usecase. --- src/qemu/qemu_monitor_json.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git

[libvirt] [PATCHv1 0/7] Baseline CPU model using QEMU QMP exchanges

2018-05-05 Thread Chris Venteicher
y-cpu-model-baseline QMP Command" patch set discussed previously on libvir-list. See "s390x CPU models: exposing features" patch set on Qemu-devel for discussion of QEMU aspects. This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chr

[libvirt] [PATCHv1 4/7] qemu_capabilities: Baseline CPUModel via QEMU

2018-05-05 Thread Chris Venteicher
Spinup QEMU instance and complete QMP query-cpu-model-baseline exchanges to determine CPUModel Baseline. query-cpu-model-baseline only compares two CPUModels so multiple exchanges are needed to evaluate more than two CPUModels. --- src/qemu/qemu_capabilities.c | 132

Re: [libvirt] [PATCHv1 0/7] Baseline CPU model using QEMU QMP exchanges

2018-05-19 Thread Chris Venteicher
Quoting Collin Walling (2018-05-17 16:07:14) > On 05/17/2018 04:15 PM, Jiri Denemark wrote: > > On Sat, May 05, 2018 at 12:48:42 -0500, Chris Venteicher wrote: > >> Some architectures (S390) depend on QEMU to compute baseline CPU model. > >> > >> Interacting

Re: [libvirt] [PATCH 00/22] New CPU related APIs

2018-05-29 Thread Chris Venteicher
Quoting Jiri Denemark (2018-05-29 09:34:02) > Hi Chris, > > > The new hypervisor specific compare and baseline commands seem to depend on > > qemuCaps being pre-populated with model data that is specific to a > > hypervisor > > instance. > > > > How do we make sure the qemuCaps are

Re: [libvirt] [PATCH 00/22] New CPU related APIs

2018-05-28 Thread Chris Venteicher
Quoting Jiri Denemark (2018-05-28 09:19:51) > On Wed, May 16, 2018 at 10:39:19 +0200, Jiri Denemark wrote: > > The current virConnectCompareCPU and virConnectBaselineCPU APIs are not > > very useful because they ignore what a hypervisor can do on the current > > host. This series adds two new APIs

Re: [libvirt] [PATCHv3 0/3] query-cpu-model-baseline QMP command

2018-05-01 Thread Chris Venteicher
Quoting John Ferlan (2018-05-01 08:57:08) > > > On 04/30/2018 10:55 PM, Chris Venteicher wrote: > > This is part of resolution of: > > https://bugzilla.redhat.com/show_bug.cgi?id=1511999 > > > > Signed-off-by: Chris Venteicher <cvent...@redhat.com> > &

[libvirt] [PATCHv3 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-30 Thread Chris Venteicher
Extract cpu_model parsing code from qemuMonitorJSONGetCPUModelExpansion into a separate helper for future reuse. --- src/qemu/qemu_monitor_json.c | 77 +++- 1 file changed, 47 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c

[libvirt] [PATCHv3 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-30 Thread Chris Venteicher
Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models to complete the query-cpu-model-baseline transaction. --- src/qemu/qemu_monitor.c | 13 +

[libvirt] [PATCHv3 2/3] qemu_monitor_json: Build Json CPU Model Info

2018-04-30 Thread Chris Venteicher
Function qemuMonitorJSONBuildCPUModelInfoToJSON builds and returns JSON of form {"model": {"name": "IvyBridge", "props": {}}} from qemuMonitorCPUModelInfo. Function qemuMonitorJSONBuildCPUModelInfoToJSON returns virJsonValuePtr on success and NULL on failure. --- src/qemu/qemu_monitor_json.c

[libvirt] [PATCHv3 0/3] query-cpu-model-baseline QMP command

2018-04-30 Thread Chris Venteicher
This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chris Venteicher <cvent...@redhat.com> diff to v1: - Replaced c++ style comments with c style - qemuMonitorJSONGetCPUModelInfo{ToJSON,FromJSON} use To/From form - qemuMonitorJSONGetCPUMod

Re: [libvirt] [PATCHv2 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-30 Thread Chris Venteicher
Please see responses below. New patchset with all recommended changes will be sent soon. Chris - Original Message - > From: "John Ferlan" <jfer...@redhat.com> > To: "Chris Venteicher" <cvent...@redhat.com>, libvir-list@redhat.com > Sent: Friday

[libvirt] [PATCH 1/1] includes: function parameter names same in headers

2018-02-12 Thread Chris Venteicher
Headers use same function parameter names as definition code. --- include/libvirt/libvirt-domain.h| 26 +- include/libvirt/libvirt-event.h | 4 ++-- include/libvirt/libvirt-host.h | 4 ++-- include/libvirt/libvirt-interface.h | 4 ++--

[libvirt] [PATCH 0/1] Function declarations match definitions

2018-02-12 Thread Chris Venteicher
to fix. Chris Venteicher (1): includes: function parameter names same in headers include/libvirt/libvirt-domain.h| 26 +- include/libvirt/libvirt-event.h | 4 ++-- include/libvirt/libvirt-host.h | 4 ++-- include/libvirt/libvirt-interface.h | 4 ++-- include

[libvirt] [PATCHv2 0/1] Function declarations match definitions

2018-02-12 Thread Chris Venteicher
to fix. Chris Venteicher (1): include: function parameter names same in declaration include/libvirt/libvirt-domain.h | 18 +++--- include/libvirt/libvirt-event.h| 4 ++-- include/libvirt/libvirt-host.h | 4 ++-- include/libvirt/libvirt-network.h | 4 ++-- include/libvirt

[libvirt] [PATCHv2 1/1] include: function parameter names same in declaration

2018-02-12 Thread Chris Venteicher
Headers use same function parameter names as definition code. In some cases in libvirt-domain and libvirt-network an established naming pattern in the header files was more consistent and informative in which case the implementation was modified in the c file. ---

[libvirt] [PATCHv1 05/12] qemu_monitor: CPUModelExpansion on CPUModel with both name and properties

2018-06-21 Thread Chris Venteicher
Send both model name and a set of features/properties to QEMU for expansion rather than just the model name. --- src/qemu/qemu_capabilities.c | 33 +-- src/qemu/qemu_monitor.c | 38 ++ src/qemu/qemu_monitor.h | 5 ++- src/qemu/qemu_monitor_json.c |

[libvirt] [PATCHv1 01/12] qemu_monitor_json: qemuMonitorCPUModelInfo / JSON conversion

2018-06-21 Thread Chris Venteicher
Bidirectional conversion functions between data structure and JSON. JSON of form: {"model": {"name": "IvyBridge", "props": {}}} --- src/qemu/qemu_monitor_json.c | 126 ++- 1 file changed, 96 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c

[libvirt] [PATCHv1 04/12] qemu_monitor: Indicate when CPUModelInfo props report migratablity

2018-06-21 Thread Chris Venteicher
Renamed variable in CPUModelInfo such that props_migratable_valid is true when properties in CPUModelInfo indicate if property is / isn't migratable. Property migratability is not part of QMP messages but rather is sometimes calculated within Libvirt and stored in CPUModelInfo properties. ---

[libvirt] [PATCHv1 11/12] qemu_capabilities: Introduce virQEMUCapsQMPBaselineCPUModel (baseline using QEMU)

2018-06-21 Thread Chris Venteicher
Baseline cpu model using QEMU/QMP query-cpu-model-baseline query-cpu-model-baseline only compares two CPUModels so multiple exchanges are needed to evaluate more than two CPUModels. --- src/qemu/qemu_capabilities.c | 89 src/qemu/qemu_capabilities.h | 4 ++

[libvirt] [PATCHv1 12/12] qemu_driver: BaselineHypervisorCPU supports S390 using QEMU/QMP

2018-06-21 Thread Chris Venteicher
Transient S390 configurations require using QEMU to compute CPU Model Baseline and to do CPU Feature Expansion. Start and use a single QEMU instance to do both the baseline and expansion transactions required by BaselineHypervisorCPU. --- src/qemu/qemu_driver.c | 66

[libvirt] [PATCHv1 08/12] qemu_capabilities: QMPCommandPtr without shadow qmperr

2018-06-21 Thread Chris Venteicher
Previously QMPCommandPtr (handle for issuing QMP commands) required an external char * qmperr to persist over the lifespan of QMPCommand to expose a QMP error string outside of QMPCommand. Specifically the external char *qmperr was required between calls to virQEMUCapsInitQMPCommandNew and

[libvirt] [PATCHv1 00/12] BaselineHypervisorCPU using QEMU QMP exchanges

2018-06-21 Thread Chris Venteicher
to expand all features in the model. See "s390x CPU models: exposing features" patch set on Qemu-devel for discussion of QEMU aspects. This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chris Venteicher Chris Venteicher (12): qemu_mo

[libvirt] [PATCHv1 06/12] cpu_conf: Calculate virCPUDef List Length function

2018-06-21 Thread Chris Venteicher
Function returns number of virCPUDefPtrs in list --- src/conf/cpu_conf.c | 15 +++ src/conf/cpu_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 19 insertions(+) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 43a3ab5dcd..ff978ec083 100644 ---

[libvirt] [PATCHv1 09/12] qemu_capabilities: Persist QEMU instance over multiple QMP Cmds

2018-06-21 Thread Chris Venteicher
Makes possible to start a single QEMU instance and use that one instance for multiple independent QMP commands without starting and stopping QEMU for each QMP command type. This allows functions outside qemu_capabilities (ex. qemuConnectBaselineHypervisorCPU in qemu_driver) requiring multiple

[libvirt] [PATCHv1 02/12] qemu_monitor: Introduce qemuMonitorCPUModelInfoInit and qemuMonitorCPUModelInfoFreeContents

2018-06-21 Thread Chris Venteicher
Init - Initial with model name and empty properties FreeContents - Free model name and properties without freeing pointer --- src/qemu/qemu_monitor.c | 37 - src/qemu/qemu_monitor.h | 4 2 files changed, 40 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCHv1 03/12] qemu_monitor: Introduce qemuMonitorGetCPUModelBaseline (query-cpu-model-baseline)

2018-06-21 Thread Chris Venteicher
Wrap QMP query-cpu-model-baseline command transaction with QEMU. --- src/qemu/qemu_monitor.c | 13 src/qemu/qemu_monitor.h | 5 +++ src/qemu/qemu_monitor_json.c | 65 src/qemu/qemu_monitor_json.h | 7 4 files changed, 90 insertions(+)

[libvirt] [PATCHv1 07/12] qemu_capabilities: virCPUDef / qemuMonitorCPUModelInfo conversions

2018-06-21 Thread Chris Venteicher
Bi-directional conversion functions. Converts model / name and features / properties. --- src/qemu/qemu_capabilities.c | 137 +-- src/qemu/qemu_capabilities.h | 3 + 2 files changed, 118 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCHv1 10/12] qemu_capabilities: Introduce virQEMUCapsNewQMPCommandConnection

2018-06-21 Thread Chris Venteicher
Start and connect to QEMU so QMP commands can be performed. Isolates code for starting QEMU and establishing Monitor connections from code for obtaining capabilities so that arbitrary QMP commands can be exchanged with QEMU. --- src/qemu/qemu_capabilities.c | 40

Re: [libvirt] [PATCHv2 09/11] qemu_capabilities: Persist QEMU instance over multiple QMP Cmds

2018-08-17 Thread Chris Venteicher
Quoting Jiri Denemark (2018-07-13 10:14:22) > On Mon, Jul 09, 2018 at 22:56:53 -0500, Chris Venteicher wrote: > > Commit makes starting a single persistent QEMU instance possible for use > > over multiple independent QMP commands without starting and stopping > > QEMU

Re: [libvirt] [PATCHv2 11/11] qemu_driver: BaselineHypervisorCPU supports S390 using QEMU/QMP

2018-07-20 Thread Chris Venteicher
Quoting David Hildenbrand (2018-07-18 02:26:24) > On 18.07.2018 00:39, Collin Walling wrote: > > On 07/17/2018 05:01 PM, David Hildenbrand wrote: > >> On 13.07.2018 18:00, Jiri Denemark wrote: > >>> On Mon, Jul 09, 2018 at 22:56:55 -0500, Chris Venteiche

Re: [libvirt] [PATCHv2 03/11] qemu_monitor: Indicate when CPUModelInfo props report migratablity

2018-07-20 Thread Chris Venteicher
Quoting Jiri Denemark (2018-07-12 06:59:18) > On Mon, Jul 09, 2018 at 22:56:47 -0500, Chris Venteicher wrote: > > Renamed variable in CPUModelInfo such that > > props_migratable_valid is true when properties in CPUModelInfo > > have been updated to accurately indicate i

[libvirt] [PATCHv2 01/11] qemu_monitor_json: Introduce qemuMonitorCPUModelInfo / JSON conversion

2018-07-09 Thread Chris Venteicher
Bidirectional conversion functions between Monitor data structure and QMP Message JSON. Commit creates reusable functions usable anywhere CPUModelInfo structure is input or output from QMP Commands. JSON of form: {"model": {"name": "IvyBridge", "props": {}}} --- src/qemu/qemu_monitor_json.c |

[libvirt] [PATCHv2 11/11] qemu_driver: BaselineHypervisorCPU supports S390 using QEMU/QMP

2018-07-09 Thread Chris Venteicher
Transient S390 configurations require using QEMU to compute CPU Model Baseline and to do CPU Feature Expansion. Start and use a single QEMU instance to do both the baseline and expansion transactions required by BaselineHypervisorCPU. CPU Feature Expansion uses true / false to indicate if

[libvirt] [PATCHv2 10/11] qemu_capabilities: Introduce virQEMUCapsQMPBaselineCPUModel (baseline using QEMU)

2018-07-09 Thread Chris Venteicher
Baseline cpu model using QEMU/QMP query-cpu-model-baseline query-cpu-model-baseline only compares two CPUModels so multiple exchanges are needed to evaluate more than two CPUModels. --- src/qemu/qemu_capabilities.c | 85 src/qemu/qemu_capabilities.h | 4 ++

[libvirt] [PATCHv2 03/11] qemu_monitor: Indicate when CPUModelInfo props report migratablity

2018-07-09 Thread Chris Venteicher
Renamed variable in CPUModelInfo such that props_migratable_valid is true when properties in CPUModelInfo have been updated to accurately indicate if property is / isn't migratable. Property migratability is not returned directly in QMP messages but rather is sometimes calculated within Libvirt

[libvirt] [PATCHv2 05/11] qemu_monitor: CPUModelExpansion on both model name and properties

2018-07-09 Thread Chris Venteicher
Send both model name and a set of features/properties to QEMU for expansion rather than just the model name. Required to expand name+props models of the form computed by baseline into fully expanded (all props/features listed) output. --- src/qemu/qemu_capabilities.c | 42 +-

[libvirt] [PATCHv2 08/11] qemu_capabilities: QMPCommandPtr without maintaining shadow qmperr

2018-07-09 Thread Chris Venteicher
Previously QMPCommandPtr (handle for issuing QMP commands) required an external char * qmperr to persist over the lifespan of QMPCommand to expose a QMP error string outside of QMPCommand. Before this change, an external char *qmperr had to be maintained between calls to

[libvirt] [PATCHv2 00/11] BaselineHypervisorCPU using QEMU QMP exchanges

2018-07-09 Thread Chris Venteicher
her issues identified with additional testing. Chris Venteicher (11): qemu_monitor_json: Introduce qemuMonitorCPUModelInfo / JSON conversion qemu_monitor: Introduce qemuMonitorGetCPUModelBaseline (query-cpu-model-baseline) qemu_monitor: Indicate when CPUModelInfo props report migratablity qe

[libvirt] [PATCHv2 04/11] qemu_monitor: Introduce qemuMonitorCPUModelInfoInit and qemuMonitorCPUModelInfoFreeContents

2018-07-09 Thread Chris Venteicher
These forms modify contents of a qemuMonitorCPUModelInfo structure but do not allocate or free the actual structure. Init - Initialize model name and empty properties within existing structure FreeContents - Free model name and properties within existing structure --- src/qemu/qemu_monitor.c |

[libvirt] [PATCHv2 06/11] qemu_monitor: Introduce qemuMonitorCPUModelInfoRemovePropByBoolValue

2018-07-09 Thread Chris Venteicher
Filter out cpu properties in qemuMonitorCPUModelInfo structure based on boolean value of true or false. Goal is to form a list of "enabled" or "disabled" properties. Required to convert between cpu model feature / property lists that indicate if property is or isn't include in model and the form

[libvirt] [PATCHv2 07/11] qemu_capabilities: Introduce virCPUDef / qemuMonitorCPUModelInfo conversions

2018-07-09 Thread Chris Venteicher
Bi-directional conversion functions. Converts model / name and features / properties between the two structures. Created reusable functions to bridge the internal (virCpuDef) and QEMU/QMP specific structures for describing CPU Models. --- src/qemu/qemu_capabilities.c | 146

[libvirt] [PATCHv2 02/11] qemu_monitor: Introduce qemuMonitorGetCPUModelBaseline (query-cpu-model-baseline)

2018-07-09 Thread Chris Venteicher
Wrap QMP query-cpu-model-baseline command transaction with QEMU. --- src/qemu/qemu_monitor.c | 13 src/qemu/qemu_monitor.h | 6 src/qemu/qemu_monitor_json.c | 63 src/qemu/qemu_monitor_json.h | 7 4 files changed, 89

[libvirt] [PATCHv2 09/11] qemu_capabilities: Persist QEMU instance over multiple QMP Cmds

2018-07-09 Thread Chris Venteicher
Commit makes starting a single persistent QEMU instance possible for use over multiple independent QMP commands without starting and stopping QEMU for each QMP command or command type. Commit allows functions outside qemu_capabilities (ex. qemuConnectBaselineHypervisorCPU in qemu_driver)

Re: [libvirt] [PATCHv1 05/12] qemu_monitor: CPUModelExpansion on CPUModel with both name and properties

2018-07-06 Thread Chris Venteicher
Quoting Chris Venteicher (2018-06-21 23:42:04) > Send both model name and a set of features/properties to QEMU for > expansion rather than just the model name. > --- > src/qemu/qemu_capabilities.c | 33 +-- > src/qemu/qemu_monitor.c | 38 ++-

Re: [libvirt] [PATCHv1 12/12] qemu_driver: BaselineHypervisorCPU supports S390 using QEMU/QMP

2018-07-06 Thread Chris Venteicher
Quoting Chris Venteicher (2018-06-21 23:42:11) > Transient S390 configurations require using QEMU to compute CPU Model > Baseline and to do CPU Feature Expansion. > > Start and use a single QEMU instance to do both the baseline and > expansion transactions required by Baseli

Re: [libvirt] [PATCHv1 11/12] qemu_capabilities: Introduce virQEMUCapsQMPBaselineCPUModel (baseline using QEMU)

2018-07-06 Thread Chris Venteicher
Quoting Collin Walling (2018-06-27 19:03:46) > On 06/22/2018 12:42 AM, Chris Venteicher wrote: > > Baseline cpu model using QEMU/QMP query-cpu-model-baseline > > > > query-cpu-model-baseline only compares two CPUModels so multiple > > exchanges are needed to evalu

Re: [libvirt] [PATCHv1 07/12] qemu_capabilities: virCPUDef / qemuMonitorCPUModelInfo conversions

2018-07-06 Thread Chris Venteicher
Quoting Chris Venteicher (2018-06-21 23:42:06) > Bi-directional conversion functions. > Converts model / name and features / properties. > --- > src/qemu/qemu_capabilities.c | 137 +-- > src/qemu/qemu_capabilities.h | 3 + > 2 files changed, 118

Re: [libvirt] [PATCHv2 03/11] qemu_monitor: Indicate when CPUModelInfo props report migratablity

2018-07-11 Thread Chris Venteicher
itional cleanup is in order. > On 07/09/2018 11:56 PM, Chris Venteicher wrote: > > Renamed variable in CPUModelInfo such that > > props_migratable_valid is true when properties in CPUModelInfo > > have been updated to accurately indicate if property is / isn't > >

Re: [libvirt] [PATCHv2 09/11] qemu_capabilities: Persist QEMU instance over multiple QMP Cmds

2018-07-11 Thread Chris Venteicher
e though so welcome discussion and glad to do whatever you think is best. > On 07/09/2018 11:56 PM, Chris Venteicher wrote: > > Commit makes starting a single persistent QEMU instance possible for use > > over multiple independent QMP commands without starting and stopping > >

Re: [libvirt] [PATCHv2 04/11] qemu_monitor: Introduce qemuMonitorCPUModelInfoInit and qemuMonitorCPUModelInfoFreeContents

2018-07-12 Thread Chris Venteicher
Quoting Jiri Denemark (2018-07-12 08:13:07) > On Mon, Jul 09, 2018 at 22:56:48 -0500, Chris Venteicher wrote: > > These forms modify contents of a qemuMonitorCPUModelInfo structure but > > do not allocate or free the actual structure. > > > > Init - Initialize mode

[libvirt] [PATCHv2 0/3] query-cpu-model-baseline QMP command

2018-04-18 Thread Chris Venteicher
Implementation of libvirt functions to support the QEMU query-cpu-model-baseline QMP command. This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chris Venteicher <cvent...@redhat.com> diff to v1: - Replaced c++ style comments with c

[libvirt] [PATCHv2 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-18 Thread Chris Venteicher
New function qemuMonitorJSONBuildCPUModelInfoFromJSON created by extracting code from existing function qemuMonitorJSONGetCPUModelExpansion to create a reusable function for extracting cpu model info from json. Function qemuMonitorJSONGetCPUModelInfoFromJSON returns qemuMonitorCPUModelInfoPtr

[libvirt] [PATCHv2 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-18 Thread Chris Venteicher
Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models to complete the query-cpu-model-baseline transaction. --- src/qemu/qemu_monitor.c | 13 ++

[libvirt] [PATCHv2 2/3] qemu_monitor_json: Build Json CPU Model Info

2018-04-18 Thread Chris Venteicher
Function qemuMonitorJSONBuildCPUModelInfoToJSON builds and returns JSON of form {"model": {"name": "IvyBridge", "props": {}}} from qemuMonitorCPUModelInfo. Function qemuMonitorJSONBuildCPUModelInfoToJSON returns virJsonValuePtr on success and NULL on failure. --- src/qemu/qemu_monitor_json.c

[libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command

2018-04-16 Thread Chris Venteicher
Implementation of libvirt functions to support the QEMU query-cpu-model-baseline QMP command. This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chris Venteicher <cvent...@redhat.com> Chris Venteicher (3): qemu_monitor_json: Po

[libvirt] [PATCH 2/3] qemu_monitor_json: Build Json CPU Model Info

2018-04-16 Thread Chris Venteicher
Function qemuMonitorJSONBuildCPUModelInfoJSON builds Json of form {"model": {"name": "IvyBridge", "props": {}}} from pointer to qemuMonitorCPUModelInfo. --- src/qemu/qemu_monitor_json.c | 49 1 file changed, 49 insertions(+) diff --git

[libvirt] [PATCH 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-16 Thread Chris Venteicher
New function qemuMonitorJSONBuildCPUModelInfo created by extracting code from existing function qemuMonitorJSONGetCPUModelExpansion to create a reusable function for extracting cpu model info from json. --- src/qemu/qemu_monitor_json.c | 82 ++-- 1 file

[libvirt] [PATCH 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-16 Thread Chris Venteicher
Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models to complete the query-cpu-model-baseline transaction. --- src/qemu/qemu_monitor.c | 16 +

Re: [libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command

2018-04-19 Thread Chris Venteicher
- Original Message - > From: "Collin Walling" <wall...@linux.ibm.com> > To: "Chris Venteicher" <cvent...@redhat.com>, libvir-list@redhat.com > Sent: Monday, April 16, 2018 6:26:07 PM > Subject: Re: [libvirt] [PATCH 0/3] query-cpu-model-base

[libvirt] [PATCHv2 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-18 Thread Chris Venteicher
Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models to complete the query-cpu-model-baseline transaction. --- src/qemu/qemu_monitor.c | 13 ++

[libvirt] [PATCHv2 2/3] qemu_monitor_json: Build Json CPU Model Info

2018-04-18 Thread Chris Venteicher
Function qemuMonitorJSONBuildCPUModelInfoToJSON builds and returns JSON of form {"model": {"name": "IvyBridge", "props": {}}} from qemuMonitorCPUModelInfo. Function qemuMonitorJSONBuildCPUModelInfoToJSON returns virJsonValuePtr on success and NULL on failure. --- src/qemu/qemu_monitor_json.c

[libvirt] [PATCHv2 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-18 Thread Chris Venteicher
New function qemuMonitorJSONBuildCPUModelInfoFromJSON created by extracting code from existing function qemuMonitorJSONGetCPUModelExpansion to create a reusable function for extracting cpu model info from json. Function qemuMonitorJSONGetCPUModelInfoFromJSON returns qemuMonitorCPUModelInfoPtr

[libvirt] [PATCHv2 0/3] query-cpu-model-baseline QMP command

2018-04-18 Thread Chris Venteicher
Implementation of libvirt functions to support the QEMU query-cpu-model-baseline QMP command. This is part of resolution of: https://bugzilla.redhat.com/show_bug.cgi?id=1511999 Signed-off-by: Chris Venteicher <cvent...@redhat.com> diff to v1: - Replaced c++ style comments with c

Re: [libvirt] [PATCH 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-18 Thread Chris Venteicher
On 04/16/2018 03:02 AM, Ján Tomko wrote: On Mon, Apr 16, 2018 at 01:06:58AM -0500, Chris Venteicher wrote: Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models

Re: [libvirt] [PATCH v2 3/3] news: Update news for vfio-ap support

2018-10-24 Thread Chris Venteicher
gt; > + The QEMU driver now has support to passthrough adjunct processors > > + into QEMU guests on S390. > > + > > + > > > > > > > > Reviewed-by: Thomas Huth Reviewed-by: Chris Venteicher > > -

Re: [libvirt] [PATCH v2 1/3] qemu: add vfio-ap capability

2018-10-24 Thread Chris Venteicher
Quoting Thomas Huth (2018-10-19 06:58:34) > On 2018-10-18 16:54, Boris Fiuczynski wrote: > > Introduce vfio-ap capability. > > > > Signed-off-by: Boris Fiuczynski > > Reviewed-by: Bjoern Walk > > --- > > src/qemu/qemu_capabilities.c | 2 ++ > > src/qemu/qemu_capabilities.h | 1 + > > 2 files

[libvirt] [PATCH v4 01/37] qemu_monitor: Introduce qemuMonitorCPUModelInfoNew

2018-11-02 Thread Chris Venteicher
A helper function allocates an initializes model name in 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

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

2018-11-02 Thread Chris Venteicher
S390 CPU's contains the same migratability info the X86 currently does. The testcases were updated to reflect the change. Every patch should compile independently if applied in sequence. Thanks, Chris Chris Venteicher (37): qemu_monitor: Introduce qemuMonitorCPUModelInfoNew qemu_monitor:

[libvirt] [PATCH v4 29/37] qemu_capabilities: Introduce virCPUDef to CPUModelInfo function

2018-11-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 dcd6ffb876

[libvirt] [PATCH v4 27/37] qemu_process: Stop locking QMP process monitor immediately

2018-11-02 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 08522a1580..6bd3da97ca 100644 --- a/src/qemu

[libvirt] [PATCH v4 30/37] qemu_monitor: Support query-cpu-model-baseline QMP command

2018-11-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 v4 33/37] qemu_driver: Identify using libvirt as a distinct way to compute baseline

2018-11-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 v4 18/37] qemu_process: Setup paths within qemuProcessInitQmp

2018-11-02 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 v4 26/37] qemu_process: Use unique directories for QMP processes

2018-11-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 | 26 -- src/qemu/qemu_process.h | 1

[libvirt] [PATCH v4 22/37] qemu_process: Cleanup qemuProcessStopQmp function

2018-11-02 Thread Chris Venteicher
qemuProcessStopQmp is one of the 4 public functions used to crate 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 v4 02/37] qemu_monitor: Introduce qemuMonitorCPUModelInfo / JSON conversion

2018-11-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 v4 05/37] qemu_process: Move process code from qemu_capabilities to qemu_process

2018-11-02 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

[libvirt] [PATCH v4 13/37] qemu_capabilities: Detect caps probe failure by checking monitor ptr

2018-11-02 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 v4 15/37] qemu_process: Add debug message in qemuProcessLaunchQmp

2018-11-02 Thread Chris Venteicher
Signed-off-by: Chris Venteicher --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1d96a43206..758c8bed05 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8173,6 +8173,9

[libvirt] [PATCH v4 16/37] qemu_process: Collect monitor code in single function

2018-11-02 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 v4 08/37] qemu_process: Refer to proc not cmd in process code

2018-11-02 Thread Chris Venteicher
. Patch changes the variable naming to focus on the process not the command. Signed-off-by: Chris Venteicher --- src/qemu/qemu_capabilities.c | 14 ++-- src/qemu/qemu_process.c | 140 +-- src/qemu/qemu_process.h | 6 +- 3 files changed, 80 insertions

[libvirt] [PATCH v4 10/37] qemu_capabilities: Stop QEMU process before freeing

2018-11-02 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 1d83ebdbe0..359b6fbb9b 100644 --- a/src/qemu/qemu_capabilities.c +++ b

[libvirt] [PATCH v4 09/37] qemu_process: Use consistent name for stop process function

2018-11-02 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 v4 03/37] qemu_capabilities: Introduce virQEMuCapsMigratablePropsDiff

2018-11-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 v4 12/37] qemu_process: Persist stderr in qemuProcess struct

2018-11-02 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 v4 11/37] qemu_process: Use qemuProcess struct for a single process

2018-11-02 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 v4 19/37] qemu_process: Stop retaining Qemu Monitor config in qemuProcess

2018-11-02 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 v4 21/37] qemu_process: Cleanup qemuProcess alloc function

2018-11-02 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 af6b20713a..104ed58cea 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[libvirt] [PATCH v4 14/37] qemu_process: Introduce qemuProcessStartQmp

2018-11-02 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 v4 28/37] qemu_capabilities: Introduce CPUModelInfo to virCPUDef function

2018-11-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 v4 31/37] qemu_driver: Consolidate code to baseline using libvirt

2018-11-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 v4 20/37] qemu_process: Don't open monitor if process failed

2018-11-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 | 27 +-- 1 file changed,

[libvirt] [PATCH v4 17/37] qemu_process: Store libDir in qemuProcess struct

2018-11-02 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 v4 24/37] qemu_monitor: Make monitor callbacks optional

2018-11-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

  1   2   3   >