[libvirt] [PATCHv2 12/16] qemu: Correct CPU capabilities probing for hvf

2018-11-21 Thread Roman Bolshakov
With this change virsh domcapabilites shows: Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCHv2 08/16] qemu: Introduce virQEMUCapsHaveAccel

2018-11-21 Thread Roman Bolshakov
The function should be used to check if qemu capabilities include a hardware acceleration, i.e. 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/src

[libvirt] [PATCHv2 02/16] conf: Add hvf domain type

2018-11-21 Thread Roman Bolshakov
Extended Page Tables (EPT) and Unrestricted Mode. Signed-off-by: Roman Bolshakov --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c| 4 +++- src/conf/domain_conf.h| 1 + src/qemu/qemu_command.c | 4 5 files

[libvirt] [PATCHv2 00/16] Introduce hvf domain type for Hypevisor.framework

2018-11-21 Thread Roman Bolshakov
ooks like a separate work item. - [ ] Can't retrieve qemucapsprobe replies for macOS because qemucapsprobemock is not getting injected because of the issue with VIRT_TEST_PRELOAD - [ ] Can't add to tests/qemuxml2argvtest.c to illustrate the hvf example because qemucapsprobe doesn't work yet. Roman B

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

2018-11-19 Thread Roman Bolshakov
On Thu, Oct 25, 2018 at 09:44:01PM +0100, Daniel P. Berrangé wrote: > On Sat, Oct 20, 2018 at 05:19:47PM +0300, Roman Bolshakov wrote: > > Signed-off-by: Roman Bolshakov > > --- > > src/qemu/qemu_capabilities.c | 1 + > > src/qemu/qemu_capabilities.h | 1 + > &g

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

2018-10-22 Thread Roman Bolshakov
On Sat, Oct 20, 2018 at 05:19:45PM +0300, Roman Bolshakov wrote: > conf: Define hvf domain type > qemu: Define hvf capability > qemu: Query hvf capability on macOS > qemu: Expose hvf domain type if hvf is supported > qemu: Rename kvmCPU to accelCPU >

[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

[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

[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

[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

[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
supports Hypervisor.framework since 2.12. Roman Bolshakov (13): conf: Define hvf domain type qemu: Define hvf capability qemu: Query hvf capability on macOS qemu: Expose hvf domain type if hvf is supported qemu: Rename kvmCPU to accelCPU qemu: Introduce virQEMUCapsTypeIsAccelerated qemu

[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

[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
virQEMUCapsGetHostCPUData is not interested in the exact type of accelarator. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[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

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

2018-10-20 Thread Roman Bolshakov
. Signed-off-by: Roman Bolshakov --- src/qemu/qemu_capabilities.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4dac040246..eb3148038a 100644 --- a/src/qemu/qemu_capabilities.c

[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

[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

[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

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

2018-08-23 Thread Roman Bolshakov
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_AFFINITY. Signed-off-by: Roman Bolshakov --- Changes since

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

2018-08-23 Thread Roman Bolshakov
fixes the issue in qemucapabilitiestest. It returns Bad file descriptor message 25 times without the fix. Signed-off-by: Roman Bolshakov --- Changes since v1: * Don't go through dispatch code on EBADF src/util/vireventpoll.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util

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

2018-08-22 Thread Roman Bolshakov
On Wed, Aug 22, 2018 at 10:41:18AM +0100, Daniel P. Berrangé wrote: > I don't think we should go through the dispatch code when > we get EBADF, as the contents of the 'revents' fields are > undefined after we get an error. > > We should jump straight to the end where we have > "eventLoop.running

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

2018-08-21 Thread Roman Bolshakov
vm --live --cpulist 7 error: Requested operation is not valid: cpu affinity is not supported The patch also fixes virmacmaptest on macOS Signed-off-by: Roman Bolshakov --- src/qemu/qemu_driver.c | 6 ++ src/util/virprocess.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff

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

2018-08-21 Thread Roman Bolshakov
fixes the issue in qemucapabilitiestest. It returns Bad file descriptor message 25 times without the fix. Signed-off-by: Roman Bolshakov --- src/util/vireventpoll.c | 8 1 file changed, 8 insertions(+) diff --git a/src/util/vireventpoll.c b/src/util/vireventpoll.c index 13d278df13

<    1   2