[libvirt] [PATCH v2 0/3] Resolve libvirtd crash matching scsi_host
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1146837
Rewrite the v1 patch to take a different method to attack the problem.
Expose the getHostNumber from scsi check/startup/refresh in the form
of virGetSCSIHostNumber. Additionally, expose part of the getAdapterName
code in the form of virGetSCSIHostNameByParentaddr. Then use the two
functions to determine whether the incoming def matches any of the
defined pool defs.
v1 is here:
http://www.redhat.com/archives/libvir-list/2014-September/msg01746.html
John Ferlan (3):
virutil: Introduce virGetSCSIHostNumber
virutil: Introduce virGetSCSIHostNameByParentaddr
storage_conf: Resolve libvirtd crash matching scsi_host
src/conf/storage_conf.c | 69 ++++++++++++++----------
src/libvirt_private.syms | 2 +
src/storage/storage_backend_scsi.c | 59 ++++-----------------
src/util/virutil.c | 106 +++++++++++++++++++++++++++++++++++++
src/util/virutil.h | 10 ++++
5 files changed, 170 insertions(+), 76 deletions(-)
--
1.9.3
10 years
[libvirt] [PowerPC PATCH 0/3 v4] Libvirt CPU enhancements for Power KVM
by Prerna Saxena
This patch series is a collection of enhancements for PowerPC CPUs on PowerKVM.
Series Summary:
==========
Patch 1/3 : Introduce a new architecture 'ppc64le' for libvirt.
Patch 2/3 : Add libvirt support for VMs running in 'compat' mode on Power KVM.
Patch 3/3 : Improve PVR handling to fall back to cpu generation.
Detail:
====
* PowerPC has traditionally been a Big-endian architecture. However, with PowerPC ISA version 2.07, it can run in Little-endian mode as well. IBM Power8 processors, compliant with ISA 2.07 allow launching VMs in little-endian mode. This is signified by 'ppc64le' architecture. Patch 1 adds this support to libvirt, to allow running VMs based on ppc64le architecture.
* Patch 2,3 tweak libvirt to correctly model PowerPC CPUs based on recent PowerKVM implementation.
PowerKVM permits VMs with vcpus in the following allowed modes :
i) Host native mode:
where the vcpu seen in the VM belongs to the same processor generation as the host.
Example: A POWER7 host, conforming to PowerISA version 2.06, will run VMs with "power7" vcpus.
ii) Binary Compatibility ("compat") mode:
PowerISA allows processors to run VMs in binary compatibility ("compat") mode supporting an older version of ISA.
As an example: In compatibility mode, a POWER7 host can run a "power6" VM, conforming to power ISA v2.05.
Similarly, a POWER8 host can run a "power7" VM conforming to PowerISA v2.06.
QEMU has recently added support to explicitly denote a VM running in compatibility mode through commits 6d9412ea & 8dfa3a5e85. Henceforth, VMs of type (i) will be invoked with the QEMU invocation "-cpu host", while VMs of type (ii) will be invoked using "-cpu host, compat=power6".
Now, an explicit cpu selection using "-cpu POWER6" is not valid. Instead, the recommended practice is to use the matching compat mode, if the requested cpu type differs from the host.
Patches 2-3 address various aspects of this change.
* Patch 2 : Adds support for generating the correct command line for QEMU. New xml semantics are introduced to signify this type. Corresponding documentation is also added.
* Patch 3 : PowerKVM vCPUs differ uniquely across generations ( such as power6, power7, power8). Each generation signifies a new PowerISA version that exhibits features unique to that generation. The higher order 16 bits of PVR denote the processor generation and the lower order 16 bits denote the cpu chip (sub)version.
For all practical purposes of launching a VM, we care about the generation the vCPU will belong to, and not specifically the chip version. In fact, PowerKVM does not seek out specification of a unique chip version(such as POWER7_v2.3) for running a vCPU. This patch updates the libvirt PVR check to reflect this relationship.
Changelog:
=========
v1 : https://www.redhat.com/archives/libvir-list/2014-June/msg01338.html
v2 : http://www.redhat.com/archives/libvir-list/2014-October/msg00351.html
v3 : http://www.mail-archive.com/libvir-list@redhat.com/msg104010.html
Changes since v3:
i) Added documentation for describing 'compat' mode to formatdomain.html.in
( Thanks for pointing this out, Michal )
ii) Minor corrections ( Indentation fix; Added check for PPC64LE in virDomainVideoDefaultType )
Regards,
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
10 years
[libvirt] [PATCH] src/Makefile.am: Add forgotten backslash
by Michal Privoznik
As I've pushed 5892944f I haven't noticed one small nitpick.
There was this backslash missing on the line 1231 in the
enumeration of libraries to be added to vbox storage driver. This
resulted in nondeterministic build which sometimes succeeded and
sometimes failed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial and build-breaker rules.
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 5b81432..d8fe624 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1228,7 +1228,7 @@ libvirt_driver_vbox_storage_impl_la_CFLAGS = \
libvirt_driver_vbox_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_vbox_storage_impl_la_LIBADD = $(DLOPEN_LIBS) \
$(MSCOM_LIBS) \
- $(LIBXML_LIBS)
+ $(LIBXML_LIBS) \
libvirt_driver_vbox_impl.la
libvirt_driver_vbox_storage_impl_la_SOURCES = $(VBOX_STORAGE_DRIVER_SOURCES)
endif WITH_VBOX
--
2.0.4
10 years
[libvirt] [PATCH] util: fix libvirtd crash caused by virStorageNetHostTransportTypeFromString
by Shanzhi Yu
When split uri->scheme into two strings with "+", the second one will be
"rdma://server/..", pass it to virStorageNetHostTransportTypeFromString
will lead libvirtd crash. So a second virStringSplit call is needed.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1156288
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
src/util/virstoragefile.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 960aa23..795c188 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2144,6 +2144,9 @@ virStorageSourceParseBackingURI(virStorageSourcePtr src,
goto cleanup;
}
+ if (!(scheme = virStringSplit(scheme[1], ":", 2)))
+ goto cleanup;
+
if (scheme[1] &&
(src->hosts->transport = virStorageNetHostTransportTypeFromString(scheme[1])) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
--
1.9.3
10 years
[libvirt] [PATCH v2 0/3] add nodeset check in numatune
by Chen Fan
when setting elements memnode and nodeset in attribute numatune more
than the host nodes in XML file, VM boot should fail. so add check for
that.
Chen Fan (3):
numatune: add check for numatune nodeset range
lxc controller: add check for numatune
virnuma: remove redundant check for numanode
src/conf/numatune_conf.c | 21 -------
src/conf/numatune_conf.h | 19 ++++++
src/libvirt_private.syms | 1 +
src/lxc/lxc_controller.c | 3 +-
src/qemu/qemu_command.c | 3 +
src/qemu/qemu_command.h | 1 +
src/util/virnuma.c | 70 +++++++++++++++++-----
src/util/virnuma.h | 2 +
...rgv-numatune-static-nodeset-exceed-hostnode.xml | 35 +++++++++++
tests/qemuxml2argvmock.c | 9 +++
tests/qemuxml2argvtest.c | 1 +
11 files changed, 128 insertions(+), 37 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-static-nodeset-exceed-hostnode.xml
--
1.9.3
10 years
[libvirt] [PATCH 0/2] libssh2 connection fixes
by Cédric Bosdonnat
Hi guys,
Here are 2 trivial patches to fixes issues connecting using libssh2. The first
one fixes a -1 use with a size_t, and the second one discards callbacks with
no prompt called by the SSH server.
Cédric Bosdonnat (2):
Fix test wanting a negative size_t
Fix handling keyboard-interactive callbacks for libssh2
src/rpc/virnetsshsession.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--
1.8.4.5
10 years
[libvirt] [PATCH 0/2] Add non-FreeBSD guest support to Bhyve driver.
by Conrad Meyer
First-time libvirt contributor here. Apologies if I've made beginner mistakes,
etc. If something needs fixing, please let me know and I'll try and take care
of it expediently.
First, the bhyve driver expected and assumed an OS type of 'hvm'. I think this
was incorrect. Bhyve does not provide a BIOS API and instead uses a host
bootloader to paravirtualize guests.
This patch changes the OS type Bhyve expects to 'xen' and updates tests to
match.
Second, drvbhyve hardcodes bhyveload(8) as the host bootloader for guests.
bhyveload(8) loader only supports FreeBSD guests.
This patch adds <bootloader> and <bootloader_args> handling to bhyve_command,
so libvirt can boot non-FreeBSD guests in Bhyve.
See patch logs for further details.
Thanks,
Conrad
Conrad Meyer (2):
bhyve: Support /domain/bootloader configuration for non-FreeBSD
guests.
Generated PO files for 'bhyve: Support /domain/bootloader'
docs/drvbhyve.html.in | 30 +++++-
docs/formatdomain.html.in | 4 +-
po/af.po | 4 +
po/am.po | 4 +
po/ar.po | 4 +
po/as.po | 4 +
po/be.po | 4 +
po/bg.po | 4 +
po/bn.po | 4 +
po/bn_IN.po | 4 +
po/bo.po | 4 +
po/bs.po | 4 +
po/ca.po | 4 +
po/cs.po | 4 +
po/cy.po | 4 +
po/da.po | 4 +
po/de.po | 4 +
po/el.po | 4 +
po/en_GB.po | 4 +
po/es.po | 4 +
po/et.po | 4 +
po/eu_ES.po | 4 +
po/fa.po | 4 +
po/fi.po | 4 +
po/fr.po | 4 +
po/gl.po | 4 +
po/gu.po | 4 +
po/he.po | 4 +
po/hi.po | 4 +
po/hr.po | 4 +
po/hu.po | 4 +
po/hy.po | 4 +
po/id.po | 4 +
po/is.po | 4 +
po/it.po | 4 +
po/ja.po | 4 +
po/ka.po | 4 +
po/kn.po | 4 +
po/ko.po | 4 +
po/ku.po | 4 +
po/libvirt.pot | 4 +
po/lo.po | 4 +
po/lt.po | 4 +
po/lv.po | 4 +
po/mk.po | 4 +
po/ml.po | 4 +
po/mr.po | 4 +
po/ms.po | 4 +
po/my.po | 4 +
po/nb.po | 4 +
po/nl.po | 4 +
po/nn.po | 4 +
po/nso.po | 4 +
po/or.po | 4 +
po/pa.po | 4 +
po/pl.po | 4 +
po/pt.po | 4 +
po/pt_BR.po | 4 +
po/ro.po | 4 +
po/ru.po | 4 +
po/si.po | 4 +
po/sk.po | 4 +
po/sl.po | 4 +
po/sq.po | 4 +
po/sr.po | 4 +
po/sr(a)latin.po | 4 +
po/sv.po | 4 +
po/ta.po | 4 +
po/te.po | 4 +
po/th.po | 4 +
po/tr.po | 4 +
po/uk.po | 4 +
po/ur.po | 4 +
po/vi.po | 4 +
po/vi_VN.po | 4 +
po/zh_CN.po | 4 +
po/zh_TW.po | 4 +
po/zu.po | 4 +
src/bhyve/bhyve_capabilities.c | 2 +-
src/bhyve/bhyve_command.c | 107 +++++++++++++++++++--
tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.xml | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-base.xml | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-console.xml | 2 +-
.../bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.xml | 2 +-
.../bhyvexml2argv-disk-virtio.xml | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.xml | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-metadata.xml | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-serial.xml | 2 +-
.../bhyvexml2xmlout-metadata.xml | 2 +-
89 files changed, 439 insertions(+), 26 deletions(-)
--
1.9.3
10 years
[libvirt] [PATCH v3 0/7] hotplug: Fix libvirtd crash on qemu-attached guest
by John Ferlan
v2 is here:
http://www.redhat.com/archives/libvir-list/2014-September/msg01575.html
As Michal pointed out in his review - other devices could have the
same issue - so take care of each of them separately (I already knew
the answer to my last question...)
Totally different approach this time - rather than error out, follow
the example I from the Controller Detach code which will generate an
alias for the device (although it did miss one minor check to see if
it was already set leading to a potential memory leak since the alias
code would overwrite whatever was there).
Note: In a way 1/7 was already ACK'd - I just hadn't separated it yet
for a push and wanted to keep these closer together when/if they were
pushed.
Whether 7/7 is now necessary is debateable - I keep it only for
completeness and environment setup in much the same way the start
code handles aliases.
John Ferlan (7):
virsh: Adjust the text in man page regarding qemu-attach
hotplug: Check for alias in controller detach
hotplug: Check for alias in disk detach
hotplug: Check for alias in hostdev detach
hotplug: Check for alias in chrdev detach
hotplug: Check for alias in net detach
qemu-attach: Assign device aliases
src/qemu/qemu_driver.c | 3 +++
src/qemu/qemu_hotplug.c | 28 +++++++++++++++++++++++++++-
tools/virsh.pod | 5 +++--
3 files changed, 33 insertions(+), 3 deletions(-)
--
1.9.3
10 years
[libvirt] [PATCH] remote: fix jump depends on uninitialised value
by Jincheng Miao
Currently remote driver only initializes partial fields of
remote_connect_get_all_domain_stats_args. But xdr_array()
will check the uninitialised field 'doms_val'.
For safty reason, memset all fields of args is better.
Fix the following error from valgrind, like:
==30515== 1 errors in context 1 of 3:
==30515== Conditional jump or move depends on uninitialised value(s)
==30515== at 0x85E9402: xdr_array (xdr_array.c:88)
==30515== by 0x4FD8FC9: xdr_remote_connect_get_all_domain_stats_args (remote_protocol.c:6473)
==30515== by 0x4FE72F2: virNetMessageEncodePayload (virnetmessage.c:350)
==30515== by 0x4FDD21C: virNetClientProgramCall (virnetclientprogram.c:326)
==30515== by 0x4FB4D01: callFull.isra.2 (remote_driver.c:6667)
==30515== by 0x4FCBD45: call (remote_driver.c:6689)
==30515== by 0x4FCBD45: remoteConnectGetAllDomainStats (remote_driver.c:7793)
==30515== by 0x4FA0E75: virConnectGetAllDomainStats (libvirt.c:21678)
==30515== by 0x147FD1: cmdDomstats (virsh-domain-monitor.c:2148)
==30515== by 0x13006B: vshCommandRun (virsh.c:1915)
==30515== by 0x12A9E1: main (virsh.c:3699)
Signed-off-by: Jincheng Miao <jmiao(a)redhat.com>
---
src/remote/remote_driver.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 067f2d0..b8d90ed 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -7779,6 +7779,8 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
virDomainStatsRecordPtr elem = NULL;
virDomainStatsRecordPtr *tmpret = NULL;
+ memset(&args, 0, sizeof(args));
+
if (ndoms) {
if (VIR_ALLOC_N(args.doms.doms_val, ndoms) < 0)
goto cleanup;
--
1.7.1
10 years
[libvirt] [PATCH] virsh: Improve the job type reported of virsh cmd blockcommit
by Shanzhi Yu
When begin a blockcommit job(active) with virsh, it will report
"Block Commit started"(it really donesn't matter much), but for
more preciese it should report "Active Block Commit started"
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
tools/virsh-domain.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 94ae3d3..3416e31 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1723,9 +1723,15 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
if (!blocking) {
- vshPrint(ctl, "%s", _("Block Commit started"));
- ret = true;
- goto cleanup;
+ if (active) {
+ vshPrint(ctl, "%s", _("Active Block Commit started"));
+ ret = true;
+ goto cleanup;
+ } else {
+ vshPrint(ctl, "%s", _("Block Commit started"));
+ ret = true;
+ goto cleanup;
+ }
}
while (blocking) {
--
1.9.3
10 years