Re: [libvirt] [PATCH v3] qemu: Allow UEFI paths to be specified at compile time

2015-01-21 Thread Michal Privoznik
On 20.01.2015 18:20, Martin Kletzander wrote: On Wed, Jan 14, 2015 at 04:28:33PM +0100, Michal Privoznik wrote: Up until now there are just two ways how to specify UEFI paths to libvirt. The first one is editing qemu.conf, the other is editing qemu_conf.c and recompile which is not that fancy.

Re: [libvirt] [PATCH 2/2] esx_vi: fix possible segfault

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 18:09:28 +0100, Pavel Hrdina wrote: Clang found possible dereference of NULL pointer which is right. Function 'esxVI_LookupTaskInfoByTask' should find a task info. The issue is that we could return 0 and leave 'taksInfo' pointer NULL because if there is no match we

Re: [libvirt] [PATCH 1/2] util: Functions for getting/setting device options

2015-01-21 Thread Laine Stump
On 01/19/2015 11:18 AM, akrow...@linux.vnet.ibm.com wrote: From: Tony Krowiak akrow...@linux.vnet.ibm.com This patch provides the utility functions needed to synchronize the rxfilter changes made to a guest domain with the corresponding macvtap devices on the host: * Get/set PROMISC flag *

Re: [libvirt] [PATCH 2/2] qemu: change macvtap device options in response to NIC_RX_FILTER_CHANGED

2015-01-21 Thread Laine Stump
(I didn't try make syntax-check, but am assuming you have and that it passes) On 01/19/2015 11:18 AM, akrow...@linux.vnet.ibm.com wrote: From: Tony Krowiak akrow...@linux.vnet.ibm.com This patch supplies the funtionality of synchronizing the host macvtap device options with the guest

[libvirt] [PATCH v4 2/2] qemu: Add AAVMF to the list of known UEFIs

2015-01-21 Thread Michal Privoznik
Well, even though users can pass the list of UEFI:NVRAM pairs at the configure time, we may maintain the list of widely available UEFI ourselves too. And as arm64 begin to rises, OVMF was ported there too. With a slight name change - it's called AAVMF, with AAVMF_CODE.fd being the UEFI firmware

[libvirt] [PATCH v4 0/2] Allow UEFI paths to be specified at compile time

2015-01-21 Thread Michal Privoznik
diff to v3: - basically the patch is split into two patches - dropped shell script in to configure.ac Michal Privoznik (2): qemu: Allow UEFI paths to be specified at compile time qemu: Add AAVMF to the list of known UEFIs configure.ac | 12

[libvirt] [PATCH v4 1/2] qemu: Allow UEFI paths to be specified at compile time

2015-01-21 Thread Michal Privoznik
Up until now there are just two ways how to specify UEFI paths to libvirt. The first one is editing qemu.conf, the other is editing qemu_conf.c and recompile which is not that fancy. So, new configure option is introduced: --with-loader-nvram which takes a list of pairs of UEFI firmware and NVRAM

[libvirt] [PATCH 5/5] qemu: reorder PCI slot assignment functions

2015-01-21 Thread Erik Skultety
In previous commit a chunk of code got moved in to a separate static function qemuValidateDevicePCISlotsChipsets. This function then invokes chipset specific functions which are defined as static as well. For these reasons it is necessary to either have a forward declaration or slightly reorder

[libvirt] [PATCH 4/5] qemu: move PCI slot assignment for PIIX3, Q35 into a separate function

2015-01-21 Thread Erik Skultety
In order to be able to test for fully reserved PCI buses, assignment of PCI slots for integrated devices needs to be moved to a separate function. This also might be a good preparation if we decide to add support for other chipsets as well. --- src/qemu/qemu_command.c | 45

[libvirt] [PATCH 1/2] xenapi_driver: fix copy-paste typo

2015-01-21 Thread Pavel Hrdina
Clang found that we are passing variable with wrong enum type to 'xenapiCrashExitEnum2virDomainLifecycle' function. This is probably copy-paste typo as the correct variable exists in the code, but it isn't used. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/xenapi/xenapi_driver.c | 2 +-

[libvirt] [PATCH 2/2] esx_vi: fix possible segfault

2015-01-21 Thread Pavel Hrdina
Clang found possible dereference of NULL pointer which is right. Function 'esxVI_LookupTaskInfoByTask' should find a task info. The issue is that we could return 0 and leave 'taksInfo' pointer NULL because if there is no match we simply end the search loop end set 'result' to 0. Every caller count

Re: [libvirt] [PATCH 1/2] xenapi_driver: fix copy-paste typo

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 18:09:27 +0100, Pavel Hrdina wrote: Clang found that we are passing variable with wrong enum type to 'xenapiCrashExitEnum2virDomainLifecycle' function. This is probably copy-paste typo as the correct variable exists in the code, but it isn't used. Signed-off-by:

[libvirt] [PATCH 0/5] Revert and fix PCI bridge auto-add to extend default bus

2015-01-21 Thread Erik Skultety
Erik Skultety (5): qemu: Remove dead code in qemuDomainAssignPCIAddresses revert patch conf: virDomainDefMaybeAddController tweak return code qemu: Fix auto-adding PCI bridge when all slots are reserved qemu: move PCI slot assignment for PIIX3, Q35 into a separate function qemu: reorder

[libvirt] [PATCH 2/5] conf: virDomainDefMaybeAddController tweak return code

2015-01-21 Thread Erik Skultety
Previously the function returned either -1 in case of an error or 0 on success. However, we should also distinguish between a case we successfully added a controller and a case there wasn't a need to add any controller --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1

[libvirt] [PATCH 1/5] qemu: Remove dead code in qemuDomainAssignPCIAddresses revert patch

2015-01-21 Thread Erik Skultety
As it turned out, fix of dead code 419a22 changed the affected condition from never true to always true, so better fix would be to change the return code of virDomainMaybeAddController from 0 to 1 if a new bridge has been added, thus distinguishing case when we didn't need to add any controller

[libvirt] [PATCH 3/5] qemu: Fix auto-adding PCI bridge when all slots are reserved

2015-01-21 Thread Erik Skultety
Commit 93c8ca tried to fix the issue with auto-adding of a PCI bridge controller, it worked well when the slots were reserved by devices with user defined addresses without any other devices with unspecified PCI addresses present in the XML. However, if another device with unspecified PCI

[libvirt] [PATCH 0/2] fix two issues found by clang

2015-01-21 Thread Pavel Hrdina
Pavel Hrdina (2): xenapi_driver: fix copy-paste typo esx_vi: fix possible segfault src/esx/esx_vi.c | 3 ++- src/xenapi/xenapi_driver.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.0.5 -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/2] qemu: change macvtap device options in response to NIC_RX_FILTER_CHANGED

2015-01-21 Thread Tony Krowiak
On 01/21/2015 01:44 PM, Laine Stump wrote: (I didn't try make syntax-check, but am assuming you have and that it passes) On 01/19/2015 11:18 AM, akrow...@linux.vnet.ibm.com wrote: From: Tony Krowiak akrow...@linux.vnet.ibm.com This patch supplies the funtionality of synchronizing the host

Re: [libvirt] [PATCH 1/2] util: Functions for getting/setting device options

2015-01-21 Thread Tony Krowiak
On 01/21/2015 01:34 PM, Laine Stump wrote: On 01/19/2015 11:18 AM, akrow...@linux.vnet.ibm.com wrote: From: Tony Krowiak akrow...@linux.vnet.ibm.com This patch provides the utility functions needed to synchronize the rxfilter changes made to a guest domain with the corresponding macvtap

Re: [libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2015-01-21 Thread John Ferlan
On 12/09/2014 01:48 AM, Luyao Huang wrote: Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check when we try to start the vm. And this check only check the target type, and the other things will be done in

Re: [libvirt] [PATCH 2/3] Grant access to helpers

2015-01-21 Thread Mike Latimer
On Tuesday, January 20, 2015 09:08:04 AM Cedric Bosdonnat wrote: On Mon, 2015-01-19 at 18:25 -0700, Mike Latimer wrote: Apparmor must not prevent access to required helper programs. The following helpers should be allowed to run in unconfined execution mode: - libvirt_parthelper -

Re: [libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2015-01-21 Thread lhuang
On 01/22/2015 07:16 AM, John Ferlan wrote: On 12/09/2014 01:48 AM, Luyao Huang wrote: Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check when we try to start the vm. And this check only check the target type, and the

[libvirt] 右键列表订阅

2015-01-21 Thread Liuwanzhi
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v3 1/2] qemu: output error when try to hotplug unsupport console

2015-01-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1164627 When using 'virsh attach-device' to hotplug an unsupported console type into a qemu guest, the attachment will erroneously allows the attachment. This patch will check to ensure that only the support target types are used for a running guest.

[libvirt] [PATCH v3 2/2] qemu: add a target type check when hot/cold-plug a Chr device

2015-01-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1164627 Add a func just check the base target type which qemu support. And this check will help to avoid add a qemu unsupport target type chr device to a running guest(hotplug) or to the guest inactive XML (coldplug, will effect next boot) And this

Re: [libvirt] [PATCH v3 2/2] qemu: add a target type check when hot/cold-plug a Chr device

2015-01-21 Thread Peter Krempa
On Thu, Jan 22, 2015 at 10:28:19 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1164627 Add a func just check the base target type which qemu support. And this check will help to avoid add a qemu unsupport target type chr device to a running guest(hotplug) or to the

Re: [libvirt] [PATCH 8/8] Removing probing of secondary drivers

2015-01-21 Thread Michal Privoznik
On 21.01.2015 11:15, Daniel P. Berrange wrote: On Wed, Jan 21, 2015 at 11:08:54AM +0100, Michal Privoznik wrote: On 20.01.2015 17:37, Daniel P. Berrange wrote: For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the

Re: [libvirt] [PATCH 8/8] Removing probing of secondary drivers

2015-01-21 Thread Michal Privoznik
On 20.01.2015 17:37, Daniel P. Berrange wrote: For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the hypervisor in question. As a result the ESX HyperV drivers have both been

Re: [libvirt] [PATCH 0/8] Refactoring driver registration

2015-01-21 Thread Michal Privoznik
On 20.01.2015 17:37, Daniel P. Berrange wrote: This series continues on my previous work to refactor the driver registration process. With this patch series applied, there is no probing of secondary drivers any more. Once the hypervisor driver is chosen, the correct secondary drivers are

Re: [libvirt] [PATCH 8/8] Removing probing of secondary drivers

2015-01-21 Thread Daniel P. Berrange
On Wed, Jan 21, 2015 at 11:08:54AM +0100, Michal Privoznik wrote: On 20.01.2015 17:37, Daniel P. Berrange wrote: For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the

Re: [libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2015-01-21 Thread Ján Tomko
On 01/21/2015 04:10 AM, lhuang wrote: On 01/21/2015 03:00 AM, John Ferlan wrote: On 12/09/2014 01:48 AM, Luyao Huang wrote: Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check when we try to start the vm. And this

[libvirt] [RFC PATCH 12/12] qemu_driver: detect threads corresponding to Vcpus

2015-01-21 Thread Zhu Guihua
After hotplugging the CPUs, we need to re-detect threads corresponding to Vcpus. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 271 src/qemu/qemu_driver.h | 8 ++ src/qemu/qemu_hotplug.c | 7 ++ 3 files

[libvirt] [RFC PATCH 10/12] qemu: implement cpu device hotunplug on live level

2015-01-21 Thread Zhu Guihua
This patch implements live hotunplug of a cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 2 ++ src/qemu/qemu_hotplug.c | 66 + src/qemu/qemu_hotplug.h | 4 +++ 3 files changed, 72 insertions(+) diff

[libvirt] [RFC PATCH 11/12] qemu_monitor_json: sort JSON array of cpu info

2015-01-21 Thread Zhu Guihua
JSON array of cpu info is sorted in order to find thread id of cpu smoothly. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_monitor_json.c | 31 +-- src/util/virbitmap.c | 2 +- src/util/virbitmap.h

[libvirt] [RFC PATCH 04/12] domain_conf: introduce cpu device hotplug helpers

2015-01-21 Thread Zhu Guihua
virDomainCPUFind - to find a cpu within VM def virDomainCPUInsert - wrapper for inserting a new cpu device into VM def virDomainCPURemove - wrapper for removing cpu from VM def Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 59

[libvirt] [RFC PATCH 09/12] qemu: implement cpu device hotplug on live level

2015-01-21 Thread Zhu Guihua
This patch implements live hotplug of a cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 6 ++ src/qemu/qemu_hotplug.c | 55 + src/qemu/qemu_hotplug.h | 7 +++ 3 files changed, 68 insertions(+)

[libvirt] [RFC PATCH 05/12] qemu_driver: implement cpu device hotplug on config level

2015-01-21 Thread Zhu Guihua
The config level requires an insert or remove from domain definition structure. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [RFC PATCH 06/12] qemu_command: introduce a func for cpu device alias assignment

2015-01-21 Thread Zhu Guihua
This function used to set a alias name for cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_command.c | 32 src/qemu/qemu_command.h | 3 +++ 2 files changed, 35 insertions(+) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC PATCH 03/11] domain_conf: add support for memory device configuration in XML

2015-01-21 Thread Zhu Guihua
This patch adds configuration support for the memory device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 16 +++- src/conf/domain_conf.h | 30 ++ src/qemu/qemu_driver.c | 6 ++ src/qemu/qemu_hotplug.c | 1 + 4

[libvirt] [RFC PATCH 2/3] qemu: introduce qemuDomainRemoveDimmDevice

2015-01-21 Thread Zhu Guihua
This func being introduced is responsible for deleting memory backend and removing dimm from VM def. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_hotplug.c | 41 + 1 file changed, 41 insertions(+) diff --git

[libvirt] [RFC PATCH 0/3] qemu: add support to hot-unplug memory device

2015-01-21 Thread Zhu Guihua
If you apply the patchset on your qemu [RESEND PATCH v1 00/13] QEmu memory hot unplug support. https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg00583.html, qemu can support memory hot-unplug. So this patchset will make libvirt support hot-unplug memory device for qemu driver. This

[libvirt] [RFC PATCH 1/3] qemu_monitor: introduce qemuMonitorDelMemoryBackend

2015-01-21 Thread Zhu Guihua
The function being introduced is responsibel for excuting 'object_del' command to hot remove memory backend. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_monitor.c | 20 src/qemu/qemu_monitor.h | 2 ++ 2 files changed, 22 insertions(+) diff --git

[libvirt] [RFC PATCH 3/3] qemu: implement dimm device hot-unplug on live level

2015-01-21 Thread Zhu Guihua
Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 2 ++ src/qemu/qemu_hotplug.c | 54 + src/qemu/qemu_hotplug.h | 3 +++ 3 files changed, 59 insertions(+) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [RFC PATCH 03/12] domain_conf: introduce cpu def helpers

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:00:55 +0800, Zhu Guihua wrote: virDomainCPUDefFree - free memory allocated virDomainCPUDefParseXML - parse job type virDomainCPUDefFormat - output job type This patch lacks addition to the RNG schemas that would describe the elements that are added and the correct

Re: [libvirt] [RFC PATCH 10/12] qemu: implement cpu device hotunplug on live level

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:01:02 +0800, Zhu Guihua wrote: This patch implements live hotunplug of a cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 2 ++ src/qemu/qemu_hotplug.c | 66 +

[libvirt] [RFC PATCH 02/12] domain_conf: add support for cpu device configuration in XML

2015-01-21 Thread Zhu Guihua
This patch adds configuration support for the cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 14 ++ src/conf/domain_conf.h | 19 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 6 ++

[libvirt] [RFC PATCH 01/12] domain_conf: allocate cpu's apic id dynamically

2015-01-21 Thread Zhu Guihua
Add a bitmap apic_idmap to store status of APIC IDs. If you want to use an APIC ID, you can find a minimum value which has not been used in the bitmap. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 15 +++ src/conf/domain_conf.h | 3 +++

[libvirt] [RFC PATCH 00/12] qemu: add support to hot-plug/unplug cpu device

2015-01-21 Thread Zhu Guihua
If you apply the folowing patchset [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html, and [PATCH v2 00/11] cpu: add i386 cpu hot remove support https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01557.html,

[libvirt] [RFC PATCH 08/12] qemu: introduce qemuBuildCPUDeviceStr

2015-01-21 Thread Zhu Guihua
qemuBuildCPUDeviceStr being introduced is responsible for creating command line argument for '-device' for given cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_command.c | 50 + src/qemu/qemu_command.h | 5 +

[libvirt] [RFC PATCH 07/12] qemu: implement support for qemu64-x86_64-cpu

2015-01-21 Thread Zhu Guihua
This patch adds a new capability bit QEMU_CAPS_QEMU64_X86_64_CPU. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git

[libvirt] [RFC PATCH 04/11] domain_conf: introduce dimm def helpers

2015-01-21 Thread Zhu Guihua
virDomainDimmDefFree - free memory allocated for dimm virDomainDimmDefParseXML - parse job type virDomainDimmDefFormat - output job type Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 196 +++ src/conf/domain_conf.h

[libvirt] [RFC PATCH 00/11] qemu: add support to hotplug memory device

2015-01-21 Thread Zhu Guihua
Now qemu has already supported memory hotplug, so this patchset will make libvirt support hotplug memory device for qemu driver. First, add two parameters slots and maxmem for memory hotplug, and the xml format can be like this. memory slot='10'102400/memory maxMemory1024000/maxMemory Second,

[libvirt] [RFC PATCH 11/11] qemu: implement dimm device hotplug on live level

2015-01-21 Thread Zhu Guihua
This patch implements live hotplug of a memory device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 6 + src/qemu/qemu_hotplug.c | 70 + src/qemu/qemu_hotplug.h | 5 3 files changed, 81 insertions(+)

Re: [libvirt] [RFC PATCH 00/12] qemu: add support to hot-plug/unplug cpu device

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:00:52 +0800, Zhu Guihua wrote: If you apply the folowing patchset [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html, and [PATCH v2 00/11] cpu: add i386 cpu hot remove support

Re: [libvirt] [RFC PATCH 02/12] domain_conf: add support for cpu device configuration in XML

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:00:54 +0800, Zhu Guihua wrote: This patch adds configuration support for the cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 14 ++ src/conf/domain_conf.h | 19 +++

Re: [libvirt] [RFC PATCH 08/12] qemu: introduce qemuBuildCPUDeviceStr

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:01:00 +0800, Zhu Guihua wrote: qemuBuildCPUDeviceStr being introduced is responsible for creating command line argument for '-device' for given cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_command.c | 50

Re: [libvirt] [RFC PATCH 11/12] qemu_monitor_json: sort JSON array of cpu info

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:01:03 +0800, Zhu Guihua wrote: JSON array of cpu info is sorted in order to find thread id of cpu smoothly. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_monitor_json.c | 31

Re: [libvirt] [RFC PATCH 00/12] qemu: add support to hot-plug/unplug cpu device

2015-01-21 Thread Daniel P. Berrange
On Wed, Jan 21, 2015 at 04:00:52PM +0800, Zhu Guihua wrote: If you apply the folowing patchset [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html, and [PATCH v2 00/11] cpu: add i386 cpu hot remove support

Re: [libvirt] [RFC PATCH 0/3] qemu: add support to hot-unplug memory device

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:32:05 +0800, Zhu Guihua wrote: If you apply the patchset on your qemu [RESEND PATCH v1 00/13] QEmu memory hot unplug support. https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg00583.html, qemu can support memory hot-unplug. So this patchset will make

Re: [libvirt] [RFC PATCH 00/12] qemu: add support to hot-plug/unplug cpu device

2015-01-21 Thread Daniel P. Berrange
On Wed, Jan 21, 2015 at 04:00:52PM +0800, Zhu Guihua wrote: If you apply the folowing patchset [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg01552.html, and [PATCH v2 00/11] cpu: add i386 cpu hot remove support

[libvirt] [RFC PATCH 03/12] domain_conf: introduce cpu def helpers

2015-01-21 Thread Zhu Guihua
virDomainCPUDefFree - free memory allocated virDomainCPUDefParseXML - parse job type virDomainCPUDefFormat - output job type Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 100 + 1 file changed, 100 insertions(+)

[libvirt] [RFC PATCH 07/11] qemu_monitor: introduce qemuMonitorAddMemoryBackend

2015-01-21 Thread Zhu Guihua
The function being introduced is responsible for excuting 'object_add' command to hot add memory backend. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_monitor.c | 54 + src/qemu/qemu_monitor.h | 4 2 files changed, 58

[libvirt] [RFC PATCH 08/11] qemu_command: introduce a func for memory device alias

2015-01-21 Thread Zhu Guihua
This function used to set a alias name for memory device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_command.c | 32 src/qemu/qemu_command.h | 3 +++ 2 files changed, 35 insertions(+) diff --git a/src/qemu/qemu_command.c

[libvirt] [RFC PATCH 01/11] domain_conf: support slots and maxmem properties in memory xml

2015-01-21 Thread Zhu Guihua
Add properties slots and maxmem, so as to support memory hotplug. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 22 ++ src/conf/domain_conf.h | 4 src/qemu/qemu_command.c | 28 ++-- 3 files changed, 52

[libvirt] [RFC PATCH 06/11] qemu: implement dimm device hotplug on config level

2015-01-21 Thread Zhu Guihua
The config level requires an insert or remove from domain definition structure. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [RFC PATCH 10/11] qemu: introduce qemuBuildDimmDeviceStr

2015-01-21 Thread Zhu Guihua
qemuBuildDimmDeviceStr being introduced is responsible for creating command line argument for '-device' for given dimm device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_command.c | 50 + src/qemu/qemu_command.h | 4

[libvirt] [RFC PATCH 09/11] qemu: implement support for pc-dimm

2015-01-21 Thread Zhu Guihua
This patch adds a new capability bit QEMU_CAPS_PC_DIMM. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt] [RFC PATCH 02/11] domain_conf: introduce virDomainDimmGetFreeSlot

2015-01-21 Thread Zhu Guihua
Add a bitmap dimm_slot_map to store status of slots. If you want to use a slot, you can find a minimum value which has not been used in the bitmap. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 12 src/conf/domain_conf.h | 3 +++ 2 files changed,

Re: [libvirt] [RFC PATCH 01/12] domain_conf: allocate cpu's apic id dynamically

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:00:53 +0800, Zhu Guihua wrote: Add a bitmap apic_idmap to store status of APIC IDs. If you want to use an APIC ID, you can find a minimum value which has not been used in the bitmap. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c

[libvirt] [RFC PATCH 05/11] domain_conf: introduce dimm device hotplug helpers

2015-01-21 Thread Zhu Guihua
virDomainDimmFind - to find a dimm within VM def virDomainDimmInsert - wrapper for inserting a new dimm into VM def virDomainDimmRemove - wrapper for removing dimm from VM def Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/conf/domain_conf.c | 60

Re: [libvirt] [RFC PATCH 07/12] qemu: implement support for qemu64-x86_64-cpu

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:00:59 +0800, Zhu Guihua wrote: This patch adds a new capability bit QEMU_CAPS_QEMU64_X86_64_CPU. Misleading subject. This patch adds the capability, but does not impelment support for the device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com ---

Re: [libvirt] [RFC PATCH 09/12] qemu: implement cpu device hotplug on live level

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:01:01 +0800, Zhu Guihua wrote: This patch implements live hotplug of a cpu device. Signed-off-by: Zhu Guihua zhugh.f...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 6 ++ src/qemu/qemu_hotplug.c | 55 +

Re: [libvirt] [RFC PATCH 00/11] qemu: add support to hotplug memory device

2015-01-21 Thread Peter Krempa
On Wed, Jan 21, 2015 at 16:20:16 +0800, Zhu Guihua wrote: Now qemu has already supported memory hotplug, so this patchset will make libvirt support hotplug memory device for qemu driver. As I'm already working on this I can see a few problems with your series. First, add two parameters

[libvirt] RFC: Building a virtlogd daemon

2015-01-21 Thread Daniel P. Berrange
With QEMU there are a couple of areas where QEMU ends up logging data to a file on the host. - stdout/err - connected to /var/log/libvirt/qemu/$GUEST.log - serial/parallel/console when used with type=file The stdout/err is typically very small, typically only getting data when an error occurs

[libvirt] [PATCH v2 7/9] domain_conf: Read and Write quorum config

2015-01-21 Thread Matthias Gatto
Add the capabiltty to libvirt to parse and format the quorum syntax as described here: http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c | 165 +++-- 1

[libvirt] [libvirt-test-API][PATCH] Add network_dhcp_leases test case to conf

2015-01-21 Thread jiahu
For running the case, should setup testing environment before the case, and clean up the environment after the case. --- cases/basic_network.conf | 55 1 file changed, 55 insertions(+) diff --git a/cases/basic_network.conf

Re: [libvirt] [PATCH 2/2] qemu: add a check when cold-plug a Chr device

2015-01-21 Thread Luyao Huang
On 01/21/2015 08:00 PM, Ján Tomko wrote: On 01/21/2015 04:10 AM, lhuang wrote: On 01/21/2015 03:00 AM, John Ferlan wrote: On 12/09/2014 01:48 AM, Luyao Huang wrote: Add a func just check the base target type which qemu support. But i still doubt this will be useful , we already have a check

[libvirt] [libvirt-test-API][PATCH] Add network_dhcp_leases test case

2015-01-21 Thread jiahu
The network_dhcp_leases.py uses DHCPLeases() to validate new API virNetworkGetDHCPLeases of libvirt. --- repos/network/network_dhcp_leases.py | 277 +++ 1 file changed, 277 insertions(+) create mode 100644 repos/network/network_dhcp_leases.py diff --git

Re: [libvirt] [PATCH 1/2] Introduce btrfsCloneFile for btrfs COW copy

2015-01-21 Thread Ján Tomko
On 01/21/2015 08:06 AM, Chen, Hanxiao wrote: -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Chen, Hanxiao Sent: Monday, January 19, 2015 2:26 PM To: Ján Tomko; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH

Re: [libvirt] RFC: Building a virtlogd daemon

2015-01-21 Thread Vasiliy Tolstov
Very good idea! 2015-01-21 15:12 GMT+03:00 Daniel P. Berrange berra...@redhat.com: With QEMU there are a couple of areas where QEMU ends up logging data to a file on the host. - stdout/err - connected to /var/log/libvirt/qemu/$GUEST.log - serial/parallel/console when used with type=file

[libvirt] [PATCH v2 0/9] qemu: Add quorum support to libvirt

2015-01-21 Thread Matthias Gatto
The purpose of these patches is to introduce quorum for libvirt I've try to follow this proposal: http://www.redhat.com/archives/libvir-list/2014-May/msg00533.html This feature ask for 6 task: 1) Allow a _virStorageSource to contain more than one backing store. Therefore we have to treat the

[libvirt] [PATCH v2 3/9] virstoragefile: Add virStorageSourceSetBackingStore

2015-01-21 Thread Matthias Gatto
As explained for virStorageSourceGetBackingStore, quorum allows multiple backing store, this make the operation to set bs complex because we have to check if the backingStore is used as an array or a pointer, and set it differently in both case. In order to help the manipulation of backing store,

[libvirt] Entering freeze for libvirt-1.2.12

2015-01-21 Thread Daniel Veillard
As planned I tagged the release candidate 1 in git and pushed signed tarballs and rpms to the usual place: ftp://libvirt.org/libvirt/ Seems to work fine for me, but my testing is limited. Give it a try especially on other architectures or OSes. Plan is to release an rc2 by the dn of the

[libvirt] [PATCH v2 2/9] virstoragefile: Always use virStorageSourceGetBackingStore to get backing store

2015-01-21 Thread Matthias Gatto
Uniformize backing store usage by calling virStorageSourceGetBackingStore instead of setting backing store manually. Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c| 7 --- src/conf/storage_conf.c | 18 ++

[libvirt] [PATCH v2 8/9] qemu: Add quorum support in qemuBuildDriveDevStr

2015-01-21 Thread Matthias Gatto
Allow to libvirt to build the quorum string used by quemu. Add 2 static functions: qemuBuildQuorumStr and qemuBuildAndAppendDriveStrToVirBuffer. qemuBuildQuorumStr is made because a quorum can have another quorum as a child, so we may need to call qemuBuildQuorumStr recursively.

[libvirt] [PATCH v2 5/9] virstoragefile: Treat backingStore as a pointer or an array

2015-01-21 Thread Matthias Gatto
As explain in the former patchs, backingStore can be treat an array or a pointer. If we have only one backingStore we have to use it as a normal ptr but if there is more backing store, we use it as a pointer's array. Because it would be complicated to expend backingStore manually, and do the

[libvirt] [PATCH v2 9/9] virstoragefile: Add node-name

2015-01-21 Thread Matthias Gatto
Add nodename inside virstoragefile During xml backingStore parsing, look for a nodename attribute in the disk declaration if this one is a quorum, if a nodename is found, add it to the virStorageSource otherwise create a new one with a random name. Take inspiration from this patch to create the

[libvirt] [PATCH v2 1/9] virstoragefile: Add virStorageSourceGetBackingStore

2015-01-21 Thread Matthias Gatto
Create virStorageSourceGetBackingStore function in preparation for quorum: Actually, if we want to get a backing store inside a virStorageSource we have to do it manually(src-backingStore = backingStore). The problem is that with a quorum, a virStorageSource can contain multiple backing stores,

[libvirt] [PATCH v2 6/9] virstoragefile: Add quorum in virstoragefile

2015-01-21 Thread Matthias Gatto
Add VIR_STORAGE_TYPE_QUORUM in virStorageType. Add VIR_STORAGE_FILE_QUORUM in virStorageFileFormat. Add threshold value in _virStorageSource Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- docs/formatdomain.html.in | 20 ++-- docs/schemas/storagecommon.rng |

Re: [libvirt] [PATCH v2] systemd: fix build without dbus

2015-01-21 Thread Pavel Hrdina
On 01/19/2015 02:36 PM, Daniel P. Berrange wrote: The virDBusMethodCall method has a DBusError as one of its parameters. If the caller wants to pass a non-NULL value for this, it immediately makes the calling code require DBus at build time. This has led to breakage of non-DBus builds several

Re: [libvirt] [PATCH v2] systemd: fix build without dbus

2015-01-21 Thread Daniel P. Berrange
On Wed, Jan 21, 2015 at 03:15:31PM +0100, Ján Tomko wrote: On 01/19/2015 02:36 PM, Daniel P. Berrange wrote: The virDBusMethodCall method has a DBusError as one of its parameters. If the caller wants to pass a non-NULL value for this, it immediately makes the calling code require DBus at

[libvirt] [PATCH v2 4/9] virstoragefile: Always use virStorageSourceSetBackingStore to set backing store

2015-01-21 Thread Matthias Gatto
Replace the parts of the code where a backing store is set manually with virStorageSourceSetBackingStore Signed-off-by: Matthias Gatto matthias.ga...@outscale.com --- src/conf/domain_conf.c | 2 +- src/conf/storage_conf.c | 4 ++-- src/qemu/qemu_driver.c | 4 ++--

Re: [libvirt] [PATCH v2] systemd: fix build without dbus

2015-01-21 Thread Ján Tomko
On 01/19/2015 02:36 PM, Daniel P. Berrange wrote: The virDBusMethodCall method has a DBusError as one of its parameters. If the caller wants to pass a non-NULL value for this, it immediately makes the calling code require DBus at build time. This has led to breakage of non-DBus builds several