qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] [RFC] Add HAX support
@ 2016-11-08 15:39 Vincent Palatin
  2016-11-08 15:39 ` [Qemu-devel] [PATCH 1/3] kvm: move cpu synchronization code Vincent Palatin
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Vincent Palatin @ 2016-11-08 15:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Vincent Palatin

I took a stab at trying to rebase/upstream the support for Intel HAXM.
(Hardware Accelerated Execution Manager).
Intel HAX is kernel-based hardware acceleration module for Windows and MacOSX.

I have based my work on the last version of the source code I found:
the emu-2.2-release branch in the external/qemu-android repository as used by
the Android emulator.
In patch 2/3, I have forward-ported the core HAX code mostly unmodified from
there, I just did some minor touch up to make it build and run properly.
So it might contain some outdated constructs and probably requires more
attention (thus the 'RFC' for this patchset).

In patch 3/3, I have put the plumbing into the QEMU code base, I did some clean
up there and it is reasonably intrusive: i.e.
 Makefile.target           |   1 +
 configure                 |  18 +++++++
 cpu-exec.c                |  23 ++++++++-
 cpus.c                    | 125 ++++++++++++++++++++++++++++++++++++++++------
 exec.c                    |  16 ++++++
 hw/intc/apic_common.c     |   3 +-
 include/qom/cpu.h         |   5 ++
 include/sysemu/hw_accel.h |   9 ++++
 qemu-options.hx           |  11 ++++
 target-i386/Makefile.objs |   7 +++
 target-i386/seg_helper.c  |   5 ++
 target-i386/translate.c   |   8 +++
 vl.c                      |  17 +++++--
 13 files changed, 229 insertions(+), 19 deletions(-)

I'm not so happy with the qemu_cpu_kick_thread mess in cpus.c,
if somebody can help/advise.

The patch 1/3 just extracts from KVM specific header the cpu_synchronize_
functions that HAX is also using.

I have tested the end result on a Windows 10 Pro machine (with UG support)
with the Intel HAXM module 6.0.4 and a large ChromiumOS x86_64 image to
exercise various code paths. It looks stable.
I also did a quick regression testing of the integration by running a Linux
build with KVM enabled.


Vincent Palatin (3):
  kvm: move cpu synchronization code
  target-i386: Add Intel HAX files
  Plumb the HAXM-based hardware acceleration support

 Makefile.target             |    1 +
 configure                   |   18 +
 cpu-exec.c                  |   23 +-
 cpus.c                      |  126 +++-
 exec.c                      |   16 +
 gdbstub.c                   |    1 +
 hax-stub.c                  |   66 ++
 hw/i386/kvm/apic.c          |    1 +
 hw/i386/kvmvapic.c          |    1 +
 hw/intc/apic_common.c       |    3 +-
 hw/misc/vmport.c            |    2 +-
 include/qom/cpu.h           |    5 +
 include/sysemu/hax.h        |   66 ++
 include/sysemu/hw_accel.h   |   48 ++
 include/sysemu/kvm.h        |   23 -
 monitor.c                   |    2 +-
 qemu-options.hx             |   11 +
 qom/cpu.c                   |    2 +-
 target-arm/cpu.c            |    2 +-
 target-i386/Makefile.objs   |    7 +
 target-i386/hax-all.c       | 1449 +++++++++++++++++++++++++++++++++++++++++++
 target-i386/hax-darwin.c    |  315 ++++++++++
 target-i386/hax-darwin.h    |   63 ++
 target-i386/hax-i386.h      |   94 +++
 target-i386/hax-interface.h |  357 +++++++++++
 target-i386/hax-slot.c      |  332 ++++++++++
 target-i386/hax-slot.h      |   58 ++
 target-i386/hax-windows.c   |  478 ++++++++++++++
 target-i386/hax-windows.h   |   89 +++
 target-i386/helper.c        |    1 +
 target-i386/kvm.c           |    1 +
 target-i386/seg_helper.c    |    5 +
 target-i386/translate.c     |    8 +
 vl.c                        |   17 +-
 34 files changed, 3645 insertions(+), 46 deletions(-)
 create mode 100644 hax-stub.c
 create mode 100644 include/sysemu/hax.h
 create mode 100644 include/sysemu/hw_accel.h
 create mode 100644 target-i386/hax-all.c
 create mode 100644 target-i386/hax-darwin.c
 create mode 100644 target-i386/hax-darwin.h
 create mode 100644 target-i386/hax-i386.h
 create mode 100644 target-i386/hax-interface.h
 create mode 100644 target-i386/hax-slot.c
 create mode 100644 target-i386/hax-slot.h
 create mode 100644 target-i386/hax-windows.c
 create mode 100644 target-i386/hax-windows.h

-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-11-11 11:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 15:39 [Qemu-devel] [PATCH 0/3] [RFC] Add HAX support Vincent Palatin
2016-11-08 15:39 ` [Qemu-devel] [PATCH 1/3] kvm: move cpu synchronization code Vincent Palatin
2016-11-08 17:34   ` Paolo Bonzini
2016-11-08 15:39 ` [Qemu-devel] [PATCH 2/3] target-i386: Add Intel HAX files Vincent Palatin
2016-11-08 17:46   ` Paolo Bonzini
2016-11-08 19:43     ` Vincent Palatin
2016-11-09 17:08     ` Vincent Palatin
2016-11-09 12:30   ` Stefan Hajnoczi
2016-11-09 17:08     ` Vincent Palatin
2016-11-08 15:39 ` [Qemu-devel] [PATCH 3/3] Plumb the HAXM-based hardware acceleration support Vincent Palatin
2016-11-08 20:37   ` Paolo Bonzini
2016-11-09 17:19     ` Vincent Palatin
2016-11-09 17:32       ` Paolo Bonzini
2016-11-11 11:25         ` Vincent Palatin
2016-11-11 11:26           ` Paolo Bonzini
2016-11-08 17:43 ` [Qemu-devel] [PATCH 0/3] [RFC] Add HAX support Paolo Bonzini
2016-11-08 19:41   ` Vincent Palatin
2016-11-08 20:41     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).