047483513a
xen-4.6.0-testing-src.tar.bz2 mini-os.tar.bz2 blktap2-no-uninit.patch stubdom-have-iovec.patch - Renamed xsa149.patch to CVE-2015-7969-xsa149.patch - Dropped patches now contained in tarball or unnecessary xen-4.5.2-testing-src.tar.bz2 54c2553c-grant-table-use-uint16_t-consistently-for-offset-and-length.patch 54ca33bc-grant-table-refactor-grant-copy-to-reduce-duplicate-code.patch 54ca340e-grant-table-defer-releasing-pages-acquired-in-a-grant-copy.patch 54f4985f-libxl-fix-libvirtd-double-free.patch 55103616-vm-assist-prepare-for-discontiguous-used-bit-numbers.patch 551ac326-xentop-add-support-for-qdisk.patch 552d0fd2-x86-hvm-don-t-include-asm-spinlock-h.patch 552d0fe8-x86-mtrr-include-asm-atomic.h.patch 552d293b-x86-vMSI-X-honor-all-mask-requests.patch 552d2966-x86-vMSI-X-add-valid-bits-for-read-acceleration.patch 5537a4d8-libxl-use-DEBUG-log-level-instead-of-INFO.patch 5548e903-domctl-don-t-truncate-XEN_DOMCTL_max_mem-requests.patch 5548e95d-x86-allow-to-suppress-M2P-user-mode-exposure.patch 554c7aee-x86-provide-arch_fetch_and_add.patch 554c7b00-arm-provide-arch_fetch_and_add.patch 554cc211-libxl-add-qxl.patch 55534b0a-x86-provide-add_sized.patch 55534b25-arm-provide-add_sized.patch 5555a4f8-use-ticket-locks-for-spin-locks.patch 5555a5b9-x86-arm-remove-asm-spinlock-h.patch 5555a8ec-introduce-non-contiguous-allocation.patch 556d973f-unmodified-drivers-tolerate-IRQF_DISABLED-being-undefined.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=387
80 lines
2.9 KiB
Diff
80 lines
2.9 KiB
Diff
---
|
|
tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c | 46 ++++++++++++++++
|
|
1 file changed, 46 insertions(+)
|
|
|
|
Index: xen-4.5.0-testing/tools/qemu-xen-traditional-dir-remote/xen-hooks.mak
|
|
===================================================================
|
|
--- xen-4.5.0-testing.orig/tools/qemu-xen-traditional-dir-remote/xen-hooks.mak
|
|
+++ xen-4.5.0-testing/tools/qemu-xen-traditional-dir-remote/xen-hooks.mak
|
|
@@ -1,3 +1,4 @@
|
|
+CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc
|
|
CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc/include
|
|
CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/include
|
|
CPPFLAGS+= -I$(XEN_ROOT)/tools/include
|
|
Index: xen-4.4.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c
|
|
===================================================================
|
|
--- xen-4.4.0-testing.orig/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c
|
|
+++ xen-4.4.0-testing/tools/qemu-xen-traditional-dir-remote/hw/xen_platform.c
|
|
@@ -30,6 +30,8 @@
|
|
#include "qemu-xen.h"
|
|
#include "net.h"
|
|
#include "xen_platform.h"
|
|
+#include "sysemu.h"
|
|
+#include <xc_private.h>
|
|
|
|
#include <assert.h>
|
|
#include <xenguest.h>
|
|
@@ -335,8 +337,52 @@ static void xen_platform_ioport_writeb(v
|
|
}
|
|
}
|
|
|
|
+static uint32_t ioport_base;
|
|
+
|
|
+static void suse_platform_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
|
+{
|
|
+ DECLARE_DOMCTL;
|
|
+ int rc;
|
|
+
|
|
+ if (val == 0)
|
|
+ qemu_invalidate_map_cache();
|
|
+
|
|
+ switch (addr - ioport_base) {
|
|
+ case 0:
|
|
+ /* FIXME Unknown who makes use of this code! */
|
|
+ fprintf(logfile, "Init hypercall page %x, addr %x.\n", val, addr);
|
|
+ domctl.domain = (domid_t)domid;
|
|
+ domctl.u.hypercall_init.gmfn = val;
|
|
+ domctl.cmd = XEN_DOMCTL_hypercall_init;
|
|
+ rc = xc_domctl(xc_handle, &domctl);
|
|
+ fprintf(logfile, "result -> %d.\n", rc);
|
|
+ break;
|
|
+ case 4:
|
|
+ /* xen-kmp used this since xen-3.0.4, instead the official protocol from xen-3.3+
|
|
+ * pre vmdp 1.7 made use of 4 and 8 depending on how vmdp was configured.
|
|
+ * If vmdp was to control both disk and LAN it would use 4.
|
|
+ * If it controlled just disk or just LAN, it would use 8 below. */
|
|
+ fprintf(logfile, "Disconnect IDE hard disk...\n");
|
|
+ ide_unplug_harddisks();
|
|
+ fprintf(logfile, "Disconnect netifs...\n");
|
|
+ pci_unplug_netifs();
|
|
+ fprintf(logfile, "Shutdown taps...\n");
|
|
+ net_tap_shutdown_all();
|
|
+ fprintf(logfile, "Done.\n");
|
|
+ break;
|
|
+ default:
|
|
+ fprintf(logfile, "Write %x to bad port %x (base %x) on evtchn device.\n",
|
|
+ val, addr, ioport_base);
|
|
+ break;
|
|
+ }
|
|
+}
|
|
+
|
|
static void platform_ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type)
|
|
{
|
|
+ ioport_base = addr;
|
|
+
|
|
+ register_ioport_write(addr, 16, 4, suse_platform_ioport_write, NULL);
|
|
+
|
|
PCIXenPlatformState *d = (PCIXenPlatformState *)pci_dev;
|
|
register_ioport_write(addr, size, 1, xen_platform_ioport_writeb, d);
|
|
register_ioport_read(addr, size, 1, xen_platform_ioport_readb, d);
|