Dear list,
Google announced another round of GSoC [1]. The organization
applications can be filled mid January next year (~1.5 month to go).
Please update our Ideas page [2] if you have any idea for student
projects (you do not have to mentor it if you don't feel like it).
Similarly, if you
From: ZhiPeng Lu
Signed-off-by: ZhiPeng Lu
---
v1->v2:
1. Fix "make syntax-check" failure
v2->v3:
1. remove other_config when updating vlan
docs/formatnetwork.html.in | 17 +
docs/schemas/networkcommon.rng | 1 +
src/conf/netdev_vlan_conf.c | 2 +-
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. **
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 |
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
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
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.
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
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.)
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
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"
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
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.
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
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
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
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.
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
---
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
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
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
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 qemuProcessQmpConnectMonitor code
consistent with the
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:
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
---
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 ++--
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
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
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
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 ++--
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
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
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
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
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
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
Hypervisor baseline has an expansion mode where the cpu property /
feature list is fully expanded to list all supported (true) features.
The output (expanded) cpu model should not list properties that are
false (unsupported.)
QEMU expansion output enumerates both true (supported) and false
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
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
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
39 matches
Mail list logo