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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



QEMU supports Hypervisor.framework since 2.12 as hvf accel.
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 since macOS 10.10 on machines with Intel VT-x feature
set that includes Extended Page Tables (EPT) and Unrestricted Mode.

Signed-off-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
---
 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 changed, 13 insertions(+), 5 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 2af4960981..25dd4bbbd6 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -22,10 +22,10 @@
       <a id="attributeDomainType"><code>type</code></a>
       specifies the hypervisor used for running
       the domain. The allowed values are driver specific, but
-      include "xen", "kvm", "qemu", "lxc" and "kqemu". The
-      second attribute is <code>id</code> which is a unique
-      integer identifier for the running guest machine. Inactive
-      machines have no id value.
+      include "xen", "kvm", "hvf" (<span class="since">since 4.10.0 and QEMU
+      2.12</span>), "qemu", "lxc" and "kqemu". The second attribute is
+      <code>id</code> which is a unique integer identifier for the running
+      guest machine. Inactive machines have no id value.
     </p>
 
 
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 5ee727eefa..596e347eda 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -213,6 +213,7 @@
         <value>phyp</value>
         <value>vz</value>
         <value>bhyve</value>
+        <value>hvf</value>
       </choice>
     </attribute>
   </define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 13874837c2..369d4bd634 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -119,7 +119,8 @@ VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
               "phyp",
               "parallels",
               "bhyve",
-              "vz")
+              "vz",
+              "hvf")
 
 VIR_ENUM_IMPL(virDomainOS, VIR_DOMAIN_OSTYPE_LAST,
               "hvm",
@@ -15024,6 +15025,7 @@ virDomainVideoDefaultType(const virDomainDef *def)
     case VIR_DOMAIN_VIRT_HYPERV:
     case VIR_DOMAIN_VIRT_PHYP:
     case VIR_DOMAIN_VIRT_NONE:
+    case VIR_DOMAIN_VIRT_HVF:
     case VIR_DOMAIN_VIRT_LAST:
     default:
         return VIR_DOMAIN_VIDEO_TYPE_DEFAULT;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 467785cd83..65f00692b7 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -245,6 +245,7 @@ typedef enum {
     VIR_DOMAIN_VIRT_PARALLELS,
     VIR_DOMAIN_VIRT_BHYVE,
     VIR_DOMAIN_VIRT_VZ,
+    VIR_DOMAIN_VIRT_HVF,
 
     VIR_DOMAIN_VIRT_LAST
 } virDomainVirtType;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 23a6661c10..0fb796e15c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7251,6 +7251,10 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
         virBufferAddLit(&buf, ",accel=kvm");
         break;
 
+    case VIR_DOMAIN_VIRT_HVF:
+        virBufferAddLit(&buf, ",accel=hvf");
+        break;
+
     case VIR_DOMAIN_VIRT_KQEMU:
     case VIR_DOMAIN_VIRT_XEN:
     case VIR_DOMAIN_VIRT_LXC:
-- 
2.19.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux