Initial Windows on ARM (AArch64 64-Bit) host support
PATCH v2 1/4 Initial Windows on ARM (AArch64 64-Bit) host support
This series of patches is for initial support of Windows 10 on ARM as a QEMU host.
Currently only TCG intepreter is working correctly, it crashes when TCG JIT is enabled.
For now we assume it is built using the clang aarch64-w64-mingw32 toolchain, you can get a prebuilt toolchain at https://github.com/mstorsjo/llvm-mingw.
QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets
This attribute is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets.
--- contrib/libvhost-user/libvhost-user.h | 2 +- include/qemu/compiler.h | 2 +- scripts/cocci-macro-file.h | 7 ++++++- slirp/src/util.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-)
contrib/libvhost-user/libvhost-user.h +1 -1
@@ -148,7 +148,7 @@ typedef struct VhostUserInflight {uint16_t queue_size; } VhostUserInflight; -#if defined(_WIN32) +#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))# define VU_PACKED __attribute__((gcc_struct, packed))#else # define VU_PACKED __attribute__((packed))
include/qemu/compiler.h +1 -1
@@ -28,7 +28,7 @@#define QEMU_SENTINEL __attribute__((sentinel)) -#if defined(_WIN32) +#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))# define QEMU_PACKED __attribute__((gcc_struct, packed))#else # define QEMU_PACKED __attribute__((packed))
scripts/cocci-macro-file.h +6 -1
@@ -23,7 +23,12 @@#define QEMU_NORETURN __attribute__ ((__noreturn__))#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))#define QEMU_SENTINEL __attribute__((sentinel)) -#define QEMU_PACKED __attribute__((gcc_struct, packed)) + +#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) +# define QEMU_PACKED __attribute__((gcc_struct, packed)) +#else +# define QEMU_PACKED __attribute__((packed)) +#endif #define cat (x,y) x ## y#define cat2 (x,y) cat(x,y)
slirp/src/util.h +1 -1
@@ -43,7 +43,7 @@#include <netinet/in.h> #endif -#if defined(_WIN32) +#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))# define SLIRP_PACKED __attribute__((gcc_struct, packed))#else # define SLIRP_PACKED __attribute__((packed))
Signature · 1 line
2.17.1
Samuel Thibault
AppliedHello,
Cao Jiaxi, le mer. 01 mai 2019 02:10:09 +0800, a ecrit:
Quoted 6 lines
This series of patches is for initial support of Windows 10 on ARM as a QEMU host.
Currently only TCG intepreter is working correctly, it crashes when TCG JIT is enabled.
For now we assume it is built using the clang aarch64-w64-mingw32 toolchain, you can get a prebuilt toolchain at https://github.com/mstorsjo/llvm-mingw.
QEMU_PACKED: Removegcc_structattribute in Windows non x86 targets
This attribute is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets.
I have applied it to the libslirp repo, thanks!
I'll submit a pull request to get it updated on qemu.
Samuel