All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Problem building QEMU with whpx support
@ 2018-06-21 21:44 Umang Kakaiya
  2018-07-09 17:02 ` Justin Terry (VM)
  0 siblings, 1 reply; 2+ messages in thread
From: Umang Kakaiya @ 2018-06-21 21:44 UTC (permalink / raw)
  To: qemu-devel, juterry

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://wiki.qemu.org/index.php/Hosts/W32#Native_builds_with_MSYS2>)

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

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

* Re: [Qemu-devel] Problem building QEMU with whpx support
  2018-06-21 21:44 [Qemu-devel] Problem building QEMU with whpx support Umang Kakaiya
@ 2018-07-09 17:02 ` Justin Terry (VM)
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Terry (VM) @ 2018-07-09 17:02 UTC (permalink / raw)
  To: Umang Kakaiya, qemu-devel

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

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

end of thread, other threads:[~2018-07-09 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 21:44 [Qemu-devel] Problem building QEMU with whpx support Umang Kakaiya
2018-07-09 17:02 ` Justin Terry (VM)

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.