All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Justin Terry (VM)" <juterry@microsoft.com>
To: Umang Kakaiya <umangkk5@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Problem building QEMU with whpx support
Date: Mon, 9 Jul 2018 17:02:10 +0000	[thread overview]
Message-ID: <MWHPR21MB07650D2B61CA11DE684CC551B6440@MWHPR21MB0765.namprd21.prod.outlook.com> (raw)
In-Reply-To: <CABi5iw=FM2yFzji4HKhAxG0fYmsGb+h5wYp5wJo-DYNgMHuihg@mail.gmail.com>

Hey Umang,

Sorry I missed this. There is no official documentation for building QEMU on WHP as there is really no difference to cross compiling QEMU in general. However, yes you can cross compile this on 18.04 (and other distros). After installing the correct packages (mingw-w64) you will end up with a path on your Linux machine “/usr/x86_64-w64-mingw32/include/” folder. If you copy WinHvEmulation.h, WinHvPlatformDefs.h, WinHvPlatform.h from any “C:\Program Files (x86)\Windows Kits\10\Include\<version>\um\WinHv*.h” installed insider SDK you can then run “./configure --target-list=x86_64-softmmu --cross-prefix=x86_64_w64-mingw32- --enable-whpx” … (Etc). This will output a qemu binary that can be run on the Windows host.

Note, my personal way of doing this (not a requirement) is to use WSL on the same machine I am testing with. So I have enabled the Windows Subsystem for Linux, installed a distro of my choosing, copied the headers from the installed SDK, and run ./configure. I then have the output of make on a shared drive, so I can open cmd.exe launch the qemu exe with whatever options and test out my changes. Hope this helps!

-Justin

From: Umang Kakaiya <umangkk5@gmail.com>
Sent: Thursday, June 21, 2018 2:44 PM
To: qemu-devel@nongnu.org; Justin Terry (VM) <juterry@microsoft.com>
Subject: Problem building QEMU with whpx support

Hi Justin,

We are trying to use QEMU on Windows Hyper-V environment with whpx enabled for better performance. We were unable to build QEMU with WHPX support. We used Ubuntu 18.04 server VM with two libraries (WinHv*.lib) from the latest Windows 10 SDK to build QEMU and added '--enable-whpx' parameter in config. But building is failing giving the following message:
The command to launch QEMU is as below,

$ ./configure --enable-whpx --enable-debug

The following error was output from the command line,
Error: User requested feature WinHvPlatform
       configure was not able to find it.
       WinHvEmulation is not installed.

We analyzed the issue and found that configure is unable to locate the WinHvPlatform.h file.
As for providing WinHV*.lib files we tried following steps:
1. We set LD_LIB_PATH to point to the WinHV*.lib files.
2. We used --path_win_sdk option in configure to add the path to Windows insider SDK.
3. We moved to Windows Environment and tried building QEMU with MSYS2 build options according to steps mentioned in QEMU blog (Link<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.qemu.org%2Findex.php%2FHosts%2FW32%23Native_builds_with_MSYS2&data=02%7C01%7Cjuterry%40microsoft.com%7C7cb5af61e68f4adb723c08d5d7c0252c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636652142620044047&sdata=VhqbjvzvQbjIn8WYmAqOGaU2QM7CnhCVpE4VrV4sepI%3D&reserved=0>)
But it didn't work because base qemu build itself fails. We then      tried MingW64 to build QEMU but got the same error above with --enable-whpx.


We tried to find any documentation to provide exact steps in building QEMU with whpx support but didn't make any progress. So there are three questions:

1. Can we build QEMU with whpx packages on Ubuntu 18.04 or do we need to use QEMU native build on Windows machine using MSYS2.
2. Where to keep the WinHV*.lib files in QEMU source directories so that configure can locate the files for build.
3. Can you provide any links or reference to documentation on building QEMU with whpx support with all dependency packages required.

Below is the configuration of the Hyper-V machine used for this experiment,

Windows OS: Windows Server Datacenter 2016
Windows edition: Server
Windows version: 1803 (OS build 17645.1042)
SDK version: 10.0.17686.0


Best Regards,
Umang

      reply	other threads:[~2018-07-09 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 21:44 [Qemu-devel] Problem building QEMU with whpx support Umang Kakaiya
2018-07-09 17:02 ` Justin Terry (VM) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR21MB07650D2B61CA11DE684CC551B6440@MWHPR21MB0765.namprd21.prod.outlook.com \
    --to=juterry@microsoft.com \
    --cc=qemu-devel@nongnu.org \
    --cc=umangkk5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.