[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/16] iothread: fix breakage on windows
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 14/16] iothread: fix breakage on windows |
Date: |
Mon, 26 Mar 2018 15:36:41 +0200 |
From: Peter Xu <address@hidden>
OOB can enable iothread for parsing even on Windows. We need some tunes
to enable that on Windows otherwise it'll break Windows users. This
patch fixes the breakage on Windows with qemu-system-ppc.exe.
Reported-by: Howard Spoelstra <address@hidden>
Tested-by: Howard Spoelstra <address@hidden>
Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
iothread.c | 4 ++++
util/aio-win32.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/iothread.c b/iothread.c
index 1b3463c..e675c38 100644
--- a/iothread.c
+++ b/iothread.c
@@ -31,11 +31,15 @@ typedef ObjectClass IOThreadClass;
#define IOTHREAD_CLASS(klass) \
OBJECT_CLASS_CHECK(IOThreadClass, klass, TYPE_IOTHREAD)
+#ifdef CONFIG_POSIX
/* Benchmark results from 2016 on NVMe SSD drives show max polling times around
* 16-32 microseconds yield IOPS improvements for both iodepth=1 and iodepth=32
* workloads.
*/
#define IOTHREAD_POLL_MAX_NS_DEFAULT 32768ULL
+#else
+#define IOTHREAD_POLL_MAX_NS_DEFAULT 0ULL
+#endif
static __thread IOThread *my_iothread;
diff --git a/util/aio-win32.c b/util/aio-win32.c
index d6d5e02..a67b00c 100644
--- a/util/aio-win32.c
+++ b/util/aio-win32.c
@@ -410,5 +410,7 @@ void aio_context_setup(AioContext *ctx)
void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
int64_t grow, int64_t shrink, Error **errp)
{
- error_setg(errp, "AioContext polling is not implemented on Windows");
+ if (max_ns) {
+ error_setg(errp, "AioContext polling is not implemented on Windows");
+ }
}
--
1.8.3.1
- [Qemu-devel] [PULL 01/16] scripts/get_maintainer.pl: Print proper error message for missing $file, (continued)
- [Qemu-devel] [PULL 01/16] scripts/get_maintainer.pl: Print proper error message for missing $file, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 07/16] hw/audio: Fix crashes when devices are used on ISA bus without DMA, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 06/16] fdc: Exit if ISA controller does not support DMA, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 08/16] scripts/device-crash-test: Remove fixed isapc-with-iommu entry, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 09/16] vhost-user-test: do not hang if chardev creation failed, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 11/16] tcg: Really fix cpu_io_recompile, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 12/16] chardev-socket: remove useless if, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 13/16] scsi: turn "is this a SCSI device?" into a conditional hint, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 14/16] iothread: fix breakage on windows,
Paolo Bonzini <=
- [Qemu-devel] [PULL 15/16] chardev/char-fe: Allow NULL chardev in qemu_chr_fe_init(), Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 10/16] vhost-user-test: add back memfd check, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 16/16] qemu-pr-helper: Actually allow users to specify pidfile, Paolo Bonzini, 2018/03/26
- Re: [Qemu-devel] [PULL 00/16] Misc fixes for QEMU 2.12.0-rc1, Peter Maydell, 2018/03/27