* [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets [not found] <20190503002258.9799-1-driver1998@foxmail.com> @ 2019-05-03 0:23 ` Cao Jiaxi 2019-05-03 0:23 ` Cao Jiaxi 2019-05-03 0:25 ` [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion Cao Jiaxi ` (2 subsequent siblings) 3 siblings, 1 reply; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:23 UTC (permalink / raw) To: mdroth; +Cc: qemu-devel, Cao Jiaxi gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- 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(-) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 414ceb0a2f..78b33306e8 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib/libvhost-user/libvhost-user.h @@ -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)) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 296b2fd572..09fc44cca4 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -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)) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index e485cdccae..c6bbc05ba3 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -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) diff --git a/slirp/src/util.h b/slirp/src/util.h index 01f1e0e068..278828fe3f 100644 --- a/slirp/src/util.h +++ b/slirp/src/util.h @@ -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)) -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 0:23 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi @ 2019-05-03 0:23 ` Cao Jiaxi 0 siblings, 0 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:23 UTC (permalink / raw) To: mdroth; +Cc: Cao Jiaxi, qemu-devel gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- 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(-) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 414ceb0a2f..78b33306e8 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib/libvhost-user/libvhost-user.h @@ -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)) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 296b2fd572..09fc44cca4 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -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)) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index e485cdccae..c6bbc05ba3 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -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) diff --git a/slirp/src/util.h b/slirp/src/util.h index 01f1e0e068..278828fe3f 100644 --- a/slirp/src/util.h +++ b/slirp/src/util.h @@ -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)) -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion [not found] <20190503002258.9799-1-driver1998@foxmail.com> 2019-05-03 0:23 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi @ 2019-05-03 0:25 ` Cao Jiaxi 2019-05-03 0:25 ` Cao Jiaxi 2019-05-03 9:03 ` Philippe Mathieu-Daudé 2019-05-03 0:29 ` [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Cao Jiaxi 2019-05-03 0:31 ` [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats Cao Jiaxi 3 siblings, 2 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:25 UTC (permalink / raw) To: mdroth; +Cc: qemu-devel, Cao Jiaxi The win2qemu[] is supposed to be the conversion table to convert between STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. But it was incorrectly written that it forces to set a GuestDiskBusType value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- qga/commands-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index d40d61f605..6b67f16faf 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -457,7 +457,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) #ifdef CONFIG_QGA_NTDDSCSI -static STORAGE_BUS_TYPE win2qemu[] = { +static GuestDiskBusType win2qemu[] = { [BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN, [BusTypeScsi] = GUEST_DISK_BUS_TYPE_SCSI, [BusTypeAtapi] = GUEST_DISK_BUS_TYPE_IDE, -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion 2019-05-03 0:25 ` [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion Cao Jiaxi @ 2019-05-03 0:25 ` Cao Jiaxi 2019-05-03 9:03 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:25 UTC (permalink / raw) To: mdroth; +Cc: Cao Jiaxi, qemu-devel The win2qemu[] is supposed to be the conversion table to convert between STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. But it was incorrectly written that it forces to set a GuestDiskBusType value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- qga/commands-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index d40d61f605..6b67f16faf 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -457,7 +457,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) #ifdef CONFIG_QGA_NTDDSCSI -static STORAGE_BUS_TYPE win2qemu[] = { +static GuestDiskBusType win2qemu[] = { [BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN, [BusTypeScsi] = GUEST_DISK_BUS_TYPE_SCSI, [BusTypeAtapi] = GUEST_DISK_BUS_TYPE_IDE, -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion 2019-05-03 0:25 ` [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion Cao Jiaxi 2019-05-03 0:25 ` Cao Jiaxi @ 2019-05-03 9:03 ` Philippe Mathieu-Daudé 2019-05-03 9:03 ` Philippe Mathieu-Daudé 1 sibling, 1 reply; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 9:03 UTC (permalink / raw) To: Cao Jiaxi, mdroth; +Cc: qemu-devel On 5/3/19 2:25 AM, Cao Jiaxi wrote: > The win2qemu[] is supposed to be the conversion table to convert between > STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. > > But it was incorrectly written that it forces to set a GuestDiskBusType > value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang. > Suggested-by: Eric Blake <eblake@redhat.com> > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > qga/commands-win32.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/commands-win32.c b/qga/commands-win32.c > index d40d61f605..6b67f16faf 100644 > --- a/qga/commands-win32.c > +++ b/qga/commands-win32.c > @@ -457,7 +457,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) > > #ifdef CONFIG_QGA_NTDDSCSI > > -static STORAGE_BUS_TYPE win2qemu[] = { > +static GuestDiskBusType win2qemu[] = { > [BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN, > [BusTypeScsi] = GUEST_DISK_BUS_TYPE_SCSI, > [BusTypeAtapi] = GUEST_DISK_BUS_TYPE_IDE, > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion 2019-05-03 9:03 ` Philippe Mathieu-Daudé @ 2019-05-03 9:03 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 9:03 UTC (permalink / raw) To: Cao Jiaxi, mdroth; +Cc: qemu-devel On 5/3/19 2:25 AM, Cao Jiaxi wrote: > The win2qemu[] is supposed to be the conversion table to convert between > STORAGE_BUS_TYPE in Windows SDK and GuestDiskBusType in qga. > > But it was incorrectly written that it forces to set a GuestDiskBusType > value to STORAGE_BUS_TYPE, which generates an enum conversion warning in clang. > Suggested-by: Eric Blake <eblake@redhat.com> > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > qga/commands-win32.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/commands-win32.c b/qga/commands-win32.c > index d40d61f605..6b67f16faf 100644 > --- a/qga/commands-win32.c > +++ b/qga/commands-win32.c > @@ -457,7 +457,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) > > #ifdef CONFIG_QGA_NTDDSCSI > > -static STORAGE_BUS_TYPE win2qemu[] = { > +static GuestDiskBusType win2qemu[] = { > [BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN, > [BusTypeScsi] = GUEST_DISK_BUS_TYPE_SCSI, > [BusTypeAtapi] = GUEST_DISK_BUS_TYPE_IDE, > ^ permalink raw reply [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 [not found] <20190503002258.9799-1-driver1998@foxmail.com> 2019-05-03 0:23 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi 2019-05-03 0:25 ` [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion Cao Jiaxi @ 2019-05-03 0:29 ` Cao Jiaxi 2019-05-03 0:29 ` Cao Jiaxi 2019-05-03 9:06 ` Philippe Mathieu-Daudé 2019-05-03 0:31 ` [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats Cao Jiaxi 3 siblings, 2 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:29 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi Windows ARM64 uses LLP64 model, which breaks current assumptions. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index 3cd080b83d..eebe1ce9c5 100644 --- a/util/cacheinfo.c +++ b/util/cacheinfo.c @@ -107,7 +107,7 @@ static void sys_cache_info(int *isize, int *dsize) static void arch_cache_info(int *isize, int *dsize) { if (*isize == 0 || *dsize == 0) { - unsigned long ctr; + uint64_t ctr; /* The real cache geometry is in CCSIDR_EL1/CLIDR_EL1/CSSELR_EL1, but (at least under Linux) these are marked protected by the -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 2019-05-03 0:29 ` [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Cao Jiaxi @ 2019-05-03 0:29 ` Cao Jiaxi 2019-05-03 9:06 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:29 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi Windows ARM64 uses LLP64 model, which breaks current assumptions. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- util/cacheinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cacheinfo.c b/util/cacheinfo.c index 3cd080b83d..eebe1ce9c5 100644 --- a/util/cacheinfo.c +++ b/util/cacheinfo.c @@ -107,7 +107,7 @@ static void sys_cache_info(int *isize, int *dsize) static void arch_cache_info(int *isize, int *dsize) { if (*isize == 0 || *dsize == 0) { - unsigned long ctr; + uint64_t ctr; /* The real cache geometry is in CCSIDR_EL1/CLIDR_EL1/CSSELR_EL1, but (at least under Linux) these are marked protected by the -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 2019-05-03 0:29 ` [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Cao Jiaxi 2019-05-03 0:29 ` Cao Jiaxi @ 2019-05-03 9:06 ` Philippe Mathieu-Daudé 2019-05-03 9:06 ` Philippe Mathieu-Daudé 1 sibling, 1 reply; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 9:06 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel On 5/3/19 2:29 AM, Cao Jiaxi wrote: > Windows ARM64 uses LLP64 model, which breaks current assumptions. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > util/cacheinfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/cacheinfo.c b/util/cacheinfo.c > index 3cd080b83d..eebe1ce9c5 100644 > --- a/util/cacheinfo.c > +++ b/util/cacheinfo.c > @@ -107,7 +107,7 @@ static void sys_cache_info(int *isize, int *dsize) > static void arch_cache_info(int *isize, int *dsize) > { > if (*isize == 0 || *dsize == 0) { > - unsigned long ctr; > + uint64_t ctr; > > /* The real cache geometry is in CCSIDR_EL1/CLIDR_EL1/CSSELR_EL1, > but (at least under Linux) these are marked protected by the > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 2019-05-03 9:06 ` Philippe Mathieu-Daudé @ 2019-05-03 9:06 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 9:06 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel On 5/3/19 2:29 AM, Cao Jiaxi wrote: > Windows ARM64 uses LLP64 model, which breaks current assumptions. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > util/cacheinfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/cacheinfo.c b/util/cacheinfo.c > index 3cd080b83d..eebe1ce9c5 100644 > --- a/util/cacheinfo.c > +++ b/util/cacheinfo.c > @@ -107,7 +107,7 @@ static void sys_cache_info(int *isize, int *dsize) > static void arch_cache_info(int *isize, int *dsize) > { > if (*isize == 0 || *dsize == 0) { > - unsigned long ctr; > + uint64_t ctr; > > /* The real cache geometry is in CCSIDR_EL1/CLIDR_EL1/CSSELR_EL1, > but (at least under Linux) these are marked protected by the > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats [not found] <20190503002258.9799-1-driver1998@foxmail.com> ` (2 preceding siblings ...) 2019-05-03 0:29 ` [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Cao Jiaxi @ 2019-05-03 0:31 ` Cao Jiaxi 2019-05-03 0:31 ` Cao Jiaxi 2019-05-03 10:13 ` Philippe Mathieu-Daudé 3 siblings, 2 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:31 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi I encountered the following compilation error on mingw: /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] #define __USE_MINGW_ANSI_STDIO 1 ^ /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous definition is here #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ It turns out that __USE_MINGW_ANSI_STDIO must be set before any system headers are included, not just before stdio.h. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- include/qemu/osdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 303d315c5d..af2b91f0b8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -85,17 +85,17 @@ extern int daemon(int, int); #endif #endif +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ +#ifdef __MINGW32__ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #include <stdarg.h> #include <stddef.h> #include <stdbool.h> #include <stdint.h> #include <sys/types.h> #include <stdlib.h> - -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ -#ifdef __MINGW32__ -#define __USE_MINGW_ANSI_STDIO 1 -#endif #include <stdio.h> #include <string.h> -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats 2019-05-03 0:31 ` [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats Cao Jiaxi @ 2019-05-03 0:31 ` Cao Jiaxi 2019-05-03 10:13 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:31 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi I encountered the following compilation error on mingw: /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] #define __USE_MINGW_ANSI_STDIO 1 ^ /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous definition is here #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ It turns out that __USE_MINGW_ANSI_STDIO must be set before any system headers are included, not just before stdio.h. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- include/qemu/osdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 303d315c5d..af2b91f0b8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -85,17 +85,17 @@ extern int daemon(int, int); #endif #endif +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ +#ifdef __MINGW32__ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #include <stdarg.h> #include <stddef.h> #include <stdbool.h> #include <stdint.h> #include <sys/types.h> #include <stdlib.h> - -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ -#ifdef __MINGW32__ -#define __USE_MINGW_ANSI_STDIO 1 -#endif #include <stdio.h> #include <string.h> -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats 2019-05-03 0:31 ` [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats Cao Jiaxi 2019-05-03 0:31 ` Cao Jiaxi @ 2019-05-03 10:13 ` Philippe Mathieu-Daudé 2019-05-03 10:13 ` Philippe Mathieu-Daudé 1 sibling, 1 reply; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 10:13 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel On 5/3/19 2:31 AM, Cao Jiaxi wrote: > I encountered the following compilation error on mingw: > > /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] > #define __USE_MINGW_ANSI_STDIO 1 > ^ > /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous definition is here > #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ > > It turns out that __USE_MINGW_ANSI_STDIO must be set before any > system headers are included, not just before stdio.h. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > include/qemu/osdep.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > index 303d315c5d..af2b91f0b8 100644 > --- a/include/qemu/osdep.h > +++ b/include/qemu/osdep.h > @@ -85,17 +85,17 @@ extern int daemon(int, int); > #endif > #endif > > +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ > +#ifdef __MINGW32__ > +#define __USE_MINGW_ANSI_STDIO 1 > +#endif > + > #include <stdarg.h> > #include <stddef.h> > #include <stdbool.h> > #include <stdint.h> > #include <sys/types.h> > #include <stdlib.h> > - > -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ > -#ifdef __MINGW32__ > -#define __USE_MINGW_ANSI_STDIO 1 > -#endif > #include <stdio.h> > > #include <string.h> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats 2019-05-03 10:13 ` Philippe Mathieu-Daudé @ 2019-05-03 10:13 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 10:13 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel On 5/3/19 2:31 AM, Cao Jiaxi wrote: > I encountered the following compilation error on mingw: > > /mnt/d/qemu/include/qemu/osdep.h:97:9: error: '__USE_MINGW_ANSI_STDIO' macro redefined [-Werror,-Wmacro-redefined] > #define __USE_MINGW_ANSI_STDIO 1 > ^ > /mnt/d/llvm-mingw/aarch64-w64-mingw32/include/_mingw.h:433:9: note: previous definition is here > #define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */ > > It turns out that __USE_MINGW_ANSI_STDIO must be set before any > system headers are included, not just before stdio.h. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > include/qemu/osdep.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > index 303d315c5d..af2b91f0b8 100644 > --- a/include/qemu/osdep.h > +++ b/include/qemu/osdep.h > @@ -85,17 +85,17 @@ extern int daemon(int, int); > #endif > #endif > > +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ > +#ifdef __MINGW32__ > +#define __USE_MINGW_ANSI_STDIO 1 > +#endif > + > #include <stdarg.h> > #include <stddef.h> > #include <stdbool.h> > #include <stdint.h> > #include <sys/types.h> > #include <stdlib.h> > - > -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ > -#ifdef __MINGW32__ > -#define __USE_MINGW_ANSI_STDIO 1 > -#endif > #include <stdio.h> > > #include <string.h> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 0/4] Initial Windows on ARM (AArch64 64-Bit) host support @ 2019-05-03 0:22 Cao Jiaxi 2019-05-03 0:36 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi 0 siblings, 1 reply; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:22 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi 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. Cao Jiaxi (4): QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets qga: Fix mingw compilation warnings on enum conversion util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 osdep: Fix mingw compilation regarding stdio formats contrib/libvhost-user/libvhost-user.h | 2 +- include/qemu/compiler.h | 2 +- include/qemu/osdep.h | 10 +++++----- qga/commands-win32.c | 2 +- scripts/cocci-macro-file.h | 7 ++++++- slirp/src/util.h | 2 +- util/cacheinfo.c | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 0:22 [Qemu-devel] [PATCH v3 0/4] Initial Windows on ARM (AArch64 64-Bit) host support Cao Jiaxi @ 2019-05-03 0:36 ` Cao Jiaxi 2019-05-03 0:36 ` Cao Jiaxi 2019-05-03 5:06 ` Thomas Huth 0 siblings, 2 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:36 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- 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(-) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 414ceb0a2f..78b33306e8 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib/libvhost-user/libvhost-user.h @@ -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)) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 296b2fd572..09fc44cca4 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -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)) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index e485cdccae..c6bbc05ba3 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -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) diff --git a/slirp/src/util.h b/slirp/src/util.h index 01f1e0e068..278828fe3f 100644 --- a/slirp/src/util.h +++ b/slirp/src/util.h @@ -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)) -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 0:36 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi @ 2019-05-03 0:36 ` Cao Jiaxi 2019-05-03 5:06 ` Thomas Huth 1 sibling, 0 replies; 24+ messages in thread From: Cao Jiaxi @ 2019-05-03 0:36 UTC (permalink / raw) To: qemu-devel; +Cc: Cao Jiaxi gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> --- 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(-) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 414ceb0a2f..78b33306e8 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib/libvhost-user/libvhost-user.h @@ -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)) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 296b2fd572..09fc44cca4 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -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)) diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index e485cdccae..c6bbc05ba3 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -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) diff --git a/slirp/src/util.h b/slirp/src/util.h index 01f1e0e068..278828fe3f 100644 --- a/slirp/src/util.h +++ b/slirp/src/util.h @@ -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)) -- 2.17.1 ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 0:36 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi 2019-05-03 0:36 ` Cao Jiaxi @ 2019-05-03 5:06 ` Thomas Huth 2019-05-03 5:06 ` Thomas Huth 2019-05-03 15:23 ` Peter Maydell 1 sibling, 2 replies; 24+ messages in thread From: Thomas Huth @ 2019-05-03 5:06 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel Cc: QEMU Trivial, Stefan Weil, Samuel Thibault, Marc-André Lureau On 03/05/2019 02.36, Cao Jiaxi wrote: > gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > 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(-) > > diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h > index 414ceb0a2f..78b33306e8 100644 > --- a/contrib/libvhost-user/libvhost-user.h > +++ b/contrib/libvhost-user/libvhost-user.h > @@ -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)) > diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h > index 296b2fd572..09fc44cca4 100644 > --- a/include/qemu/compiler.h > +++ b/include/qemu/compiler.h > @@ -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)) > diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h > index e485cdccae..c6bbc05ba3 100644 > --- a/scripts/cocci-macro-file.h > +++ b/scripts/cocci-macro-file.h > @@ -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) > diff --git a/slirp/src/util.h b/slirp/src/util.h > index 01f1e0e068..278828fe3f 100644 > --- a/slirp/src/util.h > +++ b/slirp/src/util.h > @@ -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)) > The slirp code is currently on its way into a separate module, so you might need to provide that hunk to the libslirp folks again... I'm putting the slirp maintainers on CC:, maybe they can pick it up from here. Anyway: Reviewed-by: Thomas Huth <thuth@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 5:06 ` Thomas Huth @ 2019-05-03 5:06 ` Thomas Huth 2019-05-03 15:23 ` Peter Maydell 1 sibling, 0 replies; 24+ messages in thread From: Thomas Huth @ 2019-05-03 5:06 UTC (permalink / raw) To: Cao Jiaxi, qemu-devel Cc: QEMU Trivial, Stefan Weil, Marc-André Lureau, Samuel Thibault On 03/05/2019 02.36, Cao Jiaxi wrote: > gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > --- > 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(-) > > diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h > index 414ceb0a2f..78b33306e8 100644 > --- a/contrib/libvhost-user/libvhost-user.h > +++ b/contrib/libvhost-user/libvhost-user.h > @@ -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)) > diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h > index 296b2fd572..09fc44cca4 100644 > --- a/include/qemu/compiler.h > +++ b/include/qemu/compiler.h > @@ -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)) > diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h > index e485cdccae..c6bbc05ba3 100644 > --- a/scripts/cocci-macro-file.h > +++ b/scripts/cocci-macro-file.h > @@ -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) > diff --git a/slirp/src/util.h b/slirp/src/util.h > index 01f1e0e068..278828fe3f 100644 > --- a/slirp/src/util.h > +++ b/slirp/src/util.h > @@ -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)) > The slirp code is currently on its way into a separate module, so you might need to provide that hunk to the libslirp folks again... I'm putting the slirp maintainers on CC:, maybe they can pick it up from here. Anyway: Reviewed-by: Thomas Huth <thuth@redhat.com> ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 5:06 ` Thomas Huth 2019-05-03 5:06 ` Thomas Huth @ 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:56 ` Marc-André Lureau 1 sibling, 2 replies; 24+ messages in thread From: Peter Maydell @ 2019-05-03 15:23 UTC (permalink / raw) To: Thomas Huth Cc: Cao Jiaxi, QEMU Developers, QEMU Trivial, Stefan Weil, Marc-André Lureau, Samuel Thibault On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: > > On 03/05/2019 02.36, Cao Jiaxi wrote: > > gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. > > > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > > --- > > 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(-) > > diff --git a/slirp/src/util.h b/slirp/src/util.h > > index 01f1e0e068..278828fe3f 100644 > > --- a/slirp/src/util.h > > +++ b/slirp/src/util.h > > @@ -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)) > > > > The slirp code is currently on its way into a separate module, so you > might need to provide that hunk to the libslirp folks again... I'm > putting the slirp maintainers on CC:, maybe they can pick it up from here. Yes, the slirp module has now landed in master, so this patch definitely needs to be split into two. I've kept in my target-arm.next tree the parts which are applicable to the QEMU repo itself (ie everything except the slirp/ change), so we just need a new patch for the slirp submodule part. Marc-André, Samuel -- what's the process for submitting and getting reviewed changes to the slirp submodule now it's a separate project ? thanks -- PMM ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 15:23 ` Peter Maydell @ 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:56 ` Marc-André Lureau 1 sibling, 0 replies; 24+ messages in thread From: Peter Maydell @ 2019-05-03 15:23 UTC (permalink / raw) To: Thomas Huth Cc: QEMU Trivial, Stefan Weil, QEMU Developers, Cao Jiaxi, Marc-André Lureau, Samuel Thibault On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: > > On 03/05/2019 02.36, Cao Jiaxi wrote: > > gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. > > > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > > --- > > 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(-) > > diff --git a/slirp/src/util.h b/slirp/src/util.h > > index 01f1e0e068..278828fe3f 100644 > > --- a/slirp/src/util.h > > +++ b/slirp/src/util.h > > @@ -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)) > > > > The slirp code is currently on its way into a separate module, so you > might need to provide that hunk to the libslirp folks again... I'm > putting the slirp maintainers on CC:, maybe they can pick it up from here. Yes, the slirp module has now landed in master, so this patch definitely needs to be split into two. I've kept in my target-arm.next tree the parts which are applicable to the QEMU repo itself (ie everything except the slirp/ change), so we just need a new patch for the slirp submodule part. Marc-André, Samuel -- what's the process for submitting and getting reviewed changes to the slirp submodule now it's a separate project ? thanks -- PMM ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:23 ` Peter Maydell @ 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 16:23 ` Philippe Mathieu-Daudé 1 sibling, 2 replies; 24+ messages in thread From: Marc-André Lureau @ 2019-05-03 15:56 UTC (permalink / raw) To: Peter Maydell Cc: Thomas Huth, qemu trival, Stefan Weil, QEMU Developers, Cao Jiaxi, Samuel Thibault Hi Le ven. 3 mai 2019 à 17:23, Peter Maydell <peter.maydell@linaro.org> a écrit : > On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: > > > > On 03/05/2019 02.36, Cao Jiaxi wrote: > > > gcc_struct is for x86 only, and it generates an warning on ARM64 > Clang/MinGW targets. > > > > > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > > > --- > > > 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(-) > > > > diff --git a/slirp/src/util.h b/slirp/src/util.h > > > index 01f1e0e068..278828fe3f 100644 > > > --- a/slirp/src/util.h > > > +++ b/slirp/src/util.h > > > @@ -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)) > > > > > > > The slirp code is currently on its way into a separate module, so you > > might need to provide that hunk to the libslirp folks again... I'm > > putting the slirp maintainers on CC:, maybe they can pick it up from > here. > > Yes, the slirp module has now landed in master, so this patch > definitely needs to be split into two. I've kept in my > target-arm.next tree the parts which are applicable to > the QEMU repo itself (ie everything except the slirp/ change), > so we just need a new patch for the slirp submodule part. > > Marc-André, Samuel -- what's the process for submitting and > getting reviewed changes to the slirp submodule now it's a > separate project ? > It's hosted on gitlab.freedesktop.org, with some CI. It's fine to send patches on qemu devel, as long as Samuel or I are in CC. But in the long term, I think gitlab MR will be favoured (after a while using it, I think gitlab is better than ML for patches & bug tracking tbh) > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 15:56 ` Marc-André Lureau @ 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 16:23 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 24+ messages in thread From: Marc-André Lureau @ 2019-05-03 15:56 UTC (permalink / raw) To: Peter Maydell Cc: Thomas Huth, qemu trival, Stefan Weil, QEMU Developers, Cao Jiaxi, Samuel Thibault Hi Le ven. 3 mai 2019 à 17:23, Peter Maydell <peter.maydell@linaro.org> a écrit : > On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: > > > > On 03/05/2019 02.36, Cao Jiaxi wrote: > > > gcc_struct is for x86 only, and it generates an warning on ARM64 > Clang/MinGW targets. > > > > > > Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> > > > --- > > > 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(-) > > > > diff --git a/slirp/src/util.h b/slirp/src/util.h > > > index 01f1e0e068..278828fe3f 100644 > > > --- a/slirp/src/util.h > > > +++ b/slirp/src/util.h > > > @@ -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)) > > > > > > > The slirp code is currently on its way into a separate module, so you > > might need to provide that hunk to the libslirp folks again... I'm > > putting the slirp maintainers on CC:, maybe they can pick it up from > here. > > Yes, the slirp module has now landed in master, so this patch > definitely needs to be split into two. I've kept in my > target-arm.next tree the parts which are applicable to > the QEMU repo itself (ie everything except the slirp/ change), > so we just need a new patch for the slirp submodule part. > > Marc-André, Samuel -- what's the process for submitting and > getting reviewed changes to the slirp submodule now it's a > separate project ? > It's hosted on gitlab.freedesktop.org, with some CI. It's fine to send patches on qemu devel, as long as Samuel or I are in CC. But in the long term, I think gitlab MR will be favoured (after a while using it, I think gitlab is better than ML for patches & bug tracking tbh) > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 15:56 ` Marc-André Lureau @ 2019-05-03 16:23 ` Philippe Mathieu-Daudé 2019-05-03 16:23 ` Philippe Mathieu-Daudé 1 sibling, 1 reply; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 16:23 UTC (permalink / raw) To: Marc-André Lureau, Peter Maydell Cc: Thomas Huth, qemu trival, Stefan Weil, QEMU Developers, Cao Jiaxi, Samuel Thibault On 5/3/19 5:56 PM, Marc-André Lureau wrote: > Hi > > Le ven. 3 mai 2019 à 17:23, Peter Maydell <peter.maydell@linaro.org> a > écrit : > >> On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: >>> >>> On 03/05/2019 02.36, Cao Jiaxi wrote: >>>> gcc_struct is for x86 only, and it generates an warning on ARM64 >> Clang/MinGW targets. >>>> >>>> Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> >>>> --- >>>> 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(-) >> >>>> diff --git a/slirp/src/util.h b/slirp/src/util.h >>>> index 01f1e0e068..278828fe3f 100644 >>>> --- a/slirp/src/util.h >>>> +++ b/slirp/src/util.h >>>> @@ -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)) >>>> >>> >>> The slirp code is currently on its way into a separate module, so you >>> might need to provide that hunk to the libslirp folks again... I'm >>> putting the slirp maintainers on CC:, maybe they can pick it up from >> here. >> >> Yes, the slirp module has now landed in master, so this patch >> definitely needs to be split into two. I've kept in my >> target-arm.next tree the parts which are applicable to >> the QEMU repo itself (ie everything except the slirp/ change), >> so we just need a new patch for the slirp submodule part. >> >> Marc-André, Samuel -- what's the process for submitting and >> getting reviewed changes to the slirp submodule now it's a >> separate project ? >> > > It's hosted on gitlab.freedesktop.org, with some CI. It's fine to send > patches on qemu devel, as long as Samuel or I are in CC. But in the long > term, I think gitlab MR will be favoured (after a while using it, I think > gitlab is better than ML for patches & bug tracking tbh) Except when working offline (or with poor intermittent link). ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets 2019-05-03 16:23 ` Philippe Mathieu-Daudé @ 2019-05-03 16:23 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 24+ messages in thread From: Philippe Mathieu-Daudé @ 2019-05-03 16:23 UTC (permalink / raw) To: Marc-André Lureau, Peter Maydell Cc: Thomas Huth, qemu trival, Stefan Weil, QEMU Developers, Cao Jiaxi, Samuel Thibault On 5/3/19 5:56 PM, Marc-André Lureau wrote: > Hi > > Le ven. 3 mai 2019 à 17:23, Peter Maydell <peter.maydell@linaro.org> a > écrit : > >> On Fri, 3 May 2019 at 06:07, Thomas Huth <thuth@redhat.com> wrote: >>> >>> On 03/05/2019 02.36, Cao Jiaxi wrote: >>>> gcc_struct is for x86 only, and it generates an warning on ARM64 >> Clang/MinGW targets. >>>> >>>> Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> >>>> --- >>>> 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(-) >> >>>> diff --git a/slirp/src/util.h b/slirp/src/util.h >>>> index 01f1e0e068..278828fe3f 100644 >>>> --- a/slirp/src/util.h >>>> +++ b/slirp/src/util.h >>>> @@ -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)) >>>> >>> >>> The slirp code is currently on its way into a separate module, so you >>> might need to provide that hunk to the libslirp folks again... I'm >>> putting the slirp maintainers on CC:, maybe they can pick it up from >> here. >> >> Yes, the slirp module has now landed in master, so this patch >> definitely needs to be split into two. I've kept in my >> target-arm.next tree the parts which are applicable to >> the QEMU repo itself (ie everything except the slirp/ change), >> so we just need a new patch for the slirp submodule part. >> >> Marc-André, Samuel -- what's the process for submitting and >> getting reviewed changes to the slirp submodule now it's a >> separate project ? >> > > It's hosted on gitlab.freedesktop.org, with some CI. It's fine to send > patches on qemu devel, as long as Samuel or I are in CC. But in the long > term, I think gitlab MR will be favoured (after a while using it, I think > gitlab is better than ML for patches & bug tracking tbh) Except when working offline (or with poor intermittent link). ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2019-05-03 16:30 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20190503002258.9799-1-driver1998@foxmail.com> 2019-05-03 0:23 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi 2019-05-03 0:23 ` Cao Jiaxi 2019-05-03 0:25 ` [Qemu-devel] [PATCH v3 2/4] qga: Fix mingw compilation warnings on enum conversion Cao Jiaxi 2019-05-03 0:25 ` Cao Jiaxi 2019-05-03 9:03 ` Philippe Mathieu-Daudé 2019-05-03 9:03 ` Philippe Mathieu-Daudé 2019-05-03 0:29 ` [Qemu-devel] [PATCH v3 3/4] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Cao Jiaxi 2019-05-03 0:29 ` Cao Jiaxi 2019-05-03 9:06 ` Philippe Mathieu-Daudé 2019-05-03 9:06 ` Philippe Mathieu-Daudé 2019-05-03 0:31 ` [Qemu-devel] [PATCH v3 4/4] osdep: Fix mingw compilation regarding stdio formats Cao Jiaxi 2019-05-03 0:31 ` Cao Jiaxi 2019-05-03 10:13 ` Philippe Mathieu-Daudé 2019-05-03 10:13 ` Philippe Mathieu-Daudé 2019-05-03 0:22 [Qemu-devel] [PATCH v3 0/4] Initial Windows on ARM (AArch64 64-Bit) host support Cao Jiaxi 2019-05-03 0:36 ` [Qemu-devel] [PATCH v3 1/4] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets Cao Jiaxi 2019-05-03 0:36 ` Cao Jiaxi 2019-05-03 5:06 ` Thomas Huth 2019-05-03 5:06 ` Thomas Huth 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:23 ` Peter Maydell 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 15:56 ` Marc-André Lureau 2019-05-03 16:23 ` Philippe Mathieu-Daudé 2019-05-03 16:23 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).