[libvirt] [PATCH] qemu: Fix indentation in qemu_domain.h for RNG Namespaces
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed as trivial
src/qemu/qemu_domain.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 041149167c08..39731826e0f5 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -833,10 +833,10 @@ int qemuDomainNamespaceTeardownChardev(virQEMUDriverPtr driver,
virDomainChrDefPtr chr);
int qemuDomainNamespaceSetupRNG(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- virDomainRNGDefPtr rng);
+ virDomainObjPtr vm,
+ virDomainRNGDefPtr rng);
int qemuDomainNamespaceTeardownRNG(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- virDomainRNGDefPtr rng);
+ virDomainObjPtr vm,
+ virDomainRNGDefPtr rng);
#endif /* __QEMU_DOMAIN_H__ */
--
2.11.0
7 years, 8 months
[libvirt] [PATCH] util: fix off-by-one when expanding a bitmap
by Ján Tomko
To make sure bit 'b' fits into the bitmap, we need to allocate b+1
bits, since we number from 0.
Adjust the bitmap test to use a multiple of 8 to catch this
invalid write.
---
src/util/virbitmap.c | 2 +-
tests/virbitmaptest.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 0c04f1a..1b47d74 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -187,7 +187,7 @@ int virBitmapSetBit(virBitmapPtr bitmap, size_t b)
*/
static int virBitmapExpand(virBitmapPtr map, size_t b)
{
- size_t new_len = VIR_DIV_UP(b, VIR_BITMAP_BITS_PER_UNIT);
+ size_t new_len = VIR_DIV_UP(b + 1, VIR_BITMAP_BITS_PER_UNIT);
/* resize the memory if necessary */
if (map->map_len < new_len) {
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index a17ef82..c2a06df 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -639,15 +639,15 @@ test12(const void *opaque ATTRIBUTE_UNUSED)
TEST_MAP(0, "");
- if (virBitmapSetBitExpand(map, 100) < 0)
+ if (virBitmapSetBitExpand(map, 120) < 0)
goto cleanup;
- TEST_MAP(101, "100");
+ TEST_MAP(121, "120");
if (virBitmapClearBitExpand(map, 150) < 0)
goto cleanup;
- TEST_MAP(151, "100");
+ TEST_MAP(151, "120");
virBitmapFree(map);
if (virBitmapParseUnlimited("34,1023", &map) < 0)
--
2.10.2
7 years, 8 months
[libvirt] [PATCH] vz: change printing format specifier for network statistics
by Maxim Nestratov
This is necessary to be able to get statistics for venet0 or
"host-routed" adapter, which has -1 index and thus, its statistics
is shown as "net.nic4294967295".
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/vz/vz_sdk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index f63b9a3..d5688e1 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -4388,7 +4388,7 @@ prlsdkGetNetStats(PRL_HANDLE sdkstats, PRL_HANDLE sdkdom, const char *path,
prlsdkCheckRetGoto(pret, cleanup);
#define PRLSDK_GET_NET_COUNTER(VAL, NAME) \
- if (virAsprintf(&name, "net.nic%d.%s", net_index, NAME) < 0) \
+ if (virAsprintf(&name, "net.nic%u.%s", net_index, NAME) < 0) \
goto cleanup; \
if (prlsdkExtractStatsParam(sdkstats, name, &stats->VAL) < 0) \
goto cleanup; \
--
2.4.11
7 years, 8 months
[libvirt] [PATCH 0/2] vz: support more API calls
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
vz: support virDomainAbortJob
vz: support virDomainReset
src/vz/vz_driver.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
src/vz/vz_sdk.h | 2 ++
src/vz/vz_utils.c | 1 +
src/vz/vz_utils.h | 2 ++
5 files changed, 106 insertions(+)
--
1.8.3.1
7 years, 8 months
[libvirt] [PATCH] cpu: fix typo: rename __kvm_hv_spinlock to __kvm_hv_spinlocks
by Maxim Nestratov
Corresponding hv cpu feature name is 'spinlocks' thus, we should have similar
name with __kvm_hv_ prefix. Otherwise we have misleading warning:
"host doesn't support hyperv 'spinlocks' feature" even when it's supported.
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/cpu/cpu_x86_data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
index 4660ab6..4f3940b 100644
--- a/src/cpu/cpu_x86_data.h
+++ b/src/cpu/cpu_x86_data.h
@@ -53,7 +53,7 @@ struct _virCPUx86CPUID {
# define VIR_CPU_x86_KVM_HV_SYNIC "__kvm_hv_synic"
# define VIR_CPU_x86_KVM_HV_STIMER "__kvm_hv_stimer"
# define VIR_CPU_x86_KVM_HV_RELAXED "__kvm_hv_relaxed"
-# define VIR_CPU_x86_KVM_HV_SPINLOCK "__kvm_hv_spinlock"
+# define VIR_CPU_x86_KVM_HV_SPINLOCK "__kvm_hv_spinlocks"
# define VIR_CPU_x86_KVM_HV_VAPIC "__kvm_hv_vapic"
# define VIR_CPU_x86_KVM_HV_VPINDEX "__kvm_hv_vpindex"
# define VIR_CPU_x86_KVM_HV_RESET "__kvm_hv_reset"
--
2.4.11
7 years, 8 months
[libvirt] [PATCHv4 0/3] Add support for file memorybacking
by Jaroslav Safka
Hi,
we would like to introduce 3 new elements source,access and allocation in memoryBacking element.
For now it was made for numa topology.
<memoryBacking>
<source type="file|anonymous"/>
<access mode="shared|private"/>
<allocation mode="immediate|ondemand"/>
</memoryBacking>
If allocation is immediate then -mem-prealloc should be added to the qemu commanline.
If source is file then
-object memory-backend-file,id=mem,size=1024M,mem-path=*lib dir path* -numa node,memdev=mem Will be added to the qemu commandline
If access is shared then the "share=on" parameter will be added to the memory-backend-file e.g.
-object memory-backend-file,id=mem,size=1024M,mem-path=/var/lib/libvirt/qemu,share=on
The access mode can be overriden by specifying token memAccess in numa cell.
The test cpu-numa-memshared was removed, because behaviour was changed and is not needed anymore
Jaroslav Safka (3):
qemu,conf: Rename virNumaMemAccess to virDomainMemoryAccess
conf: Add new xml elements for file memorybacking support
qemu: Add args generation for file memory backing
docs/formatdomain.html.in | 9 ++
docs/schemas/domaincommon.rng | 30 +++++
src/conf/domain_conf.c | 133 ++++++++++++++++-----
src/conf/domain_conf.h | 22 ++++
src/conf/numa_conf.c | 15 +--
src/conf/numa_conf.h | 14 +--
src/qemu/qemu_command.c | 123 ++++++++++++-------
src/qemu/qemu_process.c | 2 +-
.../qemuxml2argv-fd-memory-no-numa-topology.args | 21 ++++
.../qemuxml2argv-fd-memory-no-numa-topology.xml | 27 +++++
.../qemuxml2argv-fd-memory-numa-topology.args | 24 ++++
.../qemuxml2argv-fd-memory-numa-topology.xml | 30 +++++
.../qemuxml2argv-fd-memory-numa-topology2.args | 26 ++++
.../qemuxml2argv-fd-memory-numa-topology2.xml | 31 +++++
.../qemuxml2argv-fd-memory-numa-topology3.args | 30 +++++
.../qemuxml2argv-fd-memory-numa-topology3.xml | 32 +++++
.../qemuxml2argv-memorybacking-set.xml | 24 ++++
.../qemuxml2argv-memorybacking-unset.xml | 24 ++++
tests/qemuxml2argvtest.c | 12 +-
.../qemuxml2xmlout-memorybacking-set.xml | 32 +++++
.../qemuxml2xmlout-memorybacking-unset.xml | 32 +++++
tests/qemuxml2xmltest.c | 4 +-
22 files changed, 605 insertions(+), 92 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-topology.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-no-numa-topology.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-fd-memory-numa-topology3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memorybacking-set.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memorybacking-unset.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-memorybacking-set.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-memorybacking-unset.xml
--
2.7.4
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
7 years, 8 months
[libvirt] [PATCH 0/2] qemu: auto-add all necessary hubs
by Ján Tomko
not just one.
https://bugzilla.redhat.com/show_bug.cgi?id=1410188
Ján Tomko (2):
conf: move VIR_DOMAIN_USB_HUB_PORTS to the header file
qemu: Add enough USB hubs to accomodate all devices
src/conf/domain_addr.c | 2 --
src/conf/domain_addr.h | 2 ++
src/qemu/qemu_domain_address.c | 15 +++++---
.../qemuxml2argv-usb-hub-autoadd-deluxe.args | 42 ++++++++++++++++++++++
.../qemuxml2argv-usb-hub-autoadd-deluxe.xml | 35 ++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
6 files changed, 92 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-hub-autoadd-deluxe.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-hub-autoadd-deluxe.xml
--
2.10.2
7 years, 8 months
[libvirt] [PATCH v1 0/4] bhyve: rework SATA address allocation
by Roman Bogorodskiy
This series reworks SATA address allocation in the bhyve driver.
While commit messages provide enough details (I hope), there
are some general important notes:
- currently, sata devices get PCI addresses and this no
longer works, so right now bhyve driver fails on any
SATA device
- While this series fixes SATA devices' addresses (I hope *again*),
old Domain XMLs with already generated PCI addresses will
not work. Also, it will not work for XMLs where user
manually specified PCI address for a disk, though it
worked before. This is not good and I'm open for suggestions
how to handle that. I'm thinking about writing a tiny
Python script that will drop incorrect addresses from
domain XMLs.
Fabian Freyer (1):
bhyve: detect 32 SATA devices per controller support
Roman Bogorodskiy (3):
bhyve: add virBhyveDriverCreateXMLConf
bhyve: fix SATA address allocation
bhyve: add tests for SATA address allocation
po/POTFILES.in | 1 +
src/bhyve/bhyve_capabilities.c | 59 ++++-
src/bhyve/bhyve_capabilities.h | 3 +-
src/bhyve/bhyve_command.c | 143 +++++++++---
src/bhyve/bhyve_device.c | 33 ++-
src/bhyve/bhyve_domain.c | 69 +++++-
src/bhyve/bhyve_domain.h | 2 +
src/bhyve/bhyve_driver.c | 4 +-
.../bhyvexml2argvdata/bhyvexml2argv-acpiapic.args | 4 +-
...bhyvexml2argv-addr-more-than-32-sata-disks.args | 21 ++
...yvexml2argv-addr-more-than-32-sata-disks.ldargs | 3 +
.../bhyvexml2argv-addr-more-than-32-sata-disks.xml | 196 ++++++++++++++++
.../bhyvexml2argv-addr-multiple-sata-disks.args | 9 +
.../bhyvexml2argv-addr-multiple-sata-disks.ldargs | 3 +
.../bhyvexml2argv-addr-multiple-sata-disks.xml | 31 +++
...2argv-addr-no32devs-more-than-32-sata-disks.xml | 196 ++++++++++++++++
...xml2argv-addr-no32devs-multiple-sata-disks.args | 11 +
...l2argv-addr-no32devs-multiple-sata-disks.ldargs | 3 +
...exml2argv-addr-no32devs-multiple-sata-disks.xml | 31 +++
...yvexml2argv-addr-no32devs-single-sata-disk.args | 9 +
...exml2argv-addr-no32devs-single-sata-disk.ldargs | 3 +
...hyvexml2argv-addr-no32devs-single-sata-disk.xml | 21 ++
.../bhyvexml2argv-addr-single-sata-disk.args | 9 +
.../bhyvexml2argv-addr-single-sata-disk.ldargs | 3 +
.../bhyvexml2argv-addr-single-sata-disk.xml | 21 ++
tests/bhyvexml2argvdata/bhyvexml2argv-base.args | 4 +-
.../bhyvexml2argv-bhyveload-bootorder.args | 5 +-
.../bhyvexml2argv-bhyveload-bootorder1.args | 5 +-
.../bhyvexml2argv-bhyveload-bootorder3.args | 5 +-
.../bhyvexml2argv-bhyveload-explicitargs.args | 4 +-
tests/bhyvexml2argvdata/bhyvexml2argv-console.args | 2 +-
.../bhyvexml2argv-custom-loader.args | 4 +-
.../bhyvexml2argv-disk-cdrom-grub.args | 4 +-
.../bhyvexml2argv-disk-cdrom.args | 4 +-
.../bhyvexml2argv-grub-bootorder.args | 6 +-
.../bhyvexml2argv-grub-bootorder2.args | 6 +-
.../bhyvexml2argv-grub-defaults.args | 4 +-
.../bhyvexml2argvdata/bhyvexml2argv-localtime.args | 4 +-
tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args | 4 +-
.../bhyvexml2argv-serial-grub-nocons.args | 2 +-
.../bhyvexml2argv-serial-grub.args | 2 +-
tests/bhyvexml2argvdata/bhyvexml2argv-serial.args | 2 +-
tests/bhyvexml2argvtest.c | 25 ++-
.../bhyvexml2xmlout-acpiapic.xml | 5 +-
...hyvexml2xmlout-addr-more-than-32-sata-disks.xml | 246 +++++++++++++++++++++
.../bhyvexml2xmlout-addr-multiple-sata-disks.xml | 45 ++++
...ml2xmlout-addr-no32devs-multiple-sata-disks.xml | 51 +++++
...vexml2xmlout-addr-no32devs-single-sata-disk.xml | 33 +++
.../bhyvexml2xmlout-addr-single-sata-disk.xml | 33 +++
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-bootorder.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-bootorder1.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-bootorder2.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-bootorder3.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-bootorder4.xml | 5 +-
.../bhyvexml2xmlout-bhyveload-explicitargs.xml | 5 +-
.../bhyvexml2xmlout-console.xml | 5 +-
.../bhyvexml2xmlout-custom-loader.xml | 5 +-
.../bhyvexml2xmlout-disk-cdrom-grub.xml | 5 +-
.../bhyvexml2xmlout-disk-cdrom.xml | 5 +-
.../bhyvexml2xmlout-disk-virtio.xml | 1 +
.../bhyvexml2xmlout-grub-bootorder.xml | 5 +-
.../bhyvexml2xmlout-grub-bootorder2.xml | 5 +-
.../bhyvexml2xmlout-grub-defaults.xml | 5 +-
.../bhyvexml2xmlout-localtime.xml | 5 +-
.../bhyvexml2xmlout-macaddr.xml | 5 +-
.../bhyvexml2xmlout-metadata.xml | 6 +-
.../bhyvexml2xmlout-serial-grub-nocons.xml | 5 +-
.../bhyvexml2xmlout-serial-grub.xml | 5 +-
.../bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml | 5 +-
tests/bhyvexml2xmltest.c | 42 +++-
71 files changed, 1398 insertions(+), 139 deletions(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-more-than-32-sata-disks.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-more-than-32-sata-disks.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-multiple-sata-disks.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-multiple-sata-disks.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-no32devs-single-sata-disk.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-single-sata-disk.xml
--
2.11.0
7 years, 8 months
[libvirt] [PATCH] vz: don't show bootorder for containers
by Nikolay Shirokovskiy
Because this is invalid xml for containers. This patch almost
reverts 7eda8369, but still skips converting vz sdk bootorder
for containers to libvirt bootorder because we use boot order
in containers for quite different purpurse.
---
I know I reviewed this code just recently. It is just got out
of my sight.
src/vz/vz_sdk.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index ced58e5..43a6340 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1695,21 +1695,6 @@ prlsdkBootOrderCheck(PRL_HANDLE sdkdom, PRL_DEVICE_TYPE sdkType, int sdkIndex,
return ret;
}
-static void
-prlsdkConvertBootOrderCt(virDomainDefPtr def)
-{
- size_t i;
- for (i = 0; i < def->nfss; i++) {
-
- if (STREQ(def->fss[i]->dst, "/")) {
- def->os.nBootDevs = 0;
- return;
- }
- }
- def->os.nBootDevs = 1;
- def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK;
-}
-
static int
prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
{
@@ -1870,12 +1855,8 @@ prlsdkLoadDomain(vzDriverPtr driver,
goto error;
/* depends on prlsdkAddDomainHardware */
- if (IS_CT(def)) {
- prlsdkConvertBootOrderCt(def);
- } else {
- if (prlsdkConvertBootOrderVm(sdkdom, def) < 0)
- goto error;
- }
+ if (!IS_CT(def) && prlsdkConvertBootOrderVm(sdkdom, def) < 0)
+ goto error;
pret = PrlVmCfg_GetEnvId(sdkdom, &envId);
prlsdkCheckRetGoto(pret, error);
--
1.8.3.1
7 years, 8 months