[libvirt] [PATCH v2] libxl: support serial list

2016-08-03 Thread Bob Liu
Add support for multi serial devices, after this patch virsh can be used to connect different serial devices of running domains. E.g. vish # console --devname serial Note: This depends on a xen/libxl bug fix to have libxl_console_get_tty(...) correctly returning the tty path (as opposed to

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread Cole Robinson
On 08/03/2016 06:39 PM, John Ferlan wrote: > > > On 08/03/2016 06:30 PM, Cole Robinson wrote: >> On 08/03/2016 05:57 PM, John Ferlan wrote: >>> >>> >>> On 08/03/2016 05:37 PM, Cole Robinson wrote: On 08/03/2016 09:40 AM, John Ferlan wrote: > > > On 07/28/2016 08:02 AM, Jovanka

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread John Ferlan
On 08/03/2016 06:30 PM, Cole Robinson wrote: > On 08/03/2016 05:57 PM, John Ferlan wrote: >> >> >> On 08/03/2016 05:37 PM, Cole Robinson wrote: >>> On 08/03/2016 09:40 AM, John Ferlan wrote: On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: > Add node device event handling

[libvirt] [PATCH v5 0/8] perf: add more perf events support

2016-08-03 Thread John Ferlan
v4: http://www.redhat.com/archives/libvir-list/2016-July/msg00607.html Reworked/reworded the series slightly. The end result is mostly the same as the original, but with the suggested tweaks. John Ferlan (3): virsh: Add a forward reference to perf command from domstats --perf virsh: Rework

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread Cole Robinson
On 08/03/2016 05:57 PM, John Ferlan wrote: > > > On 08/03/2016 05:37 PM, Cole Robinson wrote: >> On 08/03/2016 09:40 AM, John Ferlan wrote: >>> >>> >>> On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: Add node device event handling infrastructure to node_device_event.[ch] ---

[libvirt] [PATCH v5 2/8] perf: Remove the switch from qemuDomainGetStatsPerf

2016-08-03 Thread John Ferlan
From: Qiaowei Ren Remove the unnecessary switch since all VIR_PERF_EVENT* values are fetched Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v5 6/8] util: Move virPerfNew and virPerfFree

2016-08-03 Thread John Ferlan
Move them to the bottom under the #ifdef code. Signed-off-by: John Ferlan --- src/util/virperf.c | 68 +++--- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/util/virperf.c b/src/util/virperf.c index

[libvirt] [PATCH v5 1/8] perf: rename qemuDomainGetStatsPerfRdt()

2016-08-03 Thread John Ferlan
From: Qiaowei Ren This patch rename qemuDomainGetStatsPerfRdt() to qemuDomainGetStatsPerfOneEvent() Signed-off-by: Qiaowei Ren Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 11 ++- 1 file changed, 6

[libvirt] [PATCH v5 8/8] perf: add more perf events support

2016-08-03 Thread John Ferlan
From: Qiaowei Ren With current perf framework, this patch adds support and documentation for more perf events, including cache misses, cache references, cpu cycles, and instructions. Signed-off-by: Qiaowei Ren Signed-off-by: John Ferlan

[libvirt] [PATCH v5 4/8] virsh: Add a forward reference to perf command from domstats --perf

2016-08-03 Thread John Ferlan
Keep the details in one place... Signed-off-by: John Ferlan --- tools/virsh.pod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh.pod b/tools/virsh.pod index 97d16c5..00b5d51 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -935,6 +935,8 @@ I<--perf>

[libvirt] [PATCH v5 3/8] util: Add some comment details for virPerfEventType

2016-08-03 Thread John Ferlan
From: Qiaowei Ren Add to some details for the existing enum Signed-off-by: John Ferlan --- src/util/virperf.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/util/virperf.h b/src/util/virperf.h index 7163410..bdafe03

[libvirt] [PATCH v5 7/8] perf: Adjust the perf initialization

2016-08-03 Thread John Ferlan
From: Qiaowei Ren Introduce a static attr table and refactor virPerfEventEnable() for general purpose usage. This patch creates a static table/matrix that converts the VIR_PERF_EVENT_* events into their respective "attr.type" and "attr.config" so that virPerfEventEnable

[libvirt] [PATCH v5 5/8] virsh: Rework the perf event names into a table.

2016-08-03 Thread John Ferlan
Should be easier to read Signed-off-by: John Ferlan --- tools/virsh.pod | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 00b5d51..7ce498b 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod

Re: [libvirt] [PATCH v4 4/4] perf: add description for new events in virsh.pod

2016-08-03 Thread John Ferlan
On 07/16/2016 04:15 AM, Qiaowei Ren wrote: > This patch add 'domstats --perf' description for new events in > virsh.pod. > > Signed-off-by: Qiaowei Ren > --- > tools/virsh.pod | 4 > 1 file changed, 4 insertions(+) > This would need to be merged with the previous

Re: [libvirt] [PATCH v4 3/4] perf: add more perf events support

2016-08-03 Thread John Ferlan
On 07/16/2016 04:15 AM, Qiaowei Ren wrote: > With current perf framework, this patch adds support to more perf > events, including cache misses, cache references, cpu cycles, > instrctions, etc.. > > Signed-off-by: Qiaowei Ren > --- > docs/formatdomain.html.in

Re: [libvirt] [PATCH v4 2/4] perf: introduce a static attr table and refactor virPerfEventEnable() for general purpose

2016-08-03 Thread John Ferlan
Need to keep those commit messages a lot shorter... On 07/16/2016 04:15 AM, Qiaowei Ren wrote: > This patch creates some sort of static table/matrix that would be able to > convert the VIR_PERF_EVENT_* into their respective "attr.type" and > "attr.config", so that virPerfEventEnable() doesn't

Re: [libvirt] [PATCH v4 1/4] perf: rename qemuDomainGetStatsPerfRdt()

2016-08-03 Thread John Ferlan
On 07/16/2016 04:15 AM, Qiaowei Ren wrote: > This patch rename qemuDomainGetStatsPerfRdt() to > qemuDomainGetStatsPerfOneEvent() and update qemuDomainGetStatsPerf() > based on this change for multiple/general purpose. > > Signed-off-by: Qiaowei Ren > --- >

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread John Ferlan
On 08/03/2016 05:37 PM, Cole Robinson wrote: > On 08/03/2016 09:40 AM, John Ferlan wrote: >> >> >> On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: >>> Add node device event handling infrastructure to node_device_event.[ch] >>> --- >>> src/Makefile.am | 5 + >>>

Re: [libvirt] Examples of QEMU machine-type-specific code in libvirt?

2016-08-03 Thread Laine Stump
On 08/03/2016 04:49 PM, Eduardo Habkost wrote: Hi, I am collecting some material for my KVM Forum talk, and I am interested in hearing from libvirt developers about instances where machine-type-specific information is needed by libvirt, and the info is not provided by QEMU. I found some

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread Cole Robinson
On 08/03/2016 09:40 AM, John Ferlan wrote: > > > On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: >> Add node device event handling infrastructure to node_device_event.[ch] >> --- >> src/Makefile.am | 5 + >> src/conf/node_device_event.c | 234 >>

[libvirt] Examples of QEMU machine-type-specific code in libvirt?

2016-08-03 Thread Eduardo Habkost
Hi, I am collecting some material for my KVM Forum talk, and I am interested in hearing from libvirt developers about instances where machine-type-specific information is needed by libvirt, and the info is not provided by QEMU. I found some instances where machine-type capabilities are hardcoded

Re: [libvirt] [PATCH] libxl: allow libxl to calculate shadow mem requirements

2016-08-03 Thread Jim Fehlig
On 08/03/2016 03:51 AM, Joao Martins wrote: > On 08/03/2016 12:49 AM, Jim Fehlig wrote: >> Long, long ago before libxl_get_required_shadow_memory() was >> made publicly available, its code was copied to the libxl driver >> for calculating shadow memory requirements of HVM domains. >> >> Long ago,

Re: [libvirt] [PATCH 10/10] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-03 Thread John Ferlan
On 08/03/2016 01:00 PM, Peter Krempa wrote: > On Wed, Aug 03, 2016 at 12:04:02 -0400, John Ferlan wrote: >> >> >> On 08/03/2016 04:11 AM, Peter Krempa wrote: >>> Prepare to extract more data by returning a array of structs rather than >>> just an array of thread ids. Additionally report fatal

Re: [libvirt] [PATCH 3/3] docs: drop todo.html

2016-08-03 Thread Cole Robinson
On 08/03/2016 12:30 PM, Ján Tomko wrote: > There is little information value in: > Todo list unavailable: no config file > > Drop the file completely along with the script generating it. > --- I had a similar patch before: http://www.redhat.com/archives/libvir-list/2016-May/msg01618.html

Re: [libvirt] [PATCH 10/10] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-03 Thread Peter Krempa
On Wed, Aug 03, 2016 at 12:04:02 -0400, John Ferlan wrote: > > > On 08/03/2016 04:11 AM, Peter Krempa wrote: > > Prepare to extract more data by returning a array of structs rather than > > just an array of thread ids. Additionally report fatal errors separately > > from qemu not being able to

[libvirt] [PATCH 0/3] docs/Makefile.am cleanups

2016-08-03 Thread Ján Tomko
The effect of 2/3 will be more apparent after apibuild.py speedups (to be written). Ján Tomko (3): docs/Makefile.am: remove redundant variables docs/Makefile.am: build hvsupport.html earlier docs: drop todo.html .gitignore| 1 - docs/Makefile.am | 44 +++---

[libvirt] [PATCH 2/3] docs/Makefile.am: build hvsupport.html earlier

2016-08-03 Thread Ján Tomko
This file requires three steps instead of two. Move it earlier in the list of targets to avoid waiting for it. --- docs/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f266117..d6e975d 100644 --- a/docs/Makefile.am +++

[libvirt] [PATCH 1/3] docs/Makefile.am: remove redundant variables

2016-08-03 Thread Ján Tomko
Remove DOC_SOURCE_DIR, introduced by and unused since commit b325d74. PERL is already detected in configure.ac. --- docs/Makefile.am | 5 - 1 file changed, 5 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 206ef3b..f266117 100644 --- a/docs/Makefile.am +++

[libvirt] [PATCH 3/3] docs: drop todo.html

2016-08-03 Thread Ján Tomko
There is little information value in: Todo list unavailable: no config file Drop the file completely along with the script generating it. --- .gitignore| 1 - docs/Makefile.am | 34 ++ docs/sitemap.html.in | 4 -- docs/todo.cfg-example | 26 ---

[libvirt] [PATCH 6/7] cfg.mk: drop redundant sc_size_of_brackets

2016-08-03 Thread Ján Tomko
This check forbids a space after sizeof, which is already done by check-spacing.pl. --- build-aux/check-spacing.pl | 2 +- cfg.mk | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl index

[libvirt] [PATCH 2/7] configure.ac: drop checks for ETH flags

2016-08-03 Thread Ján Tomko
No choices are made at configure time based on these checks. Drop them and use #ifdefs in virnetdev.c. --- configure.ac | 5 - src/util/virnetdev.c | 20 ++-- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index

[libvirt] [PATCH 5/7] cfg.mk: drop redundant sc_prohibit_gethostby

2016-08-03 Thread Ján Tomko
Both gethostbyaddr and gethostbyname* are already checked by sc_prohibit_nonreentrant. --- cfg.mk | 9 - 1 file changed, 9 deletions(-) diff --git a/cfg.mk b/cfg.mk index 0604d69..9f236c2 100644 --- a/cfg.mk +++ b/cfg.mk @@ -520,13 +520,6 @@ sc_forbid_manual_xml_indent: halt='use

[libvirt] [PATCH 3/7] tests: fix the return value of test-wrap-argv

2016-08-03 Thread Ján Tomko
The script was returning success unless it failed on the last file. This went unnoticed because sc_prohibit_long_lines forbids lines longer than 90 characters in .arg[sv] files. --- tests/test-wrap-argv.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-wrap-argv.pl

[libvirt] [PATCH 0/7] More syntax-check cleanups

2016-08-03 Thread Ján Tomko
The first patch pulls the latest gnulibs to fetch the newest syntax-check speedups. Patch 2 is included since a gnulib update will trigger configure anyway. The rest are mostly cleanups, the speed-ups they (might) provide are barely measurable. Ján Tomko (7): maint: update to latest gnulib

[libvirt] [PATCH 7/7] cfg.mk: join not_streq and not_strneq tests

2016-08-03 Thread Ján Tomko
The marginally nicer error message is not worth the extra lines in cfg.mk. Also drop the excludes since there was only one offender in the tests. --- cfg.mk | 15 ++- tests/virstoragetest.c | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git

[libvirt] [PATCH 4/7] cfg.mk: use subst instead of tr

2016-08-03 Thread Ján Tomko
GNU make is able to replace characters, no need to call tr. --- cfg.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cfg.mk b/cfg.mk index cf47d4c..0604d69 100644 --- a/cfg.mk +++ b/cfg.mk @@ -614,8 +614,9 @@ msg_gen_function += xenapiSessionErrorHandler #

[libvirt] [PATCH 1/7] maint: update to latest gnulib

2016-08-03 Thread Ján Tomko
Pick up the new syntax-check speedups. --- .gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gnulib b/.gnulib index 68b6ade..0fe8b3c 16 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject commit 68b6adebef05670a312fb92b05e7bd089d2ed43a +Subproject commit

Re: [libvirt] [PATCH 10/10] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-03 Thread John Ferlan
On 08/03/2016 04:11 AM, Peter Krempa wrote: > Prepare to extract more data by returning a array of structs rather than > just an array of thread ids. Additionally report fatal errors separately > from qemu not being able to produce data. > --- > src/qemu/qemu_monitor.c | 31

[libvirt] [PATCH 1/2] qemu: add a max_core setting to qemu.conf for core dump size

2016-08-03 Thread Daniel P. Berrange
Currently the QEMU processes inherit their core dump rlimit from libvirtd, which is really suboptimal. This change allows their limit to be directly controlled from qemu.conf instead. --- src/libvirt_private.syms | 2 ++ src/qemu/libvirtd_qemu.aug | 4 src/qemu/qemu.conf

[libvirt] [PATCH 0/2] Improve handling of QEMU core dumping

2016-08-03 Thread Daniel P. Berrange
Daniel P. Berrange (2): qemu: add a max_core setting to qemu.conf for core dump size qemu: allow turning off QEMU guest RAM dump globally src/libvirt_private.syms | 2 ++ src/qemu/libvirtd_qemu.aug | 5 + src/qemu/qemu.conf | 31

[libvirt] [PATCH 2/2] qemu: allow turning off QEMU guest RAM dump globally

2016-08-03 Thread Daniel P. Berrange
We already have the ability to turn off dumping of guest RAM via the domain XML. This is not particularly useful though, as it is under control of the management application. What is needed is a way for the sysadmin to turn off guest RAM defaults globally, regardless of whether the mgmt app

Re: [libvirt] [gconfig v2 4/4] config: Add spice host setter

2016-08-03 Thread Christophe Fergeau
Same minor comments as the previous patch, Adding some test case to tests/test-gconfig.c would be good to have imo. Acked-by: Christophe Fergeau Christophe On Mon, Aug 01, 2016 at 11:52:40PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru

Re: [libvirt] [gconfig v2 3/4] config: Add vnc host setter

2016-08-03 Thread Christophe Fergeau
On Mon, Aug 01, 2016 at 11:52:39PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru > > Learn to set the address that vnc is listening on. > > We first remove the 'listen' attribute to avoid inconsistencies > checks between the 'listen' attribute and the

Re: [libvirt] [gconfig v2 2/4] Introduce libvirt-gconfig-domain-graphics-listen-address

2016-08-03 Thread Christophe Fergeau
On Mon, Aug 01, 2016 at 11:52:38PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru > > This is needed to be able to change the address a graphics > device is listening on. > --- > libvirt-gconfig/Makefile.am| 2 + >

Re: [libvirt] [gconfig v2 1/4] Introduce libvirt-domain-graphics-listen

2016-08-03 Thread Christophe Fergeau
Hey, On Mon, Aug 01, 2016 at 11:52:37PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru > > Abstract class which represents a listen child node > of the graphics device. > --- > libvirt-gconfig/Makefile.am| 2 + >

Re: [libvirt] [PATCH 08/10] qemu: domain: Simplify return values of qemuDomainRefreshVcpuInfo

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 09:03:50AM -0400, John Ferlan wrote: > > > On 08/03/2016 04:11 AM, Peter Krempa wrote: > > Call the vcpu thread info validation separately to decrease complexity > > of returned values by qemuDomainRefreshVcpuInfo. > > > > This function now returns 0 on success and -1 on

Re: [libvirt] [PATCH v2 2/8] conf: add node_device_event handling

2016-08-03 Thread John Ferlan
On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: > Add node device event handling infrastructure to node_device_event.[ch] > --- > src/Makefile.am | 5 + > src/conf/node_device_event.c | 234 > +++ > src/conf/node_device_event.h | 59

Re: [libvirt] [PATCH 09/10] qemu: monitor: Return structures from qemuMonitorGetCPUInfo

2016-08-03 Thread John Ferlan
On 08/03/2016 04:11 AM, Peter Krempa wrote: > The function will gradually add more returned data. Return a struct for > every vCPU containing the data. > --- > src/qemu/qemu_domain.c | 26 ++- > src/qemu/qemu_monitor.c | 56 >

Re: [libvirt] [PATCH 10/10] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-03 Thread Jiri Denemark
On Wed, Aug 03, 2016 at 10:11:02 +0200, Peter Krempa wrote: > Prepare to extract more data by returning a array of structs rather than s/a array/an array/ Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 01/10] qemu: monitor: Add monitor API for device_add supporting JSON objects

2016-08-03 Thread Ján Tomko
On Wed, Aug 03, 2016 at 10:10:53AM +0200, Peter Krempa wrote: Rather than formating a string and splitting it back to a JSON object s/formating/formatting/ Jan add API that will take a JSON object directly. --- src/qemu/qemu_monitor.c | 18 ++ src/qemu/qemu_monitor.h

Re: [libvirt] [PATCH 08/10] qemu: domain: Simplify return values of qemuDomainRefreshVcpuInfo

2016-08-03 Thread John Ferlan
On 08/03/2016 04:11 AM, Peter Krempa wrote: > Call the vcpu thread info validation separately to decrease complexity > of returned values by qemuDomainRefreshVcpuInfo. > > This function now returns 0 on success and -1 on error. Certain > failures of qemu to report data are still considered as

Re: [libvirt] [PATCH 07/10] qemu: domain: Improve vCPU data checking in qemuDomainDetectVcpuPids

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:59AM +0200, Peter Krempa wrote: s/qemuDomainDetectVcpuPids/qemuDomainRefreshVcpu/ in $subject > Validate the presence of the thread id according to state of the vCPU > rather than just checking the vCPU count. Additionally put the new > validation code into a

Re: [libvirt] [PATCH 07/10] qemu: domain: Improve vCPU data checking in qemuDomainDetectVcpuPids

2016-08-03 Thread John Ferlan
$SUBJ s/qemuDomainDetectVcpuPids/qemuDomainRefreshVcpuInfo/ On 08/03/2016 04:10 AM, Peter Krempa wrote: > Validate the presence of the thread id according to state of the vCPU > rather than just checking the vCPU count. Additionally put the new > validation code into a separate function so that

Re: [libvirt] [PATCH 02/10] internal: Introduce macro for stealing pointers

2016-08-03 Thread John Ferlan
On 08/03/2016 04:10 AM, Peter Krempa wrote: > VIR_STEAL copies the second argument into the first and then sets it to > NULL. This is useful for stealing pointers. > --- > src/internal.h | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/internal.h b/src/internal.h >

Re: [libvirt] [PATCH 06/10] qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:58AM +0200, Peter Krempa wrote: > Use a name that contains the command used to get the information. > --- > src/qemu/qemu_monitor.c | 4 ++-- > src/qemu/qemu_monitor_json.c | 5 +++-- > src/qemu/qemu_monitor_json.h | 4 ++-- > src/qemu/qemu_monitor_text.c | 5

Re: [libvirt] [PATCH 01/10] qemu: monitor: Add monitor API for device_add supporting JSON objects

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 12:43:48PM +0200, Pavel Hrdina wrote: > On Wed, Aug 03, 2016 at 10:10:53AM +0200, Peter Krempa wrote: > > Rather than formating a string and splitting it back to a JSON object > > add API that will take a JSON object directly. > > --- > > src/qemu/qemu_monitor.c | 18

Re: [libvirt] [PATCH 05/10] qemu: domain: Rename qemuDomainDetectVcpuPids to qemuDomainRefreshVcpuInfo

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:57AM +0200, Peter Krempa wrote: > The function will eventually do more useful stuff than just detection of > thread ids. > --- > src/qemu/qemu_domain.c | 10 +- > src/qemu/qemu_domain.h | 5 +++-- > src/qemu/qemu_driver.c | 4 ++-- >

Re: [libvirt] [PATCH 04/10] qemu: Improve error message in virDomainGetVcpus

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:56AM +0200, Peter Krempa wrote: > If the VM is offline we can't retrieve the runtime statistical > information. Pinning could be retrieved but there are separate APIs for > that. > --- > src/qemu/qemu_driver.c | 5 ++--- > 1 file changed, 2 insertions(+), 3

Re: [libvirt] [PATCH 03/10] qemu: monitor: Add do-while block to QEMU_CHECK_MONITOR_FULL

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:55AM +0200, Peter Krempa wrote: > Assure that it's just one statement to avoid problems when used with > conditions. > --- > src/qemu/qemu_monitor.c | 25 ++--- > 1 file changed, 14 insertions(+), 11 deletions(-) > ACK -- libvir-list mailing

Re: [libvirt] [PATCH 02/10] internal: Introduce macro for stealing pointers

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:54AM +0200, Peter Krempa wrote: > VIR_STEAL copies the second argument into the first and then sets it to > NULL. This is useful for stealing pointers. > --- > src/internal.h | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/internal.h

Re: [libvirt] [PATCH 01/10] qemu: monitor: Add monitor API for device_add supporting JSON objects

2016-08-03 Thread Pavel Hrdina
On Wed, Aug 03, 2016 at 10:10:53AM +0200, Peter Krempa wrote: > Rather than formating a string and splitting it back to a JSON object > add API that will take a JSON object directly. > --- > src/qemu/qemu_monitor.c | 18 ++ > src/qemu/qemu_monitor.h | 2 ++ >

[libvirt] [PATCH] storage: Fix a NULL ptr dereference in virStorageBackendCreateQemuImg

2016-08-03 Thread Erik Skultety
There was a missing check for vol->target.encryption being NULL at one particular place (modified by commit a48c71411) which caused a crash when user attempted to create a raw volume using a non-raw file volume as source. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1363636

Re: [libvirt] [PATCH] libxl: add serial list support

2016-08-03 Thread Joao Martins
[Adding Jim as there was past discussion about serials/consoles] On 08/03/2016 02:29 AM, Bob Liu wrote: > Add support for multi serial devices, after this patch virsh can be used to > connect different serial devices of running domains. E.g. > vish # console --devname serial > > Signed-off-by:

Re: [libvirt] [PATCH] libxl: allow libxl to calculate shadow mem requirements

2016-08-03 Thread Joao Martins
On 08/03/2016 12:49 AM, Jim Fehlig wrote: > Long, long ago before libxl_get_required_shadow_memory() was > made publicly available, its code was copied to the libxl driver > for calculating shadow memory requirements of HVM domains. > > Long ago, libxl_get_required_shadow_memory() was exported in

[libvirt] [PATCH 07/10] qemu: domain: Improve vCPU data checking in qemuDomainDetectVcpuPids

2016-08-03 Thread Peter Krempa
Validate the presence of the thread id according to state of the vCPU rather than just checking the vCPU count. Additionally put the new validation code into a separate function so that the information retrieval can be split from the validation. --- src/qemu/qemu_domain.c | 49

[libvirt] [PATCH 01/10] qemu: monitor: Add monitor API for device_add supporting JSON objects

2016-08-03 Thread Peter Krempa
Rather than formating a string and splitting it back to a JSON object add API that will take a JSON object directly. --- src/qemu/qemu_monitor.c | 18 ++ src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 29 +++--

[libvirt] [PATCH 06/10] qemu: monitor: Rename qemuMonitor(JSON|Text)GetCPUInfo

2016-08-03 Thread Peter Krempa
Use a name that contains the command used to get the information. --- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor_json.c | 5 +++-- src/qemu/qemu_monitor_json.h | 4 ++-- src/qemu/qemu_monitor_text.c | 5 +++-- src/qemu/qemu_monitor_text.h | 4 ++-- tests/qemumonitorjsontest.c |

[libvirt] [PATCH 03/10] qemu: monitor: Add do-while block to QEMU_CHECK_MONITOR_FULL

2016-08-03 Thread Peter Krempa
Assure that it's just one statement to avoid problems when used with conditions. --- src/qemu/qemu_monitor.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index b58c412..1ef18dd 100644 ---

[libvirt] [PATCH 05/10] qemu: domain: Rename qemuDomainDetectVcpuPids to qemuDomainRefreshVcpuInfo

2016-08-03 Thread Peter Krempa
The function will eventually do more useful stuff than just detection of thread ids. --- src/qemu/qemu_domain.c | 10 +- src/qemu/qemu_domain.h | 5 +++-- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_process.c | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff

[libvirt] [PATCH 04/10] qemu: Improve error message in virDomainGetVcpus

2016-08-03 Thread Peter Krempa
If the VM is offline we can't retrieve the runtime statistical information. Pinning could be retrieved but there are separate APIs for that. --- src/qemu/qemu_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH 09/10] qemu: monitor: Return structures from qemuMonitorGetCPUInfo

2016-08-03 Thread Peter Krempa
The function will gradually add more returned data. Return a struct for every vCPU containing the data. --- src/qemu/qemu_domain.c | 26 ++- src/qemu/qemu_monitor.c | 56 ++--- src/qemu/qemu_monitor.h | 13 +++- 3 files

[libvirt] [PATCH 00/10] New vCPU hotplug prequel

2016-08-03 Thread Peter Krempa
A few patches that are standalone enough which originated from my work in progress on new way to do vcpu hotplug. Peter Krempa (10): qemu: monitor: Add monitor API for device_add supporting JSON objects internal: Introduce macro for stealing pointers qemu: monitor: Add do-while block to

[libvirt] [PATCH 08/10] qemu: domain: Simplify return values of qemuDomainRefreshVcpuInfo

2016-08-03 Thread Peter Krempa
Call the vcpu thread info validation separately to decrease complexity of returned values by qemuDomainRefreshVcpuInfo. This function now returns 0 on success and -1 on error. Certain failures of qemu to report data are still considered as success. Any error reported now is fatal. ---

[libvirt] [PATCH 10/10] qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs

2016-08-03 Thread Peter Krempa
Prepare to extract more data by returning a array of structs rather than just an array of thread ids. Additionally report fatal errors separately from qemu not being able to produce data. --- src/qemu/qemu_monitor.c | 31 --- src/qemu/qemu_monitor.h | 6

[libvirt] [PATCH 02/10] internal: Introduce macro for stealing pointers

2016-08-03 Thread Peter Krempa
VIR_STEAL copies the second argument into the first and then sets it to NULL. This is useful for stealing pointers. --- src/internal.h | 12 1 file changed, 12 insertions(+) diff --git a/src/internal.h b/src/internal.h index 0dc34c7..c633ee6 100644 --- a/src/internal.h +++

Re: [libvirt] Release of libvirt-2.1.0

2016-08-03 Thread Daniel Veillard
On Tue, Aug 02, 2016 at 02:46:34PM +0100, Justin Clift wrote: > On 2 Aug 2016, at 09:57, Daniel Veillard wrote: > > Sorry I didn't push an rc2 on Friday, finishing my move, but not seeing > > any > > issue raised by rc1, I though it was better to push the final release now