qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

iothread: fix breakage on windows

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 <hsp.cat7@gmail.com>
Tested-by: Howard Spoelstra <hsp.cat7@gmail.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180322085630.23654-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Peter Xu and committed by
Paolo Bonzini
90c558be 09c2c6ff

+7 -1
+4
iothread.c
··· 31 31 #define IOTHREAD_CLASS(klass) \ 32 32 OBJECT_CLASS_CHECK(IOThreadClass, klass, TYPE_IOTHREAD) 33 33 34 + #ifdef CONFIG_POSIX 34 35 /* Benchmark results from 2016 on NVMe SSD drives show max polling times around 35 36 * 16-32 microseconds yield IOPS improvements for both iodepth=1 and iodepth=32 36 37 * workloads. 37 38 */ 38 39 #define IOTHREAD_POLL_MAX_NS_DEFAULT 32768ULL 40 + #else 41 + #define IOTHREAD_POLL_MAX_NS_DEFAULT 0ULL 42 + #endif 39 43 40 44 static __thread IOThread *my_iothread; 41 45
+3 -1
util/aio-win32.c
··· 410 410 void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, 411 411 int64_t grow, int64_t shrink, Error **errp) 412 412 { 413 - error_setg(errp, "AioContext polling is not implemented on Windows"); 413 + if (max_ns) { 414 + error_setg(errp, "AioContext polling is not implemented on Windows"); 415 + } 414 416 }