[libvirt] [PATCH] tests: enable qemu 2.9 capabilities test for s390
by Boris Fiuczynski
Adjust qemu 2.9 s390 capabilites xml and enable qemu capabilities test.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
---
tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml | 8 +++++---
tests/qemucapabilitiestest.c | 1 +
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml
index 7d46128..fa9d91d 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml
@@ -1,7 +1,7 @@
<qemuCaps>
- <qemuctime>1495812539</qemuctime>
- <selfctime>1496170776</selfctime>
- <selfvers>3004000</selfvers>
+ <qemuctime>0</qemuctime>
+ <selfctime>0</selfctime>
+ <selfvers>0</selfvers>
<usedQMP/>
<flag name='kvm'/>
<flag name='mem-path'/>
@@ -133,6 +133,8 @@
<flag name='query-named-block-nodes'/>
<flag name='kernel-irqchip'/>
<flag name='kernel-irqchip.split'/>
+ <flag name='virtio.iommu_platform'/>
+ <flag name='virtio.ats'/>
<flag name='loadparm'/>
<version>2009050</version>
<kvmVersion>0</kvmVersion>
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index bbb683e..c76da05 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -175,6 +175,7 @@ mymain(void)
DO_TEST("ppc64le", "caps_2.6.0");
DO_TEST("s390x", "caps_2.7.0");
DO_TEST("s390x", "caps_2.8.0");
+ DO_TEST("s390x", "caps_2.9.50");
/*
* Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies"
--
2.7.4
7 years, 5 months
[libvirt] [PATCH v3 00/26] Multiple PHBs and hostdev isolation for pSeries guests
by Andrea Bolognani
Changes from [v2]:
* support hot(un)plug properly;
* add documentation.
Changes from [v1]:
* address review comments;
* implement a much better isolation algorithm that doesn't
require parsing and formatting the isolation group and
can handle more dynamic scenarios, such as empty PHBs
changing their isolation groups to accomodate hotplugged
hostdevs;
* add more test cases.
Known limitations:
* hostdevs in IOMMU group 0 are not handled properly
- the default isolation group is currently 0, which
means hostdevs in IOMMU group 0 will be assigned
addresses as if they were emulated devices and will
not be isolated properly. Fixing this will be a lot
of work because it requires cleaning up the the code
that instantiates pretty much anything embedding a
virDomainDeviceInfo, which is... A lot of things.
Luckily, IOMMU group 0 will probably not contain any
devices that are actually usable as hostdevs, so it
should be okay to fix this in a follow-up series
rather than upfront.
Reviewed-by tags have been collected, so figuring out which
patches are still in need of reviewing is pretty easy.
[v1] https://www.redhat.com/archives/libvir-list/2017-June/msg00110.html
[v2] https://www.redhat.com/archives/libvir-list/2017-June/msg00695.html
Andrea Bolognani (26):
conf: Remove obsolete comment
conf: Make virDomainPCIAddressSetGrow() private
conf: Make virDomainPCIAddressFlagsCompatible() private
conf: Tweak virDomainPCIAddressGetNextAddr() signature
qemu: Clean up qemuDomainAttachHostPCIDevice()
tests: Update qemumemlock data
tests: Mock IOMMU groups
conf: Simplify slot allocation
qemu: Allow qemuBuildControllerDevStr() to return NULL
qemu: Tweak index number checking
conf: Move index number checking to drivers
qemu: Relax pci-root index requirement for pSeries guests
conf: Parse and format <target index='...'/>
conf: Add 'spapr-pci-host-bridge' controller model
qemu: Automatically pick target index and model for pci-root
controllers
qemu: Introduce QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE
qemu: Deal with PHB naming conventions
qemu: Use multiple PHBs for pSeries guests
tests: Add tests for pSeries guests with multiple PHBs
tests: Add baseline tests for automatic PHB usage
qemu: Use PHBs to fill holes in PCI bus numbering
qemu: Use PHBs when extending the guest PCI topology
conf: Introduce isolation groups
conf: Implement isolation rules
qemu: Isolate hostdevs on pSeries guests
news: Update for multiple PHBs and hostdev isolation
docs/formatdomain.html.in | 5 +
docs/news.xml | 21 ++
docs/schemas/domaincommon.rng | 7 +
src/bhyve/bhyve_device.c | 4 +-
src/bhyve/bhyve_domain.c | 15 ++
src/conf/device_conf.h | 14 +-
src/conf/domain_addr.c | 222 ++++++++++++------
src/conf/domain_addr.h | 38 ++-
src/conf/domain_conf.c | 31 ++-
src/conf/domain_conf.h | 2 +
src/libvirt_private.syms | 2 -
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 148 ++++++++++--
src/qemu/qemu_command.h | 9 +-
src/qemu/qemu_domain.c | 14 ++
src/qemu/qemu_domain_address.c | 261 +++++++++++++++++++--
src/qemu/qemu_hotplug.c | 23 +-
.../qemuargv2xmldata/qemuargv2xml-pseries-disk.xml | 5 +-
.../qemuargv2xml-pseries-nvram.xml | 5 +-
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
.../qemumemlock-pc-hardlimit+hostdev.xml | 2 +-
.../qemumemlock-pc-hardlimit+locked+hostdev.xml | 2 +-
tests/qemumemlockdata/qemumemlock-pc-hostdev.xml | 2 +-
.../qemumemlock-pc-locked+hostdev.xml | 2 +-
.../qemumemlock-pseries-hardlimit+hostdev.xml | 2 +-
...emumemlock-pseries-hardlimit+locked+hostdev.xml | 2 +-
.../qemumemlock-pseries-hostdev.xml | 2 +-
.../qemumemlock-pseries-locked+hostdev.xml | 2 +-
tests/qemumemlocktest.c | 21 +-
.../qemuxml2argv-pseries-hostdevs-1.args | 25 ++
.../qemuxml2argv-pseries-hostdevs-1.xml | 38 +++
.../qemuxml2argv-pseries-hostdevs-2.args | 25 ++
.../qemuxml2argv-pseries-hostdevs-2.xml | 37 +++
.../qemuxml2argv-pseries-hostdevs-3.args | 24 ++
.../qemuxml2argv-pseries-hostdevs-3.xml | 31 +++
.../qemuxml2argv-pseries-many-buses-1.args | 22 ++
.../qemuxml2argv-pseries-many-buses-1.xml | 19 ++
.../qemuxml2argv-pseries-many-buses-2.args | 22 ++
.../qemuxml2argv-pseries-many-buses-2.xml | 18 ++
.../qemuxml2argv-pseries-many-devices.args | 53 +++++
.../qemuxml2argv-pseries-many-devices.xml | 48 ++++
.../qemuxml2argv-pseries-phb-default-missing.args | 22 ++
.../qemuxml2argv-pseries-phb-default-missing.xml | 16 ++
.../qemuxml2argv-pseries-phb-simple.args | 22 ++
.../qemuxml2argv-pseries-phb-simple.xml | 17 ++
tests/qemuxml2argvtest.c | 64 ++++-
.../qemuxml2xmlout-panic-pseries.xml | 5 +-
.../qemuxml2xmlout-ppc64-usb-controller-legacy.xml | 5 +-
.../qemuxml2xmlout-ppc64-usb-controller.xml | 5 +-
.../qemuxml2xmlout-pseries-hostdevs-1.xml | 54 +++++
.../qemuxml2xmlout-pseries-hostdevs-2.xml | 50 ++++
.../qemuxml2xmlout-pseries-hostdevs-3.xml | 47 ++++
...xml => qemuxml2xmlout-pseries-many-buses-1.xml} | 19 +-
...xml => qemuxml2xmlout-pseries-many-buses-2.xml} | 20 +-
.../qemuxml2xmlout-pseries-many-devices.xml | 125 ++++++++++
.../qemuxml2xmlout-pseries-nvram.xml | 5 +-
.../qemuxml2xmlout-pseries-panic-missing.xml | 5 +-
.../qemuxml2xmlout-pseries-panic-no-address.xml | 5 +-
...qemuxml2xmlout-pseries-phb-default-missing.xml} | 18 +-
...m.xml => qemuxml2xmlout-pseries-phb-simple.xml} | 18 +-
tests/qemuxml2xmltest.c | 59 ++++-
tests/virpcimock.c | 43 +++-
63 files changed, 1637 insertions(+), 216 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-1.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-1.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hostdevs-3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-buses-1.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-buses-1.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-buses-2.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-buses-2.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-devices.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-many-devices.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-default-missing.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-default-missing.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-phb-simple.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hostdevs-1.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hostdevs-2.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hostdevs-3.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-nvram.xml => qemuxml2xmlout-pseries-many-buses-1.xml} (55%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-nvram.xml => qemuxml2xmlout-pseries-many-buses-2.xml} (54%)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-many-devices.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-nvram.xml => qemuxml2xmlout-pseries-phb-default-missing.xml} (56%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-nvram.xml => qemuxml2xmlout-pseries-phb-simple.xml} (56%)
--
2.7.5
7 years, 5 months
[libvirt] [PATCH v3 0/4] Virtio-crypto device support
by Longpeng(Mike)
As virtio-crypto has been supported in QEMU 2.8 and the frontend
driver has been merged in linux 4.10, so it's necessary to support
virtio-crypto in libvirt.
---
Hi guys,
Sorry for the long delay...
Changes since v2:
- PATCH 1: modify docs as Martin & Boris's suggestion. [Martin & Boris]
- PATCH 2: add the missing 'ToString'. [Martin]
- PATCH 3: use virAsprintf instead of virBufferAsprintf. [Martin]
remove pointless virBufferCheckError. [Martin]
- rebase on master. [Longpeng]
Changes since v1:
- split patch [Martin]
- rebase on master [Martin]
- add docs/tests/schema [Martin]
- fix typos [Gonglei]
---
Longpeng(Mike) (4):
docs: schema: Add basic documentation for the virtual
conf: Parse virtio-crypto in the domain XML
qemu: Implement support for 'builtin' backend for virtio-crypto
tests: Add testcase for virtio-crypto XML parsing
docs/formatdomain.html.in | 61 ++++++
docs/schemas/domaincommon.rng | 30 +++
src/conf/domain_conf.c | 213 ++++++++++++++++++++-
src/conf/domain_conf.h | 32 ++++
src/libvirt_private.syms | 4 +
src/qemu/qemu_alias.c | 20 ++
src/qemu/qemu_alias.h | 3 +
src/qemu/qemu_capabilities.c | 6 +
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 126 ++++++++++++
src/qemu/qemu_command.h | 3 +
src/qemu/qemu_domain_address.c | 25 +++
src/qemu/qemu_driver.c | 6 +
src/qemu/qemu_hotplug.c | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 2 +
.../qemuxml2argv-virtio-crypto-builtin.xml | 26 +++
.../qemuxml2argv-virtio-crypto.args | 22 +++
.../qemuxml2xmlout-virtio-crypto-builtin.xml | 31 +++
tests/qemuxml2xmltest.c | 2 +
20 files changed, 618 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml
--
1.8.3.1
7 years, 5 months
[libvirt] [PATCH 0/2] virtio-crypto: ccw support
by Boris Fiuczynski
The two patches of this series are based on the patch series
[libvirt] [PATCH v3 0/4] Virtio-crypto device support
https://www.redhat.com/archives/libvir-list/2017-July/msg00097.html
They add ccw support and a test for virtio-crypto-ccw.
Boris Fiuczynski (2):
qemu: virtio-crypto: add ccw support
qemu: virtio-crypto: add test for ccw support
src/qemu/qemu_command.c | 8 ++++++--
.../qemuxml2argv-virtio-crypto-ccw.args | 22 ++++++++++++++++++++++
.../qemuxml2argv-virtio-crypto-ccw.xml | 16 ++++++++++++++++
tests/qemuxml2argvtest.c | 6 ++++++
4 files changed, 50 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.xml
--
2.7.4
7 years, 5 months
[libvirt] [PATCH 0/4] Misc cleanups for internal.h
by Daniel P. Berrange
Looking at internal.h there was some cruft we could usefully
clean out.
Daniel P. Berrange (4):
Remove duplicate define of __GNUC_PREREQ
Require use of GCC 4.4 or CLang compilers
Remove network constants out of internal.h
Remove incorrectly used TODO macro
config-post.h | 24 +++---
src/internal.h | 153 +++++++--------------------------
src/libxl/libxl_conf.c | 1 +
src/nwfilter/nwfilter_dhcpsnoop.c | 1 +
src/nwfilter/nwfilter_gentech_driver.c | 1 +
src/qemu/qemu_conf.c | 1 +
src/util/virsocketaddr.h | 16 ++++
src/util/virutil.c | 1 +
src/vz/vz_sdk.c | 1 +
src/xen/xen_hypervisor.c | 6 +-
src/xen/xend_internal.c | 6 +-
11 files changed, 76 insertions(+), 135 deletions(-)
--
2.9.4
7 years, 5 months
[libvirt] libvirt binding for DBUS
by Pavel Hrdina
Hi,
Last week (Jun 26 - Jun 30) there was a Cockpit Hackfest and the main
topic was integration virtualization support into Cockpit. For that
purpose Lars and me have started to work on a new libvirt dbus binding.
Currently the binding is written manually and only few APIs are
supported, however the ultimate goal is to write a code generator
and ensure that all APIs are covered by this binding (similarly to the
python binding).
Dan, can you please setup hosting on libvirt.org?
The binding is experimental and the API may and probably will change
until first official release.
Thanks,
Pavel
[1] <https://github.com/larskarlitski/libvirt-dbus>
7 years, 5 months
[libvirt] [PATCH] qemu: Take all PHBs into account while calculating memlock limits
by Shivaprasad G Bhat
Now that the multi-phb support series is in, work on the TODO at
qemuDomainGetMemLockLimitBytes() to arrive at the correct memlock limit
value.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
This patch should be applied on top of Andrea's multi-phb support
patchset.
src/qemu/qemu_domain.c | 12 ++++++++----
tests/qemumemlocktest.c | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a3ce10a..a8293b4 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6674,12 +6674,16 @@ qemuDomainGetMemLockLimitBytes(virDomainDefPtr def)
unsigned long long memory;
unsigned long long baseLimit;
unsigned long long passthroughLimit;
- size_t nPCIHostBridges;
+ size_t nPCIHostBridges = 0;
bool usesVFIO = false;
- /* TODO: Detect at runtime once we start using more than just
- * the default PCI Host Bridge */
- nPCIHostBridges = 1;
+ for (i = 0; i < def->ncontrollers; i++) {
+ if (def->controllers[i]->type != VIR_DOMAIN_CONTROLLER_TYPE_PCI ||
+ def->controllers[i]->model != VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
+ continue;
+ }
+ nPCIHostBridges++;
+ }
for (i = 0; i < def->nhostdevs; i++) {
virDomainHostdevDefPtr dev = def->hostdevs[i];
diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c
index c0f1dc3..268563d 100644
--- a/tests/qemumemlocktest.c
+++ b/tests/qemumemlocktest.c
@@ -131,7 +131,7 @@ mymain(void)
DO_TEST("pseries-hardlimit", 2147483648);
DO_TEST("pseries-locked", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
- DO_TEST("pseries-hostdev", 2168455168);
+ DO_TEST("pseries-hostdev", 4320133120);
DO_TEST("pseries-hardlimit+locked", 2147483648);
DO_TEST("pseries-hardlimit+hostdev", 2147483648);
7 years, 5 months
[libvirt] Release of libvirt-3.5.0
by Daniel Veillard
As planned, it is out, I tagged it in git and pushed signed tarball and
rpms to the usual place:
ftp://libvirt.org/libvirt/
I also made a release 3.5.0 of the python bindings with minimal changes
compared to 3.4.0, it can be found at:
ftp://libvirt.org/libvirt/python/
This is a balanced release with signiciant amounts of both new features,
improvements and bug fixes:
New features:
- qemu: Add support for loadparm for a boot device
Add an optional boot parameter 'loadparm' for a boot device. Loadparm
is an 8 byte parameter that, when present, is queried by S390 guests
via sclp or diag 308. Linux guests on S390 use it to select a boot
entry.
- Support controlling how video devices are exposed to the bhyve guests
The vgaconf attribute was added to video's driver element. Possible
values are: on, off, and io. It controlls the way how bhyve exposes
video devices to its guests; various guest OSes might require different
settings to boot properly.
- qemu: Add support for live updates of coalesce settings
Users can now use virsh update-device to change the coalesce settings
of an interfaces while the domain is running.
- qemu: Allow VirtIO devices to use vIOMMU
It is now possible to turn on IOTBL for the vIOMMU and have VirtIO
devices use it, provided they have been configured appropriately.
Improvements:
- qemu: block copy job can be used with persistent domains
Until now it was not possible to use block copy with persistent VMs. In
use cases where it's not required to recover the job after VM shutdown,
it's possible to specify VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB flag to
start the copy job.
- JSON pseudo-protocol backing store parser supports new format of qemu 2.9
QEMU 2.9 modified a few structures corresponding to the JSON format of
specifying a backing store for a disk image. Libvirt now implements the
new format.
- Capabilities now include info about host's CAT settings
Various information about resource control from the host is gathered
and presented in capabilities if available.
- apparmor: Several improvements
Allow access to Ceph config, EFI firmware on both x86_64 and aarch64,
device tree on ppc64 and more.
- qemu: Support host-model on POWER9 machines
Bug fixes:
- qemu: snapshot: retrieve image metadata from user provided files
Disk images of an external snapshot created with
VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT flag specified would not be
scanned for metadata after recent changes. The metadata is necessary to
allow keeping relative paths between images when doing a block-commit.
- Parse decimal numbers in a locale-independent way
Some locales, such as de_DE and pt_BR, use comma rather than dot to
separate the integer part from the fractional part of a decimal number;
however, several data sources such as the kernel use a
locale-independent representation and need to be treated accordingly.
- Support compilation with newer compiler and libc versions
Several fixes have been included to make compilation with Clang 4.0.0,
GCC 7.1 and glibc >= 2.25.90 possible.
- qemu: Query name for vhost-user interfaces at runtime
This makes it possible to use virsh subcommands such as domiflist and
domifstat on vhost-user interfaces.
- qemu: Set MTU for hotplugged interfaces correctly
When hotplugging a network interface, the MTU was only set on the guest
side. Set it on the host side as well.
- qemu: Forbid updating MTU for interfaces of running guests
The MTU setting can't be modified while the guest is running, so any
attempt to alter it at runtime will now result in an error rather than
being silently ignored.
- qemu: Fix specifying QXL heads with older QEMU releases
Specifying the number of QXL heads was not working correctly for QEMU
releases older than 1.6.
- qemu: Fix migration to older libvirt/QEMU versions
When the guest is started, libvirt updates the CPU definition to
reflect the actual CPU features to enforce ABI. We need to send
original and updated CPU definition in order to support migration to
older libvirt/QEMU versions. Only the updated CPU definition was sent
to destination.
So thanks everybody for your help toward this release, be it code,
bug reports, reviews ideas or doc, it's all appreciated !
So please enjoy this new release !
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
7 years, 5 months
Re: [libvirt] [PATCH v3 1/4] block: Pass bdrv_* methods to bs->file by default
by Eric Blake
[adding libvirt for block size discussion]
On 07/04/2017 04:44 AM, Kevin Wolf wrote:
> Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben:
>> The following functions fail if bs->drv does not implement them:
>>
>> bdrv_probe_blocksizes
>> bdrv_probe_geometry
>> bdrv_truncate
>> bdrv_has_zero_init
>> bdrv_get_info
>> bdrv_media_changed
>> bdrv_eject
>> bdrv_lock_medium
>> bdrv_co_ioctl
>>
>> Instead, the call should be passed to bs->file if it exists, to allow
>> filter drivers to support those methods without implementing them.
>>
>
>> + return bdrv_probe_blocksizes(bs->file->bs, bsz);
>> }
>>
>> return -ENOTSUP;
>
> This change actually changes existing behaviour. Basically, all of your
> additions also apply for qcow2 images or other image formats, and we
> need to check whether they make sense there.
>
> bdrv_probe_blocksizes() is used for the default values for the physical
> and logical block sizes for block devices if no value is explicitly
> specified in -device. This makes sense as it will allow the guest to
> optimise its requests so that they align with the block size that is
> optimal for the storage that contains the image. (I also think that we
> probably should implement .bdrv_probe_blocksizes() not only for
> host_device, but also for regular files to get optimal performance by
> default.)
>
> Changing the defaults can be a problem for cross-version live migration
> if the default values are used. Management tools that want to do live
> migration are supposed to explicitly provide all options they can, so
> this should be okay.
>
> Eric, does libvirt set the physical/logical block size explicitly? If
> not, it would be good if it started to do so.
Libvirt supports user control of block size via this XML in <disk>:
<blockio logical_block_size='512' physical_block_size='4096'/>
which it translates to command-line logical_block_size= and
physical_block_size=. But I didn't see anywhere that libvirt tries to
do anything with block size in QMP, which makes me wonder if that is a
libvirt bug for not allowing a block size when hot-plugging a drive, or
a weakness in QMP.
Your point that if libvirt isn't always specifying block size, then we
risk the block size changing on migration (that is, libvirt should be
patched to specify block size always, and not just when the XML
specifies it).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
7 years, 5 months