Re: [libvirt] [PATCH 1/2] Add support for EOI with APIC

2012-09-14 Thread Martin Kletzander
On 09/13/2012 04:52 PM, Michal Privoznik wrote: On 13.09.2012 16:12, Martin Kletzander wrote: New options is added to support EOI (End of Interrupt) exposure for guests. As it makes sense only when APIC is enabled, I added this into the apic element in features because this should be tri-state

Re: [libvirt] [PATCH v2] Fix libvirtd crash possibility

2012-09-14 Thread Martin Kletzander
On 09/13/2012 05:04 PM, Eric Blake wrote: On 09/12/2012 05:00 PM, Eric Blake wrote: On 09/12/2012 04:44 PM, Martin Kletzander wrote: When generating RPC protocol messages, it's strictly needed to have continuousline of numbers or RPC messages. However in case anyone s/continuousline

[libvirt] [PATCH] syntax-check: fix run.in

2012-09-18 Thread Martin Kletzander
Two more problems in run.in made the syntax-check fail. --- Pushed under the 'build-breaker' rule. cfg.mk | 2 +- run.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cfg.mk b/cfg.mk index 0dd58df..bbfd4a2 100644 --- a/cfg.mk +++ b/cfg.mk @@ -789,7 +789,7 @@

Re: [libvirt] [PATCH] Adhere to copyright_address check

2012-09-18 Thread Martin Kletzander
On 09/18/2012 01:10 PM, Daniel P. Berrange wrote: On Tue, Sep 18, 2012 at 01:07:26PM +0200, Guido Günther wrote: to fix make syntax-check Found by http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/ --- run.in |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[libvirt] [PATCH] virNetDevBandwidthClear: Improve error handling

2012-09-18 Thread Martin Kletzander
Two changes are introduced in this patch. The first change removes ATTRIBUTE_RETURN_CHECK from virNetDevBandwidthClear, because it was called with ignore_value always, anyway. The function is used even when it's not necessary to call it, just for cleanup purposes. The second change is an added

[libvirt] [PATCH] secret: Fix error for private secrets

2012-09-18 Thread Martin Kletzander
When trying to get the value of a private secret, the code used 'operation denied' error. That error is specified as an error for read-only connections trying to perform denied operation. The following error seems more accurate. To compare the difference: - BEFORE error: operation secret is

[libvirt] [PATCH] Fix minor details in apic eoi

2012-09-18 Thread Martin Kletzander
The introduction of APIC EOI patches had a few little details that could look better, so this patch fixes that. The fixes: - on and off as values are changed to codeon/code and codeoff/code respectively, because the code around uses the same tags for such values. - VIR_FREE is unnecessary

Re: [libvirt] [PATCH] Fix minor details in apic eoi

2012-09-18 Thread Martin Kletzander
On 09/18/2012 04:33 PM, Peter Krempa wrote: On 09/18/12 16:01, Martin Kletzander wrote: The introduction of APIC EOI patches had a few little details that could look better, so this patch fixes that. The fixes: - on and off as values are changed to codeon/code and codeoff/code

Re: [libvirt] [PATCH] virNetDevBandwidthClear: Improve error handling

2012-09-18 Thread Martin Kletzander
On 09/18/2012 04:23 PM, Peter Krempa wrote: On 09/18/12 15:52, Martin Kletzander wrote: Two changes are introduced in this patch. The first change removes ATTRIBUTE_RETURN_CHECK from virNetDevBandwidthClear, because it was called with ignore_value always, anyway. The function is used even

Re: [libvirt] [PATCH] secret: Fix error for private secrets

2012-09-18 Thread Martin Kletzander
On 09/18/2012 04:09 PM, Peter Krempa wrote: On 09/18/12 15:53, Martin Kletzander wrote: When trying to get the value of a private secret, the code used 'operation denied' error. That error is specified as an error for read-only connections trying to perform denied operation. The following

[libvirt] [PATCH 4/4] QEMU Tests for reboot-timeout

2012-09-18 Thread Martin Kletzander
--- tests/qemuargv2xmltest.c| 4 .../qemuxml2argv-reboot-timeout-disabled.args | 3 +++ .../qemuxml2argv-reboot-timeout-disabled.xml| 21 + .../qemuxml2argv-reboot-timeout-enabled.args| 3 +++

[libvirt] [PATCH 0/4] Add support for reboot-timeout

2012-09-18 Thread Martin Kletzander
and enums (I couldn't look at that), so that's the first patch. Most of it is mechanical, the rest should be pretty straight-forward. --- I'd *love* to have it in 0.10.2, but I understand if it's too late :( Martin Kletzander (4): qemu: Cleanup boot parameter building Add support for reboot

[libvirt] [PATCH 2/4] Add support for reboot-timeout

2012-09-18 Thread Martin Kletzander
Whenever the guest machine fails to boot, new parameter (reboot-timeout) controls whether it should reboot and after how many ms it should do so. Docs included. --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 20 src/conf/domain_conf.c

[libvirt] [PATCH 3/4] qemu: Add support for reboot-timeout

2012-09-18 Thread Martin Kletzander
This patch adds support for -boot reboot-timeout=rb_time that is added in QEMU. --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 36 3 files changed, 41 insertions(+) diff --git

Re: [libvirt] [PATCH 2/4] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
On 09/18/2012 06:50 PM, Daniel P. Berrange wrote: On Tue, Sep 18, 2012 at 05:36:47PM +0200, Martin Kletzander wrote: Whenever the guest machine fails to boot, new parameter (reboot-timeout) controls whether it should reboot and after how many ms it should do so. Docs included. --- docs

Re: [libvirt] [PATCHv2] security: Don't ignore errors when parsing DAC security labels

2012-09-19 Thread Martin Kletzander
On 09/18/2012 04:00 PM, Peter Krempa wrote: The DAC security driver silently ignored errors when parsing the DAC label and used default values instead. With a domain containing the following label definition: seclabel type='static' model='dac' relabel='yes' labelsdfklsdjlfjklsdjkl/label

Re: [libvirt] [PATCH] qemu: Transition domain to PAUSED after 'stop' command

2012-09-19 Thread Martin Kletzander
On 09/19/2012 12:16 PM, Michal Privoznik wrote: On 19.09.2012 11:43, Michal Privoznik wrote: Currently, we mark domain PAUSED (but not emit an event) just before we issue 'stop' on monitor; This command can take ages to finish, esp. when domain's doing a lot of IO - users can enforce qemu to

[libvirt] [PATCH v2 2/3] qemu: Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
This patch adds support for -boot reboot-timeout=rb_time that is added in QEMU. --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 28 3 files changed, 33 insertions(+) diff --git

[libvirt] [PATCH v2 1/3] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
Whenever the guest machine fails to boot, new parameter (reboot-timeout) controls whether it should reboot and after how many ms it should do so. Docs included. --- docs/formatdomain.html.in | 11 --- docs/schemas/domaincommon.rng | 24 ++-- src/conf/domain_conf.c

[libvirt] [PATCH v2 3/3] QEMU Tests for reboot-timeout

2012-09-19 Thread Martin Kletzander
--- tests/qemuargv2xmltest.c| 4 .../qemuxml2argv-reboot-timeout-disabled.args | 3 +++ .../qemuxml2argv-reboot-timeout-disabled.xml| 21 + .../qemuxml2argv-reboot-timeout-enabled.args| 3 +++

[libvirt] [PATCH v2 0/3] Add support for reboot-timeout

2012-09-19 Thread Martin Kletzander
and enums (I couldn't look at that), so that's the first patch. Most of it is mechanical, the rest should be pretty straight-forward. --- v2: - modified according to mprivozn and danpb - ACK'd patch not sent Martin Kletzander (3): Add support for reboot-timeout qemu: Add support for reboot

Re: [libvirt] [PATCH v2] Fix libvirtd crash possibility

2012-09-20 Thread Martin Kletzander
On 09/19/2012 07:49 PM, Eric Blake wrote: On 09/12/2012 04:44 PM, Martin Kletzander wrote: When generating RPC protocol messages, it's strictly needed to have continuousline of numbers or RPC messages. However in case anyone tries backporting some functionality and will skip a number

[libvirt] [PATCH v2 0/3] Support for limiting guest coredumps

2012-09-20 Thread Martin Kletzander
using madvise(2) system call and in case the guest memory is not desired the option can reduce the coredump by a reasonable size. [1] https://www.redhat.com/archives/libvir-list/2012-August/msg00572.html [2] http://lists.nongnu.org/archive/html/qemu-devel/2012-08/msg00554.html Martin Kletzander (3

[libvirt] [PATCH v2 2/3] qemu: add support for dump-guest-core option

2012-09-20 Thread Martin Kletzander
The dump-guest-core' option is new option for the machine type (-machine pc,dump-guest-core) that controls whether the guest memory will be marked as dumpable. While testing this, I've found out that the value for the '-M' options is not parsed correctly when additional parameters are used.

[libvirt] [PATCH v2 3/3] tests: Add tests for dump-core option

2012-09-20 Thread Martin Kletzander
--- tests/qemuargv2xmltest.c | 2 ++ .../qemuxml2argv-machine-core-off.args | 5 + .../qemuxml2argv-machine-core-off.xml | 26 ++ .../qemuxml2argv-machine-core-on.args | 5 +

[libvirt] [PATCH v2 1/3] Add support for limiting guest coredump

2012-09-20 Thread Martin Kletzander
Sometimes when guest machine crashes, coredump can get huge due to the guest memory. This can be limited using madvise(2) system call and is being used in QEMU hypervisor. This patch adds an option for configuring that in the domain XML and related documentation. --- docs/formatdomain.html.in

Re: [libvirt] [PATCH v2 0/3] Support for limiting guest coredumps

2012-09-20 Thread Martin Kletzander
On 09/20/2012 10:58 AM, Martin Kletzander wrote: Even though I got a sparse ACK on v1, it's been some time, all the things should be fixed. Also the QEMU patch is already upstream. This series applies on the disable_s3/s4 series [1] and works with qemu patch [2] (upstream already

Re: [libvirt] [PATCH v2 1/3] Add support for limiting guest coredump

2012-09-20 Thread Martin Kletzander
On 09/20/2012 11:32 AM, Daniel P. Berrange wrote: On Thu, Sep 20, 2012 at 10:58:13AM +0200, Martin Kletzander wrote: Sometimes when guest machine crashes, coredump can get huge due to the guest memory. This can be limited using madvise(2) system call and is being used in QEMU hypervisor

Re: [libvirt] [PATCH v2 2/3] qemu: Add support for reboot-timeout

2012-09-20 Thread Martin Kletzander
On 09/20/2012 12:22 PM, Peter Krempa wrote: @@ -8271,6 +8286,19 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, qemuParseCommandLineBootDevs(def, token); } else if (STRPREFIX(token, menu=on)) { def-os.bootmenu

Re: [libvirt] [PATCHv3] security: Don't ignore errors when parsing DAC security labels

2012-09-20 Thread Martin Kletzander
On 09/19/2012 02:42 PM, Peter Krempa wrote: The DAC security driver silently ignored errors when parsing the DAC label and used default values instead. With a domain containing the following label definition: seclabel type='static' model='dac' relabel='yes' labelsdfklsdjlfjklsdjkl/label

Re: [libvirt] [PATCH v2 2/3] qemu: Add support for reboot-timeout

2012-09-20 Thread Martin Kletzander
On 09/20/2012 03:32 PM, Peter Krempa wrote: On 09/20/12 15:15, Martin Kletzander wrote: On 09/20/2012 12:22 PM, Peter Krempa wrote: @@ -8271,6 +8286,19 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, qemuParseCommandLineBootDevs(def, token

Re: [libvirt] [PATCH v2 1/3] Add support for reboot-timeout

2012-09-20 Thread Martin Kletzander
On 09/20/2012 11:54 AM, Peter Krempa wrote: On 09/19/12 19:22, Martin Kletzander wrote: Whenever the guest machine fails to boot, new parameter (reboot-timeout) controls whether it should reboot and after how many ms it should do so. Docs included. --- docs/formatdomain.html.in | 11

Re: [libvirt] [PATCH v2 2/3] qemu: add support for dump-guest-core option

2012-09-20 Thread Martin Kletzander
On 09/20/2012 02:54 PM, Michal Privoznik wrote: On 20.09.2012 10:58, Martin Kletzander wrote: The dump-guest-core' option is new option for the machine type (-machine pc,dump-guest-core) that controls whether the guest memory will be marked as dumpable. While testing this, I've found out

Re: [libvirt] [PATCH v2 3/3] QEMU Tests for reboot-timeout

2012-09-20 Thread Martin Kletzander
On 09/20/2012 11:59 AM, Peter Krempa wrote: On 09/19/12 19:22, Martin Kletzander wrote: --- tests/qemuargv2xmltest.c| 4 .../qemuxml2argv-reboot-timeout-disabled.args | 3 +++ .../qemuxml2argv-reboot-timeout-disabled.xml| 21

Re: [libvirt] [PATCH v2 3/3] tests: Add tests for dump-core option

2012-09-20 Thread Martin Kletzander
On 09/20/2012 02:54 PM, Michal Privoznik wrote: On 20.09.2012 10:58, Martin Kletzander wrote: --- tests/qemuargv2xmltest.c | 2 ++ .../qemuxml2argv-machine-core-off.args | 5 + .../qemuxml2argv-machine-core-off.xml | 26

Re: [libvirt] [PATCH v2 1/3] Add support for limiting guest coredump

2012-09-20 Thread Martin Kletzander
On 09/20/2012 02:54 PM, Michal Privoznik wrote: On 20.09.2012 10:58, Martin Kletzander wrote: Sometimes when guest machine crashes, coredump can get huge due to the guest memory. This can be limited using madvise(2) system call and is being used in QEMU hypervisor. This patch adds an option

Re: [libvirt] [PATCH] Update how to compile with -Werror

2012-09-25 Thread Martin Kletzander
On 09/25/2012 09:38 AM, Jiri Denemark wrote: On Mon, Sep 24, 2012 at 18:44:34 -0500, Doug Goldstein wrote: --enable-compile-warnings=error has been renamed to --enable-werror so update the HACKING and the hacking.html to reflect that. --- docs/hacking.html.in |2 +- 1 files changed, 1

Re: [libvirt] [PATCH] Update how to compile with -Werror

2012-09-25 Thread Martin Kletzander
On 09/25/2012 11:23 AM, Jiri Denemark wrote: On Tue, Sep 25, 2012 at 11:16:32 +0200, Martin Kletzander wrote: On 09/25/2012 09:38 AM, Jiri Denemark wrote: On Mon, Sep 24, 2012 at 18:44:34 -0500, Doug Goldstein wrote: --enable-compile-warnings=error has been renamed to --enable-werror so

Re: [libvirt] [PATCH] lxc: Correctly report active cgroups

2012-10-01 Thread Martin Kletzander
On 10/01/2012 02:54 PM, Michal Privoznik wrote: There was an inverted return value in lxcCgroupControllerActive(). The function assumes cgroups are active and do couple of checks to prove that. If any of them fails, false is returned. Therefore, at the end, after all checks are done we must

[libvirt] [PATCH] fix kvm_pv_eoi with kvmclock

2012-10-08 Thread Martin Kletzander
When both kvmclock and kvm_pv_eoi are configured (either disabled or enabled) libvirt will generate invalid CPU specification due to the fact that even though kvmclock causes the CPU to be specified, it doesn't set have_cpu flag to true (and the new kvm_pv_eoi as well). This patch fixes the issue

Re: [libvirt] [PATCH] fix kvm_pv_eoi with kvmclock

2012-10-08 Thread Martin Kletzander
On 10/08/2012 07:52 PM, Peter Krempa wrote: On 10/08/12 19:32, Martin Kletzander wrote: When both kvmclock and kvm_pv_eoi are configured (either disabled or enabled) libvirt will generate invalid CPU specification due to the fact that even though kvmclock causes the CPU to be specified

Re: [libvirt] [PATCH] hooks: let virCommand do the error reporting

2012-10-09 Thread Martin Kletzander
On 10/09/2012 05:47 AM, Eric Blake wrote: The code was reporting raw exit status without decoding it into normal vs. signal exit. virCommandRun already does this, but with a different error type, so all we have to do is recast the error to the correct type. Reported by li guang. *

Re: [libvirt] [PATCH] qemu: Fix QMP detection of QXL graphics

2012-10-09 Thread Martin Kletzander
On 10/09/2012 08:30 AM, Jiri Denemark wrote: With the recent introduction of QMP capabilities probing, libvirt failed to detect support for QXL graphics in QEMU 1.2 and newer. In addition to fixing that, this patch also causes libvirt to detect QXL support for qemu-kvm-0.13.0, which doesn't

Re: [libvirt] [PATCH] hooks: let virCommand do the error reporting

2012-10-09 Thread Martin Kletzander
On 10/09/2012 04:45 PM, Eric Blake wrote: On 10/09/2012 12:32 AM, Martin Kletzander wrote: On 10/09/2012 05:47 AM, Eric Blake wrote: The code was reporting raw exit status without decoding it into normal vs. signal exit. virCommandRun already does this, but with a different error type, so

Re: [libvirt] [PATCH] qemu: Create or remove cgroup when doing vcpu (un)hotpluging

2012-10-10 Thread Martin Kletzander
On 10/09/2012 06:08 PM, Osier Yang wrote: Various APIs use cgroup to either set or get the statistics of host or guest. Hotplug or unhotplug new vcpus without creating or removing the cgroup for the vcpus could cause problems for those APIs. E.g. % virsh vcpucount dom maximum config

Re: [libvirt] [PATCH 1/3] conf: Do not allow vcpupin's cpuid exceed current vcpus number

2012-10-10 Thread Martin Kletzander
On 10/10/2012 01:14 PM, Osier Yang wrote: Setting pinning policy for vcpu which exceed current vcpus number makes no sense, and it could cause problem for APIs which associate the vcpu thread id with cgroup. --- src/conf/domain_conf.c |4 ++-- 1 files changed, 2 insertions(+), 2

Re: [libvirt] [PATCH 2/3] conf: Initialize the pinning policy for vcpus

2012-10-10 Thread Martin Kletzander
On 10/10/2012 01:14 PM, Osier Yang wrote: There are two branches to specifiy the pinning policy for vcpus. 1) def-cpuset: vcpu cpuset='0-10,^6'6/vcpu 2) def-cputune.vcpupins: cputune vcpupin vcpuid='1' cpuset='0-5'/ /cputune def-cputune.vcpupins only maintains the

[libvirt] [PATCH] Make the use of XDG folders variable

2012-10-11 Thread Martin Kletzander
While ago, commit 32a9aac2e04c991340b66c855a1095e4e6445e54 introduced a change of the folders used to keep information in user home directories. As this can still cause problems, mainly with older SELinux policies, make this change variable with new configuration option '--disable-xdg'. ---

Re: [libvirt] [PATCH 3/7] conf: Initialize the pinning policy for vcpus

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: Document for vcpu's cpuset says: Since 0.4.4, this element can contain an optional cpuset attribute, which is a comma-separated list of physical CPU numbers that virtual CPUs can be pinned to. However, it's not the truth, libvirt actually pins the

Re: [libvirt] [PATCH 4/7] qemu: Create or remove cgroup when doing vcpu hotpluging

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: Various APIs use cgroup to either set or get the statistics of host or guest. Hotplug or hot unplug new vcpus without creating or removing the cgroup for the vcpus could cause problems for those APIs. E.g. % virsh vcpucount dom maximum config

Re: [libvirt] [PATCH 2/7] conf: Do not allow vcpupin's cpuid exceed current vcpus number

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: Setting pinning policy for vcpu which exceed current vcpus number makes no sense, and it could cause problem for APIs which associate the vcpu thread id with cgroup. --- src/conf/domain_conf.c |4 ++-- 1 files changed, 2 insertions(+), 2

Re: [libvirt] [PATCH] conf: Ignore vcpupin for not onlined vcpus when parsing

2012-10-12 Thread Martin Kletzander
On 10/12/2012 03:52 PM, Osier Yang wrote: Setting pinning policy for vcpu which exceeds current vcpus number just makes no sense, however, it could cause various problems, E.g. vcpu current='1'4/vcpu cputune vcpupin vcpuid='3' cpuset='4'/ /cputune % virsh start linux error: Failed to

Re: [libvirt] [PATCH 6/7] conf: Prohibit emulatorpin if vcpu placement is auto

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: When vcpu placement is auto, the domain process will be pinned to advisory nodeset from querying numad, While emulatorpin will override the pinning. That means both of them are to set the pinning policy for domain process, but conflicts with each

Re: [libvirt] [PATCH 7/7] qemu: Ignore def-cpumask if emulatorpin is specified

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: If the vcpu placement is static, it's just fine to ignore the def-cpumask if emulatorpin is specified. See more details in PATCH 1/7. --- src/qemu/qemu_process.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH 7/7] qemu: Ignore def-cpumask if emulatorpin is specified

2012-10-12 Thread Martin Kletzander
On 10/12/2012 04:16 PM, Martin Kletzander wrote: On 10/12/2012 11:50 AM, Osier Yang wrote: If the vcpu placement is static, it's just fine to ignore the def-cpumask if emulatorpin is specified. See more details in PATCH 1/7. --- src/qemu/qemu_process.c |3 ++- 1 files changed, 2

Re: [libvirt] [PATCH 5/7] qemu: Initialize cpuset for hotplugged vcpu as def-cpuset

2012-10-12 Thread Martin Kletzander
On 10/12/2012 11:50 AM, Osier Yang wrote: The onlined vcpu pinning policy should inherit def-cpuset if it's not specified explicitly, and the affinity should be set in this case. Oppositely, the offlined vcpu pinning policy should be free()'ed. --- src/conf/domain_conf.c | 21

[libvirt] [PATCH] selinux: Use raw contexts

2012-10-12 Thread Martin Kletzander
We are currently able to work only with non-translated SELinux contexts, but we are using functions that work with translated contexts throughout the code. This patch swaps all SELinux context translation relative calls with their raw sisters to avoid parsing problems. The problems can be

Re: [libvirt] [PATCH v3] conf: Ignore emulatorpin if vcpu placement is auto

2012-10-12 Thread Martin Kletzander
On 10/12/2012 04:44 PM, Osier Yang wrote: When vcpu placement is auto, the domain process will be pinned to advisory nodeset from querying numad, While emulatorpin will override the pinning. That means both of them are to set the pinning policy for domain process, but conflicts with each

Re: [libvirt] [PATCH] selinux: Use raw contexts

2012-10-12 Thread Martin Kletzander
On 10/12/2012 04:53 PM, Eric Blake wrote: On 10/12/2012 08:39 AM, Martin Kletzander wrote: We are currently able to work only with non-translated SELinux contexts, but we are using functions that work with translated contexts throughout the code. This patch swaps all SELinux context

Re: [libvirt] [PATCH] selinux: Use raw contexts

2012-10-12 Thread Martin Kletzander
On 10/12/2012 05:41 PM, Eric Blake wrote: On 10/12/2012 09:17 AM, Martin Kletzander wrote: On 10/12/2012 04:53 PM, Eric Blake wrote: On 10/12/2012 08:39 AM, Martin Kletzander wrote: We are currently able to work only with non-translated SELinux contexts, but we are using functions that work

[libvirt] [PATCH] Add support for SUSPEND_DISK event

2012-10-12 Thread Martin Kletzander
This patch adds support for SUSPEND_DISK event; both lifecycle and separated. The support is added for QEMU, machines are changed to PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes to shut-off. This and much more needs to be done in order for libvirt to work with transient

Re: [libvirt] [PATCHv2 3/4] qemu: reorganize qemuDomainChangeNet

2012-10-15 Thread Martin Kletzander
On 10/14/2012 11:23 AM, Laine Stump wrote: (V1 of this patch is in the following thread: https://www.redhat.com/archives/libvir-list/2012-October/msg00542.html I'm posting it because PATCH 4/4 of that series attempts to use apparently non-existent/non-working functionality in qemu;

[libvirt] [PATCHv3] Add support for SUSPEND_DISK event

2012-10-15 Thread Martin Kletzander
This patch adds support for SUSPEND_DISK event; both lifecycle and separated. The support is added for QEMU, machines are changed to PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes to shut-off. This and much more needs to be done in order for libvirt to work with transient

Re: [libvirt] [PATCH 1/2] selinux: load and free selinux active file contexts configuration database

2012-10-15 Thread Martin Kletzander
On 10/15/2012 09:12 AM, Guannan Ren wrote: If we use matchpathcon() to look up selinux context for specific pathname, it'd better actively load file contexts database by matchpathcon_init() and free memory when finished using matchpathcon by matchpathcon_fini(). ---

Re: [libvirt] [PATCH] Add support for SUSPEND_DISK event

2012-10-15 Thread Martin Kletzander
On 10/15/2012 12:07 PM, Daniel P. Berrange wrote: On Fri, Oct 12, 2012 at 09:28:04PM +0200, Martin Kletzander wrote: This patch adds support for SUSPEND_DISK event; both lifecycle and separated. The support is added for QEMU, machines are changed to PMSUSPENDED, but as QEMU sends SHUTDOWN

Re: [libvirt] [PATCHv3] Add support for SUSPEND_DISK event

2012-10-15 Thread Martin Kletzander
On 10/15/2012 12:07 PM, Peter Krempa wrote: On 10/15/12 11:55, Martin Kletzander wrote: This patch adds support for SUSPEND_DISK event; both lifecycle and separated. The support is added for QEMU, machines are changed to PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes

Re: [libvirt] [PATCH 1/2] selinux: load and free selinux active file contexts configuration database

2012-10-15 Thread Martin Kletzander
On 10/15/2012 12:22 PM, Daniel P. Berrange wrote: On Mon, Oct 15, 2012 at 03:12:45PM +0800, Guannan Ren wrote: If we use matchpathcon() to look up selinux context for specific pathname, it'd better actively load file contexts database by matchpathcon_init() and free memory when finished using

Re: [libvirt] [PATCH v2 2/2] selinux: add security selinux function to label tapfd

2012-10-15 Thread Martin Kletzander
On 10/15/2012 11:03 AM, Guannan Ren wrote: BZ:https://bugzilla.redhat.com/show_bug.cgi?id=851981 When using macvtap, a character device gets first created by kernel with name /dev/tapN, its selinux context is: system_u:object_r:device_t:s0 Shortly, when udev gets notification when new file

[libvirt] [PATCH] selinux: Use raw contexts 2

2012-10-15 Thread Martin Kletzander
In commit 9674f2c637114fa6ac0680fe5658a41a62bb34a8, I forgot to change selabel_lookup with the other functions, so this one-liner does exactly that. --- src/security/security_selinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/security_selinux.c

Re: [libvirt] [PATCH] selinux: Use raw contexts 2

2012-10-16 Thread Martin Kletzander
On 10/15/2012 04:12 PM, Guannan Ren wrote: On 10/15/2012 08:45 PM, Martin Kletzander wrote: In commit 9674f2c637114fa6ac0680fe5658a41a62bb34a8, I forgot to change selabel_lookup with the other functions, so this one-liner does exactly that. --- src/security/security_selinux.c | 2 +- 1

[libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I created this cleanup that uses one pointer for all the temporary stored XPath strings and values, plus

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:48 AM, Michal Privoznik wrote: On 16.10.2012 11:19, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup). As a fix, I

Re: [libvirt] [PATCH] conf: Fix crash with cleanup

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:50 AM, Daniel P. Berrange wrote: On Tue, Oct 16, 2012 at 11:19:55AM +0200, Martin Kletzander wrote: There was a crash possible when both boot dev... and boot order... were specified due to virDomainDefParseBootXML() erroring out before setting *tmp (which was free'd in cleanup

Re: [libvirt] [RFC][PATCH] change the meaning of vnc port in xml

2012-10-16 Thread Martin Kletzander
On 10/16/2012 11:54 AM, Hu Tao wrote: Now the vnc port in xml file reflects the REAL port hypervisor will listen on for vnc connection. But vnc ports usually start from 5900, it's common to say 0 for 5900, 1 for 5901, and so on. This patch forbids negative vnc port number in xml, and maps

[libvirt] [PATCH] conf: add test for boot dev and order

2012-10-16 Thread Martin Kletzander
Add test for 280b8c9e7c94db1decdca08d169c88554c09fa19. --- .../qemuxml2argv-boot-dev+order.xml| 56 ++ tests/qemuxml2argvtest.c | 3 ++ 2 files changed, 59 insertions(+) create mode 100644

Re: [libvirt] [PATCH] conf: add test for boot dev and order

2012-10-16 Thread Martin Kletzander
On 10/16/2012 01:36 PM, Jiri Denemark wrote: On Tue, Oct 16, 2012 at 12:27:35 +0200, Martin Kletzander wrote: Add test for 280b8c9e7c94db1decdca08d169c88554c09fa19. --- .../qemuxml2argv-boot-dev+order.xml| 56 ++ tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH] locking: Fix build with sanlock 2.4

2012-10-16 Thread Martin Kletzander
On 10/16/2012 12:54 PM, Jiri Denemark wrote: libvirt started using sanlock_killpath to implement on_lockfailure action. Since sanlock_killpath was introduced in sanlock 2.4, libvirt fails to build with older sanlock. --- configure.ac | 7 +++

Re: [libvirt] [PATCH] spec: Require newer sanlock on recent distros

2012-10-16 Thread Martin Kletzander
On 10/16/2012 12:55 PM, Jiri Denemark wrote: Make sure libvirt is build with sanlock = 2.4 on distros that are new enough to provide it. --- libvirt.spec.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 75623eb..15c6b39 100644 ---

Re: [libvirt] [PATCH] tests: Fix domain-events python test

2012-10-16 Thread Martin Kletzander
On 10/16/2012 04:38 PM, Peter Krempa wrote: On 10/16/12 16:32, Martin Kletzander wrote: There was a missing method in python implementation of domain-events test and this patch adds that. --- examples/domain-events/events-python/event-test.py | 3 +++ 1 file changed, 3 insertions

[libvirt] [PATCH] tests: Fix domain-events python test

2012-10-16 Thread Martin Kletzander
There was a missing method in python implementation of domain-events test and this patch adds that. --- examples/domain-events/events-python/event-test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/domain-events/events-python/event-test.py

Re: [libvirt] [PATCH 1/2] Remove spurious whitespace between function name open brackets

2012-10-17 Thread Martin Kletzander
On 10/17/2012 11:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch.

Re: [libvirt] [PATCH 2/2] Add syntax-check rule to look for 'function (...args...)' violations

2012-10-17 Thread Martin Kletzander
On 10/17/2012 11:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Checking for 'function (...args...)' is quite difficult since it needs to ignore valid usage with keywords like 'if (...test...)' and while/for/switch. It must also ignore source comments and

[libvirt] [PATCH] qemu: Pin the emulator when only cpuset is specified

2012-10-17 Thread Martin Kletzander
According to our recent changes (clarifications), we should be pinning qemu's emulator processes using the vcpu 'cpuset' attribute in case there is no emulatorpin specified. This however doesn't work entirely as expected and this patch should resolve all the remaining issues. ---

Re: [libvirt] [PATCH] qemu: Pin the emulator when only cpuset is specified

2012-10-17 Thread Martin Kletzander
On 10/17/2012 06:02 PM, Michal Privoznik wrote: On 17.10.2012 17:38, Martin Kletzander wrote: According to our recent changes (clarifications), we should be pinning qemu's emulator processes using the vcpu 'cpuset' attribute in case there is no emulatorpin specified. This however doesn't work

Re: [libvirt] [PATCH] qemu: Correctly wait for spice to migrate

2012-10-18 Thread Martin Kletzander
On 10/18/2012 09:47 AM, Michal Privoznik wrote: Currently we query-spice after the main migration has completed before moving to next state. Qemu reports this as boolean (not enclosed within quotes). Therefore it is not correct to use virJSONValueObjectGetString but

Re: [libvirt] [PATCHv2 3/3] qemu: Add support for HyperV Enlightenment feature relaxed

2012-10-18 Thread Martin Kletzander
On 10/18/2012 11:39 AM, Peter Krempa wrote: This patch adds support for the relaxed feature implemented by I'd write 'QEMU support' to make it clear, but that's just a hint :) previous patch. --- Diff to v1: - Fixed parsing of qemu commandline and added test. At the original place the code

[libvirt] [PATCH] qemu: Fix emulator affinity

2012-10-18 Thread Martin Kletzander
Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that makes machines, that don't have either cpuset in vcpu or emulatorpin specified, fail. Because the function that sets affinity is called without any check, the function must not fail unless there is an error. ---

Re: [libvirt] [PATCH] qemu: Pin the emulator when only cpuset is specified

2012-10-19 Thread Martin Kletzander
On 10/19/2012 05:45 AM, Osier Yang wrote: On 2012年10月17日 23:38, Martin Kletzander wrote: According to our recent changes (clarifications), we should be pinning qemu's emulator processes using thevcpu 'cpuset' attribute in case there is noemulatorpin specified. This however doesn't work

Re: [libvirt] [PATCH] qemu: Fix emulator affinity

2012-10-19 Thread Martin Kletzander
On 10/19/2012 06:02 AM, Osier Yang wrote: On 2012年10月18日 21:51, Martin Kletzander wrote: Commit ba63d8f7d843461f77a8206c1ef9da38388713e5 introduced a bug that makes machines, that don't have either cpuset invcpu or emulatorpin specified, fail. Because the function that sets affinity

Re: [libvirt] [PATCH] virsh: Improve the error for snapshot-list

2012-10-22 Thread Martin Kletzander
On 10/22/2012 03:15 PM, Osier Yang wrote: It reports error roots and --from are exclusive even --current is specified with --roots, but no --from. --- tools/virsh-snapshot.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/virsh-snapshot.c

Re: [libvirt] [PATCH 1/3] qemu: Add helper to prepare cpumap for affinity setting

2012-10-24 Thread Martin Kletzander
On 10/24/2012 12:00 PM, Osier Yang wrote: Abstract the codes to prepare cpumap into a helper a function, which can be used later. * src/qemu/qemu_process.h: Declare qemuPrepareCpumap * src/qemu/qemu_process.c: Implement qemuPrepareCpumap, and use it. --- src/qemu/qemu_process.c | 62

Re: [libvirt] [PATCH 2/3] qemu: Keep the affinity when creating cgroup for emulator thread

2012-10-24 Thread Martin Kletzander
On 10/24/2012 12:00 PM, Osier Yang wrote: When the cpu placement model is auto, it sets the affinity for domain process with the advisory nodeset from numad, however, creating cgroup for the domain process (called emulator thread in some contexts) later overrides that with pinning it to all

Re: [libvirt] [PATCH 2/3] qemu: Keep the affinity when creating cgroup for emulator thread

2012-10-24 Thread Martin Kletzander
On 10/24/2012 03:29 PM, Osier Yang wrote: On 2012年10月24日 21:17, Martin Kletzander wrote: On 10/24/2012 12:00 PM, Osier Yang wrote: When the cpu placement model is auto, it sets the affinity for domain process with the advisory nodeset from numad, however, creating cgroup for the domain

Re: [libvirt] [PATCH 3/3] qemu: Prohibit chaning affinity of domain process if placement is 'auto'

2012-10-24 Thread Martin Kletzander
On 10/24/2012 12:00 PM, Osier Yang wrote: On one hand, numad probably will manage the affinity of domain process dynamically in future. On the other hand, even numad won't manage it, s/even/even if/ it still could confusion. Let's make things simpler enough to avoid s/could/could cause/

Re: [libvirt] [PATCH 2/3] qemu: Keep the affinity when creating cgroup for emulator thread

2012-10-24 Thread Martin Kletzander
On 10/24/2012 03:41 PM, Osier Yang wrote: On 2012年10月24日 21:36, Martin Kletzander wrote: On 10/24/2012 03:29 PM, Osier Yang wrote: On 2012年10月24日 21:17, Martin Kletzander wrote: On 10/24/2012 12:00 PM, Osier Yang wrote: When the cpu placement model is auto, it sets the affinity for domain

Re: [libvirt] [PATCH 3/3] qemu: Prohibit chaning affinity of domain process if placement is 'auto'

2012-10-24 Thread Martin Kletzander
On 10/24/2012 03:45 PM, Osier Yang wrote: On 2012年10月24日 21:38, Martin Kletzander wrote: On 10/24/2012 12:00 PM, Osier Yang wrote: On one hand, numad probably will manage the affinity of domain process dynamically in future. On the other hand, even numad won't manage it, s/even/even

Re: [libvirt] [PATCH] cpu: Add recently added cpu feature flags.

2012-10-24 Thread Martin Kletzander
On 10/24/2012 03:56 PM, Peter Krempa wrote: Qemu has added some new feature flags. This patch adds them to libvirt. The new features are for the cpuid function 0x7 that takes an argument in the ecx register. Currently only 0x0 is used as the argument so I was lazy and I just clear the

Re: [libvirt] [PATCH] build: check for pod errors

2012-10-26 Thread Martin Kletzander
On 10/26/2012 06:06 PM, Eric Blake wrote: Patch 61299a1 fixed a long-standing pod error in the man page. But we should be preventing these up front. * tools/Makefile.am (virt-xml-validate.1, virt-pki-validate.1) (virt-host-validate.1, virt-sanlock-cleanup.8, virsh.1): Reject pod conversion

[libvirt] [PATCH 1/2] qemu: Enhance QMP detection of KVM state

2012-10-28 Thread Martin Kletzander
When there is no 'qemu-kvm' binary and the emulator used for a machine is, for example, 'qemu-system-x86_64' that, by default, runs without kvm enabled, libvirt still supplies '-no-kvm' option to this process, even though it does not recognize such option (making the start of a domain fail in that

[libvirt] [PATCH 0/2] Make non-KVM machines work with QMP probing

2012-10-28 Thread Martin Kletzander
one can be chosen from [2/2 v1] and [2/2 v2] (I didn't come up with better naming, sorry). Martin Kletzander (2): qemu: Enhance QMP detection of KVM state qemu: Fix SW emulated machines src/qemu/qemu_capabilities.c | 33 +- src/qemu/qemu_command.c | 6

<    4   5   6   7   8   9   10   11   12   13   >