[libvirt] [PATCH 03/13] qemu: Query hvf capability on macOS

2018-10-20 Thread Roman Bolshakov
There's no QMP command for querying if hvf is supported, therefore we use sysctl interface that tells if Hypervisor.framwork works/available on the host. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 28 1 file changed, 28 insertions(+) diff --gi

[libvirt] [PATCH 05/13] qemu: Rename kvmCPU to accelCPU

2018-10-20 Thread Roman Bolshakov
QEMU supports a number of accelerators. It'd be good to have more generic name for kvmCPUModels and kvmCPU. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_cap

[libvirt] [PATCH 13/13] news: Mention hvf domain type

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index dc08c96352..81db0c9165 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,18 @@ + + + qemu: Add hvf do

[libvirt] [PATCH 01/13] conf: Define hvf domain type

2018-10-20 Thread Roman Bolshakov
QEMU supports Hypervisor.framework as hvf accel since 2.12. Signed-off-by: Roman Bolshakov --- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 4 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain

[libvirt] [PATCH 04/13] qemu: Expose hvf domain type if hvf is supported

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8da0a8476b..b3bfe500e2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@

[libvirt] [PATCH 00/13] Add hvf domain type for Hypervisor.framework

2018-10-20 Thread Roman Bolshakov
Hypervisor.framework provides a lightweight interface to run a virtual cpu on macOS without the need to install third-party kernel extensions (KEXTs). It's supported on machines with Intel VT-x feature set that includes Extended Page Tables (EPT) and Unrestricted Mode since macOS 10.10. QEMU supp

[libvirt] [PATCH 07/13] qemu: Introduce virQEMUCapsHaveAccel

2018-10-20 Thread Roman Bolshakov
The function should be used to check if qemu capabilities include a hardware acceleration, i.e. QEMU accel is not TCG. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/s

[libvirt] [PATCH 12/13] schema: Add hvf domain type

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- docs/schemas/domaincommon.rng | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 099a949cf8..2e1203f58e 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -213,6

[libvirt] [PATCH 08/13] qemu: Introduce virQEMUCapsToVirtType

2018-10-20 Thread Roman Bolshakov
The function is needed to support multiple accelerators without cluttering codebase by conditionals. At the first glance that might cause an issue related to the ordering capabilities being checked on a system with many accelerators but in the current code base it should be just fine because virQE

[libvirt] [PATCH 09/13] qemu: Introduce virQEMUCapsAccelStr

2018-10-20 Thread Roman Bolshakov
This makes possible to add more accelerators by touching less code and reduces code duplication. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_c

[libvirt] [PATCH 06/13] qemu: Introduce virQEMUCapsTypeIsAccelerated

2018-10-20 Thread Roman Bolshakov
It replaces hardcoded checks that select accelCPU/accelCPUModels (formerly known as kvmCPU/kvmCPUModels) for KVM. It'll be cleaner to use the function when multiple accelerators are supported in qemu driver. Explicit KVM domain checks should be done only when a feature is available only for KVM.

[libvirt] [PATCH 10/13] qemu: Make error message accel-agnostic

2018-10-20 Thread Roman Bolshakov
With more acceleration types, KVM should be used only in error messages related to KVM. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1a2a8c

[libvirt] [PATCH 11/13] qemu: Correct CPU capabilities probing for hvf

2018-10-20 Thread Roman Bolshakov
With this change virsh domcapabilites shows: Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index cd78f936ab..497b4ef1e9 100

[libvirt] [PATCH 02/13] qemu: Define hvf capability

2018-10-20 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e228f52ec0..65cf5b5c03 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qe