@@ -12,5 +12,6 @@ obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o
obj-y += kvm/
obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
+obj-y += pc-testdev.o
obj-y := $(addprefix ../,$(obj-y))
@@ -35,7 +35,10 @@
* git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
*/
+#ifndef _WIN32
#include <sys/mman.h>
+#endif
+
#include "hw.h"
#include "qdev.h"
#include "isa.h"
@@ -77,10 +80,12 @@ static void test_device_flush_page(void *opaque, uint32_t addr, uint32_t data)
hwaddr len = 4096;
void *a = cpu_physical_memory_map(data & ~0xffful, &len, 0);
+#ifndef _WIN32
/* We might not be able to get the full page, only mprotect what we actually
have mapped */
mprotect(a, len, PROT_NONE);
mprotect(a, len, PROT_READ|PROT_WRITE);
+#endif
cpu_physical_memory_unmap(a, len, 0, 0);
}