[libvirt] [PATCH] Adding POWER9 DD1.0/DD2.0 PVR value to cpu_map.xml

2017-11-28 Thread Seeteena Thoufeek
DD1.0/DD2.0 PVR value is missing from cpu_map.xml. This patch provides those details Signed-off-by: Seeteena Thoufeek --- src/cpu/cpu_map.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index e5da7a8..e4e4e68

[libvirt] [PATCH v2] libvirt: Adding POWER9 DD1.0/DD2.0 PVR value to cpu_map.xml

2017-11-28 Thread Seeteena Thoufeek
DD1.0/DD2.0 PVR value is missing from cpu_map.xml. This patch provides those details Signed-off-by: Seeteena Thoufeek --- src/cpu/cpu_map.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml index e5da7a8..be4e215

Re: [libvirt] 答复: 答复: 答复: Help:Can libvirt restore several xen snapshots more faster at same time?

2017-11-28 Thread Jim Fehlig
On 11/27/2017 09:26 PM, Chenjia (C) wrote: Dear libvirt expert: Thanks for your replay, we are not restore from the same state file twice, only one time. we have 40 process, each process handle it's own VM and VM state file, and each process will do following things cycle:

Re: [libvirt] [PATCH v4 23/30] conf: convert sclp/sclplm as

2017-11-28 Thread Andrea Bolognani
On Tue, 2017-11-28 at 15:32 +0100, Pavel Hrdina wrote: > On Tue, Nov 28, 2017 at 12:48:06PM +0100, Andrea Bolognani wrote: > > From: Pino Toscano > > > > In case we are allowed to break the ABI of a s390/s390x guest, then > > convert the first sclp/sclplm console from to ,

Re: [libvirt] [PATCH v4 23/30] conf: convert sclp/sclplm as

2017-11-28 Thread Pavel Hrdina
On Tue, Nov 28, 2017 at 12:48:06PM +0100, Andrea Bolognani wrote: > From: Pino Toscano > > In case we are allowed to break the ABI of a s390/s390x guest, then > convert the first sclp/sclplm console from to , just > like it is done on other architectures. > >

[libvirt] [PATCH] qemu: forbid user aliases for implicit pci-root controllers

2017-11-28 Thread Ján Tomko
For implicit controllers, we do not format user aliases on the command line so we provide a translation between the user alias and the qemu alias. However for pci-root controllers, the logic determining whether to use 'pci' or 'pci.0' depends on: * domain architecture * machine type * QEMU

Re: [libvirt] [PATCH v4 29/30] qemu: Require QEMU_CAPS_DEVICE_PL011 for pl011

2017-11-28 Thread Pavel Hrdina
On Tue, Nov 28, 2017 at 12:48:12PM +0100, Andrea Bolognani wrote: > Even though we never format the device on the QEMU command line, > as it's a platform serial device that's not user-instantiable, > we should still make sure it's available before using it. > > Signed-off-by: Andrea Bolognani

Re: [libvirt] [PATCH v4 30/30] news: Update for serial console fixes

2017-11-28 Thread Pavel Hrdina
On Tue, Nov 28, 2017 at 12:48:13PM +0100, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > docs/news.xml | 12 > 1 file changed, 12 insertions(+) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature --

Re: [libvirt] [PATCH v4 28/30] qemu: Add QEMU_CAPS_DEVICE_PL011

2017-11-28 Thread Pavel Hrdina
On Tue, Nov 28, 2017 at 12:48:11PM +0100, Andrea Bolognani wrote: > All serial devices shoule have an associated capability. > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_capabilities.c | 4 > src/qemu/qemu_capabilities.h

Re: [libvirt] [PATCH v4 27/30] qemu: Limit isa-serial usage to x86 guests

2017-11-28 Thread Pavel Hrdina
On Tue, Nov 28, 2017 at 12:48:10PM +0100, Andrea Bolognani wrote: > The ISA bus is x86 specific, so we should limit usage of isa-serial > to x86 guests only, just like we already do eg. with sclpconsole and > s390x guests. This patch is not necessary, it's actually dead code because in

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-28 Thread Martin Kletzander
On Tue, Nov 28, 2017 at 10:25:37AM +, Daniel P. Berrange wrote: On Tue, Nov 28, 2017 at 10:22:21AM +, Daniel P. Berrange wrote: On Tue, Nov 28, 2017 at 08:43:54AM +0100, Martin Kletzander wrote: > Just a quick note on what I've found out after I dedicated half day to go > through the

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-28 Thread Martin Kletzander
On Tue, Nov 28, 2017 at 10:47:33AM +, Nir Soffer wrote: On Tue, Nov 28, 2017 at 9:44 AM Martin Kletzander wrote: On Mon, Nov 20, 2017 at 04:57:56PM +, Daniel P. Berrange wrote: >On Mon, Nov 20, 2017 at 05:36:24PM +0100, Martin Kletzander wrote: >> On Mon, Nov 20,

[libvirt] [PATCH v4 19/30] qemu: Support usb-serial and pci-serial on pSeries

2017-11-28 Thread Andrea Bolognani
The existing implementation set the address type for all serial devices to spapr-vio, which made it impossible to use other devices such as usb-serial and pci-serial; moreover, some decisions were made based on the address type rather than the device type. Resolves:

[libvirt] [PATCH v4 23/30] conf: convert sclp/sclplm as

2017-11-28 Thread Andrea Bolognani
From: Pino Toscano In case we are allowed to break the ABI of a s390/s390x guest, then convert the first sclp/sclplm console from to , just like it is done on other architectures. Signed-off-by: Pino Toscano Reviewed-by: Andrea Bolognani

[libvirt] [PATCH v4 30/30] news: Update for serial console fixes

2017-11-28 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 104668ce9..397e382b9 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -148,6 +148,18 @@ can prepare the files

[libvirt] [PATCH v4 28/30] qemu: Add QEMU_CAPS_DEVICE_PL011

2017-11-28 Thread Andrea Bolognani
All serial devices shoule have an associated capability. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++

[libvirt] [PATCH v4 24/30] qemu: switch s390/s390x default console back to serial

2017-11-28 Thread Andrea Bolognani
From: Pino Toscano Now that and on s390/s390x behave a bit more like the other architectures, remove this extra differentation, and use sclp console by default for new guests. New virtio consoles can still be added, and it is actually needed because of the limited number

[libvirt] [PATCH v4 25/30] qemu: Add QEMU_CAPS_DEVICE_ISA_SERIAL

2017-11-28 Thread Andrea Bolognani
All serial devices shoule have an associated capability. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt] [PATCH v4 27/30] qemu: Limit isa-serial usage to x86 guests

2017-11-28 Thread Andrea Bolognani
The ISA bus is x86 specific, so we should limit usage of isa-serial to x86 guests only, just like we already do eg. with sclpconsole and s390x guests. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[libvirt] [PATCH v4 21/30] conf: add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP

2017-11-28 Thread Andrea Bolognani
From: Pino Toscano Introduce specific a target types with two models for the console devices (sclp and sclplm) used in s390 and s390x guests, so isa-serial is no more used for them. This makes usable on s390 and s390x guests, with at most only a single sclpconsole and one

[libvirt] [PATCH v4 29/30] qemu: Require QEMU_CAPS_DEVICE_PL011 for pl011

2017-11-28 Thread Andrea Bolognani
Even though we never format the device on the QEMU command line, as it's a platform serial device that's not user-instantiable, we should still make sure it's available before using it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 12

[libvirt] [PATCH v4 20/30] conf: Add target type and model for pl011

2017-11-28 Thread Andrea Bolognani
We can finally introduce a specific target model for the pl011 device used by mach-virt guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately

[libvirt] [PATCH v4 22/30] conf: pass parseFlags down to virDomainDefAddConsoleCompat

2017-11-28 Thread Andrea Bolognani
From: Pino Toscano Signed-off-by: Pino Toscano Reviewed-by: Andrea Bolognani --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 3 ++- src/vz/vz_sdk.c| 2 +- 3 files changed, 9 insertions(+), 6

[libvirt] [PATCH v4 26/30] qemu: Require QEMU_CAPS_DEVICE_ISA_SERIAL for isa-serial

2017-11-28 Thread Andrea Bolognani
We should make sure the isa-serial device is available before formatting it on the QEMU command line. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/qemu/qemu_command.c | 7 +++ tests/qemuxml2argvtest.c | 29

[libvirt] [PATCH v4 05/30] conf: Drop virDomainChrDeviceType.targetTypeAttr

2017-11-28 Thread Andrea Bolognani
This attribute was used to decide whether to format the type attribute of the element, but the logic didn't take into account all possible cases and as such could lead to unexpected results. Moreover, it's one more thing to keep track of, and can easily fall out of sync with other attributes.

[libvirt] [PATCH v4 10/30] conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat()

2017-11-28 Thread Andrea Bolognani
Formatting the element for serial devices will become a bit more complicated later on, and leaving the fallthrough behavior there would do nothing but complicate it further. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina ---

[libvirt] [PATCH v4 18/30] conf: Add target type and model for spapr-vty

2017-11-28 Thread Andrea Bolognani
We can finally introduce a specific target model for the spapr-vty device used by pSeries guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately

[libvirt] [PATCH v4 12/30] qemu: Improve qemuDomainChrTargetDefValidate()

2017-11-28 Thread Andrea Bolognani
Instead of validating each target type / address type combination separately, create a small helper to perform the matching and collapse all existing checks into a single one. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina ---

[libvirt] [PATCH v4 11/30] qemu: Introduce qemuDomainChrTargetDefValidate()

2017-11-28 Thread Andrea Bolognani
Instead of waiting until we get to command line generation, we can validate the target for a char device much earlier. Move all the checks out of qemuBuildSerialChrDeviceStr() and into the new fuction. This will later allow us to validate the target for platform devices. Signed-off-by: Andrea

[libvirt] [PATCH v4 16/30] qemu: Format targetModel for serial devices

2017-11-28 Thread Andrea Bolognani
Now that we've created a distinction between target type and target model, with the latter being the concrete device name, it's time to switch to formatting the model instead of the type. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina ---

[libvirt] [PATCH v4 08/30] conf: Check virDomainChrSourceDefFormat() return value

2017-11-28 Thread Andrea Bolognani
The function can fail, but none of the caller were accounting for that. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff

[libvirt] [PATCH v4 14/30] qemu: Set targetModel based on targetType for serial devices

2017-11-28 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/qemu/qemu_domain.c | 20 .../qemuargv2xmldata/qemuargv2xml-console-compat.xml | 4 +++-

[libvirt] [PATCH v4 06/30] conf: Introduce virDomainChrTargetDefFormat()

2017-11-28 Thread Andrea Bolognani
Move formatting of the element for char devices out of virDomainChrDefFormat() and into its own function. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 67 ++ 1

[libvirt] [PATCH v4 17/30] qemu: Remove redundancy in qemuBuildSerialChrDeviceStr()

2017-11-28 Thread Andrea Bolognani
Instead duplicating the capability check for each possible target model, introduce a small helper that matches the target model with the corresponding capability and collapse all existing checks into a single one. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina

[libvirt] [PATCH v4 15/30] qemu: Validate target model for serial devices

2017-11-28 Thread Andrea Bolognani
Target model and target type must agree for the configuration to make sense, so check that's actually the case and error out otherwise. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/libvirt_private.syms | 2 ++

[libvirt] [PATCH v4 13/30] conf: Parse and format virDomainChrSerialTargetModel

2017-11-28 Thread Andrea Bolognani
This information will be used to select, and store in the guest configuration in order to guarantee ABI stability, the concrete (hypervisor-specific) model for serial devices. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina ---

[libvirt] [PATCH v4 07/30] conf: Improve error handling in virDomainChrDefFormat()

2017-11-28 Thread Andrea Bolognani
We don't need to store the return value since we never modify it. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH v4 04/30] conf: Introduce VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE

2017-11-28 Thread Andrea Bolognani
This is the first step in getting rid of the assumption that isa-serial is the default target type for serial devices. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 8 +--- src/conf/domain_conf.h

[libvirt] [PATCH v4 02/30] qemu: Introduce qemuDomainChrDefPostParse()

2017-11-28 Thread Andrea Bolognani
Having a separate function for char device handling is better than adding even more code to qemuDomainDeviceDefPostParse(). Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina Reviewed-by: Marc Hartmayer ---

[libvirt] [PATCH v4 09/30] conf: Improve virDomainChrTargetDefFormat()

2017-11-28 Thread Andrea Bolognani
Make the switch statement type-aware, avoid calling virDomainChrTargetTypeToString() more than once and check its return value before using it. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 29

[libvirt] [PATCH v4 03/30] conf: Run devicePostParse() again for the first serial device

2017-11-28 Thread Andrea Bolognani
The devicePostParse() callback is invoked for all devices so that drivers have a chance to set their own specific values; however, virDomainDefAddImplicitDevices() runs *after* the devicePostParse() callbacks have been invoked and can add new devices, in which case the driver wouldn't have a

[libvirt] [PATCH v4 01/30] docs: Improve documentation for serial consoles

2017-11-28 Thread Andrea Bolognani
Our current documentation is missing some information and doesn't do a great job at explaining how the and elements are connected. Let's try to fix that. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- docs/formatdomain.html.in | 214

[libvirt] [PATCH v4 00/30] Fix serial console behavior on non-x86 architectures

2017-11-28 Thread Andrea Bolognani
Changes from [v3]: * document which target types have an associated address; * add capability for pl011. Changes from [v2]: * don't drop -serial suffix from existing target types; * add capability and machine type checks for isa-serial; * reduce code duplication; * improve

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-28 Thread Nir Soffer
On Tue, Nov 28, 2017 at 9:44 AM Martin Kletzander wrote: > On Mon, Nov 20, 2017 at 04:57:56PM +, Daniel P. Berrange wrote: > >On Mon, Nov 20, 2017 at 05:36:24PM +0100, Martin Kletzander wrote: > >> On Mon, Nov 20, 2017 at 03:25:33PM +, Daniel P. Berrange wrote: > >>

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-28 Thread Daniel P. Berrange
On Tue, Nov 28, 2017 at 10:22:21AM +, Daniel P. Berrange wrote: > On Tue, Nov 28, 2017 at 08:43:54AM +0100, Martin Kletzander wrote: > > Just a quick note on what I've found out after I dedicated half day to go > > through the tour of go and some other tutorials. The learning curve of Go > >

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-28 Thread Daniel P. Berrange
On Tue, Nov 28, 2017 at 08:43:54AM +0100, Martin Kletzander wrote: > On Mon, Nov 20, 2017 at 04:57:56PM +, Daniel P. Berrange wrote: > > On Mon, Nov 20, 2017 at 05:36:24PM +0100, Martin Kletzander wrote: > > > On Mon, Nov 20, 2017 at 03:25:33PM +, Daniel P. Berrange wrote: > > > > > > > >

Re: [libvirt] [PATCH v3 20/28] conf: Add target type and model for pl011

2017-11-28 Thread Andrea Bolognani
On Mon, 2017-11-27 at 17:05 +0100, Pavel Hrdina wrote: > One thing that I've just realized is that there is no capability check > whether that device exists. In QEMU it's configurable so there can > be QEMU compiled without this device, however, by default it's enabled. > > I would compare it to

[libvirt] Plans for next releases

2017-11-28 Thread Daniel Veillard
So November went through faster than expected and we are already a bit late w.r.t. freezing for the release. I suggest to do this at the end of the day, have RC2 on Thursday late or fFriday and the release over the week-end. Then for Jan/Feb as usual between the end of year breaks and the short