On 02/16/2018 06:22 AM, Daniel P. Berrangé wrote:
> It is very difficult while reading the migration code trying to
> understand whether a particular function is being called on the src side
> or the dst side, or either. Putting "Src" or "Dst" in the method names will
> make this much more obviou
On 02/16/2018 06:22 AM, Daniel P. Berrangé wrote:
> These APIs are not required anywhere outside the migration code so need
> not be exported to the rest of the QEMU driver.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> src/qemu/qemu_migration.c | 43 +--
On 02/16/2018 06:22 AM, Daniel P. Berrangé wrote:
> The qemuMigrationPrecreateStorage method needs a connection
> to access the storage driver. Instead of passing it around,
> open it at time of use.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> src/qemu/qemu_driver.c| 16 +++
>
Commit 7e62c4cd26d (first appearing in libvirt-3.9.0 as a resolution
to rhbz #1343919) added a "generated" attribute to virMacAddr that was
set whenever a mac address was auto-generated by libvirt. This
knowledge was used in a single place - when trying to match a NetDef
from the domain to delete w
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 52c76b515..b4dd7a7e8 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -445
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 56 --
1 file changed, 54 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 9dc3d5597..e4e67c585 100644
--- a/src/qemu/qemu_domain.c
+++ b/s
Some test cases that were specifically set up to exploit the
lack of checks on PCI controller options start failing with
these changes, so they are marked as such.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 43
.../i440fx-controllers-pci
This change catches an invalid use of the option in our
test suite.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 39 ++
tests/qemuxml2argvdata/pcie-expander-bus.xml | 3 --
tests/qemuxml2xmloutdata/pcie-expander-bus.xml | 4 +--
This change catches an invalid use of the option in our
test suite.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 31 ++
tests/qemuxml2argvdata/pcie-expander-bus.xml | 2 +-
tests/qemuxml2xmloutdata/pcie-expander-bus.xml | 2 +-
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 965a8384c..99573dee9 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4558,6 +4
There's no need to perform checks before conversion, we can
just go try and check the results later on.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_command.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command
Some variables are only used for PCI controllers, and we're going
to add more soon. We can declare them in the 'case' scope rather
than in the function scope to make it a bit nicer.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_command.c | 8 +---
1 file changed, 5 insertions(+), 3 delet
Changes from [v1]:
* error out instead of silently accept invalid options;
* shave quite a lot of yaks.
[v1] https://www.redhat.com/archives/libvir-list/2018-February/msg00244.html
Andrea Bolognani (15):
tests: Add some tests for PCI controller options
qemu: Move 'done' label in qemuBui
Even when we skip part of the processing, we still want error
checking on the buffer.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 55e573b61..1ab5b0818 10064
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 43 +++
1 file changed, 43 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 99573dee9..df725ed74 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 110 +
1 file changed, 110 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e4e67c585..2f76464df 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_do
We will rewrite pretty much every single line of this function
over the course of the next several commits, and starting from
a clean slate rather than replacing it bit by bit makes the
resulting diffs unmeasurably easier to read and understand,
and you need fewer of them to boot. Trust me, I tried
The input configurations set all existing options for all PCI
controllers, to see what ends up showing up in the output.
Signed-off-by: Andrea Bolognani
---
.../i440fx-controllers-pciopts.args| 24 +++
.../i440fx-controllers-pciopts.xml | 36 ++
.../ps
Validate time is a bit too early to check whether the required
capabilities are available, since the QEMU binary might have
been updated or replaced by the time we are asked to run the
guest.
Move capability checks (back) to qemuBuildControllerDevStr()
and get rid of a lot of redundancy in the pro
Performing the skip earlier will help us making the function
nicer later on. We also make the condition for the skip a bit
more precise, though that'a more for self-documenting purposes
and doesn't change anything in practice.
Signed-off-by: Andrea Bolognani
---
src/qemu/qemu_command.c | 12
On Fri, Feb 16, 2018 at 09:39:17 -0500, John Ferlan wrote:
...
> Here's the command it uses:
>
> /usr/bin/virt-install --hvm --accelerate --name 'avocado-vt-vm1' \
>--memory=1024 --vcpu=2 --import --vnc --os-variant fedora25 \
>--serial pty --memballoon model=virtio --disk \
> path=/var/li
On 02/16/2018 08:48 AM, Jiri Denemark wrote:
> On Thu, Feb 15, 2018 at 21:59:45 -0500, John Ferlan wrote:
>>
>>
>> On 02/15/2018 11:50 AM, Daniel P. Berrangé wrote:
>>> Rather than expecting callers to pass a virConnectPtr into the
>>> virDomainDiskTranslateSourcePool() method, just acquire a con
On Thu, Feb 15, 2018 at 04:43:20PM +, Daniel P. Berrangé wrote:
> The -Wextra flag bundle gained a new warning -Wcast-function-type.
> This complains if you cast between two function prototypes where
> the number of parameters or their data types are not compatible.
> Unfortunately we need such
On Fri, Feb 16, 2018 at 03:06:45PM +0100, Andrea Bolognani wrote:
> The libxml2 bindings are broken under Python 3.6, so we have
> to disable this for the time being.
>
> Signed-off-by: Andrea Bolognani
> ---
> projects/virt-manager.yaml | 8
> 1 file changed, 8 insertions(+)
Reviewed-
The libxml2 bindings are broken under Python 3.6, so we have
to disable this for the time being.
Signed-off-by: Andrea Bolognani
---
projects/virt-manager.yaml | 8
1 file changed, 8 insertions(+)
diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml
index 8f3112e..e626c
On Thu, Feb 15, 2018 at 21:59:45 -0500, John Ferlan wrote:
>
>
> On 02/15/2018 11:50 AM, Daniel P. Berrangé wrote:
> > Rather than expecting callers to pass a virConnectPtr into the
> > virDomainDiskTranslateSourcePool() method, just acquire a connection
> > to the storage driver when needed.
> >
On 02/16/2018 04:47 AM, Michal Privoznik wrote:
> On 02/16/2018 10:08 AM, Peter Krempa wrote:
>> On Fri, Feb 16, 2018 at 09:52:53 +0100, Michal Privoznik wrote:
>>> On 02/16/2018 09:34 AM, Pavel Hrdina wrote:
On Mon, Feb 12, 2018 at 01:16:28PM +0100, Michal Privoznik wrote:
> On 02/12/20
On Thu, Feb 15, 2018 at 05:50 PM +0100, "Daniel P. Berrangé"
wrote:
> Now that we have the ability to easily open connections to secondary
> drivers, eg network:///system, it is possible to reimplement the
> virDomainNetResolveActualType method in terms of the public API. This
> avoids the need
The qemuMigrationPrecreateStorage method needs a connection
to access the storage driver. Instead of passing it around,
open it at time of use.
Signed-off-by: Daniel P. Berrangé
---
src/qemu/qemu_driver.c| 16 +++
src/qemu/qemu_migration.c | 51 ++-
When setting up graphics, we sometimes need to resolve networks,
requiring the caller to pass in a virConnectPtr, except sometimes they
pass in NULL. Use virGetConnectNetwork() to acquire the connection to
the network driver when it is needed.
Reviewed-by: John Ferlan
Signed-off-by: Daniel P. Ber
Now that we have the ability to easily open connections to secondary
drivers, eg network:///system, it is possible to reimplement the
virDomainNetResolveActualType method in terms of the public API. This
avoids the need to have the network driver provide a callback for it.
Reviewed-by: John Ferla
There is a long standing hack to pass a virConnectPtr into the
qemuMonitorStartCPUs method, so that when the text monitor prompts
for a disk password, we can lookup virSecretPtr objects. This causes
us to have to pass a virConnectPtr around through countless methods
up the call chainexcept some
During domain startup there are many places where we need to acquire
secrets. Currently code passes around a virConnectPtr, except in the
places where we pass in NULL. So there are a few codepaths where ability
to start guests using secrets will fail. Change to acquire a handle to
the secret driver
There's a few places in startup code paths which pass around a
virConnectPtr which is no longer required. Specifically, the
qemuProcessStart() method now only requires a non-NULL connection if
autodestroy is requested.
Reviewed-by: John Ferlan
Signed-off-by: Daniel P. Berrangé
---
src/qemu/qemu
These APIs are not required anywhere outside the migration code so need
not be exported to the rest of the QEMU driver.
Signed-off-by: Daniel P. Berrangé
---
src/qemu/qemu_migration.c | 43 +--
src/qemu/qemu_migration.h | 32 ---
When the test suite is running, we don't want to be triggering the
startup of daemons for the secondary drivers. Thus we must provide a way
to set a custom connection for the secondary drivers, to override the
default logic which opens a new connection.
This will also be useful for code where we h
Rather than expecting callers to pass a virConnectPtr into the
virDomainDiskTranslateSourcePool() method, just acquire a connection
to the storage driver when needed.
Reviewed-by: John Ferlan
Signed-off-by: Daniel P. Berrangé
---
src/conf/domain_conf.c | 10 +++---
src/conf/domain_conf.h
There are many places we can stop passing around virConnectPtr now
and directly open secondary drivers where required instead.
v3:
- More migration function renames
- Style fixes
v2:
- Now with working tests !
Daniel P. Berrangé (10):
driver: allow override of connection for secondary
On Thu, Feb 15, 2018 at 09:59:45PM -0500, John Ferlan wrote:
>
>
> On 02/15/2018 11:50 AM, Daniel P. Berrangé wrote:
> > Rather than expecting callers to pass a virConnectPtr into the
> > virDomainDiskTranslateSourcePool() method, just acquire a connection
> > to the storage driver when needed.
>
On 02/16/2018 10:08 AM, Peter Krempa wrote:
> On Fri, Feb 16, 2018 at 09:52:53 +0100, Michal Privoznik wrote:
>> On 02/16/2018 09:34 AM, Pavel Hrdina wrote:
>>> On Mon, Feb 12, 2018 at 01:16:28PM +0100, Michal Privoznik wrote:
On 02/12/2018 01:10 PM, Peter Krempa wrote:
> On Mon, Feb 12, 2
On Fri, Feb 16, 2018 at 09:52:53 +0100, Michal Privoznik wrote:
> On 02/16/2018 09:34 AM, Pavel Hrdina wrote:
> > On Mon, Feb 12, 2018 at 01:16:28PM +0100, Michal Privoznik wrote:
> >> On 02/12/2018 01:10 PM, Peter Krempa wrote:
> >>> On Mon, Feb 12, 2018 at 11:52:49 +0100, Michal Privoznik wrote:
On 02/16/2018 09:34 AM, Pavel Hrdina wrote:
> On Mon, Feb 12, 2018 at 01:16:28PM +0100, Michal Privoznik wrote:
>> On 02/12/2018 01:10 PM, Peter Krempa wrote:
>>> On Mon, Feb 12, 2018 at 11:52:49 +0100, Michal Privoznik wrote:
Sometimes we need the lock in virObjectLockable to be recursive.
>>
On Mon, Feb 12, 2018 at 01:16:28PM +0100, Michal Privoznik wrote:
> On 02/12/2018 01:10 PM, Peter Krempa wrote:
> > On Mon, Feb 12, 2018 at 11:52:49 +0100, Michal Privoznik wrote:
> >> Sometimes we need the lock in virObjectLockable to be recursive.
> >> Because of the nature of pthreads we don't n
43 matches
Mail list logo