Re: [libvirt] [PATCH 0/3] some small fix for guest SEV related code

2018-06-20 Thread Luyao Huang
Thanks for your quick review ! BR, Luyao - Original Message - From: "Erik Skultety" To: "Luyao Huang" Cc: libvir-list@redhat.com Sent: Wednesday, June 20, 2018 7:23:26 PM Subject: Re: [libvirt] [PATCH 0/3] some small fix for guest SEV related code On Wed, Jun 20, 2018 at 05:05:01PM

Re: [libvirt] [PATCH v2 0/2] Alter qemu live/cold device attach algorithm

2018-06-20 Thread John Ferlan
On 06/12/2018 10:32 AM, John Ferlan wrote: > v1: https://www.redhat.com/archives/libvir-list/2018-June/msg00465.html > > The first patch is essentially a repeat of the v1 patch, but with > a more correct commit message. During testing if the same address > was supplied for the --config it

[libvirt] [PATCH v3 06/10] storage: Clean up storageBackendCreateQemuImgCheckEncryption

2018-06-20 Thread John Ferlan
Remove the checks for qcow encryption since both callers (create and resize) would have already disallowed usage. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/storage/storage_util.c

[libvirt] [PATCH v3 01/10] storage: Don't allow encryption secretPath to be NULL

2018-06-20 Thread John Ferlan
Allowing a NULL @secretPath for virStorageBackendCreateQemuImgCmdFromVol would result in a generated command line with a dangling "file=" output. So let's make sure the @secretPath exists before processing. This means we should pass a dummy path from the storage test. Signed-off-by: John Ferlan

[libvirt] [PATCH v3 10/10] docs: Add news article for volume encryption modifications

2018-06-20 Thread John Ferlan
Include both the domain and storage modifications in a "Removed features" section as well as describing the improvement to allow using a raw input volume to create the luks encrypted volume. Signed-off-by: John Ferlan --- docs/news.xml | 25 + 1 file changed, 25

[libvirt] [PATCH v3 09/10] storage: Add support for using inputvol for encryption

2018-06-20 Thread John Ferlan
Starting with QEMU 2.9, encryption convert processing requires a multi-step process in order to generate an encrypted image from some non encrypted raw image. Processing requires to first create an encrypted image using the sizing parameters from the input source and second to use the

[libvirt] [PATCH v3 02/10] tests: Add luks creation examples to storagevolxml2argvtest

2018-06-20 Thread John Ferlan
Add the storagevolxml2xmltest "luks" and "luks-cipher" tests to the storagevolxml2argvtest. Signed-off-by: John Ferlan --- tests/storagevolxml2argvdata/luks-cipher.argv | 5 + tests/storagevolxml2argvdata/luks.argv| 4 tests/storagevolxml2argvtest.c| 7 +++

[libvirt] [PATCH v3 03/10] storage: Rename encryption info variable for clarity

2018-06-20 Thread John Ferlan
Change from @enc to @encinfo leaving @enc for the vol->target.encryption in the storageBackendCreateQemuImgSetOptions code path. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 21 +++-- src/util/virqemu.c | 26 +- 2 files changed, 24

[libvirt] [PATCH v3 04/10] tests: Remove qcow2 encryption from storagevol tests

2018-06-20 Thread John Ferlan
We're about to disallow creation of a qcow2 encrypted storage volume, so let's remove the qcow encryption element from the tests which are testing whether other format='qcow2' related features work properly. Signed-off-by: John Ferlan --- tests/storagevolxml2argvdata/qcow2-1.1.argv

[libvirt] [PATCH v3 00/10] Storage encryption adjustments

2018-06-20 Thread John Ferlan
v2: https://www.redhat.com/archives/libvir-list/2018-May/msg01268.html Try #3 - this time since Peter removed support for qcow encrypted volumes for domains, I'm taking the same approach for storage. This is totally different from the previous approach which tried to actually create a qcow2

[libvirt] [PATCH v3 08/10] storage: Remove storageBackendGenerateSecretData

2018-06-20 Thread John Ferlan
Since we no longer support creating qcow2 encryption format volumes, we no longer have to possibly create some secret and have no real need for the function, so move the remaining functionality to build the secret path back into the caller storageBackendCreateQemuImg. Signed-off-by: John Ferlan

[libvirt] [PATCH v3 07/10] storage: Clean up storageBackendCreateQemuImgOpts

2018-06-20 Thread John Ferlan
Since we only generate the @encinfo when there's a secret object and thus we need to reference it in the options, Signed-off-by: John Ferlan --- src/storage/storage_util.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/storage/storage_util.c

[libvirt] [PATCH v3 05/10] storage: Disallow create/resize of qcow2 encrypted images

2018-06-20 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1526382 Since commit c4eedd793 disallowed qcow2 encrypted images to be used for domains, it no longer makes sense to allow a qcow2 encrypted volume to be created or resized. Add a test that will exhibit the failure of creation as well as the xml2xml

Re: [libvirt] [Qemu-devel] [PATCH] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11

2018-06-20 Thread Eduardo Habkost
(CCing Markus and libvir-list) On Wed, Jun 20, 2018 at 08:40:38PM +0200, Thomas Huth wrote: > On 12.06.2018 00:18, Eduardo Habkost wrote: > > On Mon, Jun 11, 2018 at 05:41:04AM +0200, Thomas Huth wrote: > >> The oldest machine type which is still used in a maintained distribution > >> is a

Re: [libvirt] [Qemu-devel] [PATCH RFC] hw/pc: set q35 as the default x86 machine

2018-06-20 Thread Peter Maydell
On 18 June 2018 at 18:18, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2018 at 02:14:31PM -0300, Eduardo Habkost wrote: >> > Sure if someone does that, we'll have no choice, but as long as 'pc' is >> > shipped we shouldn't gratuitously break apps by changing the default. >> >> Right. I just want

Re: [libvirt] [Qemu-devel] [PATCH RFC] hw/pc: set q35 as the default x86 machine

2018-06-20 Thread Eduardo Habkost
On Mon, Jun 18, 2018 at 08:18:16PM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 18, 2018 at 02:14:31PM -0300, Eduardo Habkost wrote: > > > Sure if someone does that, we'll have no choice, but as long as 'pc' is > > > shipped we shouldn't gratuitously break apps by changing the default. > > > >

Re: [libvirt] [PATCH 4/5] qemu: Unset the genid start change flag for revert force

2018-06-20 Thread John Ferlan
On 06/20/2018 09:20 AM, Michal Privoznik wrote: > On 06/20/2018 12:54 AM, John Ferlan wrote: >> If the the snapshot revert involves a forced revert option, then >> let's not cause startup to change the genid flag in order to signify >> that we're still running the same/previous guest and not

Re: [libvirt] [PATCH 1/6] qemu: command: Make qemuBuildNicStr static

2018-06-20 Thread Michal Privoznik
On 06/19/2018 06:40 PM, Cole Robinson wrote: > It doesn't have any external callers > > Signed-off-by: Cole Robinson > --- > src/qemu/qemu_command.c | 2 +- > src/qemu/qemu_command.h | 5 - > 2 files changed, 1 insertion(+), 6 deletions(-) > Nit pick, I prefer s/qemu:

Re: [libvirt] [PATCH 4/6] qemu: command: replace vlan= with netdev= for legacy nic

2018-06-20 Thread Michal Privoznik
On 06/19/2018 06:40 PM, Cole Robinson wrote: > VMs with hardcoded platform network devices are forced to use old > style '-net nic' command line config. Current we use qemu's vlan s/Current/Currently/ perhaps? > option to hook this with the '-netdev' host side of things. > > However since qemu

Re: [libvirt] [PATCH 0/6] qemu: command: Replace vlan= with netdev=

2018-06-20 Thread Michal Privoznik
On 06/19/2018 06:40 PM, Cole Robinson wrote: > Most VMs libvirt knows how to launch will have qemu network config like: > > -netdev $NETDEV_OPTS,id=netdev1 -device e1000,id=netdev1 > > However for machine types with built-in platform network devices, we > currently do: > > -net

Re: [libvirt] [PATCH 4/4] qemu: Escape commas for qemuBuildGrapicsSPICECommandLine

2018-06-20 Thread Anya Harter
On 06/19/2018 10:46 AM, Cole Robinson wrote: > On 06/19/2018 09:47 AM, Cole Robinson wrote: >> On 06/18/2018 07:52 PM, John Ferlan wrote: >>> >>> >>> On 06/18/2018 01:57 PM, Anya Harter wrote: Add comma escaping for cfg->spiceTLSx509certdir and graphics->data.spice.rendernode.

Re: [libvirt] [PATCH 4/5] qemu: Unset the genid start change flag for revert force

2018-06-20 Thread Michal Privoznik
On 06/20/2018 12:54 AM, John Ferlan wrote: > If the the snapshot revert involves a forced revert option, then > let's not cause startup to change the genid flag in order to signify > that we're still running the same/previous guest and not some > snapshot reversion. > >

Re: [libvirt] [PATCH 0/5] Fix a couple of force snapshot revert issues

2018-06-20 Thread Michal Privoznik
On 06/20/2018 12:54 AM, John Ferlan wrote: > Well, at least I hope so. There's a couple of related bz's in > the last two patches with gobs more details, but the long and > short of it is that when using the force flag, the domain is > Stop'd and re-Start'd without applying any snapshot. For both

[libvirt] [PATCH 2/2] qemu: Escape commas for qemuBuildSCSIiSCSIHostdevDrvStr

2018-06-20 Thread Anya Harter
Add comma escaping for netsource Signed-off-by: Anya Harter --- src/qemu/qemu_command.c | 4 +++- tests/qemuxml2argvdata/name-escape.args | 6 +- tests/qemuxml2argvdata/name-escape.xml | 7 +++ tests/qemuxml2argvtest.c| 5 - 4 files changed, 19

[libvirt] [PATCH 0/2] qemu: add comma escaping in qemuBuildSCSIiSCSIHostdevDrvStr

2018-06-20 Thread Anya Harter
In order to use the virQEMUBuildBufferEscapeComma function to escape the commas, the function first had to be converted to use a buffer. Added a test case for comma escaping in name-escape.xml. This should complete the BiteSizedTask entry at

[libvirt] [PATCH 1/2] qemu: use virBuffer in qemuBuildSCSIiSCSIHostdevDrvStr

2018-06-20 Thread Anya Harter
Instead of source to enable use of virBuffer functions in string construction. Signed-off-by: Anya Harter --- src/qemu/qemu_command.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] libvirt profiles (a.k.a. virtuned) design ideas draft

2018-06-20 Thread Martin Kletzander
After some discussion with people from various management apps we decided to try and create something that would help with common, duplicated, and perhaps easy to extract things for which the code exists in some (or most) of the projects. I'd be glad for any feedback, so here is the rendered

[libvirt] [PATCH] qemu: fix msg could be a wild pointer in qemuMonitorIOProcess()

2018-06-20 Thread Weilun Zhu
As qemuMonitorJSONIOProcess will call qemuMonitorJSONIOProcessEvent which unlocks the monitor mutex, there is some extreme situation, eg qemu send message to monitor twice in a short time, where the local viriable 'msg' of qemuMonitorIOProcess could be a wild point: 1. qemuMonitorSend() assign

[libvirt] [PATCH 0/2] qemu: Improve error/debug messages if unable to acquire a job

2018-06-20 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (2): qemuDomainObjBeginJobInternal: Log agent job too qemuDomainObjBeginJobInternal: Report agent job in error message src/qemu/qemu_domain.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) -- 2.16.4

[libvirt] [PATCH 2/2] qemuDomainObjBeginJobInternal: Report agent job in error message

2018-06-20 Thread Michal Privoznik
If a thread is unable to acquire a job (e.g. because of timeout) an error is reported and the error message contains reference to the other thread holding the job. Well, the error message should report agent job too as it is yet another source of possible failure. Signed-off-by: Michal Privoznik

[libvirt] [PATCH 1/2] qemuDomainObjBeginJobInternal: Log agent job too

2018-06-20 Thread Michal Privoznik
If a thread is unable to start a job (e.g. because of timeout) an warning is printed into the logs. So far, the message does not contain agent job info. Add it as it might help future debugging. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 16 +++- 1 file changed, 11

[libvirt] [dbus PATCH 3/3] tests: Use AM_TESTS_ENVIRONMENT

2018-06-20 Thread Andrea Bolognani
According to the documentation[1], TESTS_ENVIRONMENT is reserved for the user, which means we shouldn't be using it. AM_TESTS_ENVIRONMENT needs to be terminated with a semicolon, so do that; that requires exporting the variables instead of merely declaring them as well. [1]

[libvirt] [dbus PATCH 2/3] tests: Don't loop up abs_top_builddir in the environment

2018-06-20 Thread Andrea Bolognani
This only works if the caller has prepared the environment accordingly; however, there is already a fallback path in place and it works just fine, so much so that when test cases are executed manually through the 'run' script that's the only one being involved. Drop environment handling entirely

[libvirt] [dbus PATCH 0/3] tests: Some fixes and cleanups

2018-06-20 Thread Andrea Bolognani
The first patch fixes an actual bug, the rest just makes things a bit nicer. Andrea Bolognani (3): tests: Fix VIRT_DBUS_INTERFACES_DIR tests: Don't loop up abs_top_builddir in the environment tests: Use AM_TESTS_ENVIRONMENT tests/Makefile.am| 5 ++--- tests/libvirttest.py | 2 +- 2

[libvirt] [dbus PATCH 1/3] tests: Fix VIRT_DBUS_INTERFACES_DIR

2018-06-20 Thread Andrea Bolognani
D-Bus interface files are generated, so we need to look for them inside builddir instead of srcdir for the test suite to pass before installation. Signed-off-by: Andrea Bolognani --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am

Re: [libvirt] [PATCH 0/3] some small fix for guest SEV related code

2018-06-20 Thread Erik Skultety
On Wed, Jun 20, 2018 at 05:05:01PM +0800, Luyao Huang wrote: > *** BLURB HERE *** > > Luyao Huang (3): > qemu: correct the ret value > qemu: improve the debug message when preparing SEV guest > docs: remove extra space in the SEV xml element example > > docs/formatdomain.html.in | 10

Re: [libvirt] [PATCH v3 4/4] qemu: Switch code to use new agent job APIs

2018-06-20 Thread Jiri Denemark
On Wed, Jun 20, 2018 at 10:04:12 +0200, Michal Privoznik wrote: > There are two sets of functions here: > 1) some functions talk on both monitor and agent monitor, > 2) some functions only talk on agent monitor. > > For functions from set 1) we need to use > qemuDomainObjBeginJobWithAgent() and

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-20 Thread Daniel P . Berrangé
On Wed, Jun 20, 2018 at 11:14:41AM +0200, Marc Hartmayer wrote: > On Tue, Jun 19, 2018 at 05:03 PM +0200, "Daniel P. Berrangé" > wrote: > > On Tue, Jun 19, 2018 at 03:55:09PM +0100, Daniel P. Berrangé wrote: > >> On Tue, Jun 19, 2018 at 04:51:13PM +0200, Erik Skultety wrote: > >> > On Mon, Jun

[libvirt] [PATCH 2/3] qemu: improve the debug message when preparing SEV guest

2018-06-20 Thread Luyao Huang
Use 'preparing' instead of 'prepare' like other place in qemu_process.c. Signed-off-by: Luyao Huang --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 631254d..2967568 100644 ---

[libvirt] [PATCH 3/3] docs: remove extra space in the SEV xml element example

2018-06-20 Thread Luyao Huang
Signed-off-by: Luyao Huang --- docs/formatdomain.html.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7e710d7..89672a0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -8481,11

[libvirt] [PATCH 1/3] qemu: correct the ret value

2018-06-20 Thread Luyao Huang
Set the return value to 0 when everything work as expected Signed-off-by: Luyao Huang --- src/qemu/qemu_process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 93fd6ba..631254d 100644 --- a/src/qemu/qemu_process.c +++

[libvirt] [PATCH 0/3] some small fix for guest SEV related code

2018-06-20 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (3): qemu: correct the ret value qemu: improve the debug message when preparing SEV guest docs: remove extra space in the SEV xml element example docs/formatdomain.html.in | 10 +- src/qemu/qemu_process.c | 3 ++- 2 files changed, 7 insertions(+),

Re: [libvirt] [PATCH v3 3/4] qemuDomainSnapshotCreateActiveExternal: Grab agent job

2018-06-20 Thread Jiri Denemark
On Wed, Jun 20, 2018 at 10:04:11 +0200, Michal Privoznik wrote: > Now that we have agent job we can grab it while freezing/thawing > guest file system before/after doing snapshot. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 27 ++- > 1 file

Re: [libvirt] [PATCH v2] qemu: fix msg could be a wild pointer in qemuMonitorIOProcess()

2018-06-20 Thread zhuweilun
Hi Peter, Thanks a lot for your review! I'm so sorry for the delay, please see my reply below. 在 2018/6/8 16:05, Peter Krempa 写道: > On Thu, Jun 07, 2018 at 15:09:58 +0800, Weilun Zhu wrote: >> As qemuMonitorJSONIOProcess() will unlock the qemu monitor, there is >> some extreme situation, eg qemu

[libvirt] [PATCH v3 4/4] qemu: Switch code to use new agent job APIs

2018-06-20 Thread Michal Privoznik
There are two sets of functions here: 1) some functions talk on both monitor and agent monitor, 2) some functions only talk on agent monitor. For functions from set 1) we need to use qemuDomainObjBeginJobWithAgent() and for functions from set 2) we need to use qemuDomainObjBeginAgentJob() only.

[libvirt] [PATCH v3 3/4] qemuDomainSnapshotCreateActiveExternal: Grab agent job

2018-06-20 Thread Michal Privoznik
Now that we have agent job we can grab it while freezing/thawing guest file system before/after doing snapshot. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v3 2/4] qemu: Introduce APIs for manipulating qemuDomainAgentJob

2018-06-20 Thread Michal Privoznik
The point is to break QEMU_JOB_* into smaller pieces which enables us to achieve higher throughput. For instance, if there are two threads, one is trying to query something on qemu monitor while the other is trying to query something on agent monitor these two threads would serialize. There is not

[libvirt] [PATCH v3 1/4] qemu: Introduce qemuDomainAgentJob

2018-06-20 Thread Michal Privoznik
Introduce guest agent specific job categories to allow threads to run agent monitor specific jobs while normal monitor jobs can also be running. Alter _qemuDomainJobObj in order to duplicate certain fields that will be used for guest agent specific tasks to increase concurrency and throughput and

[libvirt] [PATCH v3 0/4] qemu: Allow concurrent access to monitor and guest agent

2018-06-20 Thread Michal Privoznik
v3 of: https://www.redhat.com/archives/libvir-list/2018-June/msg01358.html Patches 1/4 and 2/4 are ACKed already. Patch 3/4 is new and implements agent job acquiring when doing snapshots (as suggested by Jirka in his review). Patch 4/4 is written differently (again as suggested by him) although

[libvirt] [RFC PATCH 2/2] drm/i915/gvt: Add new aggregation type

2018-06-20 Thread Zhenyu Wang
New aggregation type is created for KVMGT which can be used with new mdev create "instances=xxx" parameter to combine minimal resource number for target instances, which can create user defined number of resources. User space checks whether there's "aggregation" attribute for mdev type and

[libvirt] [RFC PATCH 0/2] Add new mdev type for aggregated resources

2018-06-20 Thread Zhenyu Wang
Current mdev device create interface depends on fixed mdev type, which get uuid from user to create instance of mdev device. If user wants to use customized number of resource for mdev device, then only can create new mdev type for that which may not be flexible. To allow to create user defined

[libvirt] [RFC PATCH 1/2] vfio/mdev: Add new instances parameters for mdev create

2018-06-20 Thread Zhenyu Wang
For special mdev type which can aggregate instances for mdev device, this extends mdev create interface by allowing extra "instances=xxx" parameter, which is passed to mdev device model to be able to create arbitrary bundled number of instances for target mdev device. For created mdev device,

Re: [libvirt] [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-06-20 Thread Markus Armbruster
Daniel Henrique Barboza writes: > Hi, > > Sorry for the delay. I'll summarize what I've understood from the discussion > so far: > > - query-target is the wrong place for this flag. query-machines is > (less) wrong > because it is not a static property of the machine object > > - a new

Re: [libvirt] [dbus PATCH] maint: fix coding style

2018-06-20 Thread Erik Skultety
On Tue, Jun 19, 2018 at 06:43:07PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- Does libvirt-dbus fancy a trivial rule? Anyways, Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] conf: Remove unused virDomainDefNewFull

2018-06-20 Thread Erik Skultety
On Tue, Jun 19, 2018 at 02:42:06PM -0400, Cole Robinson wrote: > The last usages were removed with the xend driver in 1dac5f0 > > Signed-off-by: Cole Robinson Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list