Hey Paolo,

Thanks for all the feedback. After talking with various members of the team 
around these scenarios I think its best we add the migration blockers for all 
of your comments unfortunately. The answers to your question are below:

1. For CPUID. The API has support for an "EXTENDED_VM_EXITS" of type 
WHvRunVpExitReasonX64Cpuid after a call to WHvRunVirtualProcessor. This will 
one day allow for the CPUID instruction to be resolved however it is not 
currently implemented in the platform. So for right now we will have to block 
on CPUID.

2. For dirty memory tracking. We currently don’t have support in the platform 
or API for this. I have added that to the feature backlog and will update QEMU 
as that gets implemented in the platform. However, VGA does indeed work with 
the current impl of log_sync.

3. Also, for XSAVE/RSTOR we again don’t have platform support for the required 
registers. I have added this to the feature platform backlog to gain access for 
that functionality as well.

4. This will be supported on Windows 10 hosts (I don’t have the insider build 
number yet) and it will require an Intel processor with VT-x and Unrestricted 
Guest support. Will update the qemu-devel list once we have an insider build 
that is public that has the platform bits.

So, if your ok with it I will block on CPUID, Memory Tracking, and XSAVE/RSTOR 
functionality and send out the updated PR.

-Justin

> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Friday, January 12, 2018 12:48 PM
> To: Justin Terry (VM) <jute...@microsoft.com>
> Cc: qemu-devel@nongnu.org qemu-devel <qemu-devel@nongnu.org>
> Subject: Re: [PATCH 0/4] Implements the Windows Hypervisor Platform
> accelerator
> 
> 
> > Hello QEMU Community!
> >
> > Over the past few months the Hyper-V team at Microsoft has been
> > working hard on a new user-mode API for our hypervisor that will be
> > released as part of the upcoming SDK. This new API adds user-mode
> > capabilities to create and manage partitions at the hypervisor level,
> > configure memory mappings for the partition, and create and control
> execution of virtual processors.
> >
> > With this new API we are now able to bring our hypervisor to the QEMU
> > community! The following patches implement the Windows Hypervisor
> > Platform accelerator (WHPX) for QEMU on Windows 10 hosts.
> >
> > When compiling QEMU for x86_64 passing the --enable-whpx flag will
> > compile the accelerator for use. At runtime using the '-accel whpx'
> > should see a significant performance improvement over emulation, much
> > like when using 'hax' on Windows.
> >
> > Over the next few days the pre-release version of the documentation
> > for this new API will be visible at
> >
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.
> > microsoft.com%2Fen-
> us%2Fvirtualization&data=02%7C01%7Cjuterry%40microsoft.com%7Ce979c5
> 0ab5544ab2dec708d559fdc86f%7C72f988bf86f141af91ab2d7cd011db47%7C1
> %7C0%7C636513868884987772&sdata=E%2BE5DX%2FJqsK2%2BZJVWzQ3qFy
> Kg0YLKrg6EtzLkvnJqbU%3D&reserved=0 under the 'Windows Hypervisor
> Platform' section. Here you will see the requirements, API, and examples.
> 
> That's great!  Accelerator galore. :)
> 
> From a quick skim they patches seem to be generally pretty good!  I have a
> few quick question on a couple features that seem to be missing:
> 
> - an important missing feature is support for CPU models (e.g. "-cpu
> Haswell").  Code
>   for that was added recently for Hypervisor.framework and you should be
> able to copy
>   some of it and then more for your CPUID intercept.  However, the question
> I have is:
>   what interfaces does WHPX support to query the hypervisor's CPUID
> capabilities?
> 
> - is dirty memory support available?  The log_sync callback seems a bit
> incomplete :)
>   If it's not, VGA output probably will not work.
> 
> - I might have missed this because the relevant code is quite repetitive -
> what about
>   get/set of XSAVE areas?  If either this or dirty memory is not present, it's
> probably
>   best to block migration (grep for migration_blockers).
> 
> Also, what versions of Windows will support WHPX?
> 
> Thanks,
> 
> Paolo
> > Thank you for your feedback.
> >
> > 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    | 1395
> >  +++++++++++++++++++++++++++++++++++++++++++++
> >  10 files changed, 1619 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
> >
> >

Reply via email to