[PATCH 4/5] qemu: add QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE capability

2021-09-08 Thread Hiroki Narukawa
To support virtio-blk queue-size option, this commit adds capability detection to the option. Signed-off-by: Hiroki Narukawa --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[PATCH 5/5] qemu: add virtio-blk queue-size option

2021-09-08 Thread Hiroki Narukawa
The option "queue-size" in virtio-blk was added in qemu-2.12.0, and default value increased from qemu-5.0.0. However, increasing this value may lead to drop of random access performance. This is configurable value, so we want to use it via libvirt. Signed-off-by: Hiroki Narukawa ---

[PATCH 2/5] qemu: add disk queue count ABI stability check

2021-09-08 Thread Hiroki Narukawa
virtio-blk num-queue is visible to guest OS, so this must be kept while live migration. Signed-off-by: Hiroki Narukawa --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dbefc98ee8..6cc1f78ec2 100644 ---

[PATCH 1/5] qemu: Make disk-virtio-queues tests use DO_TEST_CAPS_LATEST

2021-09-08 Thread Hiroki Narukawa
Currently disk-virtio-queues test is now using specifying a fake capability. By this commit this test will make use of DO_TEST_CAPS_LATEST. Signed-off-by: Hiroki Narukawa --- .../qemuxml2argvdata/disk-virtio-queues.args | 20 +++ .../disk-virtio-queues.x86_64-latest.args | 35

[PATCH 0/5] qemu: add virtio-blk queue-size option

2021-09-08 Thread Hiroki Narukawa
This is resubmit of "qemu: add virtio-blk queue-size option" after following the review. The option "queue-size" in virtio-blk was added in qemu-2.12.0, and default value increased from qemu-5.0.0. However, increasing this value may lead to drop of random access performance. This is

[PATCH 3/5] qemu: add queue_size option to disk

2021-09-08 Thread Hiroki Narukawa
The option "queue-size" in virtio-blk was added in qemu-2.12.0, and default value increased from qemu-5.0.0. However, increasing this value may lead to drop of random access performance. To add disk queue_size option, first this commit add interface to accept. Signed-off-by: Hiroki Narukawa

[PATCH 9/9] ch_driver: Handle validation failure correctly

2021-09-08 Thread William Douglas
When validation like deviceValidateCallback fails, the vm will not be set and so the call to virDomainObjListRemove will be passed a NULL pointer causing a segfault. To prevent this add a check that the vm is defined before calling out to virDomainObjListRemove. Signed-off-by: William Douglas

[PATCH 3/9] ch_monitor: Update virCHMonitorGet to handle accept a response

2021-09-08 Thread William Douglas
The virCHMonitorGet function needed to be able to return data from the hypervisor. This functionality is needed in order for the driver to support PTY enablement and getting details about the VM state. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 46

[PATCH 4/9] ch_monitor: Use virCHMonitorGet to access cloud-hypervisor API

2021-09-08 Thread William Douglas
Now that virCHMonitorGet is capable of handling data returned by the cloud-hypervisor API, make use of this via virCHMonitorGetInfo to call into the vm.info endpoint. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 15 +++ src/ch/ch_monitor.h | 3 +++ 2 files changed, 18

[PATCH 8/9] ch_driver: Add handler for console API

2021-09-08 Thread William Douglas
Enable the handler function to find and open the console character device that will be used by the console API. Signed-off-by: William Douglas --- src/ch/ch_driver.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/src/ch/ch_driver.c

[PATCH 6/9] ch_process: Handle enabled console devices

2021-09-08 Thread William Douglas
Add functionality to allow libvirt console to connect to the cloud-hypervisor created PTY associated with a VM by updating the domain with console path information. This has to be run after the VM is created by cloud-hypervisor. Signed-off-by: William Douglas --- src/ch/ch_process.c | 84

[PATCH 2/9] ch_monitor: Make unused function static

2021-09-08 Thread William Douglas
The virCHMonitorGet function wasn't in use and was declared as non-static (though not in a header file). This function isn't going to be used outside of the monitor though so remove the initial declaration and define the function to be static. Future work should adjust this function to allow

[PATCH 1/9] ch_domain: Add virChrdevs for console support

2021-09-08 Thread William Douglas
Add and initialize a virChrdevs to the _virCHDomainObjPrivate structure in order to eventually track the consoles in use by a domain. Signed-off-by: William Douglas --- src/ch/ch_domain.c | 7 +++ src/ch/ch_domain.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/ch/ch_domain.c

[PATCH 7/9] ch_domain: Allow controller and chr devices

2021-09-08 Thread William Douglas
With the console and serial device handling fully functional, allow the required device types to be specified in the domain configuration. The configuration only supports a single serial or console device. Signed-off-by: William Douglas --- src/ch/ch_domain.c | 33

[PATCH 5/9] ch_monitor: Add pty json builder function

2021-09-08 Thread William Douglas
Add function to build the the json structure to configure a PTY in cloud-hypervisor. The devices themselves still aren't allowed in configurations yet though. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PATCHv4 0/9] ch: Add Console support

2021-09-08 Thread William Douglas
This series enables console support in the cloud-hypervisor driver. Cloud-hypervisor only supports a single console or serial device at a time, hence the checks to ensure the domain configuration is only passing one or the other. Changes since v3: * Reset ch monitor's curl handle after a get

Re: [PATCH v2 0/4] Add support for two i386 pm options which control acpi hotplug

2021-09-08 Thread Ani Sinha
Ping again … On Wed, Sep 1, 2021 at 09:03 Ani Sinha wrote: > > > On Thu, 19 Aug 2021, Ani Sinha wrote: > > > Hi: > > > > I added some negative xml2argv tests as well as new xml2xml tests. In > the process, > > I also fixed a bug where I had not added appropriate code to generate > the output >

Re: [PATCH] qemu: remove unnecessary strlen for LINE_ENDING

2021-09-08 Thread Laine Stump
On 8/31/21 11:04 PM, renlei1...@163.com wrote: From: Ren Lei the length of LINE_ENDING is static, it's a waste to call strlen every time. AFAIK gcc optimizes out calls to strlen of a literal constant string, making this hand-optimization unnecessary. Signed-off-by: Ren Lei ---

Re: [PATCH 0/6] qemu: Fix crash when validating a XML without disk's

2021-09-08 Thread Michal Prívozník
On 9/7/21 3:22 PM, Peter Krempa wrote: > Apart from fixing the crash the validation code is fixed to do the > correct thing and a test case is added. > > Peter Krempa (6): > qemuDomainDefValidateDiskLunSource: Unbreak error messages > conf: validate: Move qemu-specific LUN disk validation to

Re: RFC: revert to external snapshot API

2021-09-08 Thread Nikolay Shirokovskiy
Hi! What do you think of this approach to implementing reverting? вт, 31 авг. 2021 г. в 16:46, Nikolay Shirokovskiy < nshirokovs...@virtuozzo.com>: > Hi, all. > > I want to implement reverting to external snapshot functionality. > I've checked the mailing list history and found some previous

Re: [PATCH 3/3] qemu: add virtio-blk queue-size option

2021-09-08 Thread Peter Krempa
On Mon, Sep 06, 2021 at 17:06:15 +0900, Hiroki Narukawa wrote: Same as previous patches. > --- > src/qemu/qemu_command.c | 3 ++ > src/qemu/qemu_validate.c | 6 > .../disk-virtio-queue-size.args | 29 +++ >

Re: [PATCH 2/3] qemu: add QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE capability

2021-09-08 Thread Peter Krempa
On Mon, Sep 06, 2021 at 17:06:14 +0900, Hiroki Narukawa wrote: This looks good, but the commit is lacking the commit message and origin certification. > ---

Re: [PATCH 1/3] qemu: accept queue_size XML element

2021-09-08 Thread Peter Krempa
On Mon, Sep 06, 2021 at 17:06:13 +0900, Hiroki Narukawa wrote: Missing commit message. Please describe what and why you are adding. You also need provide certification that your patches are in compliance with the Developer Certificate of Origin:

Re: [PATCH v2 2/3] conf: support for virtio-blk-pci discard option

2021-09-08 Thread Peter Krempa
On Wed, Sep 08, 2021 at 11:56:02 +0200, Peter Krempa wrote: > On Tue, Sep 07, 2021 at 15:12:09 +0800, yuxiat...@huawei.com wrote: > > From: yuxiating > > > > DISCARD and WRITE_ZEROES features for machine type >= 4.0 is enabled by > > default > > since 5c81161f8041("virtio-blk: add "discard" and

Re: [PATCH v2 3/3] qemu: command: support for virtio-blk-pci discard option

2021-09-08 Thread Peter Krempa
On Tue, Sep 07, 2021 at 15:12:10 +0800, yuxiat...@huawei.com wrote: > From: yuxiating > > This patch introduces a new attribute "discard". An example of > the XML: > > > > > The corresponding QEMU command line: > > -device virtio-blk-pci,scsi=off,discard=off,id=virtio-disk0 > >

Re: [PATCH v2 2/3] conf: support for virtio-blk-pci discard option

2021-09-08 Thread Peter Krempa
On Tue, Sep 07, 2021 at 15:12:09 +0800, yuxiat...@huawei.com wrote: > From: yuxiating > > DISCARD and WRITE_ZEROES features for machine type >= 4.0 is enabled by > default > since 5c81161f8041("virtio-blk: add "discard" and "write-zeroes" properties). > Virtio_blk kernel driver has a bug that

Re: RFC: revert to external snapshot API

2021-09-08 Thread Peter Krempa
On Tue, Aug 31, 2021 at 16:46:25 +0300, Nikolay Shirokovskiy wrote: > Hi, all. Hi, sorry for the late reply I was on PTO. > I want to implement reverting to external snapshot functionality. > I've checked the mailing list history and found some previous attempts > (not sure if this is a