Re: [libvirt] [PATCH 1/4] tests: qemuxml2argv: Remove 'args' files for tests expecting failure

2018-08-27 Thread Erik Skultety
On Mon, Aug 27, 2018 at 06:09:06PM +0200, Peter Krempa wrote: > Output file does not make sense for those. > > Signed-off-by: Peter Krempa > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 4/4] tests: qemuxml2argv: Remove 'args' for tests only used in xml2xmltest

2018-08-27 Thread Erik Skultety
On Mon, Aug 27, 2018 at 06:09:09PM +0200, Peter Krempa wrote: > 'metadata' and 'leases' are features internal to libvirt and thus don't > influence the XML. As they are not tested we don't need the output > files. > > Signed-off-by: Peter Krempa > --- Reviewed-by: Erik Skultety -- libvir-list ma

Re: [libvirt] [PATCH] vsh: Fix broken build on mingw

2018-08-27 Thread Erik Skultety
On Mon, Aug 27, 2018 at 05:44:29PM +0200, Simon Kobyda wrote: > The function wcwidth() doesn't exist on mingw. However we can > implement this function from gnulib. > Broken gnulib on CentOS and RHEL still persists. ^This fact is irrelevant to this patch. I dropped the sentence, reworded the rest

Re: [libvirt] [PATCH v3] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: 1535431818-17667-1-git-send-email-wang.y...@zte.com.cn Subject: [libvirt] [PATCH v3] qemu: Introduce state_lock_timeout to qemu.conf === TEST SCRIPT BEGIN ==

[libvirt] [PATCH v3] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread Yi Wang
When doing some job holding state lock for a long time, we may come across error: "Timed out during operation: cannot acquire state change lock" Well, sometimes it's not a problem and users wanner continue to wait, and this patch allow users decide how long time they can wait the state lock. Signe

Re: [libvirt] [PATCH] qemu: domain: validate memory access during validate domain config

2018-08-27 Thread lhuang
On 08/28/2018 06:01 AM, John Ferlan wrote: On 08/20/2018 05:48 AM, Luyao Huang wrote: commit 6534b3c4 try to raise an error when there is no numa nodes but set access='shared' in domain config. In that commit, we add a memory access validate function for memory device, but this check is not

Re: [libvirt] [PATCH v2] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Eduardo Habkost
On Mon, Aug 27, 2018 at 03:53:26PM +0200, Igor Mammedov wrote: > -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology > so that total number of logical CPUs [sockets * cores * threads] > would be equal to [maxcpus], however historically we didn't have > such check in QEMU and it is

Re: [libvirt] [PATCH v2] qemu: Introduce state_lock_timeout toqemu.conf

2018-08-27 Thread wang.yi59
> On 08/27/2018 09:29 AM, Michal Prívozník wrote: > > On 08/27/2018 12:57 PM, Yi Wang wrote: > >> When doing some job holding state lock for a long time, > >> we may come across error: > >> "Timed out during operation: cannot acquire state change lock" > >> Well, sometimes it's not a problem and us

Re: [libvirt] [PATCH v2] qemu: Introduce state_lock_timeout toqemu.conf

2018-08-27 Thread wang.yi59
> On 08/27/2018 12:57 PM, Yi Wang wrote: > > When doing some job holding state lock for a long time, > > we may come across error: > > #swtpm_user = "tss" > > #swtpm_group = "tss" > > + > > +# The timeout (in seconds) waiting for acquiring state lock. > > This is rather sparse description. I know

Re: [libvirt] [PATCH] qemu: domain: validate memory access during validate domain config

2018-08-27 Thread John Ferlan
On 08/20/2018 05:48 AM, Luyao Huang wrote: > commit 6534b3c4 try to raise an error when there is no numa nodes but > set access='shared' in domain config. In that commit, we add a memory access > validate function for memory device, but this check is not related to memory > device and won't work

Re: [libvirt] [PATCH 01/10] docs: don't refer to deprecated 'linux' ostype in example

2018-08-27 Thread Jim Fehlig
On 08/05/2018 03:48 PM, Marek Marczykowski-Górecki wrote: Use preferred name: 'xen'. I'd be fine with this change if the actual code used the preferred name too :-). E.g. config containing xen will be shown as linux after virsh define; virsh dumpxml. Also, virsh domxml-from-native wil

Re: [libvirt] [PATCH 0/2] conf: Cleanups for some device_conf predicates

2018-08-27 Thread John Ferlan
On 08/17/2018 09:40 AM, Andrea Bolognani wrote: > Andrea Bolognani (2): > conf: Rename some device_conf predicates > conf: Move some device_conf predicates > > src/bhyve/bhyve_device.c | 6 ++-- > src/conf/device_conf.c | 22 ++ > src/conf/device_conf.h |

Re: [libvirt] [PATCH 3/3] qemu: fix default machine for argv -> xml convertor

2018-08-27 Thread John Ferlan
On 08/16/2018 11:12 AM, Daniel P. Berrangé wrote: > Historically the argv -> xml convertor wanted the same default machine > as we'd set when parsing xml. The latter has now changed, however, to > use a default defined by libvirt. The former needs fixing to again > honour the default QEMU machine

Re: [libvirt] [PATCH 2/3] qemu: rename method for getting preferred machine type

2018-08-27 Thread John Ferlan
On 08/16/2018 11:12 AM, Daniel P. Berrangé wrote: > The virQEMUCapsGetDefaultMachine() method doesn't get QEMU's default > machine any more, instead it gets the historical default that libvirt > prefers for each arch. Rename it, so that the old name can be used for > getting QEMU's default. > >

Re: [libvirt] [PATCH 1/3] qemu: record the QEMU default machine in capabilities

2018-08-27 Thread John Ferlan
On 08/16/2018 11:12 AM, Daniel P. Berrangé wrote: > We don't honour the QEMU default machine type anymore, always using the > libvirt chosen default instead. The QEMU argv parser, however, will need > to know the exacty QEMU default, so we must record that info. > > Signed-off-by: Daniel P. Berr

Re: [libvirt] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2018-08-27 Thread Samuel Thibault
Thomas Huth, le lun. 27 août 2018 16:54:12 +0200, a ecrit: > These options likely do not work as expected as soon as the user > tries to use more than one network interface at once. The parameters > have been marked as deprecated since QEMU v2.6, so users had plenty > of time to move their scripts

[libvirt] [PATCH] util: json: Allow converting a virTristate(Bool|Switch) into JSON

2018-08-27 Thread Peter Krempa
Add a new modifier letter for virJSONValueObjectAddVArgs which will add a boolean value with our tristate semantics. The value is omitted when the _ABSENT value is used. Signed-off-by: Peter Krempa --- src/util/virjson.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/util

Re: [libvirt] [Qemu-devel] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2018-08-27 Thread Thomas Huth
On 2018-08-27 18:11, Peter Maydell wrote: > On 27 August 2018 at 15:54, Thomas Huth wrote: >> These options likely do not work as expected as soon as the user >> tries to use more than one network interface at once. The parameters >> have been marked as deprecated since QEMU v2.6, so users had ple

[libvirt] [PATCH 1/3] tests: qemumonitorjson: Add test for 'block-stream' command

2018-08-27 Thread Peter Krempa
Test the generated command against the schema. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 2859d3e82f..6e67a27a32 100644 --- a/tests/qemumonitorjsontest.c +++ b/t

[libvirt] [PATCH 3/3] tests: qemumonitorjson: Add test case for 'blockdev-mirror'

2018-08-27 Thread Peter Krempa
Add the generated testcase to test the generated command against the QMP schema. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 681bdfc452..94fddeec5e 100644 --- a/

[libvirt] [PATCH 0/3] tests: qemumonitorjson: Improve testing of block-related APIs

2018-08-27 Thread Peter Krempa
Peter Krempa (3): tests: qemumonitorjson: Add test for 'block-stream' command tests: qemumonitorjson: Change values which would be omitted tests: qemumonitorjson: Add test case for 'blockdev-mirror' tests/qemumonitorjsontest.c | 15 ++- 1 file changed, 10 insertions(+), 5 deleti

[libvirt] [PATCH 2/3] tests: qemumonitorjson: Change values which would be omitted

2018-08-27 Thread Peter Krempa
Many of the parameters are omitted for NULL/0 situations. Change the values for these cases so all the arguments are schema-checked. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemumonitorjsontes

Re: [libvirt] [Qemu-devel] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2018-08-27 Thread Peter Maydell
On 27 August 2018 at 15:54, Thomas Huth wrote: > These options likely do not work as expected as soon as the user > tries to use more than one network interface at once. The parameters > have been marked as deprecated since QEMU v2.6, so users had plenty > of time to move their scripts to the new

[libvirt] [PATCH 3/4] tests: qemuxml2argv: Remove the 'no-shutdown' test completely

2018-08-27 Thread Peter Krempa
Now we assume the flag always so there's no use for this test. Probably a leftover from the cleanup of the capability. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/no-shutdown.args | 27 --- tests/qemuxml2argvdata/no-shutdown.xml | 24

[libvirt] [PATCH 1/4] tests: qemuxml2argv: Remove 'args' files for tests expecting failure

2018-08-27 Thread Peter Krempa
Output file does not make sense for those. Signed-off-by: Peter Krempa --- .../hugepages-default-1G-nodeset-2M.args | 25 -- tests/qemuxml2argvdata/pcihole64-none.args | 20 - 2 files changed, 45 deletions(-) delete mode 100644 tests/qemuxml

[libvirt] [PATCH 0/4] tests: qemuxml2argv: More unused files cleanup

2018-08-27 Thread Peter Krempa
Cleanup most output files unused by our test suite. See justification in individual commits. Peter Krempa (4): tests: qemuxml2argv: Remove 'args' files for tests expecting failure tests: qemuxml2argv: Make use of 'vram64' QXL device tests tests: qemuxml2argv: Remove the 'no-shutdown' test co

[libvirt] [PATCH 2/4] tests: qemuxml2argv: Make use of 'vram64' QXL device tests

2018-08-27 Thread Peter Krempa
The test files were unused, but we don't have any other test for this feature. Make use of the existing files by removing disks and using DO_TEST_CAPS_LATEST to execute them. The legacy output files will be dropped. Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/video-qxl-device-vram64.arg

[libvirt] [PATCH 4/4] tests: qemuxml2argv: Remove 'args' for tests only used in xml2xmltest

2018-08-27 Thread Peter Krempa
'metadata' and 'leases' are features internal to libvirt and thus don't influence the XML. As they are not tested we don't need the output files. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/lease.args| 23 --- tests/qemuxml2argvdata/metadata.args | 22 -

Re: [libvirt] [PATCH] virDomainObjListAddLocked: fix double free

2018-08-27 Thread Marc Hartmayer
On Mon, Aug 27, 2018 at 04:03 PM +0200, Michal Prívozník wrote: > On 08/27/2018 03:20 PM, Marc Hartmayer wrote: >> If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked >> returns NULL (although the definition actually exists). Therefore, the >> possibility exits that "virHashAdd

Re: [libvirt] [PATCH v5 0/3] vsh: Introduce new API for printing tables

2018-08-27 Thread Simon Kobyda
On Fri, 2018-08-24 at 12:10 +0200, Michal Privoznik wrote: > On 08/24/2018 11:36 AM, Daniel P. Berrangé wrote: > > On Fri, Aug 24, 2018 at 10:59:04AM +0200, Michal Privoznik wrote: > > > > But first fix the build failures :-) > > > > On CentOS / RHEL: > > > > https://travis-ci.org/libvirt/libvir

[libvirt] [PATCH] vsh: Fix broken build on mingw

2018-08-27 Thread Simon Kobyda
The function wcwidth() doesn't exist on mingw. However we can implement this function from gnulib. Broken gnulib on CentOS and RHEL still persists. Signed-off-by: Simon Kobyda --- bootstrap.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap.conf b/bootstrap.conf index 698a52216b.

Re: [libvirt] [PATCH 0/4] Remove more deprecated options

2018-08-27 Thread Ján Tomko
On Mon, Aug 27, 2018 at 05:08:45PM +0200, Peter Krempa wrote: On Mon, Aug 27, 2018 at 16:54:08 +0200, Thomas Huth wrote: These options are deprecated since at least two releases, and nobody complained. Time to remove them now. (I'm sending these patches as a series since Paolo asked me to send

Re: [libvirt] [PATCH] qemu: Introduce 16550A serial console model

2018-08-27 Thread Andrea Bolognani
On Mon, 2018-08-27 at 15:31 +0100, Richard W.M. Jones wrote: > On Mon, Aug 27, 2018 at 02:10:18PM +0200, Andrea Bolognani wrote: > > None of the existing models is suitable for use with > > RISC-V virt guests, and we don't want information about > > the serial console to be missing from the XML. >

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Andrew Jones
On Mon, Aug 27, 2018 at 03:53:26PM +0200, Igor Mammedov wrote: > -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology > so that total number of logical CPUs [sockets * cores * threads] > would be equal to [maxcpus], however historically we didn't have > such check in QEMU and it is

Re: [libvirt] [PATCH] tests: qemuxml2argv: Drop some unused args files

2018-08-27 Thread Ján Tomko
On Mon, Aug 27, 2018 at 05:03:09PM +0200, Peter Krempa wrote: aarch64-acpi-nouefi and hostdev-scsi-boot are unused. Unused since their introduction in commit deb38c4 and bab6ee6 respectively. Noticed when checking whether '-nodefconfig' is still used by libvirt. Signed-off-by: Peter Krempa

Re: [libvirt] [PATCH 0/4] Remove more deprecated options

2018-08-27 Thread Peter Krempa
On Mon, Aug 27, 2018 at 16:54:08 +0200, Thomas Huth wrote: > These options are deprecated since at least two releases, and nobody > complained. Time to remove them now. > > (I'm sending these patches as a series since Paolo asked me to send a PULL > request on my own for them ... but if one of the

Re: [libvirt] [PATCH 7/7] vircgroup: Remove obsolete sa_assert

2018-08-27 Thread Ján Tomko
On Fri, Aug 24, 2018 at 03:45:57PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 4 1 file changed, 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://ww

Re: [libvirt] [PATCH 6/7] vircgroup: Simplify if conditions in virCgroupMakeGroup

2018-08-27 Thread Ján Tomko
On Fri, Aug 24, 2018 at 03:45:56PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: Digital signature -- libvir-list mailing lis

[libvirt] [PATCH] tests: qemuxml2argv: Drop some unused args files

2018-08-27 Thread Peter Krempa
aarch64-acpi-nouefi and hostdev-scsi-boot are unused. Noticed when checking whether '-nodefconfig' is still used by libvirt. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/aarch64-acpi-nouefi.args | 22 - tests/qemuxml2argvdata/hostdev-scsi-boot.args | 26 --

Re: [libvirt] [PATCH 5/7] vircgroup: Call virCgroupRemove inside virCgroupMakeGroup

2018-08-27 Thread Ján Tomko
On Fri, Aug 24, 2018 at 03:45:55PM +0200, Pavel Hrdina wrote: This fixes virCgroupEnableMissingControllers where virCgroupRemove was not called in case virCgroupMakeGroup failed. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 18 +- 1 file changed, 9 insertions(+), 9 dele

[libvirt] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2018-08-27 Thread Thomas Huth
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now. Signed-o

[libvirt] [PATCH 3/4] Remove the deprecated options -startdate, -localtime and -rtc-td-hack

2018-08-27 Thread Thomas Huth
Deprecated since two releases, nobody complained, thus it's time to remove them now. Signed-off-by: Thomas Huth --- qemu-deprecated.texi | 13 - qemu-options.hx | 7 - vl.c | 76 +++- 3 files changed, 22 insertions

[libvirt] [PATCH 0/4] Remove more deprecated options

2018-08-27 Thread Thomas Huth
These options are deprecated since at least two releases, and nobody complained. Time to remove them now. (I'm sending these patches as a series since Paolo asked me to send a PULL request on my own for them ... but if one of the subsystems maintainers prefers to take the patches through their own

[libvirt] [PATCH 2/4] Remove the deprecated -nodefconfig option

2018-08-27 Thread Thomas Huth
It's the same as -no-user-config and marked as deprecated since three releases already. Time to remove it now. Signed-off-by: Thomas Huth --- docs/interop/live-block-operations.rst | 4 ++-- qemu-deprecated.texi | 4 qemu-options.hx| 4 ++-- vl.c

[libvirt] [PATCH 1/4] Remove the deprecated -balloon option

2018-08-27 Thread Thomas Huth
The "-balloon" option has been replaced by "-device virtio-balloon". It's been marked as deprecated since two releases, and nobody complained, so let's remove it now. Acked-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Reviewed-by:

Re: [libvirt] [PATCH v4] qemu: qemuDomainChangeNet: validity checks should be done before XML autocompletion

2018-08-27 Thread Ján Tomko
On Mon, Aug 27, 2018 at 09:50:07AM +0200, Katerina Koukiou wrote: This patch ensures that changes in attributes of interfaces will emit errors accept if they are missing from the XML. except Previously we were falsely reporting successful updates, because some changed attributes got overwritt

[libvirt] [jenkins-ci PATCH] guests: Fix mapping for perl-Digest on Debian Sid

2018-08-27 Thread Andrea Bolognani
It's now part of perl instead of being its own package. Signed-off-by: Andrea Bolognani --- Pushed as trivial. guests/vars/mappings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml index 59a4b01..5df918f 100644 --- a/guests/vars/mapping

Re: [libvirt] [PATCH] qemu: Introduce 16550A serial console model

2018-08-27 Thread Richard W.M. Jones
On Mon, Aug 27, 2018 at 02:10:18PM +0200, Andrea Bolognani wrote: > None of the existing models is suitable for use with > RISC-V virt guests, and we don't want information about > the serial console to be missing from the XML. > > The name is based on comments in qemu/hw/riscv/virt.c: > > RISC

Re: [libvirt] [PATCH v2] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread John Ferlan
On 08/27/2018 09:29 AM, Michal Prívozník wrote: > On 08/27/2018 12:57 PM, Yi Wang wrote: >> When doing some job holding state lock for a long time, >> we may come across error: >> "Timed out during operation: cannot acquire state change lock" >> Well, sometimes it's not a problem and users wanner

Re: [libvirt] [PATCH] virDomainObjListAddLocked: fix double free

2018-08-27 Thread Michal Prívozník
On 08/27/2018 03:20 PM, Marc Hartmayer wrote: > If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked > returns NULL (although the definition actually exists). Therefore, the > possibility exits that "virHashAddEntry" will raise the error > "Duplicate key" => virDomainObjListAddObj

Re: [libvirt] [Qemu-devel] [PULL 00/12] Ui 20180827 v4 patches

2018-08-27 Thread Peter Maydell
ble in the git repository at: > > git://git.kraxel.org/qemu tags/ui-20180827-v4-pull-request > > for you to fetch changes up to b1d380372f31672da9318431e84e79bccd8ef3bf: > > util: promote qemu_egl_rendernode_open(

[libvirt] [PATCH v2] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Igor Mammedov
-smp [cpus],sockets/cores/threads[,maxcpus] should describe topology so that total number of logical CPUs [sockets * cores * threads] would be equal to [maxcpus], however historically we didn't have such check in QEMU and it is possible to start VM with an invalid topology. Deprecate invalid option

[libvirt] [PATCH] virDomainDetachDeviceFlags: Clarify update semantics

2018-08-27 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1621910 When users want to update a path to a CDROM they tend to construct a very minimal XML and feed the API with it. This is not a good practice as it breaks the assumptions the API is built on. Most notably, leaving an element out should be treated a

Re: [libvirt] [Qemu-devel] [PATCH] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Igor Mammedov
On Mon, 27 Aug 2018 14:13:43 +0200 Andrew Jones wrote: > On Mon, Aug 27, 2018 at 01:56:08PM +0200, Igor Mammedov wrote: > > -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology > > so that total number of logical CPUs [sockets * cores * threads] > > would be equal to [maxcpus], ho

Re: [libvirt] [PATCH 4/7] vircgroup: Split virCgroupPathOfController into two functions

2018-08-27 Thread Ján Tomko
On Fri, Aug 24, 2018 at 03:45:54PM +0200, Pavel Hrdina wrote: The case where we need path of any controller is only for internal use so move it out to a different function. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 54 ++-- src/util/vircgroup.

Re: [libvirt] [PATCH v2] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread Michal Prívozník
On 08/27/2018 12:57 PM, Yi Wang wrote: > When doing some job holding state lock for a long time, > we may come across error: > "Timed out during operation: cannot acquire state change lock" > Well, sometimes it's not a problem and users wanner continue > to wait, and this patch allow users decide h

[libvirt] [PATCH] virDomainObjListAddLocked: fix double free

2018-08-27 Thread Marc Hartmayer
If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked returns NULL (although the definition actually exists). Therefore, the possibility exits that "virHashAddEntry" will raise the error "Duplicate key" => virDomainObjListAddObjLocked fails => virDomainObjEndAPI(&vm) is called and

Re: [libvirt] [PATCH 00/10] Introduce x86 Cache Monitoring Technology (CMT)

2018-08-27 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: 1535368993-24901-1-git-send-email-huaqiang.w...@intel.com Subject: [libvirt] [PATCH 00/10] Introduce x86 Cache Monitoring Technology (CMT) === TEST SCRIPT BE

[libvirt] [PATCH 00/10] Introduce x86 Cache Monitoring Technology (CMT)

2018-08-27 Thread Wang Huaqiang
This series of patches introduced the x86 Cache Monitoring Technology (CMT) to libvirt by interacting with kernel resource control (resctrl) interface. CMT is one of the Intel(R) x86 CPU feature which belongs to the Resource Director Technology (RDT). CMT reports the occupancy of the last level cac

[libvirt] [PATCH 10/10] qemu: Report cache occupancy (CMT) with domstats

2018-08-27 Thread Wang Huaqiang
Intel x86 RDT CMT is the technology to tell the last level cache occupancy information. Adding the interface in qemu to report this information for resource monitor group through command 'virsh domstats --cpu-total'. Below is a typical output: # virsh domstats 1 --cpu-total Domain: 'ubun

[libvirt] [PATCH 09/10] qemu: Introduce resctrl monitoring group

2018-08-27 Thread Wang Huaqiang
Resource monitoring group monitors the resource consumption, cache and memory bandwidth, of particular resctrl allocation. Introduce the resctrl monitoring group. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 40 ++-- 1 file changed, 38 insertions

[libvirt] [PATCH 07/10] conf: refactor virDomainResctrlAppend

2018-08-27 Thread Wang Huaqiang
Changed the interface from virDomainResctrlAppend(virDomainDefPtr def, xmlNodePtr node, virResctrlAllocPtr alloc, virBitmapPtr vcpus, unsigned int flags); to virDomainResctrlAppend(virDomainDefPtr def,

[libvirt] [PATCH 05/10] util: resctrl: refactoring some functions

2018-08-27 Thread Wang Huaqiang
Some code, in virresctrl.c, manupulating the file objects of resctrlfs could be reused for cache monitor interfaces. This patch refactor these functions for purpose of reusing code in later patch: virResctrlAllocDeterminePath virResctrlAllocCreate virResctrlAddPID Signed-off-by: Wang Huaqiang --

[libvirt] [PATCH 08/10] conf: introduce resctrl monitor group in domain

2018-08-27 Thread Wang Huaqiang
Introduce resource monitoring group in domain configuration file to support CPU cache monitoring technology (CMT). Domain rng file changes, supporting following types of resource monitoring group regarding the allocation regin it belongs to: 1. monitoring group that working for partial working th

[libvirt] [PATCH 06/10] util: Introduce resctrl monitor for CMT

2018-08-27 Thread Wang Huaqiang
'virResctrlAllocMon' denotes a resctrl monitor reporting the resource consumption information. This patch introduced the interfaces for resctrl monitor. Relationship of 'resctrl allocation' and 'resctrl monitor': 1. resctrl monitor monitors resources (cache or memory bandwidth) of particular allo

[libvirt] [PATCH 03/10] conf: Add CMT capability to host

2018-08-27 Thread Wang Huaqiang
CMT capability for each cache bank, includes -. Maximum CMT monitoring groups(sharing with MBM) could be created, which reflects the maximum hardware RMID count. -. 'cache threshold'. -. Statistical information of last level cache, the actual cache occupancy. cache is splitted into 'bank's,

[libvirt] [PATCH 01/10] conf: Renamed 'controlBuf' to 'childrenBuf'

2018-08-27 Thread Wang Huaqiang
To add CMT/MBM feature and let code be consistent in later patches, renaming variable name from 'controlBuf' to 'childrenBuf', locates in functions 'virCapabilitiesFormatCaches' and 'virCapabilitiesFormatMemoryBandwidth'. Signed-off-by: Wang Huaqiang --- .gnulib | 1 - src/conf/

[libvirt] [PATCH 04/10] test: add test case for resctrl monitor

2018-08-27 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- .../linux-resctrl/resctrl/info/L3_MON/max_threshold_occupancy | 1 + .../vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_features | 3 +++ tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rmids | 1 + tests/vircaps2xmldata/vircaps-x86_64-

[libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-08-27 Thread Wang Huaqiang
Introduce function for reporting CMT capability through going through files under /sys/fs/info/L3_MON. This patch is co-work with later patches and report these information to domain. Signed-off-by: Wang Huaqiang --- src/conf/capabilities.c | 6 ++- src/conf/capabilities.h | 1 + src/util/vi

Re: [libvirt] [PATCH] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Andrew Jones
On Mon, Aug 27, 2018 at 01:56:08PM +0200, Igor Mammedov wrote: > -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology > so that total number of logical CPUs [sockets * cores * threads] > would be equal to [maxcpus], however historically we didn't have > such check in QEMU and it is

[libvirt] [PATCH] qemu: Introduce 16550A serial console model

2018-08-27 Thread Andrea Bolognani
None of the existing models is suitable for use with RISC-V virt guests, and we don't want information about the serial console to be missing from the XML. The name is based on comments in qemu/hw/riscv/virt.c: RISC-V machine with 16550a UART and VirtIO MMIO and in qemu/hw/char/serial.c: QE

[libvirt] [PATCH] vl.c deprecate incorrect CPUs topology

2018-08-27 Thread Igor Mammedov
-smp [cpus],sockets/cores/threads[,maxcpus] should describe topology so that total number of logical CPUs [sockets * cores * threads] would be equal to [maxcpus], however historically we didn't have such check in QEMU and it is possible to start VM with an invalid topology. Deprecate invalid option

[libvirt] [PATCH v2] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread Yi Wang
When doing some job holding state lock for a long time, we may come across error: "Timed out during operation: cannot acquire state change lock" Well, sometimes it's not a problem and users wanner continue to wait, and this patch allow users decide how long time they can wait the state lock. Signe

Re: [libvirt] [PATCH v4 07/12] conf: Introduce parser, formatter for uid and fid

2018-08-27 Thread Yi Min Zhao
在 2018/8/27 下午1:48, Yi Min Zhao 写道: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a6e143dc33..d437c432e3 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5716,6 +5716,27 @@ qemuDomainDeviceDefValidateGraphics(const virDomainGraphicsDef *graphics, }

Re: [libvirt] [PATCH] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread wang.yi59
Thanks for your review, Michal. I will send a v2 patch. > On 08/27/2018 08:04 AM, Yi Wang wrote: > > When doing some job holding state lock for a long time, > > we may come across error: > > "Timed out during operation: cannot acquire state change lock" > > Well, sometimes it's not a problem and u

[libvirt] [PULL 12/12] util: promote qemu_egl_rendernode_open() to libqemuutil

2018-08-27 Thread Gerd Hoffmann
From: Marc-André Lureau vhost-user-gpu will share the same code to open a DRM node. Signed-off-by: Marc-André Lureau Message-Id: <20180713130916.4153-20-marcandre.lur...@redhat.com> [ kraxel: buildfix: util/drm.o must be CONFIG_OPENGL not CONFIG_LINUX ] Signed-off-by: Gerd Hoffmann --- incl

[libvirt] [PULL 05/12] doc: switch to modern syntax for VNC TLS setup

2018-08-27 Thread Gerd Hoffmann
From: Daniel P. Berrangé The use of 'tls', 'x509' and 'x509verify' properties is the deprecated backcompat syntax, replaced by use of TLS creds objects. Signed-off-by: Daniel P. Berrangé Message-id: 20180725092751.21767-2-berra...@redhat.com Signed-off-by: Gerd Hoffmann --- qemu-doc.texi | 20

[libvirt] [PULL 00/12] Ui 20180827 v4 patches

2018-08-27 Thread Gerd Hoffmann
The following changes since commit 5ccac548faf041ff5229a8e8342e3be14a34c8af: Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2018-08-23 17:35:48 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/ui-20180827-v4-pull-re

Re: [libvirt] [Qemu-devel] [PULL 00/12] Ui 20180823 v3 patches

2018-08-27 Thread Gerd Hoffmann
On Fri, Aug 24, 2018 at 11:09:50PM +0100, Peter Maydell wrote: > On 23 August 2018 at 10:56, Gerd Hoffmann wrote: > > The following changes since commit d0092d90eb546a8bbe9e9120426c189474123797: > > > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180820' into > > staging (2018-08-

[libvirt] [PULL 04/12] sdl2: redraw correctly when scanout_mode enabled.

2018-08-27 Thread Gerd Hoffmann
From: Tao Wu When scanout_mode enabled, surface is out of sync with actual screen. In such case, we just call sdl2_gl_scanout_flush to do redraw. This fixes bug reported in https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001330.html Signed-off-by: Tao Wu Message-id: 2018072

[libvirt] [PULL 11/12] dmabuf: add y0_top, pass it to spice

2018-08-27 Thread Gerd Hoffmann
From: Marc-André Lureau Some scanouts during boot are top-down without it. y0_top is set from VHOST_USER_GPU_DMABUF_SCANOUT code path in the last patch of this series. In current QEMU code base, only vfio/display uses dmabuf API. But the VFIO query interface doesn't provide or need that detail

[libvirt] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option

2018-08-27 Thread Gerd Hoffmann
From: Thomas Huth We've got to set the gui_fullscreen variable before creating the SDL2 window, otherwise the initial window will not be created in fullscreen mode. Buglink: https://bugs.launchpad.net/bugs/1780812 Signed-off-by: Thomas Huth Message-id: 1531161850-6860-1-git-send-email-th...@red

[libvirt] [PULL 07/12] spice-display: access ptr_x/ptr_y under Mutex

2018-08-27 Thread Gerd Hoffmann
From: Paolo Bonzini The OpenGL-enabled SPICE code was not accessing the cursor position under the SimpleSpiceDisplay lock. Fix this. Signed-off-by: Paolo Bonzini Reviewed-by: Marc-André Lureau Message-id: 20180720063109.4631-2-pbonz...@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-di

[libvirt] [PULL 06/12] vnc: remove support for deprecated tls, x509, x509verify options

2018-08-27 Thread Gerd Hoffmann
From: Daniel P. Berrangé The 'tls-creds' option accepts the name of a TLS credentials object. This replaced the usage of 'tls', 'x509' and 'x509verify' options in 2.5.0. These deprecated options were grandfathered in when the deprecation policy was introduded in 2.10.0, so can now finally be remo

[libvirt] [PULL 03/12] ui: use enum to string helpers

2018-08-27 Thread Gerd Hoffmann
From: Marc-André Lureau Minor code simplification. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-id: 20180801092508.4927-1-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- qemu-keymap.c | 2 +- ui/console.c | 6 +++--- 2 files changed, 4 insertions(+),

[libvirt] [PULL 08/12] spice-display: fix qemu_spice_cursor_refresh_bh locking

2018-08-27 Thread Gerd Hoffmann
From: Paolo Bonzini spice-display should not call the ui/console.c functions dpy_cursor_define and dpy_moues_set with the SimpleSpiceDisplay lock taken. That will cause a deadlock, because the DisplayChangeListener callbacks will take the lock again. It is also in general a bad idea to invoke g

[libvirt] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro

2018-08-27 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/round.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180704153919.12432-7-f4...@amsa

[libvirt] [PULL 01/12] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag

2018-08-27 Thread Gerd Hoffmann
From: Thomas Huth SDL_INIT_NOPARACHUTE is not used in SDL2 anymore, and the define is just a dummy (see https://wiki.libsdl.org/MigrationGuide#Some_general_truths for example). So we can remove it and get rid of the "flags" variable nowadays. Signed-off-by: Thomas Huth Message-id: 1533721602-15

[libvirt] [PULL 02/12] vnc: fix memleak of the "vnc-worker-output" name

2018-08-27 Thread Gerd Hoffmann
From: Peter Wu Fixes repeated memory leaks of 18 bytes when using VNC: Direct leak of 831024 byte(s) in 46168 object(s) allocated from: ... #4 0x7f6d2f919bdd in g_strdup_vprintf glib/gstrfuncs.c:514 #5 0x56085cdcf660 in buffer_init util/buffer.c:59 #6 0x56085c

Re: [libvirt] [PATCH] apparmor: fix ptrace rules with kernel 4.18

2018-08-27 Thread Christian Ehrhardt
On Fri, Aug 24, 2018 at 5:59 PM Jamie Strandboge wrote: > On Fri, 2018-08-24 at 08:12 +0200, Christian Ehrhardt wrote: > > Due to kernel upstream change 338d0be4 ("apparmor: fix ptrace read > > check") > > libvirt now hits apparmor denies like: > > apparmor="DENIED" operation="ptrace" profile="

Re: [libvirt] [PATCH v2] qemu: Start domain on a node without cpu affinity

2018-08-27 Thread Michal Prívozník
On 08/23/2018 10:49 AM, Roman Bolshakov wrote: > qemuProcessInitCpuAffinity prevents a VM from getting started on a > platform that uses cpu affinity wrapper stubs e.g. macOS. > > The patch adds qemuProcessInitCpuAffinity stub on all platforms without > HAVE_SCHED_GETAFFINITY or HAVE_BSD_CPU_AFFIN

Re: [libvirt] [PATCH v2] util: eventpoll: Survive EBADF on macOS

2018-08-27 Thread Michal Prívozník
On 08/23/2018 10:49 AM, Roman Bolshakov wrote: > Fixes: > https://www.redhat.com/archives/libvir-list/2017-January/msg00978.html > > QEMU is probed through monitor fd to check capabilities during libvirtd init. > The monitor fd is closed after probing by virQEMUCapsInitQMPCommandFree > that calls

Re: [libvirt] [PATCH] qemu: Introduce state_lock_timeout to qemu.conf

2018-08-27 Thread Michal Prívozník
On 08/27/2018 08:04 AM, Yi Wang wrote: > When doing some job holding state lock for a long time, > we may come across error: > "Timed out during operation: cannot acquire state change lock" > Well, sometimes it's not a problem and users wanner continue > to wait, and this patch allow users decide h

[libvirt] [PATCH v3 24/28] security_dac: Pass virSecurityManagerPtr to virSecurityDACRestoreFileLabelInternal

2018-08-27 Thread Michal Privoznik
This function is going call security manager APIs and therefore it needs pointer to it. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 43 ++- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/src/security/security_dac.c b/

[libvirt] [PATCH v3 25/28] security_dac: Fix info messages when chown()-ing

2018-08-27 Thread Michal Privoznik
Firstly, the message that says we're setting uid:gid shouldn't be called from virSecurityDACSetOwnershipInternal() because virSecurityDACRestoreFileLabelInternal() is calling it too. Secondly, there are places between us reporting label restore and us actually doing it where we can quit. Don't say

[libvirt] [PATCH v3 18/28] lock_manager: Allow disabling configFile for virLockManagerPluginNew

2018-08-27 Thread Michal Privoznik
In some cases we might want to not load the lock driver config. Alter virLockManagerPluginNew() and the lock drivers to cope with this fact. Signed-off-by: Michal Privoznik --- src/locking/lock_driver_lockd.c | 4 +++- src/locking/lock_driver_sanlock.c | 4 +++- src/locking/lock_manager.c

[libvirt] [PATCH v3 22/28] security_manager: Introduce metadata locking APIs

2018-08-27 Thread Michal Privoznik
Expose two APIs to lock and unlock metadata for given path. As the comment from the header file says, this is somewhat cumbersome, but it does not seem there is a better way. The idea is that a security driver (like DAC or SELinux) will call virSecurityManagerMetadataLock() just before they are ab

[libvirt] [PATCH v3 14/28] lock_daemon_dispatch: Check for ownerPid rather than ownerId

2018-08-27 Thread Michal Privoznik
At the beginning of each dispatch function we check if owner attributes were registered (these consist of ID, UUID, PID and name). The check then consists of checking if ID is not zero. This is not going to work with VIR_LOCK_MANAGER_OBJECT_TYPE_DAEMON which doesn't set ID. Switch to setting PID wh

[libvirt] [PATCH v3 21/28] security_manager: Introduce virSecurityManagerLockCloseConn

2018-08-27 Thread Michal Privoznik
This is basically just a wrapper over virLockManagerCloseConn() so that no connection is left open when it shouldn't be. Signed-off-by: Michal Privoznik --- src/security/security_manager.c | 75 + 1 file changed, 75 insertions(+) diff --git a/src/security

[libvirt] [PATCH v3 05/28] virLockManagerLockDaemonAcquire: Drop useless check

2018-08-27 Thread Michal Privoznik
The if() is completely useless since args.path is set to NULL in the line just above. Signed-off-by: Michal Privoznik --- src/locking/lock_driver_lockd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index

  1   2   >