From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org, Justin Terry <juterry@microsoft.com>
Cc: "Fam Zheng" <fam@euphon.net>, "Thomas Huth" <thuth@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Stefan Weil" <sw@weilnetz.de>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH v2 2/3] tests/docker: Add fedora-win10sdk-cross image
Date: Fri, 20 Sep 2019 13:33:28 +0200 [thread overview]
Message-ID: <20190920113329.16787-3-philmd@redhat.com> (raw)
In-Reply-To: <20190920113329.16787-1-philmd@redhat.com>
To build WHPX (Windows Hypervisor) binaries, we need the WHPX
headers provided by the Windows SDK.
Add a script that fetches the required MSI/CAB files from the
latest SDK (currently 10.0.18362.1).
Headers are accessible under /opt/win10sdk/include.
Set the QEMU_CONFIGURE_OPTS environment variable accordingly,
enabling HAX and WHPX. Due to CPP warnings related to Microsoft
specific #pragmas, we also need to use the '--disable-werror'
configure flag.
Cc: Justin Terry <juterry@microsoft.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
tests/docker/Makefile.include | 2 ++
.../dockerfiles/fedora-win10sdk-cross.docker | 23 ++++++++++++++++
tests/docker/dockerfiles/win10sdk-dl.sh | 27 +++++++++++++++++++
3 files changed, 52 insertions(+)
create mode 100644 tests/docker/dockerfiles/fedora-win10sdk-cross.docker
create mode 100755 tests/docker/dockerfiles/win10sdk-dl.sh
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 50a400b573..aa2e4e56dd 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -125,6 +125,8 @@ docker-image-debian-ppc64-cross: docker-image-debian10
docker-image-debian-riscv64-cross: docker-image-debian10
docker-image-debian-sh4-cross: docker-image-debian10
docker-image-debian-sparc64-cross: docker-image-debian10
+docker-image-fedora-win10sdk-cross: docker-image-fedora
+docker-image-fedora-win10sdk-cross: EXTRA_FILES:=$(DOCKER_FILES_DIR)/win10sdk-dl.sh
docker-image-travis: NOUSER=1
diff --git a/tests/docker/dockerfiles/fedora-win10sdk-cross.docker b/tests/docker/dockerfiles/fedora-win10sdk-cross.docker
new file mode 100644
index 0000000000..55ca933d40
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-win10sdk-cross.docker
@@ -0,0 +1,23 @@
+#
+# Docker MinGW64 cross-compiler target with WHPX header installed
+#
+# This docker target builds on the Fedora 30 base image.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+FROM qemu:fedora
+
+RUN dnf install -y \
+ cabextract \
+ msitools \
+ wget
+
+# Install WHPX headers from Windows Software Development Kit:
+# https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
+ADD win10sdk-dl.sh /usr/local/bin/win10sdk-dl.sh
+RUN /usr/local/bin/win10sdk-dl.sh
+
+ENV QEMU_CONFIGURE_OPTS ${QEMU_CONFIGURE_OPTS} \
+ --cross-prefix=x86_64-w64-mingw32- \
+ --extra-cflags=-I/opt/win10sdk/include --disable-werror \
+ --enable-hax --enable-whpx
diff --git a/tests/docker/dockerfiles/win10sdk-dl.sh b/tests/docker/dockerfiles/win10sdk-dl.sh
new file mode 100755
index 0000000000..1c35c2a252
--- /dev/null
+++ b/tests/docker/dockerfiles/win10sdk-dl.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Install WHPX headers from Windows Software Development Kit
+# https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+WINDIR=/opt/win10sdk
+mkdir -p ${WINDIR}
+pushd ${WINDIR}
+# Get the bundle base for Windows SDK v10.0.18362.1
+BASE_URL=$(curl --silent --include 'http://go.microsoft.com/fwlink/?prd=11966&pver=1.0&plcid=0x409&clcid=0x409&ar=Windows10&sar=SDK&o1=10.0.18362.1' | sed -nE 's_Location: (.*)/\r_\1_p')/Installers
+# Fetch the MSI containing the headers
+wget --no-verbose ${BASE_URL}/'Windows SDK Desktop Headers x86-x86_en-us.msi'
+while true; do
+ # Fetch all cabinets required by this MSI
+ CAB_NAME=$(msiextract Windows\ SDK\ Desktop\ Headers\ x86-x86_en-us.msi 3>&1 2>&3 3>&-| sed -nE "s_.*Error opening file $PWD/(.*): No such file or directory_\1_p")
+ test -z "${CAB_NAME}" && break
+ wget --no-verbose ${BASE_URL}/${CAB_NAME}
+done
+rm *.{cab,msi}
+mkdir /opt/win10sdk/include
+# Only keep the WHPX headers
+for inc in "${WINDIR}/Program Files/Windows Kits/10/Include/10.0.18362.0/um"/WinHv*; do
+ ln -s "${inc}" /opt/win10sdk/include
+done
+popd > /dev/null
--
2.20.1
next prev parent reply other threads:[~2019-09-20 11:36 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 11:33 [PATCH v2 0/3] testing: Build WHPX enabled binaries Philippe Mathieu-Daudé
2019-09-20 11:33 ` [PATCH v2 1/3] target/i386: Fix broken build with WHPX enabled Philippe Mathieu-Daudé
2019-09-20 11:37 ` Paolo Bonzini
2019-09-20 11:33 ` Philippe Mathieu-Daudé [this message]
2019-09-20 11:33 ` [PATCH v2 3/3] .shippable.yml: Build WHPX enabled binaries Philippe Mathieu-Daudé
2019-09-20 15:17 ` [PATCH v2 0/3] testing: " Philippe Mathieu-Daudé
2019-09-20 16:53 ` Justin Terry (VM)
2020-05-20 10:26 ` Philippe Mathieu-Daudé
2020-05-20 10:26 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-07-31 8:33 ` Philippe Mathieu-Daudé
2020-07-31 8:33 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-07-31 23:31 ` [EXTERNAL] " Sunil Muthuswamy
2020-08-03 10:51 ` Philippe Mathieu-Daudé
2020-08-03 10:51 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-08-03 11:28 ` Stefan Weil
2020-08-03 20:25 ` Stefan Weil
2020-08-04 6:43 ` Thomas Huth
2020-08-04 6:55 ` Stefan Weil
2020-08-04 7:23 ` Philippe Mathieu-Daudé
2020-08-04 7:23 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-08-04 7:42 ` Stefan Weil
2020-08-04 7:52 ` Philippe Mathieu-Daudé
2020-08-04 7:52 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-08-04 8:10 ` Thomas Huth
2020-08-04 9:23 ` Daniel P. Berrangé
2020-08-04 9:23 ` [Bug 1879672] " Daniel Berrange
2020-08-18 21:20 ` [EXTERNAL] " Sunil Muthuswamy
2020-08-19 3:36 ` Philippe Mathieu-Daudé
2020-08-19 3:36 ` [Bug 1879672] " Philippe Mathieu-Daudé
2019-09-21 6:34 ` no-reply
-- strict thread matches above, loose matches on Subject: below --
2020-05-20 10:14 [Bug 1879672] [NEW] QEMU installer with WHPX support Philippe Mathieu-Daudé
2020-05-20 10:25 ` [Bug 1879672] " Daniel Berrange
2020-05-20 12:30 ` Stefan Weil
2020-06-08 7:18 ` Philippe Mathieu-Daudé
2020-11-04 20:01 ` John Snow
2020-11-04 23:12 ` Philippe Mathieu-Daudé
2020-11-04 23:12 ` Philippe Mathieu-Daudé
2021-05-09 15:38 ` Philippe Mathieu-Daudé
2021-05-09 18:33 ` Stefan Weil
2021-05-27 7:45 ` Philippe Mathieu-Daudé
2020-02-18 20:38 [PATCH] WHPX: Assigning maintainer for Windows Hypervisor Platform Sunil Muthuswamy
2020-02-18 20:51 ` Justin Terry (SF)
2020-02-19 8:31 ` Philippe Mathieu-Daudé
2020-02-19 15:50 ` [EXTERNAL] " Justin Terry (SF)
2020-02-21 7:54 ` Stefan Weil
2020-02-24 19:43 ` Sunil Muthuswamy
2020-05-20 10:29 ` Philippe Mathieu-Daudé
2020-05-20 10:29 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-05-19 21:59 ` Sunil Muthuswamy
2020-05-20 10:29 ` Philippe Mathieu-Daudé
2020-05-20 10:29 ` [Bug 1879672] " Philippe Mathieu-Daudé
2020-02-21 17:15 ` Paolo Bonzini
2019-11-07 19:48 [PATCH v2] WHPX: support for xcr0 Sunil Muthuswamy
2019-11-07 20:05 ` Stefan Weil
2019-11-07 22:52 ` Sunil Muthuswamy
2020-05-20 10:27 ` Philippe Mathieu-Daudé
2020-05-20 10:27 ` [Bug 1879672] " Philippe Mathieu-Daudé
2019-11-12 18:52 ` Sunil Muthuswamy
2019-11-13 14:56 ` Paolo Bonzini
2022-04-28 6:31 ` Paolo Bonzini
2019-09-19 10:59 [Qemu-devel] [PATCH 0/2] testing: Build WHPX enabled binaries Philippe Mathieu-Daudé
2019-09-19 10:59 ` [Qemu-devel] [PATCH 1/2] tests/docker: Add fedora-win10sdk-cross image Philippe Mathieu-Daudé
2019-09-19 11:28 ` Alex Bennée
2019-09-19 11:35 ` Philippe Mathieu-Daudé
2019-09-19 10:59 ` [Qemu-devel] [PATCH 2/2] .shippable.yml: Build WHPX enabled binaries Philippe Mathieu-Daudé
2019-09-19 11:02 ` Philippe Mathieu-Daudé
2019-09-19 11:09 ` [Qemu-devel] [PATCH 0/2] testing: " Thomas Huth
2019-09-19 11:21 ` Philippe Mathieu-Daudé
2019-09-19 11:18 ` Stefan Weil
2019-09-19 11:26 ` Philippe Mathieu-Daudé
2020-05-20 10:25 ` Philippe Mathieu-Daudé
2020-05-20 10:25 ` [Bug 1879672] " Philippe Mathieu-Daudé
2019-09-19 11:41 ` [Qemu-devel] " Daniel P. Berrangé
2019-09-19 11:54 ` Philippe Mathieu-Daudé
2019-09-19 13:25 ` Daniel P. Berrangé
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=20190920113329.16787-3-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=juterry@microsoft.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.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.