I had intended to make these changes to commit d40b820c before
pushing, but forgot about it during the day between the initial review
and ACK.
Neither change is significant - just returning immediately when
virNetDevGetName() faills (instead of logging a debug message first)
and eliminating a comm
Hypervisor baseline cpu can be computed locally using libvirt utility
functions or remotely using QEMU QMP commands.
Likewise, cpu feature expansion can be computed locally using libvirt
utility functions or remotely using QEMU QMP commands.
This patch identifies using libvirt as a distinct case
Add capability to calculate hypervisor baseline using QMP message
exchanges with QEMU in addition to existing capability to calculate
baseline using libvirt utility functions.
A new utility function encapsulates the core logic for interacting with QEMU
using QMP baseline messages. The QMP messages
QEMU only returns migratable props when expanding model unless
explicitly told to also include non-migratable props.
Props will be marked migratable when we are certain QEMU returned only
migratable props resulting in consistent information and expansion output
for s390 that is consistent with x86
Create public function to convert virCPUDef data structure into
qemuMonitorCPUModelInfoPtr data structure.
There was no existing code to reuse to create this function
so this new virQEMUCapsCPUModelInfoFromCPUDef function was based on
reversing the action of the existing virQEMUCapsCPUModelInfoToC
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/qemu_pr
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
---
src
Move a step closer to the function structure used elsewhere in
qemu_process where qemuProcessStart and qemuProcessStop are the exposed
functions.
qemuProcessQMPStart mirrors qemuProcessStart in calling sub functions to
initialize, launch the process and connect the monitor to the QEMU
process.
st
qemuProcessQMPNew 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.
Signed-off-by: Chri
qemuProcessQMPStart 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 re
Move code for setting paths and prepping file system from
qemuProcessQMPNew to qemuProcessQMPInit.
This keeps qemuProcessQMPNew limited to data structures
and path initialization is done in qemuProcessQMPInit.
The patch is a non-functional, cut / paste change,
however goto is now "cleanup" rather
Support using QEMU to do feature expansion when also using QEMU to
compute hypervisor baseline.
A QEMU process is already created to send the QMP messages to baseline
using QEMU.
The same QEMU process is used for the CPU feature expansion.
QEMU only returns migratable features when expanding CPU
Create utility function encapsulating code to calculate
hypervisor baseline cpu using the local libvirt utility functions.
Similar function encapsulating code to calculating hypervisor baseline
using QEMU QMP messages will be introduced in later commit.
Patch is a cut and paste of existing code i
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 ++--
Create an augmented CPUModelInfo identifying which props are/aren't
migratable based on a diff between migratable and non-migratable
inputs.
This patch pulls existing logic out of virQEMUCapsProbeQMPHostCPU
and wraps the existing logic in a standalone function hopefully
simplifying both functions
In the past capabilities could be determined in other ways if QMP
messaging didn't succeed so a non-fatal error case was included in the
capabilities and QMP Process code.
For a while now, QMP capabilities failure has been a fatal case.
This patch makes QMP process failures return as a fatal erro
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 +
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
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 +++-
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 p
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 inse
qemuMonitor code lives in qemuProcessQMPConnectMonitor rather than in
qemuProcessQMPNew and qemuProcessQMPLaunch.
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. I
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 pro
Conversion functions are used convert CPUModelInfo structs into
QMP JSON and the reverse.
QMP JSON is of form:
{"model": {"name": "IvyBridge", "props": {}}}
qemuMonitorCPUModelInfoBoolPropAdd is used to add boolean properties to
CPUModelInfo struct.
qemuMonitorJSONGetCPUModelExpansion makes full
Expose the process exit status code so the status code can be used to
determine if stderr (qmperr) should be logged.
In the case of virQEMUCapsInitQmp,
we only log stderr (qmperr) if the -first- query process fails with a
non zero status code.
Logging functions are pulled inside virQEMUCapsInitQm
Simple cut/paste operations within function
qemuConnectBaselineHypervisorCPU to group together code specific to
computing baseline using only libvirt utility functions.
This is done in anticipation of creating new utility functions for
1) baseline using libvirt utilities (this code)
2) baseline us
s/qemuProcessQMPAbort/qemuProcessQMPStop/ applied to change function name
used to stop QEMU processes in process code moved from qemu_capabilities.
No functionality change.
The new name, qemuProcessQMPStop, is consistent with the existing
function qemuProcessStop used to stop Domain processes.
S
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/qem
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 exchanges with QEMU in addition to a
query-cpu-model-expansion QMP exchange to ex
In new process code, move from model where qemuProcessQMP struct can be
used to activate a series of Qemu processes to model where one
qemuProcessQMP struct is used for one and only one Qemu process.
By allowing only one process activation per qemuProcessQMP struct, the
struct can safely store pro
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.
The moved code activates and manages Qemu processes without
establishing a guest domain.
** This patch is a straight cut/paste move between files. **
T
A qemuProcessQMP 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 qemuProcessQMPFree is called.
The qmperr variable is renamed stderr (captures stderr from process.)
The
virQEMUCapsInitQMP now stops QEMU process in all execution paths,
before freeing the process structure.
The qemuProcessQMPStop function can be called multiple times without
problems... Won't attempt to stop processes and free resources multiple
times.
Follow the convention established in qemu_pro
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 ch
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 | 2
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.
> >
> > The QMP exchange to exit capabil
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.
> >
> > qemuProcessQmpStart mi
On 1/11/19 2:11 AM, Erik Skultety wrote:
On Thu, Jan 10, 2019 at 11:48:42AM -0500, Laine Stump wrote:
On 1/10/19 10:44 AM, Erik Skultety wrote:
On Wed, Jan 09, 2019 at 12:43:15PM -0500, Laine Stump wrote:
When checking the setting of accept_ra, we have assumed that all
routes have a single nex
38 matches
Mail list logo