On 9/25/19 6:57 PM, Laine Stump wrote:
A virDomainNetDef object in a domain's nets array might contain a
virDomainHostdevDef, and when this is the case, the domain's hostdevs
array will also have a pointer to this embedded hostdev (this is done
so that internal functions that need to perform
On Wed, Sep 18, 2019 at 11:56:56AM -0300, Daniel Henrique Barboza wrote:
> VIR_AUTOFREE is a beautiful macro. Let's use it across the board
> inside qemu_driver.c to make the code a bit tidier and smaller,
> sparing VIR_FREE() calls and sometimes a whole 'cleanup'
> label.
>
> This is a huge
On 9/22/19 1:59 AM, Laine Stump wrote:
Patch 2/2 is the actual fix. 1/2 is just to make the fix simpler.
NB: these two patches should also be included with the other patches for
https://bugzilla.redhat.com/1745815
Laine Stump (2):
conf: take advantage of VIR_AUTO* in
On 9/23/19 3:08 AM, Laine Stump wrote:
Since the VIR_DEFINE_AUTOPTR_FUNC() was added for
virNetworkPortDefPtr, I decided to convert all uses of
virNetworkPortDefPtr that were appropriate to use VIR_AUTOPTR. This could be
squashed into patch 1/2, or left separate, or just completely dropped.
On Wed, Sep 18, 2019 at 11:56:54AM -0300, Daniel Henrique Barboza wrote:
> virQEMUDriverConfigPtr can be auto-unref for the great majority
> of the uses made in qemu_driver, sparing us a virObjectUnref()
> call and sometimes a whole 'cleanup' label.
>
> This patch changes virQEMUDriverConfigPtr
On Wed, Sep 18, 2019 at 11:56:58AM -0300, Daniel Henrique Barboza wrote:
> VIR_AUTOFREE is a beautiful macro. Let's use it across the board
> inside qemu_driver.c to make the code a bit tidier and smaller,
> sparing VIR_FREE() calls and sometimes a whole 'cleanup'
> label.
>
> This is the last
On Wed, Sep 18, 2019 at 11:56:55AM -0300, Daniel Henrique Barboza wrote:
> virQEMUDriverConfigPtr can be auto-unref for the great majority
> of the uses made in qemu_driver, sparing us a virObjectUnref()
> call and sometimes a whole 'cleanup' label.
>
> This patch changes virQEMUDriverConfigPtr
On 9/25/19 7:58 PM, Cole Robinson wrote:
On 9/25/19 9:50 AM, Daniel Henrique Barboza wrote:
The existing QEMU and vbox URI path validation consider
that a privileged user can use both a "/system" and a
"/session" URI. This differs from all the other drivers
that forbids the root user to use
On Thu, Sep 26, 2019 at 02:16:04PM +0100, Daniel P. Berrangé wrote:
On Thu, Sep 26, 2019 at 12:39:39PM +0200, Erik Skultety wrote:
On Tue, Sep 24, 2019 at 03:58:44PM +0100, Daniel P. Berrangé wrote:
question 1) what's the benefit of compiling a regex and using it only once? Btw
python does
On Wed, Sep 25, 2019 at 03:17:10PM +0100, Daniel P. Berrangé wrote:
On Wed, Sep 25, 2019 at 03:25:39PM +0200, Ján Tomko wrote:
On Tue, Sep 24, 2019 at 03:58:43PM +0100, Daniel P. Berrangé wrote:
> As part of an goal to eliminate Perl from libvirt build tools,
> rewrite the augeas-gentest.pl
On 9/25/19 7:54 AM, Peter Krempa wrote:
Move all extensive functions to a new file so that we don't just pile
everything in the common files. This obviously isn't possible with
straight code movement as we still need stubs in qemu_driver.c
Additionally some functions e.g. for looking up a
On Thu, Sep 26, 2019 at 05:34:49PM +0200, Ján Tomko wrote:
> On Thu, Sep 26, 2019 at 02:16:04PM +0100, Daniel P. Berrangé wrote:
> > On Thu, Sep 26, 2019 at 12:39:39PM +0200, Erik Skultety wrote:
> > > On Tue, Sep 24, 2019 at 03:58:44PM +0100, Daniel P. Berrangé wrote:
> > > question 1) what's the
Validate all the commands against the schema.
Signed-off-by: Peter Krempa
---
tests/qemumonitorjsontest.c | 39 +
1 file changed, 39 insertions(+)
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index d0bbb1f674..8179e802c1 100644
---
Unify with other code that generates parameters for the 'transaction'
command.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 21 +
src/qemu/qemu_monitor.h | 11 +++
src/qemu/qemu_monitor_json.c | 35 +++
Delete/merge bitmaps when deleting checkpoints using a 'transaction' so
that we don't have to deal with halfway-failed scenarios and also fix
access to 'vm' while in the monitor lock.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_checkpoint.c | 47 +++---
1 file
Now it's not used outside of qemu_monitor_json.c.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor_json.c | 2 +-
src/qemu/qemu_monitor_json.h | 4
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index
Rather than generating the transaction contents in random places add a
unified set of APIs to generate the contents for a 'transaction' for the
dirty bitmap APIs.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 48
src/qemu/qemu_monitor.h | 24
This should be applied on top of the checkpoints split. Pushing it
requires the interlocking patches for checkpoints being merged as the
bitmap removal QMP command is transactionable only since qemu 4.2. That
is also the reason for the addition of the capabilities of qemu 4.2.
Peter Krempa (9):
Use the generators provided by the monitor code instead.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_checkpoint.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 30d1b6ae3a..04320b8e39 100644
---
Use the new generator residing in the monitor code rather than directly
using qemuMonitorJSONTransactionAdd.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_block.c | 21 -
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_block.c
Sometimes, we have a PCI address and not fully allocated
virPCIDevice and yet we still want to know its /dev/vfio/N path.
Introduce virPCIDeviceAddressGetIOMMUGroupDev() function exactly
for that.
Signed-off-by: Michal Privoznik
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain.c | 10
In near future, the decision what to do with /dev/vfio/vfio with
respect to domain namespace and CGroup is going to be moved out
of qemuDomainGetHostdevPath() because there will be some other
types of devices than hostdevs that need access to VFIO.
All functions that I'm changing assume that
In near future we will have a list of PCI devices we want to
detach (held in virPCIDeviceListPtr) but we don't have
virDomainHostdevDefPtr. That's okay because
virHostdevPreparePCIDevices() works with virPCIDeviceListPtr
mostly anyway. And in very few places where it needs
virDomainHostdevDefPtr
The @freeTmpPath boolean is used to determine if @tmpPath holds
an allocated memory or is a pointer to a constant string and
therefore if it needs to be freed or not when returning from the
function. Well, we can unify the way we set @tmpPath so that it
always holds an allocated memory and thus
On Wed, Sep 25, 2019 at 02:54:37PM +0200, Peter Krempa wrote:
Move it to qemu_domain.c and rename it to qemuDomainObjFromDomain. This
will allow reusing it after splitting out checkpoint code from
qemu_driver.c.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 31 +
On 9/25/19 7:54 AM, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/qemu/qemu_checkpoint.c | 185 ++---
src/qemu/qemu_checkpoint.h | 5 +
src/qemu/qemu_domain.c | 162 +---
src/qemu/qemu_domain.h | 15 ---
4
On 9/26/19 2:52 AM, Michal Privoznik wrote:
On 9/23/19 3:08 AM, Laine Stump wrote:
Since the VIR_DEFINE_AUTOPTR_FUNC() was added for
virNetworkPortDefPtr, I decided to convert all uses of
virNetworkPortDefPtr that were appropriate to use VIR_AUTOPTR. This
could be
squashed into patch 1/2, or
On Thu, Sep 26, 2019 at 16:40:54 +0100, Daniel Berrange wrote:
> On Thu, Sep 26, 2019 at 05:35:46PM +0200, Ján Tomko wrote:
> > On Wed, Sep 25, 2019 at 03:17:10PM +0100, Daniel P. Berrangé wrote:
> > > On Wed, Sep 25, 2019 at 03:25:39PM +0200, Ján Tomko wrote:
> > > > On Tue, Sep 24, 2019 at
We replaced them by use of transaction to simplify possible failure
scenarios.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_monitor.c | 51 ---
src/qemu/qemu_monitor.h | 19 --
src/qemu/qemu_monitor_json.c | 119 ---
On Tue, Sep 24, 2019 at 03:58:46PM +0100, Daniel P. Berrangé wrote:
As part of an goal to eliminate Perl from libvirt build tools,
rewrite the check-spacing.pl tool in Python.
This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall
Signed-off-by: Michal Privoznik
---
src/conf/domain_conf.c | 14 ++
src/conf/domain_conf.h | 3 +++
src/libvirt_private.syms | 1 +
3 files changed, 18 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index adf8455579..c1769f743b 100644
---
There are two types of host devices that require /dev/vfio/vfio
access:
1) PCI devices with VFIO backend
2) Mediated devices
Introduce a simple helper that returns true if passed @hostdev
falls in either of the categories.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_hostdev.c | 9
Now that all callers of qemuDomainGetHostdevPath() handle
/dev/vfio/vfio on their own, we can safely drop handling in this
function. In near future the decision whether domain needs VFIO
file is going to include more device types than just
virDomainHostdev.
Signed-off-by: Michal Privoznik
---
In some places we need to check if a hostdev has VFIO backend.
Because of how complicated virDomainHostdevDef structure is, the
check consists of three lines. Move them to a function and
replace all checks with the function call.
Signed-off-by: Michal Privoznik
---
src/conf/domain_conf.c | 5
These functions do not change any of the passed hostdevs. They
just read them.
Signed-off-by: Michal Privoznik
---
src/util/virhostdev.c | 6 +++---
src/util/virhostdev.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index
There are three cases where vir*DeviceGetPath() returns a const
string. In these cases, the string is initialized in
corresponding vir*DeviceNew() calls which fail if string couldn't
be allocated. There's no point in checking the second time if the
string is NULL.
Signed-off-by: Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2019-July/msg00675.html
As usual, you can find my patches on my github:
https://github.com/zippy2/libvirt/tree/nvme_v3
https://travis-ci.org/zippy2/libvirt/builds/590033775
(Yeah, my branch is really called _v3 because reasons)
diff to v1:
-
Previous patches rendered some of 'cleanup' labels needless.
Drop them.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_cgroup.c | 25 ---
src/qemu/qemu_domain.c | 56 +-
2 files changed, 32 insertions(+), 49 deletions(-)
diff --git
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 9 +
src/qemu/qemu_domain.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 824bca89f4..6502c6191c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
On Thu, Sep 26, 2019 at 05:58:47PM +0200, Peter Krempa wrote:
> On Thu, Sep 26, 2019 at 16:40:54 +0100, Daniel Berrange wrote:
> > On Thu, Sep 26, 2019 at 05:35:46PM +0200, Ján Tomko wrote:
> > > On Wed, Sep 25, 2019 at 03:17:10PM +0100, Daniel P. Berrangé wrote:
> > > > On Wed, Sep 25, 2019 at
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/storage/storage_driver.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index ce10b55ed0..d160ff34fe 100644
---
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/node_device/node_device_driver.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/node_device/node_device_driver.c
b/src/node_device/node_device_driver.c
index
Signed-off-by: Daniel Henrique Barboza
---
I've made this test file to make sure I wasn't messing
up with the logic at patch 8. The idea of having this
test seems okay, but probably I could do it shorter/cleaner.
Feel free to discard it if it's not applicable or
unnecessary. Adding this new
The existing QEMU and vbox URI path validation consider
that a privileged user can use both a "/system" and a
"/session" URI. This differs from all the other drivers
that forbids the root user to use "/session" URI.
Let's update virConnectValidateURIPath() to handle these
cases as exceptions,
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/vbox/vbox_driver.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index 1f31fa28df..d7e80828ab 100644
--- a/src/vbox/vbox_driver.c
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/network/bridge_driver.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index c54be96407..c617bbb58f 100644
---
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/vbox/vbox_common.c | 16 ++--
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index ddabcb80ca..d3b8fb625f 100644
--- a/src/vbox/vbox_common.c
On Thu, Sep 26, 2019 at 05:01:24PM +0200, Michal Privoznik wrote:
> On 9/26/19 4:42 PM, Erik Skultety wrote:
> > On Thu, Sep 26, 2019 at 04:25:05PM +0200, Michal Privoznik wrote:
> > > The private data for video definition is created in
> > > virDomainVideoDefNew() and we attempt to free it in
> >
On Thu, Sep 26, 2019 at 05:35:46PM +0200, Ján Tomko wrote:
> On Wed, Sep 25, 2019 at 03:17:10PM +0100, Daniel P. Berrangé wrote:
> > On Wed, Sep 25, 2019 at 03:25:39PM +0200, Ján Tomko wrote:
> > > On Tue, Sep 24, 2019 at 03:58:43PM +0100, Daniel P. Berrangé wrote:
> > > > As part of an goal to
There are going to be more disk types that are considered unsafe
with respect to migration. Therefore, move the error reporting
call outside of if() body and rework if-else combo to switch().
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_migration.c | 25 -
1 file
There is this class of PCI devices that act like disks: NVMe.
Therefore, they are both PCI devices and disks. While we already
have (and can assign a NVMe device to a domain
successfully) we don't have disk representation. There are three
problems with PCI assignment in case of a NVMe device:
1)
In near future we will have a list of PCI devices we want to
re-attach to the host (held in virPCIDeviceListPtr) but we don't
have virDomainHostdevDefPtr. That's okay because
virHostdevReAttachPCIDevices() works with virPCIDeviceListPtr
mostly anyway. And in very few places where it needs
With NVMe disks, one can start a blockjob with a NVMe disk
that is not visible in domain XML (at least right away). Usually,
it's fairly easy to override this limitation of
qemuDomainGetMemLockLimitBytes() - for instance for hostdevs we
temporarily add the device to domain def, let the function
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
tests/virhostdevtest.c | 97 ++
1 file changed, 97 insertions(+)
diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c
index 46627355c3..fde7f92bc4 100644
--- a/tests/virhostdevtest.c
+++
This function will return true if any of disks (or their backing
chain) for given domain contains an NVMe disk.
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
src/conf/domain_conf.c | 14 ++
src/conf/domain_conf.h | 3 +++
src/libvirt_private.syms | 1 +
3 files
On 9/26/19 11:51 AM, Laine Stump wrote:
On 9/26/19 3:28 AM, Michal Privoznik wrote:
On 9/25/19 6:57 PM, Laine Stump wrote:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0753904472..5f63c4f51e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8786,8
On Wed, Sep 25, 2019 at 02:54:38PM +0200, Peter Krempa wrote:
'vm' is passed in which contains the definition which contains the UUID
so we don't need another parameter for this.
Signed-off-by: Peter Krempa
---
src/conf/checkpoint_conf.c | 7 +++
src/conf/checkpoint_conf.h | 3 +--
Now, that we have everything prepared, we can generate command
line for NVMe disks.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_block.c | 25 -
src/qemu/qemu_command.c | 3 ++
src/qemu/qemu_process.c | 7 +++
This is slightly more complicated because NVMe disk source is not
a simple attribute to element. The format in which the
PCI address and namespace ID are printed is the same as QEMU
accepts them:
nvme://:XX:XX.X/X
Signed-off-by: Michal Privoznik
---
tools/virsh-domain-monitor.c | 31
On 9/26/19 6:18 AM, Erik Skultety wrote:
On Wed, Sep 18, 2019 at 11:56:55AM -0300, Daniel Henrique Barboza wrote:
virQEMUDriverConfigPtr can be auto-unref for the great majority
of the uses made in qemu_driver, sparing us a virObjectUnref()
call and sometimes a whole 'cleanup' label.
This
On Thu, Sep 26, 2019 at 04:25:05PM +0200, Michal Privoznik wrote:
> The private data for video definition is created in
> virDomainVideoDefNew() and we attempt to free it in
> virDomainVideoDefFree(). This seems to work, except
> the free function calls clear function which zeroes
> out the whole
The code to validate the URI path is repeated across several
files. This patch creates a common validation code to be
used across all of them.
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/driver.c | 26 ++
src/driver.h
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/interface/interface_backend_udev.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/interface/interface_backend_udev.c
b/src/interface/interface_backend_udev.c
index
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/interface/interface_backend_netcf.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/interface/interface_backend_netcf.c
b/src/interface/interface_backend_netcf.c
index
This is a code repetition that I crossed a few times, then
I noticed that Cole Robinson suggested a solution for it
in the wiki. Here it is.
changes from v3:
- patch 8: fix the exception logic, move the code formatting
to patch 1
- patch 9: use lowcase 'qemu'
- patch 12: (optional) test case I
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/qemu/qemu_driver.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0c65414a1a..cf9c06f274 100644
---
Suggested-by: Cole Robinson
Signed-off-by: Daniel Henrique Barboza
---
src/secret/secret_driver.c | 19 ---
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 7512a51c74..ed3bd3c751 100644
---
On 9/26/19 4:42 PM, Erik Skultety wrote:
On Thu, Sep 26, 2019 at 04:25:05PM +0200, Michal Privoznik wrote:
The private data for video definition is created in
virDomainVideoDefNew() and we attempt to free it in
virDomainVideoDefFree(). This seems to work, except
the free function calls clear
On 9/25/19 7:54 AM, Peter Krempa wrote:
The code that gets the job to refresh disk sizes was not merged yet so
remove this artifact.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 3 ---
1 file changed, 3 deletions(-)
Reviewed-by: Eric Blake
diff --git
On Thu, Sep 26, 2019 at 10:38:11 -0500, Eric Blake wrote:
> On 9/25/19 7:54 AM, Peter Krempa wrote:
> > Move all extensive functions to a new file so that we don't just pile
> > everything in the common files. This obviously isn't possible with
> > straight code movement as we still need stubs in
This function will return true if there's a storage source of
type VIR_STORAGE_TYPE_NVME, or false otherwise.
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virstoragefile.c | 14 ++
src/util/virstoragefile.h | 2 ++
3 files
This module will be used by virHostdevManager and it's inspired
by virPCIDevice module. They are very similar except instead of
what makes a NVMe device: PCI address AND namespace ID. This
means that a NVMe device can appear in a domain multiple times,
each time with a different namespace.
To simplify implementation, some restrictions are added. For
instance, an NVMe disk can't go to any bus but virtio and has to
be type of 'disk' and can't have startupPolicy set.
Signed-off-by: Michal Privoznik
---
src/conf/domain_conf.c | 96 ++
Now that we have virNVMeDevice module (introduced in previous
commit), let's use it int virHostdev to track which NVMe devices
are free to be used by a domain and which are taken.
Signed-off-by: Michal Privoznik
---
src/libvirt_private.syms | 5 +
src/util/virhostdev.c| 332
This helper is cleaner than plain memcpy() because one doesn't
have to look into virPCIDeviceAddress struct to see if it
contains any strings / pointers.
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virpci.c| 14 ++
The qemu driver has its own wrappers around virHostdev module (so
that some arguments are filled in automatically). Extend these to
include NVMe devices too.
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
src/qemu/qemu_hostdev.c | 49 ++---
We have this beautiful function that does crystal ball
divination. The function is named
qemuDomainGetMemLockLimitBytes() and it calculates the upper
limit of how much locked memory is given guest going to need. The
function bases its guess on devices defined for a domain. For
instance, if there
There are couple of places where a domain with a VFIO device gets
special treatment: in CGroups when enabling/disabling access to
/dev/vfio/vfio, and when creating/removing nodes in domain mount
namespace. Well, a NVMe disk is a VFIO device too. Fortunately,
we have this qemuDomainNeedsVFIO()
The device configs (which are actually the same one config)
come from a NVMe disk of mine.
Signed-off-by: Michal Privoznik
ACKed-by: Peter Krempa
---
tests/virpcimock.c | 3 +++
tests/virpcitestdata/-01-00.0.config | Bin 0 -> 4096 bytes
If a domain has an NVMe disk configured, then we need to create
/dev/vfio/* paths in domain's namespace so that qemu can open
them.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 69 +++---
1 file changed, 52 insertions(+), 17 deletions(-)
diff
On Thu, Sep 26, 2019 at 18:05:14 +0200, Peter Krempa wrote:
> Currently I don't indend to push this as I'm waiting for some qemu
> patches to be merged to allow detection of blockdev.
>
> This patch is necessary so that qemu's 'transaction' supports also
> deletion of bitmaps which will be
On 9/25/19 7:54 AM, Peter Krempa wrote:
There's nothing that uses it directly now. Also not allowing direct use
will promote our layering.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 1 -
1 file changed, 1 deletion(-)
Reviewed-by: Eric Blake
diff --git
Use VIR_AUTO* helpers and get rid of the 'cleanup' label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_checkpoint.c | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 30d1b6ae3a..4430f69911
Once somebody is motivated enough to add the support for the quiesce
flag or offline checkpoint deletion they are welcome to do so but we
don't need to have a reminder.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_checkpoint.c | 3 ---
1 file changed, 3 deletions(-)
diff --git
See patch 6/8 for the reasoning.
This series applies on top of the v2 of splitting checkpoints into a
separate file.
Peter Krempa (8):
qemu: checkpoint: Refactor cleanup in qemuCheckpointCreateXML
qemu: checkpoint: Remove open-ended TODOs
qemu: Simplify argument list of
Add a 'cleanup' label and use jumps as we do in other places.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 71503898e4..3ad1699eb1 100644
---
Rather than having to fix 5 places once we support the combination add a
function called by all the blockjob/snapshot APIs.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_domain.c | 21 +
src/qemu/qemu_domain.h | 4
src/qemu/qemu_driver.c | 25 +
The QEMU_CAPS_INCREMENTAL_BACKUP will be enabled once all bits of the
incremental backup feature work as expected which means also properly
interacting with blockjobs and snapshots.
Thus we can allow blockjobs and snapshots if QEMU_CAPS_INCREMENTAL_BACKUP
is present even when checkpoints exist.
Checkpoints by themselves are not very useful for anything else than
testing the few bitmap interactions that are currently implemented.
It's very unlikely that anybody used this feature and thus we can
disable it until we have a more complete implementation ready.
Additionally the code for
Drop the 'driver' argument since it can be extracted from private data
to shorten the argument list.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index
Add a new all-covering capability which will be used to interlock
incremental backup support until all bits are ready.
---
src/qemu/qemu_capabilities.c | 3 +++
src/qemu/qemu_capabilities.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c
On 9/26/19 3:28 AM, Michal Privoznik wrote:
On 9/25/19 6:57 PM, Laine Stump wrote:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0753904472..5f63c4f51e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8786,8 +8786,10 @@
Since its introduction in v1.0.5-rc1-19-g6e13860cb4 the
qemuTeardownHostdevCgroup() does nothing unless the passed
hostdev is a PCI device with VFIO backend. This seems
unnecessary.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_cgroup.c | 8 +---
1 file changed, 1 insertion(+), 7
There are several variables which could be automatically freed
upon return from the function. I'm not changing @tmpPaths (which
is a string list) because it is going to be removed in next
commit.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 18 ++
1 file changed,
This function is currently not called for any type of storage
source that is not considered 'local' (as defined by
virStorageSourceIsLocalStorage()). Well, NVMe disks are not
'local' from that point of view and therefore we will need to
call this function more frequently.
Signed-off-by: Michal
If a domain has an NVMe disk configured, then we need to allow it
on devices CGroup so that qemu can access it. There is one caveat
though - if an NVMe disk is read only we need CGroup to allow
write too. This is because when opening the device, qemu does
couple of ioctl()-s which are considered
This capability tracks if qemu is capable of:
-drive file.driver=nvme
The feature was added in QEMU's commit of v2.12.0-rc0~104^2~2.
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_capabilities.c | 4
src/qemu/qemu_capabilities.h | 3 +++
This function calls virSecuritySELinuxSetFilecon() or
virSecuritySELinuxSetFileconOptional() from a lot of places.
It works, because in all places we're passing src->path which is
what we wanted. But not anymore. We will want to be able to pass
a different path and thus the function must be
Signed-off-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 58 +
src/qemu/qemu_hostdev.c | 22
src/qemu/qemu_hostdev.h | 6 +
3 files changed, 86 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index
Because this is a HMP we're dealing with, there is nothing like
class of reply message, so we have to do some string comparison
to guess if the command fails. Well, with NVMe disks whole new
class of errors comes to play because qemu needs to initialize
IOMMU and VFIO for them. You can see all the
1 - 100 of 126 matches
Mail list logo