[libvirt] RFC: remove qemu commandline parsing?

2019-04-08 Thread Cole Robinson
qemu/qemu_parse_command.c powers 'sudo virsh domxml-from-native qemu-argv', parsing a qemu command line and attempting to turn it into libvirt domain XML. Some history: RFE: https://www.redhat.com/archives/libvir-list/2009-April/msg00266.html Patches:

[libvirt] [PATCH] util: Fix uninitalized variable to avoid garbage

2019-04-08 Thread Julio Faracco
This commit fixes an unitialized variable to avoid garbage value when virNetDevBridgeGet method returns error. When, that method fails before initialize 'val' variable, it can cause problems related to that. Signed-off-by: Julio Faracco --- src/util/virnetdevbridge.c | 2 +- 1 file changed, 1

[libvirt] [PATCH v2 3/6] lxc: Introduce method lxcDomainGetStatsCpu

2019-04-08 Thread Julio Faracco
This method is responsible to fetch all CPU Cgroup Stats and store data into virDomainStatsRecordPtr structure. Signed-off-by: Julio Faracco --- src/lxc/lxc_driver.c | 50 1 file changed, 50 insertions(+) diff --git a/src/lxc/lxc_driver.c

[libvirt] [PATCH v2 2/6] lxc: Introduce method lxcDomainGetStats

2019-04-08 Thread Julio Faracco
This method is responsible to fetch data like State, CPU, Disk and Balloon info (all single domain info) from each domain 'virDomainObjPtr'. There is an implementation of method lxcDomainGetStatsState() to give a small functionality to lxcDomainGetStats(). Signed-off-by: Julio Faracco ---

[libvirt] [PATCH v2 6/6] lxc: Introduce method lxcDomainGetBalloonStats

2019-04-08 Thread Julio Faracco
This method is responsible to fetch all Balloon Memory Stats and store data into virDomainStatsRecordPtr structure. It contains kernel memory used by current container. Signed-off-by: Julio Faracco --- src/lxc/lxc_driver.c | 65 1 file changed, 65

[libvirt] [PATCH v2 4/6] lxc: Introduce method lxcDomainGetStatsBlock

2019-04-08 Thread Julio Faracco
This method is responsible to fetch all Block Cgroup Stats and store data into virDomainStatsRecordPtr structure. This particular method check three other information like capacity, allocation and physical space. Signed-off-by: Julio Faracco --- src/lxc/lxc_driver.c | 130

[libvirt] [PATCH v2 0/6] lxc: Add suport to virConnectGetAllDomainStats

2019-04-08 Thread Julio Faracco
This series has a collection of new methods to enable support for virConnectGetAllDomainStats() to LXC driver. The only difference is Disk Stats. It needs to consider only the host file system operations as a valid block device. So, other disks should start with index 1..N. Other difference is

[libvirt] [PATCH v2 5/6] cgroup: Get kernel memory entry from CGroup V1

2019-04-08 Thread Julio Faracco
This commit implements two methods to get kernel memory using CGroup V1. One of them get the Hard Limit of kernel memory and the other one get the current kernel memory usage from that current container. For V2, it will return error because it is not defined. Signed-off-by: Julio Faracco ---

[libvirt] [PATCH v2 1/6] lxc: Introduce method lxcConnectGetAllDomainStats

2019-04-08 Thread Julio Faracco
This is an implementation of method used by driver to retrieve stats from all domain. Right now, this is a simple implementation considering only State, CPU, Disks and Balloon. Signed-off-by: Julio Faracco --- src/lxc/lxc_driver.c | 66 1 file

Re: [libvirt] [PATCH] snapshot: Fix use-after-free during snapshot delete

2019-04-08 Thread Eric Blake
On 4/8/19 1:35 PM, Roman Bogorodskiy wrote: > Eric Blake wrote: > >> Commit b647d2195 introduced a use-after-free situation when the caller >> is trying to delete a snapshot and its children: if the callback >> >> Fixes: b647d2195 >> Reported-by: Roman Bogorodskiy >> Signed-off-by: Eric Blake

Re: [libvirt] [PATCH] snapshot: Fix use-after-free during snapshot delete

2019-04-08 Thread Roman Bogorodskiy
Eric Blake wrote: > Commit b647d2195 introduced a use-after-free situation when the caller > is trying to delete a snapshot and its children: if the callback > function deletes the parent, it is no longer safe to query the parent > to learn which children also need to be deleted (where we

[libvirt] [PATCH] snapshot: Fix use-after-free during snapshot delete

2019-04-08 Thread Eric Blake
Commit b647d2195 introduced a use-after-free situation when the caller is trying to delete a snapshot and its children: if the callback function deletes the parent, it is no longer safe to query the parent to learn which children also need to be deleted (where we previously saved deleting the

[libvirt] [PATCH 1/4] Always put _LAST enums on second line of VIR_ENUM_IMPL

2019-04-08 Thread Cole Robinson
Standardize on putting the _LAST enum value on the second line of VIR_ENUM_IMPL invocations. Later patches that add string labels to VIR_ENUM_IMPL will push most of these to the second line anyways, so this saves some noise. Signed-off-by: Cole Robinson --- src/conf/capabilities.c |

[libvirt] [PATCH 0/4] Add 'label' arg to VIR_ENUM_IMPL

2019-04-08 Thread Cole Robinson
This is a different take on an RFE I posted in July: https://www.redhat.com/archives/libvir-list/2018-July/msg01815.html The goal of this series is to get us close to being able to raise errors from ToString and FromString functions directly. This will allow us to drop many hundreds of lines of

[libvirt] [PATCH 4/4] Add string labels to all VIR_ENUM_IMPL calls

2019-04-08 Thread Cole Robinson
Add string labels to all VIR_ENUM_IMPL calls, which will be used to eventually raise errors from virEnum*String functions. I roughly tried to follow these rules: 1) If it's an internal only enum, try to uniquely describe it 2) If it's for user XML values, make the label match the XML value

[libvirt] [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

2019-04-08 Thread Cole Robinson
This allows us to raise error messages from virEnum*String functions. FromString failure will report this error for value '' invalid argument: Unknown 'domain type' value '' ToString failure will report this error for unknown type=83 internal error: Unknown 'domain type' internal

[libvirt] [PATCH 2/4] cfg.mk: Only force _LAST enum on VIR_ENUM_IMPL second line

2019-04-08 Thread Cole Robinson
Drop the checking for _LAST optionally on the first line, previous patch removed all those instances Signed-off-by: Cole Robinson --- cfg.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cfg.mk b/cfg.mk index bb684f381d..b785089910 100644 --- a/cfg.mk +++ b/cfg.mk @@

Re: [libvirt] [PATCH 5/5] snapshot: Add tests of virsh -c test:///default snapshot*

2019-04-08 Thread Eric Blake
On 4/7/19 1:32 AM, Michal Prívozník wrote: > On 4/7/19 6:16 AM, Roman Bogorodskiy wrote: >> Eric Blake wrote: >> >>> Had this been in place earlier, I would have avoided the bugs in >>> commit 0baf6945 and 55c2ab3e. Writing the test required me to extend >>> the power of virsh - creating enough

Re: [libvirt] [PATCH 05/36] cpu_x86: Require within in CPU map

2019-04-08 Thread Jiri Denemark
On Mon, Apr 08, 2019 at 14:31:53 +0200, Ján Tomko wrote: > On Mon, Apr 08, 2019 at 10:42:09AM +0200, Jiri Denemark wrote: > >A feature with no cpuid element is invalid and it should not be silently > >treated as a feature with all CPUID bits set to zero. > > > >Signed-off-by: Jiri Denemark > >---

Re: [libvirt] [PATCH 05/36] cpu_x86: Require within in CPU map

2019-04-08 Thread Ján Tomko
On Mon, Apr 08, 2019 at 10:42:09AM +0200, Jiri Denemark wrote: A feature with no cpuid element is invalid and it should not be silently treated as a feature with all CPUID bits set to zero. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 7 +++ 1 file changed, 7 insertions(+)

Re: [libvirt] [PATCH 04/36] cpu_x86: Do not cache microcode version

2019-04-08 Thread Ján Tomko
On Mon, Apr 08, 2019 at 10:42:08AM +0200, Jiri Denemark wrote: The microcode version checks are used to invalidate cached CPU data we get from QEMU. To minimize /proc/cpuinfo parsing the microcode version was only read when libvirtd started and cached for the daemon's lifetime. However, the CPU

Re: [libvirt] [PATCH 03/36] cpu_map: Add Cascadelake-Server CPU model

2019-04-08 Thread Ján Tomko
On Mon, Apr 08, 2019 at 10:42:07AM +0200, Jiri Denemark wrote: Introduced in QEMU 3.1.0 by commit c7a88b52f62b30c04158eeb07f73e3f72221b6a8 Signed-off-by: Jiri Denemark --- src/cpu_map/index.xml | 1 + src/cpu_map/x86_Cascadelake-Server.xml| 82

Re: [libvirt] [ocaml PATCH 0/3] Few misc improvements

2019-04-08 Thread Richard W.M. Jones
On Fri, Apr 05, 2019 at 06:33:52PM +0200, Pino Toscano wrote: > Raise the libvirt version to the de-facto requirement, and add a new > API which will be useful. Also, sync Virterror with libvirt. > > Pino Toscano (3): > build: bump required libvirt to 1.2.8 > Implement

Re: [libvirt] [PATCH 02/36] cputest: Add data for Intel(R) Xeon(R) Platinum 8268 CPU

2019-04-08 Thread Ján Tomko
On Mon, Apr 08, 2019 at 10:42:06AM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + ...6_64-cpuid-Xeon-Platinum-8268-disabled.xml | 7 + ...86_64-cpuid-Xeon-Platinum-8268-enabled.xml | 8 +

Re: [libvirt] [PATCH 01/36] domaincapstest: Test QEMU 3.1.0

2019-04-08 Thread Ján Tomko
On Mon, Apr 08, 2019 at 10:42:05AM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- .../qemu_3.1.0.x86_64.xml | 153 ++ tests/domaincapstest.c| 4 + 2 files changed, 157 insertions(+) create mode 100644

[libvirt] [jenkins-ci PATCH 5/7] guests: Drop intltool osinfo-db-tools' dependency

2019-04-08 Thread Fabiano Fidêncio
osinfo-db-tools' commit 00abe3eb4e dropped intltool dependency. Signed-off-by: Fabiano Fidêncio --- guests/vars/projects/osinfo-db-tools.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/vars/projects/osinfo-db-tools.yml b/guests/vars/projects/osinfo-db-tools.yml index

[libvirt] [jenkins-ci PATCH 0/7] Update libosinfo/osinfo-db-tools dependencies

2019-04-08 Thread Fabiano Fidêncio
This patch set updates both libosinfo and osinfo-db-tools deps. The changes done are, basically: libosinfo: - drop gnome-common - drop intltool osinfo-db-tools: - drop gnome-common - drop intltool - add python3 - add python3-pytest - add python3-requests Together with those changes: -

[libvirt] [jenkins-ci PATCH 4/7] guests: Drop intltool libosinfo's dependency

2019-04-08 Thread Fabiano Fidêncio
libosinfo's commit 3a2dd3050 dropped intltool dependency. signed-off-by: Fabiano Fidêncio --- guests/vars/projects/libosinfo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/vars/projects/libosinfo.yml b/guests/vars/projects/libosinfo.yml index 3f95105..d95c4a4 100644 ---

[libvirt] [jenkins-ci PATCH 3/7] guests: Remove unused "gnome-common" mapping

2019-04-08 Thread Fabiano Fidêncio
libosinfo and osinfo-db-tools were the only two projects depending on gnome-common and, currently, they no longer depend on it. Signed-off-by: Fabiano Fidêncio --- guests/vars/mappings.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml

[libvirt] [jenkins-ci PATCH 7/7] Stop running `make check` against osinfo-db-tools on CentOS 7

2019-04-08 Thread Fabiano Fidêncio
osinfo-db-tools tests are Python 3 only. Signed-off-by: Fabiano Fidêncio --- guests/playbooks/build/projects/osinfo-db-tools.yml | 10 ++ jenkins/projects/osinfo-db-tools.yaml | 12 2 files changed, 22 insertions(+) diff --git

[libvirt] [jenkins-ci PATCH 2/7] guests: Drop gnome-common osinfo-db-tools' dependency

2019-04-08 Thread Fabiano Fidêncio
osinfo-db-tool's commit 1f13eea3e dropped gnome-common dependency. Signed-off-by: Fabiano Fidêncio --- guests/vars/projects/osinfo-db-tools.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/vars/projects/osinfo-db-tools.yml b/guests/vars/projects/osinfo-db-tools.yml index

[libvirt] [jenkins-ci PATCH 6/7] guests: Update test dependencies for osinfo-db-tools

2019-04-08 Thread Fabiano Fidêncio
The new dependencies are: - python3 - python3-pytest - python3-requests Signed-off-by: Fabiano Fidêncio --- guests/vars/projects/osinfo-db-tools.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guests/vars/projects/osinfo-db-tools.yml b/guests/vars/projects/osinfo-db-tools.yml index

[libvirt] [jenkins-ci PATCH 1/7] guests: Drop gnome-common libosinfo's dependency

2019-04-08 Thread Fabiano Fidêncio
libosinfo's commit 9631ef7d87 dropped gnome-common dependency. Signed-off-by: Fabiano Fidêncio --- guests/vars/projects/libosinfo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/vars/projects/libosinfo.yml b/guests/vars/projects/libosinfo.yml index 4297110..3f95105 100644 ---

Re: [libvirt] [PATCH 5/5] Include unistd.h directly by files using it

2019-04-08 Thread Ján Tomko
On Wed, Apr 03, 2019 at 03:06:37PM +0200, Peter Krempa wrote: util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed. Signed-off-by: Peter Krempa --- Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list

Re: [libvirt] [PATCH 4/5] util: Move enum convertors into virenum.(c|h)

2019-04-08 Thread Ján Tomko
On Wed, Apr 03, 2019 at 03:06:36PM +0200, Peter Krempa wrote: virutil.(c|h) is a very gross collection of random code. Remove the enum handlers from there so we can limit the scope where virtutil.h is used. Signed-off-by: Peter Krempa --- Reviewed-by: Ján Tomko Jano signature.asc

Re: [libvirt] [PATCH 3/5] util: Don't include 'viralloc.h' into other header files

2019-04-08 Thread Ján Tomko
On Wed, Apr 03, 2019 at 03:06:35PM +0200, Peter Krempa wrote: 'viralloc.h' does not provide any type or macro which would be necessary in headers. Prevent leakage of the inclusion. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature --

Re: [libvirt] [PATCH v1 4/4] domain capabilities: Expose firmware auto selection feature

2019-04-08 Thread Laszlo Ersek
On 04/05/19 10:44, Michal Privoznik wrote: > On 4/5/19 10:31 AM, Daniel P. Berrangé wrote: >> On Fri, Apr 05, 2019 at 09:19:48AM +0200, Michal Privoznik wrote: >>> If a management application wants to use firmware auto selection >>> feature it can't currently know if the libvirtd it's talking to

[libvirt] [PATCH 32/36] cputest: Add support for MSR features to cpu-parse.sh

2019-04-08 Thread Jiri Denemark
The script just parses whatever cpu-gather.sh printed out. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-parse.sh| 9 ++--- tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268.xml | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 31/36] cputest: Add support for MSR features to cpu-gather.sh

2019-04-08 Thread Jiri Denemark
This patch adds an inline python code for reading MSR features. Since reading MSRs is a privileged operation, we have to read them from /dev/cpu/*/msr if it is readable (i.e., the script runs as root) or fallback to using KVM ioctl which can be done by any user that can start virtual machines.

[libvirt] [PATCH 1/3] vz: fix for tracking current snapshot

2019-04-08 Thread Nikolay Shirokovskiy
f1056279 removed virDomainSnapshotDef.current and leaved using vm->current_snapshot only. Later 4819f54bd moved current snapshot tracking to virDomainSnapshotObjList. As vz driver never used vm->current_snaphot this patch includes fixes after both commits. Signed-off-by: Nikolay Shirokovskiy ---

[libvirt] [PATCH 25/36] cputest: Drop support for old QEMU from cpu-parse.sh

2019-04-08 Thread Jiri Denemark
We don't really need to parse CPU data from QEMU older than 2.9 (i.e., before query-cpu-model-expansion) at this point. But even if there's a need to do so, we can always use an older version of this script to do the conversion. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py |

[libvirt] [PATCH 14/36] cpu_x86: Rename virCPUx86VendorToCPUID

2019-04-08 Thread Jiri Denemark
Renamed as virCPUx86VendorToData. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 492839496e..121c88ad43 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -527,8

[libvirt] [PATCH 23/36] cpu_x86: Add support for storing MSR features in CPU map

2019-04-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 127 + src/cpu/cpu_x86_data.h | 10 +++ tests/cputestdata/cpu-cpuid.py | 3 +- 3 files changed, 127 insertions(+), 13 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c

[libvirt] [PATCH 29/36] cputest: Prepare cpu-cpuid.py for MSR features

2019-04-08 Thread Jiri Denemark
Let's make sure the current CPUID specific code is only applied to CPUID features. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 36 +++--- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/tests/cputestdata/cpu-cpuid.py

[libvirt] [PATCH 27/36] cputest: Fix comparison in checkCPUIDFeature in cpu-cpuid.py

2019-04-08 Thread Jiri Denemark
leaf["eax"] & eax > 0 check works correctly only if there's at most 1 bit set in eax. Luckily that's been always the case, but fixing this could save us from future surprises. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 12 ++-- 1 file changed, 6 insertions(+), 6

[libvirt] [PATCH 36/36] cpu_map: Introduce IA32_ARCH_CAPABILITIES MSR features

2019-04-08 Thread Jiri Denemark
--- This should not be pushed yet as the QEMU interface for MSR features is not complete yet. If a domain with some MSR features enabled would be started, all of them would be marked as disabled in the live domain configuration (even though they were actually enabled by QEMU) and they would

[libvirt] [PATCH 35/36] cpu_x86: Read CPU features from IA32_ARCH_CAPABILITIES MSR

2019-04-08 Thread Jiri Denemark
This is used by the host capabilities code to construct host CPU definition. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 24 1 file changed, 24 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 1fe6770d57..74385f7992 100644 ---

[libvirt] [PATCH 34/36] vircpuhost: Add support for reading MSRs

2019-04-08 Thread Jiri Denemark
The new virHostCPUGetMSR internal API will try to read the MSR from /dev/cpu/0/msr and if it is not possible (the device does not exist or libvirt is running unprivileged), it will fallback to asking KVM for the MSR using KVM_GET_MSRS ioctl. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH 22/36] cpu_x86: Store virCPUx86DataItem content in union

2019-04-08 Thread Jiri Denemark
The structure can only be used for CPUID data now. Adding a type indicator and moving the data into a union will let us store alternative data types. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 202 - src/cpu/cpu_x86_data.h | 10 +-

[libvirt] [PATCH 0/3] vz: fixes after commits refactoring common snapshot code

2019-04-08 Thread Nikolay Shirokovskiy
Nikolay Shirokovskiy (3): vz: fix for tracking current snapshot vz: fixes: snapshot: Switch type of virDomainSnapshotObj.def vz: fixes: snapshot: Factor out virDomainMomentDef class src/vz/vz_driver.c | 36 +++- src/vz/vz_sdk.c| 24

[libvirt] [PATCH 26/36] cputest: Generalize function names in cpu-cpuid.py

2019-04-08 Thread Jiri Denemark
The function will have to deal with both CPUID and MSR features. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 40 +- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/cputestdata/cpu-cpuid.py

[libvirt] [PATCH 33/36] cputest: Add support for MSR features to cpu-cpuid.py

2019-04-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 58 -- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/tests/cputestdata/cpu-cpuid.py b/tests/cputestdata/cpu-cpuid.py index 89efc3a40c..ae3cf5996a 100755 ---

[libvirt] [PATCH 2/3] vz: fixes: snapshot: Switch type of virDomainSnapshotObj.def

2019-04-08 Thread Nikolay Shirokovskiy
Fix for commit 1ab05da22 refactoring snapshot code. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index f7a44d4..20cc79b 100644 --- a/src/vz/vz_driver.c +++

[libvirt] [PATCH 17/36] cpu_x86: Make x86cpuidSetBits more general

2019-04-08 Thread Jiri Denemark
The function is renamed as virCPUx86DataItemSetBits and it works on virCPUx86DataItem now. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 74d157d780..f713f02929

[libvirt] [PATCH 28/36] cputest: Rename in_e[ac]x as e[ac]x_in in cpu-cpuid.py

2019-04-08 Thread Jiri Denemark
This will let us simplify the code since the dictionary keys will match attribute names in various XMLs. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 39 -- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git

[libvirt] [PATCH 18/36] cpu_x86: Make x86cpuidClearBits more general

2019-04-08 Thread Jiri Denemark
The parameters changed from virCPUx86CPUID to virCPUx86DataItem and the function is now called virCPUx86DataItemClearBits. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpu/cpu_x86.c

[libvirt] [PATCH 10/36] cpu_x86: Rename x86DataCpuid

2019-04-08 Thread Jiri Denemark
It is now called virCPUx86DataGet. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 5c2f7900a3..ad5e23843f 100644 --- a/src/cpu/cpu_x86.c +++

[libvirt] [PATCH 21/36] cpu_x86: Make x86cpuidMatch more general

2019-04-08 Thread Jiri Denemark
The function now works on virtCPUx86DataItem and it's called virCPUx86DataItemMatch. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index b88cd83aed..62a7914160

[libvirt] [PATCH 09/36] cpu_x86: Rename x86DataCpuidNext function

2019-04-08 Thread Jiri Denemark
The function is now called virCPUx86DataNext to reflect its purpose: it is an iterator over CPU data (both CPUID and MSR in the near future). Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 06/36] cpu_x86: Introduce virCPUx86DataItem container struct

2019-04-08 Thread Jiri Denemark
The following patches introduce CPU features read from MSR in addition to those queried via CPUID instruction. Let's introduce a container struct which will be able to describe either feature type. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 312

[libvirt] [PATCH 24/36] cpu_x86: Move *CheckFeature functions

2019-04-08 Thread Jiri Denemark
They are static and we will need to call them a little bit closer to the beginning of the file. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 69 --- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/src/cpu/cpu_x86.c

[libvirt] [PATCH 3/3] vz: fixes: snapshot: Factor out virDomainMomentDef class

2019-04-08 Thread Nikolay Shirokovskiy
Fix for commit ffc0fbebe refactoring snapshot code. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 2 +- src/vz/vz_sdk.c| 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 20cc79b..d327cac 100644 ---

[libvirt] [PATCH 16/36] cpu_x86: Introduce virCPUx86DataCmp

2019-04-08 Thread Jiri Denemark
virCPUx86DataSorter already compares two virCPUx86DataItem structs. Let's add a tiny wrapper around it called virCPUx86DataCmp and use it instead of open coded comparisons. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)

[libvirt] [PATCH 12/36] cpu_x86: Rename virCPUx86DataAddCPUIDInt

2019-04-08 Thread Jiri Denemark
The new name is virCPUx86DataAddItem. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index b354339852..21f58a8c3f 100644 --- a/src/cpu/cpu_x86.c +++

[libvirt] [PATCH 07/36] cpu_x86: Rename virCPUx86Vendor.cpuid

2019-04-08 Thread Jiri Denemark
Although vendor string is always reported by CPUID, the container struct is used for consistency and thus "cpuid" name is not a good fit anymore. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 30/36] cputest: Generalize feature parsing in cpu-cpuid.py

2019-04-08 Thread Jiri Denemark
The parseMapFeature for parsing features from CPU map XML can be easily generalized to support more feature types. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-cpuid.py | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 05/36] cpu_x86: Require within in CPU map

2019-04-08 Thread Jiri Denemark
A feature with no cpuid element is invalid and it should not be silently treated as a feature with all CPUID bits set to zero. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index

[libvirt] [PATCH 13/36] cpu_x86: Rename virCPUx86DataAddCPUID

2019-04-08 Thread Jiri Denemark
It's called virCPUx86DataAdd now. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 46 +- src/cpu/cpu_x86.h | 4 +-- src/libvirt_private.syms | 2 +- src/libxl/libxl_capabilities.c | 2 +- src/qemu/qemu_monitor_json.c | 2

[libvirt] [PATCH 15/36] cpu_x86: Simplify x86DataAdd

2019-04-08 Thread Jiri Denemark
The while loop just copied half of virCPUx86DataAddItem. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 121c88ad43..41067617df 100644 --- a/src/cpu/cpu_x86.c +++

[libvirt] [PATCH 03/36] cpu_map: Add Cascadelake-Server CPU model

2019-04-08 Thread Jiri Denemark
Introduced in QEMU 3.1.0 by commit c7a88b52f62b30c04158eeb07f73e3f72221b6a8 Signed-off-by: Jiri Denemark --- src/cpu_map/index.xml | 1 + src/cpu_map/x86_Cascadelake-Server.xml| 82 +++ .../x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 5 +-

[libvirt] [PATCH 20/36] cpu_x86: Make x86cpuidMatchMasked more general

2019-04-08 Thread Jiri Denemark
The function is renamed as virCPUx86DataItemMatchMasked to reflect the change in parameter types. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index

[libvirt] [PATCH 04/36] cpu_x86: Do not cache microcode version

2019-04-08 Thread Jiri Denemark
The microcode version checks are used to invalidate cached CPU data we get from QEMU. To minimize /proc/cpuinfo parsing the microcode version was only read when libvirtd started and cached for the daemon's lifetime. However, the CPU microcode can change anytime (updating the microcode package can

[libvirt] [PATCH 01/36] domaincapstest: Test QEMU 3.1.0

2019-04-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- .../qemu_3.1.0.x86_64.xml | 153 ++ tests/domaincapstest.c| 4 + 2 files changed, 157 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_3.1.0.x86_64.xml diff --git

[libvirt] [PATCH 19/36] cpu_x86: Make x86cpuidAndBits more general

2019-04-08 Thread Jiri Denemark
The function now works on virCPUx86DataItem and it's renamed as virCPUx86DataItemAndBits. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index dcdd0b60b0..57bdffc3af

[libvirt] [PATCH 08/36] cpu_x86: Rename virCPUx86DataItem variables

2019-04-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 128 +++--- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 8a10c237e9..6c77b7ce13 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@

[libvirt] [PATCH 02/36] cputest: Add data for Intel(R) Xeon(R) Platinum 8268 CPU

2019-04-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + ...6_64-cpuid-Xeon-Platinum-8268-disabled.xml | 7 + ...86_64-cpuid-Xeon-Platinum-8268-enabled.xml | 8 + .../x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 35 +

[libvirt] [PATCH 11/36] cpu_x86: Rename virCPUx86CPUIDSorter

2019-04-08 Thread Jiri Denemark
It is called virCPUx86DataSorter since the function will work on any CPU data type. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index ad5e23843f..b354339852 100644 ---

[libvirt] [PATCH 00/36] CPU driver enhancements and MSR features

2019-04-08 Thread Jiri Denemark
In addition to usual CPUID bits, some CPU features started to be reported in IA32_ARCH_CAPABILITIES MSR. This series adds support for such CPU features. However, the last patch which actually adds definitions for some MSR features to the cpu_map should not be pushed yet as the QEMU interface for

Re: [libvirt] [PATCH v4 1/2] qemu_domain: NVLink2 bridge detection function for PPC64

2019-04-08 Thread Alexey Kardashevskiy
On 04/04/2019 00:52, Daniel Henrique Barboza wrote: > > > On 4/3/19 4:05 AM, Erik Skultety wrote: >> On Tue, Apr 02, 2019 at 05:27:55PM -0300, Daniel Henrique Barboza wrote: >>> >>> On 4/2/19 5:34 AM, Erik Skultety wrote: On Tue, Mar 12, 2019 at 06:55:49PM -0300, Daniel Henrique Barboza

Re: [libvirt] [PATCH 2/5] util: Move the VIR_AUTO(CLEAN|PTR) helper macros into a separate header

2019-04-08 Thread Ján Tomko
On Wed, Apr 03, 2019 at 03:06:34PM +0200, Peter Krempa wrote: Keeping them with viralloc.h forcibly pulls in the other stuff from viralloc.h into other header files. This in turn creates a mess as more and more headers pull in the 'viral' header file. If we want to make 'viralloc.h' omnipresent

Re: [libvirt] [appdev-guide] [PATCH] fix minor bug in code example

2019-04-08 Thread Ján Tomko
On Sat, Apr 06, 2019 at 12:27:09PM +0200, Ilias Stamatis wrote: Στις Σάβ, 6 Απρ 2019 στις 10:10 π.μ., ο/η Ján Tomko έγραψε: The commit summary could be more specific, for example: Guest Domains: fix code example but more importantly, it is missing a Sign-off. See point 6 at

Re: [libvirt] [appdev-guide] [PATCH v2] Guest Domains: fix code example

2019-04-08 Thread Ján Tomko
On Sat, Apr 06, 2019 at 12:38:16PM +0200, Ilias Stamatis wrote: Signed-off-by: Ilias Stamatis --- en-US/Guest_Domains.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko And pushed. Not sure how the cron job is set up, but it might take 1-24h to show up on the