Skip to contentSkip to conversation

Updates based on feedback.

PATCH In review Justin Terry (VM) 4 participants 12 messages Jan 22, 2018 – Jan 30, 2018

lore
Share & tools
lore
#0 lore raw

v2 cover Updates based on feedback.

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

 accel/stubs/Makefile.objs |    9 +-
 accel/stubs/whpx-stub.c   |   48 ++
 configure                 |   48 +-
 cpus.c                    |   66 ++-
 include/sysemu/hw_accel.h |   13 +
 include/sysemu/whpx.h     |   40 ++
 qemu-options.hx           |    8 +-
 target/i386/Makefile.objs |    1 +
 target/i386/helper.c      |    2 +-
 target/i386/whpx-all.c    | 1366 +++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1590 insertions(+), 11 deletions(-)
 create mode 100644 accel/stubs/whpx-stub.c
 create mode 100644 include/sysemu/whpx.h
 create mode 100644 target/i386/whpx-all.c
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/4 Add the Windows Hypervisor Platform accelerator.

Introduces the configure support for the new Windows Hypervisor Platform that allows for hypervisor acceleration from usermode components on the Windows platform.

---
 configure       | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
 qemu-options.hx |  8 ++++----
 2 files changed, 51 insertions(+), 5 deletions(-)
configure +47 -1
index 6d8c996..3a36523 100755
@@ -222,6 +222,17 @@ supported_hvf_target() {
     return 1
 }
 
+supported_whpx_target() {
+    test "$whpx" = "yes" || return 1
+    glob "$1" "*-softmmu" || return 1
+    case "${1%-softmmu}" in
+        i386|x86_64)
+            return 0
+        ;;
+    esac
+    return 1
+}
+
 supported_target() {
     case "$1" in
         *-softmmu)
@@ -248,6 +259,7 @@ supported_target() {
     supported_xen_target "$1" && return 0
     supported_hax_target "$1" && return 0
     supported_hvf_target "$1" && return 0
+    supported_whpx_target "$1" && return 0
     print_error "TCG disabled, but hardware accelerator not available for '$target'"
     return 1
 }
@@ -338,6 +350,7 @@ vhost_user=""
 kvm="no"
 hax="no"
 hvf="no"
+whpx="no"
 rdma=""
 gprof="no"
 debug_tcg="no"
@@ -1054,6 +1067,10 @@ for opt do
   ;;
   --enable-hvf) hvf="yes"
   ;;
+  --disable-whpx) whpx="no"
+  ;;
+  --enable-whpx) whpx="yes"
+  ;;
   --disable-tcg-interpreter) tcg_interpreter="no"
   ;;
   --enable-tcg-interpreter) tcg_interpreter="yes"
@@ -1548,6 +1565,7 @@ disabled with --disable-FEATURE, default is enabled if available:
   kvm             KVM acceleration support
   hax             HAX acceleration support
   hvf             Hypervisor.framework acceleration support
+  whpx            Windows Hypervisor Platform acceleration support
   rdma            RDMA-based migration support
   vde             support for vde network
   netmap          support for netmap network
@@ -2446,6 +2464,30 @@ if test "$xen_pv_domain_build" = "yes" &&
 fi
 
 ##########################################
+# Windows Hypervisor Platform accelerator (WHPX) check
+if test "$whpx" != "no" ; then
+    cat > $TMPC << EOF
+#include <windows.h>
+#include <winhvplatform.h>
+#include <winhvemulation.h>
+int main(void) {
+    WHV_CAPABILITY whpx_cap;
+    WHvGetCapability(WHvCapabilityCodeFeatures, &whpx_cap, sizeof(whpx_cap));
+    return 0;
+}
+EOF
+    if compile_prog "" "-lwinhvplatform -lwinhvemulation" ; then
+        libs_softmmu="$libs_softmmu -lwinhvplatform -lwinhvemulation"
+        whpx="yes"
+    else
+        if test "$whpx" = "yes"; then
+            feature_not_found "winhvplatform" "winhvemulation is not installed"
+        fi
+        whpx="no"
+    fi
+fi
+
+##########################################
 # Sparse probe
 if test "$sparse" != "no" ; then
   if has cgcc; then
@@ -5577,6 +5619,7 @@ echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
 echo "HAX support       $hax"
 echo "HVF support       $hvf"
+echo "WHPX support      $whpx"
 echo "TCG support       $tcg"
 if test "$tcg" = "yes" ; then
     echo "TCG debug enabled $debug_tcg"
@@ -5737,7 +5780,7 @@ if test "$mingw32" = "yes" ; then
     echo "CONFIG_QGA_NTDDDISK=y" >> $config_host_mak
   fi
   if test "$guest_agent_msi" = "yes"; then
-    echo "QEMU_GA_MSI_ENABLED=yes" >> $config_host_mak  
+    echo "QEMU_GA_MSI_ENABLED=yes" >> $config_host_mak
     echo "QEMU_GA_MSI_MINGW_DLL_PATH=${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $config_host_mak
     echo "QEMU_GA_MSI_WITH_VSS=${QEMU_GA_MSI_WITH_VSS}" >> $config_host_mak
     echo "QEMU_GA_MSI_ARCH=${QEMU_GA_MSI_ARCH}" >> $config_host_mak
@@ -6659,6 +6702,9 @@ fi
 if supported_hvf_target $target; then
     echo "CONFIG_HVF=y" >> $config_target_mak
 fi
+if supported_whpx_target $target; then
+    echo "CONFIG_WHPX=y" >> $config_target_mak
+fi
 if test "$target_bigendian" = "yes" ; then
   echo "TARGET_WORDS_BIGENDIAN=y" >> $config_target_mak
 fi
qemu-options.hx +4 -4
index 5ff741a..9fbe468 100644
@@ -31,7 +31,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
     "-machine [type=]name[,prop[=value][,...]]\n"
     "                selects emulated machine ('-machine help' for list)\n"
     "                property accel=accel1[:accel2[:...]] selects accelerator\n"
-    "                supported accelerators are kvm, xen, hax, hvf or tcg (default: tcg)\n"
+    "                supported accelerators are kvm, xen, hax, hvf, whpx or tcg (default: tcg)\n"
     "                kernel_irqchip=on|off|split controls accelerated irqchip support (default=off)\n"
     "                vmport=on|off|auto controls emulation of vmport (default: auto)\n"
     "                kvm_shadow_mem=size of KVM shadow MMU in bytes\n"
@@ -66,7 +66,7 @@ Supported machine properties are:
 @table @option
 @item accel=@var{accels1}[:@var{accels2}[:...]]
 This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax, hvf or tcg can be available. By default, tcg is used. If there is
+kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg is used. If there is
 more than one accelerator specified, the next one is used if the previous one
 fails to initialize.
 @item kernel_irqchip=on|off
@@ -126,13 +126,13 @@ ETEXI
 
 DEF("accel", HAS_ARG, QEMU_OPTION_accel,
     "-accel [accel=]accelerator[,thread=single|multi]\n"
-    "                select accelerator (kvm, xen, hax, hvf or tcg; use 'help' for a list)\n"
+    "                select accelerator (kvm, xen, hax, hvf, whpx or tcg; use 'help' for a list)\n"
     "                thread=single|multi (enable multi-threaded TCG)", QEMU_ARCH_ALL)
 STEXI
 @item -accel @var{name}[,prop=@var{value}[,...]]
 @findex -accel
 This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax, hvf or tcg can be available. By default, tcg is used. If there is
+kvm, xen, hax, hvf, whpx or tcg can be available. By default, tcg is used. If there is
 more than one accelerator specified, the next one is used if the previous one
 fails to initialize.
 @table @option
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/4 Add the WHPX vcpu API

In reply to Justin Terry (VM)

Adds support for the Windows Hypervisor Platform accelerator (WHPX) stubs and introduces the whpx.h sysemu API for managing the vcpu scheduling and management.

---
 accel/stubs/Makefile.objs |  9 +++++----
 accel/stubs/whpx-stub.c   | 48 +++++++++++++++++++++++++++++++++++++++++++++++
 include/sysemu/whpx.h     | 40 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 4 deletions(-)
 create mode 100644 accel/stubs/whpx-stub.c
 create mode 100644 include/sysemu/whpx.h
accel/stubs/Makefile.objs +5 -4
index 779343b..3894caf 100644
@@ -1,4 +1,5 @@
-obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o
-obj-$(call lnot,$(CONFIG_HVF)) += hvf-stub.o
-obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
-obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
+obj-$(call lnot,$(CONFIG_HAX))  += hax-stub.o
+obj-$(call lnot,$(CONFIG_HVF))  += hvf-stub.o
+obj-$(call lnot,$(CONFIG_WHPX)) += whpx-stub.o
+obj-$(call lnot,$(CONFIG_KVM))  += kvm-stub.o
+obj-$(call lnot,$(CONFIG_TCG))  += tcg-stub.o
accel/stubs/whpx-stub.c new file +48 -0

48 lines not on this page · raw message

include/sysemu/whpx.h new file +40 -0
new file mode 100644
index 0000000..89592ae
@@ -0,0 +1,40 @@
+/*
+ * QEMU Windows Hypervisor Platform accelerator (WHPX) support
+ *
+ * Copyright Microsoft, Corp. 2017
+ *
+ * Authors:
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_WHPX_H
+#define QEMU_WHPX_H
+
+#include "config-host.h"
+#include "qemu-common.h"
+
+int whpx_init_vcpu(CPUState *cpu);
+int whpx_vcpu_exec(CPUState *cpu);
+void whpx_destroy_vcpu(CPUState *cpu);
+void whpx_vcpu_kick(CPUState *cpu);
+
+
+void whpx_cpu_synchronize_state(CPUState *cpu);
+void whpx_cpu_synchronize_post_reset(CPUState *cpu);
+void whpx_cpu_synchronize_post_init(CPUState *cpu);
+void whpx_cpu_synchronize_pre_loadvm(CPUState *cpu);
+
+#ifdef CONFIG_WHPX
+
+int whpx_enabled(void);
+
+#else /* CONFIG_WHPX */
+
+#define whpx_enabled() (0)
+
+#endif /* CONFIG_WHPX */
+
+#endif /* QEMU_WHPX_H */
Signature · 1 line
2.7.4
#3 lore raw

PATCH v2 3/4 Introduce the WHPX impl

In reply to Justin Terry (VM)

Implements the Windows Hypervisor Platform accelerator (WHPX) target. Which acts as a hypervisor accelerator for QEMU on the Windows platform. This enables QEMU much greater speed over the emulated x86_64 path's that are taken on Windows today.

1. Adds support for vPartition management.
2. Adds support for vCPU management.
3. Adds support for MMIO/PortIO.
4. Registers the WHPX ACCEL_CLASS.

---
 target/i386/Makefile.objs |    1 +
 target/i386/whpx-all.c    | 1366 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 1367 insertions(+)
 create mode 100644 target/i386/whpx-all.c
target/i386/Makefile.objs +1 -0
index 44103a6..f5c6ef2 100644
@@ -14,3 +14,4 @@ ifdef CONFIG_DARWIN
 obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-darwin.o
 obj-$(CONFIG_HVF) += hvf/
 endif
+obj-$(CONFIG_WHPX) += whpx-all.o
target/i386/whpx-all.c new file +1366 -0

1,366 lines not on this page · raw message

Signature · 1 line
2.7.4
#4 lore raw

PATCH v2 4/4 Add the WHPX acceleration enlightenments

In reply to Justin Terry (VM)

Implements the WHPX accelerator cpu enlightenments to actually use the whpx-all accelerator on Windows platforms.

---
 cpus.c                    | 66 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/sysemu/hw_accel.h | 13 ++++++++++
 target/i386/helper.c      |  2 +-
 3 files changed, 79 insertions(+), 2 deletions(-)
cpus.c +65 -1
index 2cb0af9..1495ed5 100644
@@ -38,6 +38,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/hax.h"
 #include "sysemu/hvf.h"
+#include "sysemu/whpx.h"
 #include "qmp-commands.h"
 #include "exec/exec-all.h"
 
@@ -1539,6 +1540,46 @@ static void *qemu_hvf_cpu_thread_fn(void *arg)
     return NULL;
 }
 
+static void *qemu_whpx_cpu_thread_fn(void *arg)
+{
+    CPUState *cpu = arg;
+    int r;
+
+    qemu_mutex_lock_iothread();
+    qemu_thread_get_self(cpu->thread);
+    cpu->thread_id = qemu_get_thread_id();
+    current_cpu = cpu;
+
+    r = whpx_init_vcpu(cpu);
+    if (r < 0) {
+        fprintf(stderr, "whpx_init_vcpu failed: %s\n", strerror(-r));
+        exit(1);
+    }
+
+    /* signal CPU creation */
+    cpu->created = true;
+    qemu_cond_signal(&qemu_cpu_cond);
+
+    do {
+        if (cpu_can_run(cpu)) {
+            r = whpx_vcpu_exec(cpu);
+            if (r == EXCP_DEBUG) {
+                cpu_handle_guest_debug(cpu);
+            }
+        }
+        while (cpu_thread_is_idle(cpu)) {
+            qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex);
+        }
+        qemu_wait_io_event_common(cpu);
+    } while (!cpu->unplug || cpu_can_run(cpu));
+
+    whpx_destroy_vcpu(cpu);
+    cpu->created = false;
+    qemu_cond_signal(&qemu_cpu_cond);
+    qemu_mutex_unlock_iothread();
+    return NULL;
+}
+
 #ifdef _WIN32
 static void CALLBACK dummy_apc_func(ULONG_PTR unused)
 {
@@ -1630,7 +1671,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
     }
 #else /* _WIN32 */
     if (!qemu_cpu_is_self(cpu)) {
-        if (!QueueUserAPC(dummy_apc_func, cpu->hThread, 0)) {
+        if (whpx_enabled()) {
+            whpx_vcpu_kick(cpu);
+        } else if (!QueueUserAPC(dummy_apc_func, cpu->hThread, 0)) {
             fprintf(stderr, "%s: QueueUserAPC failed with error %lu\n",
                     __func__, GetLastError());
             exit(1);
@@ -1877,6 +1920,25 @@ static void qemu_hvf_start_vcpu(CPUState *cpu)
     }
 }
 
+static void qemu_whpx_start_vcpu(CPUState *cpu)
+{
+    char thread_name[VCPU_THREAD_NAME_SIZE];
+
+    cpu->thread = g_malloc0(sizeof(QemuThread));
+    cpu->halt_cond = g_malloc0(sizeof(QemuCond));
+    qemu_cond_init(cpu->halt_cond);
+    snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/WHPX",
+             cpu->cpu_index);
+    qemu_thread_create(cpu->thread, thread_name, qemu_whpx_cpu_thread_fn,
+                       cpu, QEMU_THREAD_JOINABLE);
+#ifdef _WIN32
+    cpu->hThread = qemu_thread_get_handle(cpu->thread);
+#endif
+    while (!cpu->created) {
+        qemu_cond_wait(&qemu_cpu_cond, &qemu_global_mutex);
+    }
+}
+
 static void qemu_dummy_start_vcpu(CPUState *cpu)
 {
     char thread_name[VCPU_THREAD_NAME_SIZE];
@@ -1915,6 +1977,8 @@ void qemu_init_vcpu(CPUState *cpu)
         qemu_hvf_start_vcpu(cpu);
     } else if (tcg_enabled()) {
         qemu_tcg_init_vcpu(cpu);
+    } else if (whpx_enabled()) {
+        qemu_whpx_start_vcpu(cpu);
     } else {
         qemu_dummy_start_vcpu(cpu);
     }
include/sysemu/hw_accel.h +13 -0
index 469ffda..d2ddfb5 100644
@@ -14,6 +14,7 @@
 #include "qom/cpu.h"
 #include "sysemu/hax.h"
 #include "sysemu/kvm.h"
+#include "sysemu/whpx.h"
 
 static inline void cpu_synchronize_state(CPUState *cpu)
 {
@@ -23,6 +24,9 @@ static inline void cpu_synchronize_state(CPUState *cpu)
     if (hax_enabled()) {
         hax_cpu_synchronize_state(cpu);
     }
+    if (whpx_enabled()) {
+        whpx_cpu_synchronize_state(cpu);
+    }
 }
 
 static inline void cpu_synchronize_post_reset(CPUState *cpu)
@@ -33,6 +37,9 @@ static inline void cpu_synchronize_post_reset(CPUState *cpu)
     if (hax_enabled()) {
         hax_cpu_synchronize_post_reset(cpu);
     }
+    if (whpx_enabled()) {
+        whpx_cpu_synchronize_post_reset(cpu);
+    }
 }
 
 static inline void cpu_synchronize_post_init(CPUState *cpu)
@@ -43,6 +50,9 @@ static inline void cpu_synchronize_post_init(CPUState *cpu)
     if (hax_enabled()) {
         hax_cpu_synchronize_post_init(cpu);
     }
+    if (whpx_enabled()) {
+        whpx_cpu_synchronize_post_init(cpu);
+    }
 }
 
 static inline void cpu_synchronize_pre_loadvm(CPUState *cpu)
@@ -53,6 +63,9 @@ static inline void cpu_synchronize_pre_loadvm(CPUState *cpu)
     if (hax_enabled()) {
         hax_cpu_synchronize_pre_loadvm(cpu);
     }
+    if (whpx_enabled()) {
+        whpx_cpu_synchronize_pre_loadvm(cpu);
+    }
 }
 
 #endif /* QEMU_HW_ACCEL_H */
target/i386/helper.c +1 -1
index f63eb3d..9fba146 100644
@@ -986,7 +986,7 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access)
     X86CPU *cpu = x86_env_get_cpu(env);
     CPUState *cs = CPU(cpu);
 
-    if (kvm_enabled()) {
+    if (kvm_enabled() || whpx_enabled()) {
         env->tpr_access_type = access;
 
         cpu_interrupt(cs, CPU_INTERRUPT_TPR);
Signature · 1 line
2.7.4
#5 lore raw
In reply to Justin Terry (VM)
Quoted 5 lines · Justin Terry (VM)

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

For reference to others, v1 seems to be:

Subject: [PATCH 0/4] Implements the Windows Hypervisor Platform accelerator
https://www.mail-archive.com/[email protected]/msg505710.html

Quoted 25 lines

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

 accel/stubs/Makefile.objs |    9 +-
 accel/stubs/whpx-stub.c   |   48 ++
 configure                 |   48 +-
 cpus.c                    |   66 ++-
 include/sysemu/hw_accel.h |   13 +
 include/sysemu/whpx.h     |   40 ++
 qemu-options.hx           |    8 +-
 target/i386/Makefile.objs |    1 +
 target/i386/helper.c      |    2 +-
 target/i386/whpx-all.c    | 1366 +++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1590 insertions(+), 11 deletions(-)
 create mode 100644 accel/stubs/whpx-stub.c
 create mode 100644 include/sysemu/whpx.h
 create mode 100644 target/i386/whpx-all.c
Signature · 1 line
2.7.4
Signature · 1 line
Eduardo
#6 lore raw
In reply to Justin Terry (VM)
Quoted 11 lines · Justin Terry (VM) via Qemu-devel

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

This could be huge for QEMU on Windows users. Thanks for doing this!

Which guest OSes have you tested?

What are the known limitations (after all, the code is quite small and maybe not everything is implemented yet in this patch series)?

Stefan

#7 lore raw

Hey Stefan,

Your welcome! Excited to help.

I have only tried Ubuntu and Windows guests. Is there a set you would recommend to try out?

As for limitations, this set of patches allows for both bios and efi based boots (we have been using TianoCore). We will continue to submit patches around performance tuning on the platform but basic functionality is up and running in this set. The VGA interrupt path can be improved and we are looking at options here to make this a smoother experience. And as mentioned in the update we don't have CPUID support fully implemented yet for migration scenarios. Was there a specific set of things you were wondering that I could investigate or provide clarity on?

Thanks,
Justin

Quoted 31 lines

-----Original Message-----
From: Stefan Hajnoczi [mailto:[email protected]]
Sent: Thursday, January 25, 2018 3:02 AM
To: Justin Terry (VM) <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Updates based on feedback.

Quoted 4 lines · Justin Terry (VM) via Qemu-devel

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and

XSAVE/XRSTOR.

Quoted 7 lines

3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

This could be huge for QEMU on Windows users. Thanks for doing this!

Which guest OSes have you tested?

What are the known limitations (after all, the code is quite small and maybe not everything is implemented yet in this patch series)?

Stefan

#8 lore raw
Quoted 3 lines · Justin Terry (VM) via Qemu-devel

I have only tried Ubuntu and Windows guests. Is there a set you would recommend to try out?

As for limitations, this set of patches allows for both bios and efi based boots (we have been using TianoCore). We will continue to submit patches around performance tuning on the platform but basic functionality is up and running in this set. The VGA interrupt path can be improved and we are looking at options here to make this a smoother experience. And as mentioned in the update we don't have CPUID support fully implemented yet for migration scenarios. Was there a specific set of things you were wondering that I could investigate or provide clarity on?

That sounds good. I was just wondering what the general status was.

There is no particular set of tests I had in mind. The KVM kernel module has a test suite called kvm-unit-tests for low-level guest code tests (http://www.linux-kvm.org/page/KVM-unit-tests). There are also high-level tests written using the Avocado framework
(https://www.linux-kvm.org/page/Avocado). Neither of these is immediately useful or necessary for WHPX though.

Stefan

#9 lore raw
In reply to Justin Terry (VM)

Hi All,

Is there any additional feedback I can address here to help out the process? Please let me know.

Thanks again,
Justin

Quoted 38 lines

-----Original Message-----
From: Justin Terry (VM)
Sent: Monday, January 22, 2018 1:08 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Justin Terry (VM) <[email protected]>
Subject: [PATCH v2 0/4] Updates based on feedback.

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

 accel/stubs/Makefile.objs |    9 +-
 accel/stubs/whpx-stub.c   |   48 ++
 configure                 |   48 +-
 cpus.c                    |   66 ++-
 include/sysemu/hw_accel.h |   13 +
 include/sysemu/whpx.h     |   40 ++
 qemu-options.hx           |    8 +-
 target/i386/Makefile.objs |    1 +
 target/i386/helper.c      |    2 +-
 target/i386/whpx-all.c    | 1366
+++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1590 insertions(+), 11 deletions(-)  create mode 100644

accel/stubs/whpx-stub.c create mode 100644 include/sysemu/whpx.h create mode 100644 target/i386/whpx-all.c

--
2.7.4

#10 lore raw
Quoted 3 lines · Justin Terry (VM)

Hi All,

Is there any additional feedback I can address here to help out the process? Please let me know.

Nothing specifically (it didn't help that most of last week I was sick!). From my point of view, I just need to review the changes you made and include these patches in a pull request.

Thanks,

Paolo

Quoted 42 lines

Thanks again,
Justin

Quoted 38 lines

-----Original Message-----
From: Justin Terry (VM)
Sent: Monday, January 22, 2018 1:08 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Justin Terry (VM) <[email protected]>
Subject: [PATCH v2 0/4] Updates based on feedback.

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre submission.
2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

 accel/stubs/Makefile.objs |    9 +-
 accel/stubs/whpx-stub.c   |   48 ++
 configure                 |   48 +-
 cpus.c                    |   66 ++-
 include/sysemu/hw_accel.h |   13 +
 include/sysemu/whpx.h     |   40 ++
 qemu-options.hx           |    8 +-
 target/i386/Makefile.objs |    1 +
 target/i386/helper.c      |    2 +-
 target/i386/whpx-all.c    | 1366
+++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1590 insertions(+), 11 deletions(-)  create mode 100644

accel/stubs/whpx-stub.c create mode 100644 include/sysemu/whpx.h create mode 100644 target/i386/whpx-all.c

--
2.7.4

#11 lore raw

No worries at all Paolo. I was just making sure I didn’t miss something.

We have been working on some minor fixups/perf improvements on our end and I will submit those patches after this merges. I figured it would be easier because they will be very small and isolated so easier to review moving forward.

Thanks,
Justin

Quoted 65 lines

-----Original Message-----
From: Paolo Bonzini [mailto:[email protected]]
Sent: Tuesday, January 30, 2018 11:34 AM
To: Justin Terry (VM) <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2 0/4] Updates based on feedback.

Quoted 3 lines · Justin Terry (VM)

Hi All,

Is there any additional feedback I can address here to help out the

process? Please let me know.

Nothing specifically (it didn't help that most of last week I was sick!). From my point of view, I just need to review the changes you made and include these patches in a pull request.

Thanks,

Paolo

Quoted 15 lines

Thanks again,
Justin

Quoted 12 lines

-----Original Message-----
From: Justin Terry (VM)
Sent: Monday, January 22, 2018 1:08 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Justin Terry (VM) <[email protected]>
Subject: [PATCH v2 0/4] Updates based on feedback.

Updates based on review feedback.

1. Fixes style issues and properly ran the scripts/checkpatch pre

submission.

Quoted 28 lines
Quoted 27 lines

2. Added migration blockers for CPUID, dirty memory tracking, and XSAVE/XRSTOR.
3. Fixed some bugs around register states when using bios vs efi.

Justin Terry (VM) (4):
Add the Windows Hypervisor Platform accelerator. Add the WHPX vcpu API
Introduce the WHPX impl
Add the WHPX acceleration enlightenments

 accel/stubs/Makefile.objs |    9 +-
 accel/stubs/whpx-stub.c   |   48 ++
 configure                 |   48 +-
 cpus.c                    |   66 ++-
 include/sysemu/hw_accel.h |   13 +
 include/sysemu/whpx.h     |   40 ++
 qemu-options.hx           |    8 +-
 target/i386/Makefile.objs |    1 +
 target/i386/helper.c      |    2 +-
 target/i386/whpx-all.c    | 1366
+++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 1590 insertions(+), 11 deletions(-)  create mode

100644 accel/stubs/whpx-stub.c create mode 100644 include/sysemu/whpx.h create mode 100644 target/i386/whpx-all.c

--
2.7.4