Function virTypedParamsAddULLong use realloc to gain memory,
and doesn't free it when failed. so we need free eventParams to
prevent a memory leak.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_cgroup.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_cgroup.c
In function remoteDeserializeDomainDiskErrors, there is a typo.
Signed-off-by: Xu Yandong
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 8789c5da00..877250d40c 100644
---
We found a exception when libvirt occurrs segmentation fault.
thread 1 is waiting object lock in qemuConnectMonitor,
qemu process exits and sends EOF event as well, so thread 2 invokes
qemuMonitorLastError but pointer mon is NULL.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_monitor.c | 2 +-
1
On Thu, Sep 19, 2019 at 12:05:23AM +0200, Fabiano Fidêncio wrote:
> On Wed, Sep 18, 2019 at 9:57 PM Ján Tomko wrote:
> >
> > On Wed, Sep 18, 2019 at 05:40:06PM +0200, Fabiano Fidêncio wrote:
> > >On Wed, Sep 18, 2019 at 1:22 AM Fabiano Fidêncio
> > >wrote:
> > >>
> > >> On Tue, Sep 17, 2019 at
On Thu, Sep 19, 2019 at 10:20:04AM +0200, Pavel Hrdina wrote:
> On Thu, Sep 19, 2019 at 12:05:23AM +0200, Fabiano Fidêncio wrote:
> > On Wed, Sep 18, 2019 at 9:57 PM Ján Tomko wrote:
> > >
> > > On Wed, Sep 18, 2019 at 05:40:06PM +0200, Fabiano Fidêncio wrote:
> > > >On Wed, Sep 18, 2019 at 1:22
step1: hotplug vcpus
step2: pin vcpus
step3: unhotplug vcpus
As a result, vcpu pin info still show up in xml.
So we need clear it.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_hotplug.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
The macro VIR_DELETE_ELEMENT assume that the items being deleted have
already been cleared, so we must explicitly delete domain memory to
prevent a memory leak.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_conf.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
function virTypedParamsAddString may return -1 but alloc params,
so invoker should free it.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_driver.c | 12
1 file changed, 12 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1e041a8bac..62ce7270ca 100644
In function virNodeDevPCICapSRIOVVirtualParseXML, temp variable
addr could leak if VIR_APPEND_ELEMENT fails .
Signed-off-by: Xu Yandong
---
src/conf/node_device_conf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/conf/node_device_conf.c
Check the disk scsi address only when the disk is scsi type.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 62ce7270ca..ff2173da5e 100644
---
Reference state is not necessary when virEventAddTimeout failed,
this may cause a memory leak, so reference state only when
virEventAddTimeout success.
Signed-off-by: Xu Yandong
---
src/conf/object_event.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff
In function virDomainDeviceDefParse, we shoud use virDomainDeviceDefFree
free data structure avoid potential memory leak.
Signed-off-by: Xu Yandong
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
On Wed, Sep 18, 2019 at 06:19:54PM +0200, Fabiano Fidêncio wrote:
> It's been agreed that the projects using libvirt-jenkins-ci would have
> the `syntax-check` running as part of their test suite. Therefore,
> there's no reason for keeping a job which is not going to be used.
>
> Signed-off-by:
On Thu, Sep 19, 2019 at 04:01:54 -0400, Xu Yandong wrote:
> step1: hotplug vcpus
> step2: pin vcpus
> step3: unhotplug vcpus
> As a result, vcpu pin info still show up in xml.
> So we need clear it.
>
> Signed-off-by: Xu Yandong
> ---
The idea is that you can pre-configure the vcpu pinning info
On Thu, 2019-09-19 at 09:36 +0100, Daniel P. Berrangé wrote:
> On Thu, Sep 19, 2019 at 10:20:04AM +0200, Pavel Hrdina wrote:
> > Another argument from my side was that we require syntax-check and check
> > to be executed before posting patches to mailing list, having it under
> > single target
The gnulib 'func' modules provides portability to compilers which lack
the '__func__' symbol. We only care about GCC and CLang compilers so do
not need this compatibility code.
Signed-off-by: Daniel P. Berrangé
---
bootstrap.conf | 1 -
1 file changed, 1 deletion(-)
diff --git a/bootstrap.conf
We removed use of the secure_getenv recently in
commit 2b0d597670fb5504b7ad1411c31b8af1d3016c1b
Author: Daniel P. Berrangé
Date: Thu Aug 1 13:35:56 2019 +0100
util: get rid of virGetEnv{Allow,Block}SUID functions
Signed-off-by: Daniel P. Berrangé
---
bootstrap.conf | 1 -
1 file
On Wed, 2019-09-18 at 17:46 +0100, Daniel P. Berrangé wrote:
> On Wed, Sep 18, 2019 at 02:55:53PM +0200, Andrea Bolognani wrote:
> > So, to be clear, you're advocating for keeping our list of target
> > platforms unchanged and exempt Meson specifically from the implicit
> > requirement we've had
On 9/19/19 10:02 AM, Xu Yandong wrote:
Function virTypedParamsAddULLong use realloc to gain memory,
and doesn't free it when failed. so we need free eventParams to
prevent a memory leak.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_cgroup.c | 5 -
1 file changed, 4 insertions(+), 1
On Thu, Sep 19, 2019 at 04:00:56AM -0400, Xu Yandong wrote:
In function remoteDeserializeDomainDiskErrors, there is a typo.
Signed-off-by: Xu Yandong
---
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Ján Tomko
and pushed
Jano
signature.asc
On Thu, Sep 19, 2019 at 12:09:23PM +0200, Ján Tomko wrote:
> On Thu, Sep 19, 2019 at 09:36:35AM +0100, Daniel P. Berrangé wrote:
> > On Thu, Sep 19, 2019 at 10:20:04AM +0200, Pavel Hrdina wrote:
> > > On Thu, Sep 19, 2019 at 12:05:23AM +0200, Fabiano Fidêncio wrote:
> > > > On Wed, Sep 18, 2019 at
On Thu, 2019-09-19 at 14:21 +0100, Daniel P. Berrangé wrote:
> On Thu, Sep 19, 2019 at 02:45:53PM +0200, Andrea Bolognani wrote:
> > On Thu, 2019-09-19 at 09:36 +0100, Daniel P. Berrangé wrote:
> > Jumping in a bit late, but why do we care about this distinction in
> > CI at all? In our existing
On 9/19/19 5:00 AM, Xu Yandong wrote:
function virTypedParamsAddString may return -1 but alloc params,
so invoker should free it.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_driver.c | 12
1 file changed, 12 insertions(+)
diff --git a/src/qemu/qemu_driver.c
On 9/19/19 5:01 AM, Xu Yandong wrote:
We found a exception when libvirt occurrs segmentation fault.
thread 1 is waiting object lock in qemuConnectMonitor,
qemu process exits and sends EOF event as well, so thread 2 invokes
qemuMonitorLastError but pointer mon is NULL.
Signed-off-by: Xu
Hi,
Fixing memory soundness bugs in Stream::recv, and other bugs in both
Stream::recv and Stream::send.
The method Stream::recv takes a size argument that it passes on as the nbytes
argument to virStreamRecv. The problem is that the corresponding data pointer
points to a local stack allocated
* Handle the -2 error case
* Allow sending arbitrary byte array, not just UTF-8 strings
* Fix FFI declaration, takes size_t, not c_uint
* Return usize to be more idiomatic (type used for slice indexing)
Signed-off-by: Linus Färnstrand
---
src/stream.rs | 21 ++---
1 file
On 9/19/19 5:00 AM, Xu Yandong wrote:
In function remoteDeserializeDomainDiskErrors, there is a typo.
Signed-off-by: Xu Yandong
---
Reviewed-by: Daniel Henrique Barboza
src/remote/remote_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
On 9/19/19 5:02 AM, Xu Yandong wrote:
Reference state is not necessary when virEventAddTimeout failed,
this may cause a memory leak, so reference state only when
virEventAddTimeout success.
Signed-off-by: Xu Yandong
---
Reviewed-by: Daniel Henrique Barboza
src/conf/object_event.c |
On Thu, Sep 19, 2019 at 02:45:53PM +0200, Andrea Bolognani wrote:
> On Thu, 2019-09-19 at 09:36 +0100, Daniel P. Berrangé wrote:
> > On Thu, Sep 19, 2019 at 10:20:04AM +0200, Pavel Hrdina wrote:
> > > Another argument from my side was that we require syntax-check and check
> > > to be executed
On 9/19/19 5:01 AM, Xu Yandong wrote:
In function virDomainDeviceDefParse, we shoud use virDomainDeviceDefFree
free data structure avoid potential memory leak.
Signed-off-by: Xu Yandong
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On Thu, Sep 19, 2019 at 04:01:31AM -0400, Xu Yandong wrote:
In function virNodeDevPCICapSRIOVVirtualParseXML, temp variable
addr could leak if VIR_APPEND_ELEMENT fails .
Signed-off-by: Xu Yandong
---
src/conf/node_device_conf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
A nicer
On Thu, Sep 19, 2019 at 09:36:35AM +0100, Daniel P. Berrangé wrote:
On Thu, Sep 19, 2019 at 10:20:04AM +0200, Pavel Hrdina wrote:
On Thu, Sep 19, 2019 at 12:05:23AM +0200, Fabiano Fidêncio wrote:
> On Wed, Sep 18, 2019 at 9:57 PM Ján Tomko wrote:
> >
> > On Wed, Sep 18, 2019 at 05:40:06PM
* pass same size to virStreamRecv as the buffer has allocated
* Handle -2 error case
* Fix FFI declaration to take size_t instead of c_uint
* Allow user to pass in buffer. To allow user to decide where to
allocate it. And to be able to re-use the same buffer
* Don't try to treat binary data as a
On 9/19/19 5:01 AM, Xu Yandong wrote:
In function virDomainDeviceDefParse, we shoud use virDomainDeviceDefFree
free data structure avoid potential memory leak.
Signed-off-by: Xu Yandong
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On 9/19/19 5:01 AM, Xu Yandong wrote:
In function virNodeDevPCICapSRIOVVirtualParseXML, temp variable
addr could leak if VIR_APPEND_ELEMENT fails .
Signed-off-by: Xu Yandong
---
Reviewed-by: Daniel Henrique Barboza
src/conf/node_device_conf.c | 4 +++-
1 file changed, 3
Call to qemuMonitorJSONHumanCommand directly from
qemuMonitorArbitraryCommand.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 5 -
src/qemu/qemu_monitor_json.c | 19 +++
src/qemu/qemu_monitor_json.h | 3 +--
3 files changed, 12 insertions(+), 15
Historically HMP commands needed to be escaped to work properly.
The backdoor for calling HMP commands via QMP must unescape them so that
arguments aren't messed up.
Since we now only support the QMP passthrough the escape->unescape dance
is pointless.
Signed-off-by: Peter Krempa
---
Use the function directly rather than having a wrapper.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 11 ---
src/qemu/qemu_monitor.h | 3 ---
src/qemu/qemu_monitor_text.c | 11 ++-
3 files changed, 6 insertions(+), 19 deletions(-)
diff --git
We don't need to escape the commands any more since we use QMP
passthrough, which means we can delete the functions.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 93
src/qemu/qemu_monitor.h | 3 --
tests/qemumonitortestutils.c | 6
It was necessary for fallback functions but last one was deleted in
d828b744acae967c79513631425c685faf356be0.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index
On Thu, Sep 19, 2019 at 18:10:15 +0200, Peter Krempa wrote:
> There was quite a bit of legacy HMP cruft. We can remove it as we use
> HMP commands via QMP.
>
> Peter Krempa (8):
> qemu: monitor: Remove legacy monitor commands for FD manipulation
> qemu: monitor: Remove qemuMonitorHMPCommand
Some of the typed parameter APIs are exported publically, but the
implementation was intermixed with private functions. Introduce
virtypedparam-public.c, move all public API functions there and purge
the comments stating that some functions are public.
This will decrease the likelyhood of messing
Use VIR_AUTOPTR and get rid of the cleanup label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 8d0ef62c8b..9be122a465 100644
---
The internal helpers are not considered any more so we don't have to
ignore them either.
Signed-off-by: Peter Krempa
---
docs/apibuild.py | 5 -
1 file changed, 5 deletions(-)
diff --git a/docs/apibuild.py b/docs/apibuild.py
index 92886e1276..b59050f5ce 100755
--- a/docs/apibuild.py
+++
The function is only used as a helper in virTypedParamsAddFromString.
Make it static and move it to virtypedparam-public.c.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms| 1 -
src/util/virtypedparam-public.c | 95 +
src/util/virtypedparam.c
While investigating whether block bulk stats work properly with blockdev
I got irritated by macros hiding gotos.
Refactor the stats tracking by introducing few new typed parameter
handlers.
Peter Krempa (22):
util: typedparam: Split out public APIs into a separate file
util: typedparam:
The function is not exported in the public API thus the error
dispatching is not required.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index 7abf0257ce..acf8c39602 100644
---
Ping
On 9/11/19 6:05 PM, Daniel Henrique Barboza wrote:
This is a redesign of the previous patch series [1].
After the reviews of the first version, I ended up discarding
the idea of a qemu user configuration for the unplug timeout
value. Instead, this patch series now handles the problematic
https://bugzilla.redhat.com/show_bug.cgi?id=1753670
Signed-off-by: Fabiano Fidêncio
---
libvirt-gconfig/libvirt-gconfig-domain-video.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.h
None of the fields actually return negative values. The internal
implementation of BlockAcctStats struct in qemu uses uint64_t and the
last place using -1 in libvirt was in the HMP monitor code which was
deleted.
Change the internal type to unsigned long long and ensure that all
public
The bulk stats functions are specific as they pass around the list into
many sub-functions and also a substantial amount of the entries uses
formatted names for indexing purposes. This makes them ideal to be
converted to the new virTypedParamList helpers.
Unfortunately given how the functions are
Use QEMU_ADD_BLOCK_PARAM_ULL instead since all parameters are now
unsigned.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 32
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index
Signed-off-by: Peter Krempa
---
src/util/virtypedparam-public.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/util/virtypedparam-public.c b/src/util/virtypedparam-public.c
index fb7f178c6c..eaa9f433e7 100644
---
Introduce a new set of helpers including a new data structure which
simplifies keeping and construction of lists of typed parameters.
The use of VIR_RESIZE_N in the virTypedParamsAdd API has performance
benefits but requires passing around 3 arguments. Use of them lead to a
set of macros with
Use VIR_AUTOFREE and get rid of the cleanup label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 25 ++---
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index
The code will be reused in other function.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 55
1 file changed, 33 insertions(+), 22 deletions(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index d9f8203796..9f86166707
Some code paths pass in already pointers to strings which should be
added directly as the value of the typed parameter. To allow more
universal use of virTypedParameterAssignValue add a flag which allows to
copy the value in place.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 13
We no longer use HMP for this API.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 4
1 file changed, 4 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1e041a8bac..9315b78c48 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@
The open-coded version does not take much more space and additionally we
get rid of the hidden goto.
This also requires us to remove the 'cleanup' section.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 30 --
1 file changed, 16 insertions(+), 14
Use VIR_AUTOFREE and get rid of the cleanup label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e4404f0199..ccf9290838 100644
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ab41e51700..2814d6825a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2814d6825a..98ada96fe7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11411,7 +11411,7 @@
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 703f07a388..2163d14cea 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 20 ++--
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f0f08dcbfc..319f2d9476 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 42 +-
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b703436744..703f07a388 100644
--- a/src/qemu/qemu_driver.c
+++
The macro now became unused so it was deleted.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 39 +++
1 file changed, 15 insertions(+), 24 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2163d14cea..f0f08dcbfc 100644
On 9/19/19 10:02 AM, Xu Yandong wrote:
Check the disk scsi address only when the disk is scsi type.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index
On 9/19/19 10:02 AM, Xu Yandong wrote:
The macro VIR_DELETE_ELEMENT assume that the items being deleted have
already been cleared, so we must explicitly delete domain memory to
prevent a memory leak.
Signed-off-by: Xu Yandong
---
src/qemu/qemu_conf.c | 6 --
1 file changed, 4
On 9/19/19 10:02 AM, Xu Yandong wrote:
Reference state is not necessary when virEventAddTimeout failed,
this may cause a memory leak, so reference state only when
virEventAddTimeout success.
Signed-off-by: Xu Yandong
---
src/conf/object_event.c | 25 +
1 file
On 9/19/19 3:38 PM, Daniel P. Berrangé wrote:
The gnulib 'func' modules provides portability to compilers which lack
the '__func__' symbol. We only care about GCC and CLang compilers so do
not need this compatibility code.
Signed-off-by: Daniel P. Berrangé
---
bootstrap.conf | 1 -
1 file
On 9/19/19 3:37 PM, Daniel P. Berrangé wrote:
We removed use of the secure_getenv recently in
commit 2b0d597670fb5504b7ad1411c31b8af1d3016c1b
Author: Daniel P. Berrangé
Date: Thu Aug 1 13:35:56 2019 +0100
util: get rid of virGetEnv{Allow,Block}SUID functions
Signed-off-by:
On Thu, Sep 19, 2019 at 10:33:53 -0300, Daniel Henrique Barboza wrote:
>
>
> On 9/19/19 5:01 AM, Xu Yandong wrote:
> > In function virDomainDeviceDefParse, we shoud use virDomainDeviceDefFree
> > free data structure avoid potential memory leak.
> >
> > Signed-off-by: Xu Yandong
> > ---
> >
qemuMonitorHMPCommandWithFd is only called via qemuMonitorHMPCommand
macro, so we can remove the macro and the extra unused cruft from the
function.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 9 -
src/qemu/qemu_monitor.h | 9 +++--
2 files changed, 7 insertions(+), 11
There was quite a bit of legacy HMP cruft. We can remove it as we use
HMP commands via QMP.
Peter Krempa (8):
qemu: monitor: Remove legacy monitor commands for FD manipulation
qemu: monitor: Remove qemuMonitorHMPCommand macro
qemu: monitor: Remove support for HMP commands with fds
qemu:
The handlers for 'add-fd' and 'remove-fd' are unused now and riddled
with legacy cruft. Purge them.
Last use was removed in f2019083de3430101b94d4991a38fd947a08fd32.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 53 -
src/qemu/qemu_monitor.h | 4
The remaining HMP commands don't require fd passing so we can purge
filedescriptor passing support from qemuMonitorJSONHumanCommandWitFd and
rename it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 2 +-
src/qemu/qemu_monitor_json.c | 11 +--
This command is hooked into the virsh hypervisor-cpu-baseline command.
The CPU models provided in the XML sent to the command will be baselined
via the query-cpu-model-baseline QMP command. The resulting CPU model
will be reported.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique
query-cpu-model-baseline/comparison will accept a list of features
as part of the command. Since CPUs may be defined with CPU feature
policies, let's parse it to the appropriate boolean that the QMP
command expects.
A feature that is set to required, force, or if it is a hypervisor
CPU feature
This command is hooked into the virsh hypervisor-cpu-compare command.
As such, the CPU model XML provided to the command will be compared
to the hypervisor CPU contained in the QEMU capabilities file for the
appropriate QEMU binary (for s390x, this CPU definition can be observed
via virsh
Interfaces with QEMU to baseline CPU models. The command takes two
CPU models, A and B, that are given a model name and an optional list
of CPU features. Through the query-cpu-model-baseline command issued
via QMP, a result is produced that contains a new baselined CPU model
that is guaranteed to
Implement an XML to virCPUDefPtr helper that handles the ctxt
prerequisite for virCPUDefParseXML.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/conf/cpu_conf.c | 29 +
Modify the error messages in qemuMonitorJSONParseCPUModelData to print
the command name provided to the function.
Signed-off-by: Collin Walling
---
src/qemu/qemu_monitor_json.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c
Perform a full CPU model expansion on the result of the baselined
model name when the features flag is present.
Signed-off-by: Collin Walling
---
src/qemu/qemu_driver.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c
When expanding a CPU model via query-cpu-model-expansion, any features
that were a part of the original model are discarded. For exmaple,
when expanding modelA with features f1, f2, a full expansion may reveal
feature f3, but the expanded model will not include f1 or f2.
Let's pass a virCPUDefPtr
Note: since I've made some changes to a lot of these patches / split
up some patches, I've decided to hold off on adding any r-b's in case
there is a specific change that someone does not agree with.
Changelog:
- Properly refactored code from CPU model expansion function
- Introduced a
Providing an erroneous CPU definition in the XML file provided to the
hypervisor-cpu-compare/baseline command will result in a verbose
internal error. Let's add some sanity checking before executing the QMP
commands to provide a cleaner message if something is wrong with the
CPU model or features.
This capability enables baselining of CPU models via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jiri Denemark
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be later
used for the comparison and baseline functions.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor_json.c | 143 ---
With refactoring most of the expansion function, let's take care of
some additional cleanups.
Signed-off-by: Collin Walling
---
src/qemu/qemu_monitor_json.c | 37 ++---
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c
Some older s390 CPU models (e.g. z900) will not report props as a
response from query-cpu-model-expansion. As such, we should make the
props field optional when parsing the return data from the QMP response.
Signed-off-by: Collin Walling
---
src/qemu/qemu_capabilities.c | 10 --
Interfaces with QEMU to compare CPU models. The command takes two CPU
models, A and B, that are given a model name and an optional list of
CPU features. Through the query-cpu-model-comparison command issued
via QMP, a result is produced that contains the comparison evaluation
string (identical,
This capability enables comparison of CPU models via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
Reviewed-by: Boris Fiuczynski
Reviewed-by: Jiri Denemark
---
src/qemu/qemu_capabilities.c | 4
src/qemu/qemu_capabilities.h
A common operation in qemu_domain_address is comparing a
virPCIDeviceAddress and assigning domain, bus, slot and function
to a specific value. The former can be done with the existing
virPCIDeviceAddressEqual() helper.
A new virpci helper called virPCIDeviceSetAddress() was created to
make it
On 9/13/19 8:50 AM, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau
>
> Hi,
>
> This series adds support for running virtio GPUs in seperate
> processes, thanks to vhost-user backend.
>
Some quick notes. I attempted to run this with fedora 31 qemu. The qemu
provided
First patch is the standard "use VIR_AUTOFREE() in strings"
type of patch. Second one is something I tried it out
and ended up cleaning some repetitive code, so I believe
it's worth seeing what you think.
Daniel Henrique Barboza (2):
qemu_domain_address.c: use VIR_AUTOFREE() in strings
A few 'cleanup' labels gone after using VIR_AUTOFREE() in the
strings.
Signed-off-by: Daniel Henrique Barboza
---
src/qemu/qemu_domain_address.c | 69 +++---
1 file changed, 30 insertions(+), 39 deletions(-)
diff --git a/src/qemu/qemu_domain_address.c
96 matches
Mail list logo