The disk is not necessary to test the mdevs.
Signed-off-by: Peter Krempa
---
tests/qemuxml2argvdata/hostdev-mdev-display-missing-graphics.xml| 6 --
.../hostdev-mdev-display-spice-egl-headless.x86_64-latest.args | 2 --
tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.
SD cards are currently passed by using -drive only which would not be
compatible with using -blockdev fully.
Clear QEMU_CAPS_BLOCKDEV if the VM has such devices.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_pr
Move the preparation steps from qemuDomainAttachDiskGeneric up into
qemuDomainAttachDeviceDiskLive so that also media changing can use the
prepared file.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/qe
Node names for block objects in qemu need to be unique for an instance
of the qemu process. Add a counter to generate objects sequentially and
store it in the status XML so that we can restore it.
The helpers added allow to create new node names and reset the counter
after the VM process terminate
Use the index stored in virStorageSource struct rather than
recalculating it. Currently we'd report proper numbers but that will
change with blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/qemu
Allow storing of private data in the status XML for disks.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 60 ++
src/conf/domain_conf.h | 7 ++
2 files changed, 67 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_
Allow referring to individual node name to rezise.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_monitor.c | 12 ++--
src/qemu/qemu_monitor.h | 3 ++-
src/qemu/qemu_monitor_json.c | 4 +++-
src/qemu/qemu_monitor_json.h | 3 ++-
tests/qem
The capability currently is not enabled so that we can add individual
bits first.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
ind
Similarly to backing store indexes which will become stable eventually
we need also to be able to format and store in the status XML for later
use the index for the top level of the backing chain.
Add XML formatter, parser, schema and docs.
Signed-off-by: Peter Krempa
---
docs/formatdomain.html
Format the backing chain onto the commandline using the 'json' syntax
with -blockdev.
The command line formatter needs only minor tweaks to add the new
entries but we now need to initialize the strucutres that are used for
every layer of the backing chain.
Signed-off-by: Peter Krempa
---
src/qe
It should be impossible to lack an alias in the domain definition. Other
disk types don't generate it so remove it here as well.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index
When using -blockdev you need to use the qdev path to refer to the disk
fronends. Add means for storing the path and getting it after restart.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c| 27 +++
src/qemu/qemu_domain.h|
The copy-on-read feature is expressed by adding a new node layer in
qemu when using -blockdev. Since we will keep these per-disk (as opposed
to per storage source) we need to store the appropriate node names in
the disk definition.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c
Add a helper which will use a collection of other helpers to determine
whether a disk requires throttling to be enabled.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 10 ++
src/qemu/qemu_command.h | 3 +++
2 files changed, 13 insertions(+)
diff --git a/src/qemu/qemu_comman
We need to load the backing chain from the XML when using -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 38e88404aa..d9acb4bd68 100644
--- a/sr
Pass in the node name as the backend alias when -blockdev is used. As
copy-on-read is expressed by a separate -blockdev backing chain member
we need to decide which node name to use here.
For empty cdroms when using -blockdev there is no backend at all so NULL
is returned.
Signed-off-by: Peter Kr
With -blockdev the drive alias can't be used any more so we need to
switch to the QOM name.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 30 --
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
If a user configures the backing chain in the XML we should not ignore
it. We already do parse it but don't format it out. As a
safety-precaution don't attempt to format detected chain into the
inactive XML.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 8
When we stop using -drive qemu stops reporting it in some of the monitor
commands. To allow referring the disk frontends and the corresponding
block backends we need to know these names. Unfortunately different
buses require different names.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_alias.c
The proper way to do this would be to use the 'throttle' driver but
unfortunately it can't change the 'throttle_group' so we can't provide
feature parity. This hack uses the block_set_io_throttle command to do
so until we can properly replace it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_pro
We'll specify them ourselves so it's pointless to attempt to redetect
them.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d9acb4bd68..ff4d992ff1 100644
--- a/sr
Prepare the full backing chain by instantiating authentication and TLS
transport secrets and other necessary objects so that we can add the
full backing chain explicitly to qemu. This also includes allocation of
nodenames for the individual backing chain members.
Signed-off-by: Peter Krempa
---
For use with -blockdev we need to be able to retrieve the stats by
'qdev' for the frontend device stats since 'device' will be empty. Note
that for non-blockdev case qdev and 'device' with 'drive-' skipped would
be the same.
Additionally so that we can report the highest written offset we need to
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 479bf3adfe..e8e8bdbb14 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20194,20
Allow reuse of qemuDomainGetStatsOneBlock to work with nodenames by
removing the code that looks up the stats data to the caller.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 24 +++-
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_dri
The copy on read functionality is done using a separate layer in the
backing chain. Add function to generate properties for it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_block.c | 22 ++
src/qemu/qemu_block.h | 2 ++
2 files changed, 24 insertions(+)
diff --git a/src/qe
With blockdev we can use the full range of commands to manipulate the
tray and the medium separately. Implement monitor code for this.
Schema testing done in the qemumonitorjsontest allows us to verify that
we generate the commands correctly.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monito
Use the nodename to resize the device rather than the drive alias.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fb09278112..f745a0392a 100644
--
To allow referring to the drives via the QOM id we need to setup the
floppy drives with a proper ID. This means that -device should be used
for them.
There are the following quirks:
- FDC needs to be instantiated prior to any floppy device
- floppy drive specified via -device does not support 'boo
When reporting stats for the backing chain some of them make sense only
for the topmost entry as they are actually tied to the frontend device.
We unfortunately can't change that fact, but we can stop reporting all
zero stats for the backing chain members where they don't make any
sense.
Signed-of
Use the 'node-name' provided in the event if 'device' is empty to look
up the disk.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 3 ++-
src/qemu/qemu_monitor.h | 2 ++
src/qemu/qemu_monitor_json.c | 5 -
src/qemu/qemu_process.c | 12 +++-
4 files change
Allow looking up also via QOM id and rename the function accordingly.
Also add documentation of the specifics.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 42 +++---
src/qemu/qemu_process.h | 5 +++--
3 files cha
Initialize data for the whole backing chain when plugging in or removing
disks when a machine supports -blockdev.
Similarly to startup we need to prepare the structures for the whole
backing chain and take care of the copy-on-read feature.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c
With -blockdev qemu will not report any useful "device" for the data
returned by 'query-block'. We need to start using the 'qdev' field to do
so in cases when "device" is empty or it does not match the entry name.
This patch adds data for the 'qdev' field into the returned data
structure.
Signed-
Disk image size data are not contained in the reply of query-blockstats
but need to be gathered from query-block. For use with -blockdev we
really need to call 'query-named-block-nodes' and process it to retrieve
the correct data.
This patch introduces qemuMonitorBlockStatsUpdateCapacityBlockdev w
The string is not modified so it does not make sense to have a copy.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5dee701dc4..f36d4dc37f 100644
--- a/s
Use the 'qdev' instead of the disk alias to lookup the stats and
transfer the capacity from the appropriate node name so that the
function works with -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 48 +---
1 file changed, 37 insert
Split out the code which converts the stats gathered in
qemuDomainGetStatsBlock into typed parameters so that it will look
less ugly when extending it.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 73 +-
1 file changed, 49 insertions(+)
'query-blockstats' did not report the 'qdev' field prior to fixing it so
that it works with our setup. Use that as a witness to enable -blockdev
Note that the blockjobs were NOT adapted yet so any blockjob will desync
the state of qemu. This patch needs to wait until blockjobs are fixed.
---
src/
In cases when -blockdev is used we need to use 'query-named-block-nodes'
instead of 'query-block'. This means that we can extract the
write-threshold variable right away.
To keep compatibility with old VMs modify the code which was extracting
the value previously so that it updates the stats struc
Data relevant for the storage of a backing chain member will need to be
reported separately when switching to blockdev. Prepare a function that
extracts the appropriate data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 28 +++-
1 file changed, 27 insertions(+
Use the new APIs which allow to manipulate the tray and media separately
and also allow using a nodename to refer to a media to implement media
changing.
With the new approach we don't have to call eject twice as the media is
removed by calling qemuMonitorBlockdevMediumRemove.
Signed-off-by: Pete
While we report the read and written byte stats for every single layer
of the backing chain, qemu in fact reports them only for the frontend.
Split out the relevant stats into a separate function so that we can
later fix this bug and stop reporting it for backing chain entries where
they don't mak
Rather than totalling every entry from 'query-block' for stats provided
by qemuDomainBlocksStatsGather total only stats for known disks. This
will allow to return data for nodenames and qdevs in the same hash so
that we can use them with -blockdev.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_d
Split out the header so that the loop can be refactored later.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 38 --
1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ac9c7faf2e..6ea
Switch to using the QOM/qdev handles in all calls to
qemuMonitorGetBlockInfo when using -blockdev. The callers also need to
make sure to use the correct handle afterwards to extract the data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 9 -
src/qemu/qemu_process.c | 7 +
Add code paths which call into the new functions to gather the data on a
per-node-name basis and tweak the aliases used for extracting the data.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 54 +++---
1 file changed, 38 insertions(+), 16 de
Add handling of the 'id' field in the event which corresponds to the
QDEV id of the device.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 3 ++-
src/qemu/qemu_monitor.h | 2 ++
src/qemu/qemu_monitor_json.c | 11 ---
src/qemu/qemu_process.c | 3 ++-
4 files c
On Mon, 13 Aug 2018 at 18:10, Erik Skultety wrote:
>
> On Thu, Aug 09, 2018 at 09:42:12AM +0530, Sukrit Bhatnagar wrote:
> > By making use of GNU C's cleanup attribute handled by the
> > VIR_AUTOPTR macro for declaring aggregate pointer variables,
> > majority of the calls to *Free functions can b
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> virt-manager's UI connection will need socket access for
> openGraphicsFD
> to work - otherwise users will face a failed connection error when
> opening the UI view.
>
> Depending on the exact versions of libvirt and qemu involved this
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> If a guest runs unconfined , but libvirtd is
> confined then the peer for signal can only be detected as
> 'unconfined'. That triggers issues like:
>apparmor="DENIED" operation="signal"
>profile="/usr/sbin/libvirtd" pid=22395 co
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> Several cases were found needing /tmp, for example ceph will try to
> list /tmp
> and the samba feature of qemu will place things in /tmp/qemu-smb.*.
> This is sort of safe because:
> - While /tmp could contain anything it is not recom
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> Libvirt now tries to preserve all mounts under /dev in qemu
> namespaces.
> The old rules only listed a set of known paths but those are no more
> enough.
>
> I found some due to containers like /dev/.lxc/* and such but also
> /dev/con
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed,
please find the details below:
Type: series
Message-id: 20180805155428.40866-1-bogorods...@gmail.com
Subject: [libvirt] [PATCH] bhyve: fix process reconnect
=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script w
On Thu, Aug 09, 2018 at 09:42:08AM +0530, Sukrit Bhatnagar wrote:
> This third series of patches also modifies a few files in src/util
> to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory
> and get rid of some VIR_FREE macro invocations and *Free function
> calls.
>
> This is meant
On 07/30/2018 11:54 PM, bing.niu wrote:
>
>
> On 2018年07月31日 06:14, John Ferlan wrote:
>>
>>
>> On 07/29/2018 11:12 PM, bing@intel.com wrote:
>>> From: Bing Niu
>>>
>>> This series is to introduce RDT memory bandwidth allocation support
>>> by extending
>>> current virresctrl implementatio
On 08/10/2018 12:18 PM, Marcos Paulo de Souza wrote:
> On Mon, Aug 13, 2018 at 03:51:51PM +0200, Michal Prívozník wrote:
>> On 08/11/2018 04:39 PM, Marcos Paulo de Souza wrote:
>>> When building libvirt with libcurl debug enabled (with
>>> ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed,
please find the details below:
Type: series
Message-id: 20180810035658.13555-1-marcos.souza@gmail.com
Subject: [libvirt] [PATCH 0/2] esx: Fix {g,s}et vcpus
=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing scrip
On 08/13/2018 07:42 AM, Erik Skultety wrote:
> On Thu, Aug 09, 2018 at 09:42:10AM +0530, Sukrit Bhatnagar wrote:
>> Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
>> src/util/viralloc.h, define a new wrapper around an existing
>> cleanup function which will be called when a variable decl
Hi,
This series was run against 'syntax-check' test by patchew.org, which failed,
please find the details below:
Type: series
Message-id: 20180810112233.44540-1-i...@conquex.com
Subject: [libvirt] [PATCH 0/1] bhyve: Make LPC slot number configurable
=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testi
2018-08-10 5:56 GMT+02:00 Marcos Paulo de Souza :
> Before this patch, esxDomainGetVcpusFlags was returning -1 since
> "maxSupportedVcpus" can be NULL in ESXi[1]. In order to make it work,
> replicate the same behavior than esxDomainGetInfo that used
> config.hardware.numCPU to return the correct n
2018-08-10 5:56 GMT+02:00 Marcos Paulo de Souza :
> Before this change, esxDomainGetMaxVcpus returned -1, which in turn
> fails in libvirt. This commit reimplements esxDomainGetMaxVcpus instead
> of calling esxDomainGetVcpusFlags. The implementation checks for
> capability.maxSupportedVcpus, but as
On 08/01/2018 01:02 PM, Daniel P. Berrangé wrote:
> The x86 and ppc impls both duplicate some logic when parsing CPU
> features. Change the callback signature so that this duplication can be
> pushed up a level to common code.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> src/cpu/cpu_map.c |
On 08/01/2018 01:02 PM, Daniel P. Berrangé wrote:
> Allow for syntax
>
>
>
> to reference other files in the CPU database directory
>
> Signed-off-by: Daniel P. Berrangé
> ---
> libvirt.spec.in | 2 +-
> mingw-libvirt.spec.in | 4 +--
> src/Makefile.am | 2 +-
> src/cpu/c
On 08/01/2018 01:02 PM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé
> ---
> src/cpu/cpu_map.xml | 2374 +-
> src/cpu/cpu_map_x86_486.xml |7 +
> src/cpu/cpu_map_x86_Broadwell-IBRS.xml | 61 +
> src/cpu/cpu_m
On 08/01/2018 01:02 PM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé
> ---
> src/cpu/cpu_map.xml | 41 +
> src/cpu/cpu_map_ppc64_POWER6.xml| 6
> src/cpu/cpu_map_ppc64_POWER7.xml| 7 +
> src/cpu/cpu_map_ppc6
On 2018年08月14日 02:33, John Ferlan wrote:
On 07/30/2018 11:54 PM, bing.niu wrote:
On 2018年07月31日 06:14, John Ferlan wrote:
On 07/29/2018 11:12 PM, bing@intel.com wrote:
From: Bing Niu
This series is to introduce RDT memory bandwidth allocation support
by extending
current virresct
在 2018/8/13 下午2:59, Cornelia Huck 写道:
On Mon, 13 Aug 2018 12:46:16 +0800
Yi Min Zhao wrote:
Is there any comment? I expect comments from all of you.
Well, I don't have any objections from my side, but you need the
libvirt folks' opinion on this.
Thanks for your response!
在 2018/8/7 下午5
From: Bing Niu
Signed-off-by: Bing Niu
---
docs/news.xml | 9 +
1 file changed, 9 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 2f0c010..c6d03f5 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,15 @@
iscsiadm. It support basic pool operations: che
On Mon, Aug 13, 2018 at 7:11 PM Jamie Strandboge
wrote:
> On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> > Libvirt now tries to preserve all mounts under /dev in qemu
> > namespaces.
> > The old rules only listed a set of known paths but those are no more
> > enough.
> >
> > I fou
On Mon, Aug 13, 2018 at 7:08 PM Jamie Strandboge
wrote:
> On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> > Several cases were found needing /tmp, for example ceph will try to
> > list /tmp
> > and the samba feature of qemu will place things in /tmp/qemu-smb.*.
> > This is sort of
On Mon, Aug 13, 2018 at 6:53 PM Jamie Strandboge
wrote:
> On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote:
> > virt-manager's UI connection will need socket access for
> > openGraphicsFD
> > to work - otherwise users will face a failed connection error when
> > opening the UI view.
>
Libvirt now tries to preserve all mounts under /dev in qemu namespaces.
The old rules only listed a set of known paths but those are no more enough.
I found some due to containers like /dev/.lxc/* and such but also /dev/console
and /dev/net/tun.
Libvirt is correct to do so, but we can no more pre
virt-manager's UI connection will need socket access for openGraphicsFD
to work - otherwise users will face a failed connection error when
opening the UI view.
Depending on the exact versions of libvirt and qemu involved this needs
either a rule from qemu to libvirt or vice versa.
Acked-by: Jamie
If a guest runs unconfined , but libvirtd is
confined then the peer for signal can only be detected as
'unconfined'. That triggers issues like:
apparmor="DENIED" operation="signal"
profile="/usr/sbin/libvirtd" pid=22395 comm="libvirtd"
requested_mask="send" denied_mask="send" signal=term p
The samba feature of qemu will place the samba config file in
/tmp/qemu-smb..
But at least it has a predictable path identifying qemu-smb feature
itself by an infix in the path.
This is a compromise of security and usability as the "owner" restriction
will not protect guests among each other.
The
Several cases were found needing /tmp, for example ceph will try to list /tmp
This is a compromise of security and usability:
- we only allow generally enumerating the base dir
- enumerating anything deeper in the dir is at least guarded by the
"owner" restriction, but while that protects file
Hi,
this is a summary of things I had to touch recently for libvirt 4.6.
The first two patches are re-submissions and modifications of last
year which were never totally challenged, but also not pushed.
The first was lost in a discussion about virt-aa-helper, whicih eventually
turned out to be cle
101 - 178 of 178 matches
Mail list logo