Re: [PATCH 1/3] libxl: Break down an if() in libxlCapsInitNuma()

2021-05-24 Thread Jim Fehlig
On 5/12/21 7:23 AM, Michal Privoznik wrote: There's an if-else statement in libxlCapsInitNuma() that can really be just two standalone if()-s. Writing it as such helps with code readability. Signed-off-by: Michal Privoznik --- src/libxl/libxl_capabilities.c | 14 +++--- 1 file

Re: [PATCH v2 3/3] qapi: deprecate drive-backup

2021-05-24 Thread John Snow
On 5/24/21 10:06 AM, Vladimir Sementsov-Ogievskiy wrote: 15.05.2021 01:38, John Snow wrote: On 5/6/21 5:57 AM, Kashyap Chamarthy wrote: TODO: We also need to deprecate drive-backup transaction action.. But union members in QAPI doesn't support 'deprecated' feature. I tried to dig a bit, but

Re: [PATCH v2 3/3] qapi: deprecate drive-backup

2021-05-24 Thread Vladimir Sementsov-Ogievskiy
15.05.2021 01:38, John Snow wrote: On 5/6/21 5:57 AM, Kashyap Chamarthy wrote: TODO: We also need to deprecate drive-backup transaction action.. But union members in QAPI doesn't support 'deprecated' feature. I tried to dig a bit, but failed :/ Markus, could you please help with it? At least by

Re: Ceph RBD Connection

2021-05-24 Thread Mr. Gecko
Ok, so I figured out my problem after digging deeper into troubleshooting. My issue was just that ceph monitor is not listening to port 6789 on all interfaces. Its just listening to it on the network address 10.0.0.5. Changing the pool configuration to account for that fixed my issue. I wrote

Re: [PATCH] hw/arm/raspi: Remove deprecated raspi2/raspi3 aliases

2021-05-24 Thread Peter Maydell
On Thu, 20 May 2021 at 13:07, Peter Maydell wrote: > > On Tue, 11 May 2021 at 04:25, Philippe Mathieu-Daudé wrote: > > > > Hi Peter, > > > > Can this patch go via your qemu-arm tree (it is reviewed)? > > Sure. > > Applied to target-arm.next, thanks. This breaks 'make check' because some bits of

Re: [PATCH v2 4/4] conf: Deduplicate NUMA distance code

2021-05-24 Thread Peter Krempa
On Mon, May 24, 2021 at 14:03:09 +0200, Michal Privoznik wrote: > After previous patches we have two structures: > virCapsHostNUMACellDistance and virNumaDistance which express the > same thing. And have the exact same members (modulo their names). > Drop the former in favor of the latter. > >

Re: [PATCH 00/35] qemu: Implement support for transient disk hotplug and backing store sharing

2021-05-24 Thread Pavel Hrdina
On Fri, May 21, 2021 at 02:47:00PM +0200, Peter Krempa wrote: > This series refactors the qemu disk hotplug code so that it can be > easily extended for hotplug of transient disks and then also used at > startup to plug in disks where the users want to share the backing > image. > > Masayoshi

Re: [PATCH 12/35] qemu: Move iothread and s390 address validation for disk devices into the validator

2021-05-24 Thread Pavel Hrdina
On Fri, May 21, 2021 at 02:47:12PM +0200, Peter Krempa wrote: > The "machine-loadparm-multiple-disks-nets-s390" case now requires the > QEMU_CAPS_CCW feature to pass validation. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_command.c | 50 >

Re: Ceph RBD Connection

2021-05-24 Thread Mr. Gecko
On 5/23/21 8:48 PM, Han Han wrote: You can check the following: 1. Make sure the ceph mon node are running on the localhost:6789 root@server ~# netstat -pan | grep 6789 tcp    0  0 10.0.0.5:6789   0.0.0.0:* LISTEN  2087/ceph-mon 2. Check if the ceph authorization is

Re: [PATCH 34/35] qemu: Allow disks with images shared accross VMs

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Implement this behaviour by skipping the disks on traditional commandline and hotplug them before resuming CPUs. That allows to use the support for hotplugging of transient disks which inherently allows sharing of the backing image as we open it

Re: [PATCH 35/35] tests: Add qemuxml2argv and qemuxml2xml test for

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- .../disk-transient.x86_64-4.1.0.err | 2 +- .../disk-transient.x86_64-latest.args | 4 +- tests/qemuxml2argvdata/disk-transient.xml | 6 +++ .../disk-transient.x86_64-latest.xml | 48

Re: [PATCH 33/35] conf: Introduce 'shareBacking' for disks

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: In case the user wants to share the disk image between multiple VMs the qemu driver needs to hotplug such disks to instantiate the backends. Since that doesn't work for all disk configs add a switch to force this behaviour. Signed-off-by: Peter Krempa

Re: [PATCH 32/35] qemuDomainAttachDiskGeneric: Export

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 2 +- src/qemu/qemu_hotplug.h | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 31/35] qemuDomainAttachDiskGeneric: Pass the qemu async job type

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The qemuDomainAttachDiskGeneric will also be used on startup for transient disks which share the overlay. The VM startup code passes the asyncJob around so we need to pass it into qemuDomainAttachDiskGeneric. Signed-off-by: Peter Krempa ---

Re: [PATCH 30/35] qemuDomainAttachDiskGeneric: Implement hotplug of disk

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Add code which creates the transient overlay after hotplugging the disk backend before attaching the disk frontend. The state of the topmost image is modified to be already read-only to prevent the need to open the image in read-write mode.

Re: [PATCH 29/35] qemu: Track creation of disk overlay individually

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: In preparation for hotplug of disks we'll need to track whether the overlay file was created individually per-disk. Add 'transientOverlayCreated' to 'struct _qemuDomainDiskPrivate' and remove 'inhibitDiskTransientDelete' from 'qemuDomainObjPrivate' and

Re: [PATCH 28/35] qemuDomainAttachDiskGeneric: Split up frontend and backend attachment

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Split up the monitor contexts to attach the backend of the disk and the frontend device in preparation for hotplugging transient disks where we'll need to add the code for adding the transient overlay between these two steps. Signed-off-by: Peter Krempa

Re: [PATCH 27/35] qemuDomainAttachDiskGeneric: Refactor rollback handling

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Modify the rollback section to use it's own monitor context so that we *its can later split up the hotplug into multiple steps and move the detachment of the extension device into the rollback section rather than doing it inline. Signed-off-by: Peter

Re: [PATCH 26/35] qemuDomainAttachDiskGeneric: Move PR helper attach into qemuDomainAttachDeviceDiskLiveInternal

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Similarly to previous refactors we want to move all hotplug related setup which isn't strictly relevant to attaching the disk into qemuDomainAttachDeviceDiskLiveInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 13 ++--- 1 file

Re: [PATCH 25/35] qemuDomainAttachDiskGeneric: Refactor cleanup

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove the 'ret' variable and 'cleanup' label in favor of directly returning the value since we don't have anything under the 'cleanup:' label. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 30 -- 1 file changed,

Re: [PATCH 24/35] qemuDomainAttachDiskGeneric: Fix whitespace

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove two empty lines. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 23/35] qemu: hotplug: Move post-insertion steps of disk hotplug to qemuDomainAttachDeviceDiskLiveInternal

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Move the auditing entry and insertion into the disk definition from the function which deals with qemu to 'qemuDomainAttachDeviceDiskLiveInternal' which deals with the hotplug related specifics. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c |

Re: [PATCH 22/35] qemuDomainAttachDiskGeneric: Move setup of disk into qemuDomainAttachDeviceDiskLiveInternal

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: qemuDomainAttachDeviceDiskLiveInternal already sets up certain pieces of the disk definition so it's better suited to move the setup of the virStorageSource structs, granting access to the storage and allocation of the alias from

Re: [PATCH 21/35] qemuDomainAttachDeviceDiskLiveInternal: Simplify call to qemuDomainAttachDiskGeneric

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: We can call it in one place as all per-device-type subcases use the same code. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [PATCH v2] Add SELinux policy for virt

2021-05-24 Thread Daniel P . Berrangé
On Mon, May 24, 2021 at 05:25:19AM -0700, Andrea Bolognani wrote: > On Fri, May 21, 2021 at 03:37:00PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 21, 2021 at 04:22:59PM +0200, Vit Mojzis wrote: > > > On 4/30/21 10:28 PM, Vit Mojzis wrote: > > > > On 4/26/21 7:31 PM, Daniel P. Berrangé wrote:

Re: [PATCH 20/35] qemuDomainAttachDeviceDiskLiveInternal: Absorb qemuDomainAttachSCSIDisk

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Move the validation of the SCSI device address and the attachment of the controller into qemuDomainAttachDeviceDiskLiveInternal as there's no specific need for a special helper. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 69

Re: [PATCH 19/35] qemuDomainAttachDeviceDiskLiveInternal: Absorb qemuDomainAttachVirtioDiskDevice

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Move the specific device setup and address reservation code into the main hotplug helper as it's just one extra function call. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 32 1 file changed, 8 insertions(+),

Re: [PATCH 18/35] qemuDomainAttachDeviceDiskLiveInternal: Absorb qemuDomainAttachUSBMassStorageDevice

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Move the specific device setup and address reservation code into the main hotplug helper as it's just one extra function call. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 35 +++ 1 file changed, 15

Re: [PATCH 17/35] qemuDomainRemoveDiskDevice: Move 'copy-on-read' handling to qemuBlockStorageSourceChainData

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Unify the handling of the copy-on-read filter by changing the handling to use qemuBlockStorageSourceChainData. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by:

Re: [PATCH v2] Add SELinux policy for virt

2021-05-24 Thread Andrea Bolognani
On Fri, May 21, 2021 at 03:37:00PM +0100, Daniel P. Berrangé wrote: > On Fri, May 21, 2021 at 04:22:59PM +0200, Vit Mojzis wrote: > > On 4/30/21 10:28 PM, Vit Mojzis wrote: > > > On 4/26/21 7:31 PM, Daniel P. Berrangé wrote: > > > > On Wed, Apr 07, 2021 at 06:14:58AM -0700, Vit Mojzis wrote: > > >

Re: [PATCH 16/35] qemuDomainAttachDiskGeneric: Move 'copy-on-read' handling to qemuBlockStorageSourceChainData

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Fill in the required fields in qemuBlockStorageSourceChainData to handle the hotplug so that we can simplify the cleanup code. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 23 ++- 1 file changed, 6 insertions(+), 17

Re: [PATCH 15/35] qemuBlockStorageSourceChainData: Add handling of 'copy-on-read' filter layer

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: qemuBlockStorageSourceChainData encapsulates the backend of the disk for startup and hotplug operations. Add the handling for the copy-on-read filter so that the hotplug code doesn't need to have separate cleanup. Signed-off-by: Peter Krempa ---

Re: [PATCH 1/4] capabilities: Rename siblings to distances

2021-05-24 Thread Michal Prívozník
On 5/21/21 9:46 AM, Peter Krempa wrote: > On Thu, May 20, 2021 at 17:24:53 +0200, Michal Privoznik wrote: >> The virCapsHostNUMACellSiblingInfo structure really represents >> distance to other NUMA node. Rename the structure and variables >> of that type to make it more obvious. >> >>

[PATCH v2 4/4] conf: Deduplicate NUMA distance code

2021-05-24 Thread Michal Privoznik
After previous patches we have two structures: virCapsHostNUMACellDistance and virNumaDistance which express the same thing. And have the exact same members (modulo their names). Drop the former in favor of the latter. This change means that distances with value of 0 are no longer printed out

Re: [PATCH 14/35] conf: remove virDomainDiskInsertPreAlloced

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Replace the last use of the function by virDomainDiskInsert and remove the unused helper. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 16 ++-- src/conf/domain_conf.h | 2 -- src/libvirt_private.syms | 1 - 3 files changed, 2

Re: [PATCH 13/35] Replace virDomainDiskInsertPreAlloced by virDomainDiskInsert

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Pre-extending the disk array size is pointless nowadays since we've switched to memory APIs which don't return failure. Switch all uses of reallocation of the array followed by 'virDomainDiskInsertPreAlloced' with direct virDomainDiskInsert.

Re: [PATCH 12/35] qemu: Move iothread and s390 address validation for disk devices into the validator

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The "machine-loadparm-multiple-disks-nets-s390" case now requires the QEMU_CAPS_CCW feature to pass validation. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 50 src/qemu/qemu_validate.c | 49

Re: [PATCH 11/35] qemuxml2argvtest: Remove pointless tests for keywrapping on s390

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: There were two negative tests for the keywrapping feature on s390 when the feature flag was missing. For now both shared the error message thus worked fine, but with the upcoming patch to move some disk validation code from the command line formatter to

Re: [PATCH 10/35] qemu: Move bootindex usage logic into qemuBuildDiskDeviceStr

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: We can skip the formatting of the bootindex for floppies directly at the place where it's being formatted. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 23 --- src/qemu/qemu_command.h | 1 - src/qemu/qemu_hotplug.c | 2

Re: [PATCH 4/4] conf: Deduplicate NUMA distance code

2021-05-24 Thread Michal Prívozník
On 5/21/21 9:58 AM, Peter Krempa wrote: > On Thu, May 20, 2021 at 17:24:56 +0200, Michal Privoznik wrote: >> After previous patches we have two structures: >> virCapsHostNUMACellDistance and virNumaDistance which express the >> same thing. And have the exact same members (modulo their names). >>

Re: [PATCH 09/35] qemu: Move 'bootindex' handling for disks out of command line formatter

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The logic assigning the bootindices from the legacy boot orded s/orded/order/ configuration was spread through the command line formatters for the disk device and for the floppy controller. This patch adds 'effectiveBootindex' property to the disk

Re: [PATCH 08/35] qemu_snapshot: Add the guest name to the transient disk path

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: From: Masayoshi Mizuma Later patches will implement sharing of the backing file, so we'll need to be able to discriminate the overlays per VM. Signed-off-by: Masayoshi Mizuma Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 2 +-

Re: [PATCH 07/35] qemu: snapshot: move transient snapshot code to qemu_process

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The code deals with the startup of the VM and just uses the snapshot code to achieve the desired outcome. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 61 +- src/qemu/qemu_snapshot.c | 82

Re: [PATCH 06/35] qemuSnapshotDiskCreate: Use 'cfg' from the qemuSnapshotDiskContext

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: We store the virQEMUDriverConfig object in the context. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [PATCH 05/35] qemuSnapshotDiskPrepareOne: Use data from qemuSnapshotDiskContext

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Remove all the arguments which are present in qemuSnapshotDiskContext. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 04/35] qemuSnapshotDiskContext: Store virQEMUDriverConfig in the struct

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The config is used both with the preparation and execution functions, so we can store it in the context to simplify other helpers. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 7 +++ 1 file changed, 7 insertions(+) Reviewed-by: Ján

Re: [PATCH 03/35] qemuSnapshotDiskPrepareOne: Pass in qemuSnapshotDiskContext

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Rather than filling various parts of the context from arguments pass in the whole context. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) Reviewed-by: Ján Tomko

Re: How to hot plugin a new vhost-user-blk-pci device to running VM?

2021-05-24 Thread Daniel P . Berrangé
On Mon, May 24, 2021 at 01:04:44PM +0200, Michal Prívozník wrote: > On 5/21/21 5:28 PM, 梁朝军 wrote: > > Thanks all of you for your help. > > One more question regarding vhost-user-blk-pci type device, how to > > identify a vhost-blk disk in QEUM VM ? for example, disk name looks like > >

Re: [PATCH 02/35] qemu: process: Setup transient disks only when starting a fresh VM

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: Creating the overlay for the disk is needed when starting a new VM only. Additionally for now migration with transient disks is forbidden anyways. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 8 +--- 1 file changed, 5 insertions(+), 3

Re: [PATCH 01/35] qemu: snapshot: Extract setup of snapshot disk definition for transient disks

2021-05-24 Thread Ján Tomko
On a Friday in 2021, Peter Krempa wrote: The code will be later reused when adding support for sharing the backing image of the snapshot. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-)

Re: How to hot plugin a new vhost-user-blk-pci device to running VM?

2021-05-24 Thread Michal Prívozník
On 5/21/21 5:28 PM, 梁朝军 wrote: > Thanks all of you for your help. > One more question regarding vhost-user-blk-pci type device, how to identify > a vhost-blk disk in QEUM VM ? for example, disk name looks like vda,vdb,..., > but that some application in VM want to detect that a certain entry

Re: [PATCH] kbase: Fix broken link of migration doc

2021-05-24 Thread Ján Tomko
On a Monday in 2021, Han Han wrote: Signed-off-by: Han Han --- docs/kbase/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH] kbase: Fix broken link of migration doc

2021-05-24 Thread Han Han
Signed-off-by: Han Han --- docs/kbase/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kbase/index.rst b/docs/kbase/index.rst index d483ca94de..91083ee49d 100644 --- a/docs/kbase/index.rst +++ b/docs/kbase/index.rst @@ -66,4 +66,4 @@ Internals / Debugging `VM