summaryrefslogtreecommitdiff
path: root/kernels/xen
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/xen')
-rw-r--r--kernels/xen/09_xen141
-rw-r--r--kernels/xen/IVRS-debug.patch14
-rw-r--r--kernels/xen/TOM-register.patch187
-rw-r--r--kernels/xen/ati-passthrough.patch415
-rw-r--r--kernels/xen/bios_workaround.patch51
-rw-r--r--kernels/xen/conf.d-xenconsoled14
-rw-r--r--kernels/xen/conf.d-xenstored2
-rw-r--r--kernels/xen/grub.conf2
-rw-r--r--kernels/xen/proc-xen.mount9
-rw-r--r--kernels/xen/tmpfiles.d-xen.conf2
-rw-r--r--kernels/xen/var-lib-xenstored.mount10
-rw-r--r--kernels/xen/xen.conf19
-rw-r--r--kernels/xen/xen.install64
-rw-r--r--kernels/xen/xenconsoled.service18
-rw-r--r--kernels/xen/xendomU@.service12
-rw-r--r--kernels/xen/xendomains.patch108
-rw-r--r--kernels/xen/xendomains.service15
-rw-r--r--kernels/xen/xenstored.service20
18 files changed, 0 insertions, 1103 deletions
diff --git a/kernels/xen/09_xen b/kernels/xen/09_xen
deleted file mode 100644
index ddb20696f..000000000
--- a/kernels/xen/09_xen
+++ /dev/null
@@ -1,141 +0,0 @@
-#! /bin/sh -e
-
-if [ -f /usr/share/grub/grub-mkconfig_lib ]; then
- . /usr/share/grub/grub-mkconfig_lib
-else
- # no grub file, so we notify and exit gracefully
- echo "Cannot find grub config file, exiting." >&2
- exit 0
-fi
-
-XEN_HYPERVISOR_CMDLINE="xsave=1"
-XEN_LINUX_CMDLINE="console=tty0"
-[ -r /etc/xen/grub.conf ] && . /etc/xen/grub.conf
-
-CLASS="--class gnu-linux --class gnu --class os"
-
-if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS=GNU/Linux
-else
- if [ "${GRUB_DISTRIBUTOR}" = "Parabola" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
- elif [ "${GRUB_DISTRIBUTOR}" = "parabola" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
- elif [ "${GRUB_DISTRIBUTOR}" = "Blag" ] ; then
- OS="${GRUB_DISTRIBUTOR} Linux and GNU"
- elif [ "${GRUB_DISTRIBUTOR}" = "blag" ] ; then
- OS="${GRUB_DISTRIBUTOR} Linux and GNU"
- elif [ "${GRUB_DISTRIBUTOR}" = "Musix" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU+Linux"
- elif [ "${GRUB_DISTRIBUTOR}" = "musix" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU+Linux"
- elif [ "${GRUB_DISTRIBUTOR}" = "Dragora" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
- elif [ "${GRUB_DISTRIBUTOR}" = "dragora" ] ; then
- OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
- else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
- fi
- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}"
-fi
-
-# loop-AES arranges things so that /dev/loop/X can be our root device, but
-# the initrds that Linux uses don't like that.
-case ${GRUB_DEVICE} in
- /dev/loop/*|/dev/loop[0-9])
- GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
- ;;
-esac
-
-if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
- || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
- || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm" ] ; then
- LINUX_ROOT_DEVICE=${GRUB_DEVICE}
-else
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
-fi
-
-xen_entry ()
-{
- os="$1"
- xen_version="$2"
- version="$3"
- xen_args="$4"
- args="$5"
- printf "menuentry 'Xen %s / %s, with Linux %s' --class xen ${CLASS} {\n" "${xen_version}" "${os}" "${version}"
- save_default_entry | sed -e "s/^/\t/"
-
- if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
- fi
- printf '%s\n' "${prepare_boot_cache}"
- cat << EOF
- echo '$(printf "Loading Xen %s ..." ${xen_version})'
- multiboot ${rel_dirname}/${xen_basename} ${rel_dirname}/${xen_basename} ${xen_args}
- echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
- module ${rel_dirname}/${basename} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} rw ${args}
-EOF
- if test -n "${initrd}" ; then
- cat << EOF
- echo "Loading initial ramdisk ..."
- module ${rel_dirname}/${initrd}
-EOF
- fi
- cat << EOF
-}
-EOF
-}
-
-xen_list=`for i in /boot/xen-*.gz /xen-*.gz ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i "; fi
-done`
-prepare_boot_cache=
-
-while [ "x$xen_list" != "x" ] ; do
- xen=`version_find_latest $xen_list`
- echo "Found Xen hypervisor image: $xen" >&2
- xen_basename=`basename $xen`
- xen_dirname=`dirname $xen`
- rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname`
- xen_version=`echo $xen_basename | sed -e "s,^[^0-9]*-,,g" | sed -e "s,.gz,,g"`
- alt_xen_version=`echo $xen_version | sed -e "s,\.old$,,g"`
-
- list=`for i in /boot/vmlinuz-* /vmlinuz-*; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i "; fi
- done`
-
- while [ "x$list" != "x" ] ; do
- linux=`version_find_latest $list`
- echo -e "\tFound linux image: $linux" >&2
- basename=`basename $linux`
- dirname=`dirname $linux`
- rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
- base_init=`echo $basename | sed -e "s,vmlinuz,initramfs,g"`
- alt_version="${base_init}-fallback"
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
- initrd=
-
- for i in "${base_init}.img"; do
- if test -e "${dirname}/${i}" ; then
- initrd="$i"
- break
- fi
- done
- if test -n "${initrd}" ; then
- echo -e "\tFound initrd image: ${dirname}/${initrd}" >&2
- else
- # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
- linux_root_device_thisversion=${GRUB_DEVICE}
- fi
-
- xen_entry "${OS}" "${xen_version}" "${version}" \
- "${XEN_HYPERVISOR_CMDLINE}" \
- "${XEN_LINUX_CMDLINE}"
-
- list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
- done
-
- xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $xen | tr '\n' ' '`
-done
-
diff --git a/kernels/xen/IVRS-debug.patch b/kernels/xen/IVRS-debug.patch
deleted file mode 100644
index 5f6813cb9..000000000
--- a/kernels/xen/IVRS-debug.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/xen/drivers/passthrough/amd/iommu_acpi.c 2013-07-09 05:46:56.000000000 -0500
-+++ b/xen/drivers/passthrough/amd/iommu_acpi.c 2013-08-31 01:26:18.614846438 -0500
-@@ -651,9 +651,9 @@
- return 0;
- }
-
-- AMD_IOMMU_DEBUG("IVHD Special: %04x:%02x:%02x.%u variety %#x handle %#x\n",
-+ AMD_IOMMU_DEBUG("IVHD Special: %04x:%02x:%02x.%u variety %#x handle %#x used_id %#x\n",
- seg, PCI_BUS(bdf), PCI_SLOT(bdf), PCI_FUNC(bdf),
-- special->variety, special->handle);
-+ special->variety, special->handle, special->used_id);
- add_ivrs_mapping_entry(bdf, bdf, special->header.data_setting, iommu);
-
- switch ( special->variety )
diff --git a/kernels/xen/TOM-register.patch b/kernels/xen/TOM-register.patch
deleted file mode 100644
index 88bedbbc0..000000000
--- a/kernels/xen/TOM-register.patch
+++ /dev/null
@@ -1,187 +0,0 @@
---- xen-4.3.1/tools/qemu-xen/hw/pc.h
-+++ xen-4.3.1-new/tools/qemu-xen/hw/pc.h
-@@ -128,15 +128,14 @@ extern int no_hpet;
- struct PCII440FXState;
- typedef struct PCII440FXState PCII440FXState;
-
-+#define I440FX_TOM 0xe0000000
-+#define I440FX_XEN_TOM 0xf0000000
-+
- PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn,
- ISABus **isa_bus, qemu_irq *pic,
- MemoryRegion *address_space_mem,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
-- hwaddr pci_hole_start,
-- hwaddr pci_hole_size,
-- hwaddr pci_hole64_start,
-- hwaddr pci_hole64_size,
- MemoryRegion *pci_memory,
- MemoryRegion *ram_memory);
-
---- xen-4.3.1/tools/qemu-xen/hw/pc_piix.c
-+++ xen-4.3.1-new/tools/qemu-xen/hw/pc_piix.c
-@@ -92,9 +92,9 @@ static void pc_init1(MemoryRegion *system_memory,
- kvmclock_create();
- }
-
-- if (ram_size >= 0xe0000000 ) {
-- above_4g_mem_size = ram_size - 0xe0000000;
-- below_4g_mem_size = 0xe0000000;
-+ if (ram_size >= I440FX_TOM) {
-+ above_4g_mem_size = ram_size - I440FX_TOM;
-+ below_4g_mem_size = I440FX_TOM;
- } else {
- above_4g_mem_size = 0;
- below_4g_mem_size = ram_size;
-@@ -129,12 +129,6 @@ static void pc_init1(MemoryRegion *system_memory,
- if (pci_enabled) {
- pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
- system_memory, system_io, ram_size,
-- below_4g_mem_size,
-- 0x100000000ULL - below_4g_mem_size,
-- 0x100000000ULL + above_4g_mem_size,
-- (sizeof(hwaddr) == 4
-- ? 0
-- : ((uint64_t)1 << 62)),
- pci_memory, ram_memory);
- } else {
- pci_bus = NULL;
---- xen-4.3.1/tools/qemu-xen/hw/piix_pci.c
-+++ xen-4.3.1-new/tools/qemu-xen/hw/piix_pci.c
-@@ -86,6 +86,14 @@ struct PCII440FXState {
- #define I440FX_PAM_SIZE 7
- #define I440FX_SMRAM 0x72
-
-+/* The maximum vaule of TOM(top of memory) register in I440FX
-+ * is 1G, so it doesn't meet any popular virutal machines, so
-+ * define another register to report the base of PCI memory.
-+ * Use one byte 0xb0 for the upper 8 bit, they are originally
-+ * resevered for host bridge.
-+ * */
-+#define I440FX_PCI_HOLE_BASE 0xb0
-+
- static void piix3_set_irq(void *opaque, int pirq, int level);
- static PCIINTxRoute piix3_route_intx_pin_to_irq(void *opaque, int pci_intx);
- static void piix3_write_config_xen(PCIDevice *dev,
-@@ -101,6 +109,43 @@ static int pci_slot_get_pirq(PCIDevice *pci_dev, int pci_intx)
- return (pci_intx + slot_addend) & 3;
- }
-
-+
-+static void i440fx_update_pci_mem_hole(PCII440FXState *f, bool del)
-+{
-+ ram_addr_t above_4g_mem_size;
-+ hwaddr pci_hole_start, pci_hole_size, pci_hole64_start, pci_hole64_size;
-+
-+ pci_hole_start = pci_default_read_config(&f->dev, I440FX_PCI_HOLE_BASE, 1) << 24;
-+ pci_hole_size = 0x100000000ULL - pci_hole_start;
-+
-+ if (ram_size >= pci_hole_start) {
-+ above_4g_mem_size = ram_size - pci_hole_start;
-+ } else {
-+ above_4g_mem_size = 0;
-+ }
-+ pci_hole64_start = 0x100000000ULL + above_4g_mem_size;
-+ pci_hole64_size = sizeof(hwaddr) == 4 ? 0 : ((uint64_t)1 << 62);
-+
-+ if (del) {
-+ memory_region_del_subregion(f->system_memory, &f->pci_hole);
-+ if (pci_hole64_size) {
-+ memory_region_del_subregion(f->system_memory, &f->pci_hole_64bit);
-+ }
-+ }
-+
-+ memory_region_init_alias(&f->pci_hole, "pci-hole", f->pci_address_space,
-+ pci_hole_start, pci_hole_size);
-+ memory_region_add_subregion(f->system_memory, pci_hole_start, &f->pci_hole);
-+ memory_region_init_alias(&f->pci_hole_64bit, "pci-hole64",
-+ f->pci_address_space,
-+ pci_hole64_start, pci_hole64_size);
-+ if (pci_hole64_size) {
-+ memory_region_add_subregion(f->system_memory, pci_hole64_start,
-+ &f->pci_hole_64bit);
-+ }
-+}
-+
-+
- static void i440fx_update_memory_mappings(PCII440FXState *d)
- {
- int i;
-@@ -136,6 +181,9 @@ static void i440fx_write_config(PCIDevice *dev,
- range_covers_byte(address, len, I440FX_SMRAM)) {
- i440fx_update_memory_mappings(d);
- }
-+ if (range_covers_byte(address, len, I440FX_PCI_HOLE_BASE)) {
-+ i440fx_update_pci_mem_hole(d, true);
-+ }
- }
-
- static int i440fx_load_old(QEMUFile* f, void *opaque, int version_id)
-@@ -203,6 +251,10 @@ static int i440fx_initfn(PCIDevice *dev)
-
- d->dev.config[I440FX_SMRAM] = 0x02;
-
-+ /* Emulate top of memory, here use 0xe0000000 as default val*/
-+ uint32_t addr = xen_enabled() ? I440FX_XEN_TOM : I440FX_TOM;
-+ pci_set_byte(dev->config + I440FX_PCI_HOLE_BASE, (uint8_t)(addr >> 24));
-+
- cpu_smm_register(&i440fx_set_smm, d);
- return 0;
- }
-@@ -214,10 +266,6 @@ static PCIBus *i440fx_common_init(const char *device_name,
- MemoryRegion *address_space_mem,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
-- hwaddr pci_hole_start,
-- hwaddr pci_hole_size,
-- hwaddr pci_hole64_start,
-- hwaddr pci_hole64_size,
- MemoryRegion *pci_address_space,
- MemoryRegion *ram_memory)
- {
-@@ -244,16 +292,6 @@ static PCIBus *i440fx_common_init(const char *device_name,
- f->system_memory = address_space_mem;
- f->pci_address_space = pci_address_space;
- f->ram_memory = ram_memory;
-- memory_region_init_alias(&f->pci_hole, "pci-hole", f->pci_address_space,
-- pci_hole_start, pci_hole_size);
-- memory_region_add_subregion(f->system_memory, pci_hole_start, &f->pci_hole);
-- memory_region_init_alias(&f->pci_hole_64bit, "pci-hole64",
-- f->pci_address_space,
-- pci_hole64_start, pci_hole64_size);
-- if (pci_hole64_size) {
-- memory_region_add_subregion(f->system_memory, pci_hole64_start,
-- &f->pci_hole_64bit);
-- }
- memory_region_init_alias(&f->smram_region, "smram-region",
- f->pci_address_space, 0xa0000, 0x20000);
- memory_region_add_subregion_overlap(f->system_memory, 0xa0000,
-@@ -295,6 +333,7 @@ static PCIBus *i440fx_common_init(const char *device_name,
- (*pi440fx_state)->dev.config[0x57]=ram_size;
-
- i440fx_update_memory_mappings(f);
-+ i440fx_update_pci_mem_hole(f, false);
-
- return b;
- }
-@@ -304,10 +343,6 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn,
- MemoryRegion *address_space_mem,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
-- hwaddr pci_hole_start,
-- hwaddr pci_hole_size,
-- hwaddr pci_hole64_start,
-- hwaddr pci_hole64_size,
- MemoryRegion *pci_memory, MemoryRegion *ram_memory)
-
- {
-@@ -315,8 +350,6 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn,
-
- b = i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, isa_bus, pic,
- address_space_mem, address_space_io, ram_size,
-- pci_hole_start, pci_hole_size,
-- pci_hole64_start, pci_hole64_size,
- pci_memory, ram_memory);
- return b;
- }
diff --git a/kernels/xen/ati-passthrough.patch b/kernels/xen/ati-passthrough.patch
deleted file mode 100644
index 7c20b1ecd..000000000
--- a/kernels/xen/ati-passthrough.patch
+++ /dev/null
@@ -1,415 +0,0 @@
---- xen-4.3.1/tools/qemu-xen-traditional/hw/pass-through.c Thu Sep 6 11:05:30 2012
-+++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pass-through.c Sat Nov 24 08:27:07 2012
-@@ -1438,9 +1438,17 @@ static void pt_ioport_map(PCIDevice *d,
- if (e_phys != -1)
- {
- /* Create new mapping */
-- ret = xc_domain_ioport_mapping(xc_handle, domid, e_phys,
-- assigned_device->bases[i].access.pio_base, e_size,
-- DPCI_ADD_MAPPING);
-+ if ( vga_skip_ioport_map(d) )
-+ {
-+ assigned_device->bases[i].e_physbase = -1;
-+ }
-+ else
-+ {
-+ ret = xc_domain_ioport_mapping(xc_handle, domid, e_phys,
-+ assigned_device->bases[i].access.pio_base, e_size,
-+ DPCI_ADD_MAPPING);
-+ }
-+
- if ( ret != 0 )
- {
- PT_LOG("Error: create new mapping failed!\n");
---- xen-4.3.1/tools/qemu-xen-traditional/hw/pass-through.h Thu Sep 6 11:05:30 2012
-+++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pass-through.h Sat Nov 24 08:27:07 2012
-@@ -419,6 +419,11 @@ int pt_pci_host_write(struct pci_dev *pc
- void intel_pch_init(PCIBus *bus);
- int register_vga_regions(struct pt_dev *real_device);
- int unregister_vga_regions(struct pt_dev *real_device);
-+int vga_skip_ioport_map(PCIDevice *d);
-+int igd_register_vga_regions(struct pt_dev *real_device);
-+int igd_unregister_vga_regions(struct pt_dev *real_device);
-+int ati_register_vga_regions(struct pt_dev *real_device);
-+int ati_unregister_vga_regions(struct pt_dev *real_device);
- int setup_vga_pt(struct pt_dev *real_device);
- PCIBus *intel_pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid,
- uint16_t did, const char *name, uint16_t revision);
---- xen-4.3.1/tools/qemu-xen-traditional/hw/pci.h Thu Sep 6 11:05:30 2012
-+++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pci.h Sat Nov 24 08:27:07 2012
-@@ -54,6 +54,8 @@ extern target_phys_addr_t pci_mem_base;
-
- #define PCI_VENDOR_ID_CIRRUS 0x1013
-
-+#define PCI_VENDOR_ID_ATI 0x1002
-+
- #define PCI_VENDOR_ID_IBM 0x1014
- #define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff
-
---- xen-4.3.1/tools/qemu-xen-traditional/hw/pt-graphics.c Thu Sep 6 11:05:30 2012
-+++ xen-4.3.1-new/tools/qemu-xen-traditional/hw/pt-graphics.c Sat Nov 24 08:28:10 2012
-@@ -13,6 +13,207 @@
-
- extern int gfx_passthru;
- extern int igd_passthru;
-+/*********************************/
-+/* Code for ATI GFX Passthru */
-+/*********************************/
-+/* ATI VBIOS Working Mechanism
-+ *
-+ * Generally there are three memory resources (two MMIO and one PIO)
-+ * associated with modern ATI gfx. VBIOS uses special tricks to figure out
-+ * BARs, instead of using regular PCI config space read.
-+ *
-+ * (1) VBIOS relies on I/O port 0x3C3 to retrieve PIO BAR
-+ * (2) VBIOS maintains a shadow copy of PCI configure space. It retries the
-+ * MMIO BARs from this shadow copy via sending I/O requests to first two
-+ * registers of PIO (MMINDEX and MMDATA). The workflow is like this:
-+ * MMINDEX (register 0) is written with an index value, specifying the
-+ * register VBIOS wanting to access. Then the shadowed data can be
-+ * read/written from MMDATA (register 1). For two MMIO BARs, the index
-+ * values are 0x4010 and 0x4014 respectively.
-+ *
-+ */
-+
-+#define ATI_BAR1_INDEX 0 //MMIO BAR1
-+#define ATI_BAR2_INDEX 1 //MMIO BAR2
-+#define ATI_BAR5_INDEX 4 //PIO BAR == BAR5
-+
-+#define ATI_BAR1_MMINDEX 0x4010 //data written to MMINDEX for MMIO BAR1
-+#define ATI_BAR2_MMINDEX 0x4014 //data written to MMINDEX FOR MMIO BAR2
-+
-+struct ati_gfx_info {
-+ int initialized; /* initialized already? */
-+
-+ /* PIO */
-+ uint32_t host_pio_base; /* host base addr of PIO */
-+ uint32_t guest_pio_base; /* guest base addr of PIO */
-+ uint32_t pio_size; /* PIO size */
-+
-+ /* MMIO */
-+ uint32_t guest_mmio_base1; /* guest base addr of MMIO 1 */
-+ uint32_t guest_mmio_base2; /* guest base addr of MMIO 2 */
-+
-+ /* PIO MMINDEX access recording */
-+ uint32_t pre_mmindex_data; /* previous data written to MMINDEX */
-+};
-+
-+static struct ati_gfx_info gfx_info;
-+
-+/* Convert guest PIO port to host PIO port */
-+static uint16_t gport_to_hport(uint16_t gport)
-+{
-+ return (gport - gfx_info.guest_pio_base) + gfx_info.host_pio_base;
-+}
-+
-+/* Read host PIO port */
-+static uint32_t ati_hw_in(uint16_t hport)
-+{
-+ unsigned val;
-+
-+ //iopl(3);
-+ asm volatile ("in %1,%0":"=a"(val):"Nd"(hport));
-+ //iopl(0);
-+
-+ return val;
-+}
-+
-+/* Write data to host PIO */
-+static void ati_hw_out(uint16_t hport, uint32_t data)
-+{
-+ //iopl(3);
-+ asm volatile ("out %1, %0"::"Nd"(hport),"a"(data));
-+ //iopl(0);
-+}
-+
-+static uint32_t ati_io_regs_read(void *opaque, uint32_t addr)
-+{
-+ uint32_t val;
-+
-+ val = ati_hw_in(gport_to_hport(addr));
-+
-+ /* tweak the value if VBIOS is reading MMIO BAR1 and BAR2 */
-+ if ( addr == (gfx_info.guest_pio_base + 4) )
-+ {
-+ switch ( gfx_info.pre_mmindex_data )
-+ {
-+ case ATI_BAR1_MMINDEX:
-+ val = gfx_info.guest_mmio_base1 | (val & 0x0000000f);
-+ break;
-+ case ATI_BAR2_MMINDEX:
-+ val = gfx_info.guest_mmio_base2 | (val & 0x0000000f);
-+ break;
-+ default:
-+ break;
-+ }
-+ }
-+
-+ return val;
-+}
-+
-+static void ati_io_regs_write(void *opaque, uint32_t addr, uint32_t val)
-+{
-+ ati_hw_out(gport_to_hport(addr), val);
-+
-+ /* book keeping */
-+ if ( addr == gfx_info.guest_pio_base )
-+ gfx_info.pre_mmindex_data = val;
-+}
-+
-+static void ati_gfx_init(struct pt_dev *assigned)
-+{
-+ PCIDevice *dev = (PCIDevice *)&assigned->dev;
-+
-+ register_ioport_read(dev->io_regions[ATI_BAR5_INDEX].addr,
-+ dev->io_regions[ATI_BAR5_INDEX].size, 4, ati_io_regs_read, assigned);
-+
-+ register_ioport_write(dev->io_regions[ATI_BAR5_INDEX].addr,
-+ dev->io_regions[ATI_BAR5_INDEX].size, 4, ati_io_regs_write, assigned);
-+
-+ /* initialize IO registers */
-+ gfx_info.guest_pio_base = dev->io_regions[ATI_BAR5_INDEX].addr;
-+ gfx_info.pio_size = dev->io_regions[ATI_BAR5_INDEX].size;
-+ gfx_info.host_pio_base = assigned->bases[ATI_BAR5_INDEX].access.pio_base;
-+
-+ gfx_info.guest_mmio_base1 = dev->io_regions[ATI_BAR1_INDEX].addr;
-+ gfx_info.guest_mmio_base2 = dev->io_regions[ATI_BAR2_INDEX].addr;
-+ gfx_info.initialized = 1;
-+
-+ PT_LOG("guest_pio_bar = 0x%x, host_pio_bar = 0x%x, pio_size=0x%x "
-+ "guest_mmio_bar1=0x%x, guest_mmio_bar2=0x%x\n",
-+ gfx_info.guest_pio_base, gfx_info.host_pio_base, gfx_info.pio_size,
-+ gfx_info.guest_mmio_base1, gfx_info.guest_mmio_base2);
-+}
-+
-+static uint32_t ati_legacy_io_read(void *opaque, uint32_t addr)
-+{
-+ struct pt_dev *assigned_device = opaque;
-+ PCIDevice *dev = (PCIDevice *)&assigned_device->dev;
-+ uint32_t val = 0xFF;
-+
-+ switch( addr )
-+ {
-+ case 0x3c3:
-+ val = dev->io_regions[ATI_BAR5_INDEX].addr >> 8;
-+ /* Intercept GFX IO registers. This supposes to happen in
-+ * ati_register_vga_regions(). But we cannot get guest phys IO BAR
-+ * over there. */
-+ if ( !gfx_info.initialized )
-+ ati_gfx_init(assigned_device);
-+ break;
-+ default:
-+ PT_LOG("ERROR: port 0x%x I/O read not handled\n", addr);
-+ break;
-+ }
-+
-+ return val;
-+}
-+
-+static void ati_legacy_io_write(void *opaque, uint32_t addr, uint32_t val)
-+{
-+ PT_LOG("ERROR: port 0x%x I/O write not handled\n", addr);
-+}
-+
-+int ati_register_vga_regions(struct pt_dev *real_device)
-+{
-+ PCIDevice *dev = (PCIDevice *)&real_device->dev;
-+ int ret = 0;
-+
-+ /* We need to intercept VBIOS accesses to port 0x3C3, which returns
-+ * device port I/O BAR. For the rest of legacy I/O ports, we allow direct
-+ * accesses.
-+ */
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-+ 0x3C0, 0x3, DPCI_ADD_MAPPING);
-+
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C4,
-+ 0x3C4, 0x1C, DPCI_ADD_MAPPING);
-+
-+ register_ioport_read(0x3c3, 1, 1, ati_legacy_io_read, real_device);
-+ register_ioport_write(0x3c3, 1, 1, ati_legacy_io_write, real_device);
-+
-+ /* initialized on the first port 0x3C3 access in ati_gfx_init */
-+ gfx_info.initialized = 0;
-+
-+ return ret;
-+}
-+
-+int ati_unregister_vga_regions(struct pt_dev *real_device)
-+{
-+ int ret = 0;
-+
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-+ 0x3C0, 0x3, DPCI_REMOVE_MAPPING);
-+
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C4,
-+ 0x3C4, 0x1C, DPCI_REMOVE_MAPPING);
-+
-+ gfx_info.initialized = 0;
-+
-+ return ret;
-+}
-+
-+/*********************************/
-+/* Code for Intel IGD Passthru */
-+/*********************************/
-
- static uint32_t igd_guest_opregion = 0;
-
-@@ -176,6 +377,77 @@ read_default:
- return pci_default_read_config(pci_dev, config_addr, len);
- }
-
-+int igd_register_vga_regions(struct pt_dev *real_device)
-+{
-+ u32 vendor_id, igd_opregion;
-+ int ret = 0;
-+
-+ /* legacy I/O ports 0x3C0 -- 0x3E0 */
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-+ 0x3C0, 0x20, DPCI_ADD_MAPPING);
-+
-+ /* 1:1 map ASL Storage register value */
-+ vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2);
-+ igd_opregion = pt_pci_host_read(real_device->pci_dev, PCI_INTEL_OPREGION, 4);
-+ if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_opregion )
-+ {
-+ ret |= xc_domain_memory_mapping(xc_handle, domid,
-+ igd_opregion >> XC_PAGE_SHIFT,
-+ igd_opregion >> XC_PAGE_SHIFT,
-+ 2,
-+ DPCI_ADD_MAPPING);
-+ PT_LOG("register_vga: igd_opregion = %x\n", igd_opregion);
-+ }
-+
-+ return ret;
-+}
-+
-+int igd_unregister_vga_regions(struct pt_dev *real_device)
-+{
-+ u32 vendor_id, igd_opregion;
-+ int ret = 0;
-+
-+ ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-+ 0x3C0, 0x20, DPCI_REMOVE_MAPPING);
-+
-+ vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2);
-+ igd_opregion = pt_pci_host_read(real_device->pci_dev, PCI_INTEL_OPREGION, 4);
-+ if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_opregion )
-+ {
-+ ret |= xc_domain_memory_mapping(xc_handle, domid,
-+ igd_opregion >> XC_PAGE_SHIFT,
-+ igd_opregion >> XC_PAGE_SHIFT,
-+ 2,
-+ DPCI_REMOVE_MAPPING);
-+ }
-+
-+ return ret;
-+}
-+/*********************************/
-+/* Generic Code for GFX Passthru */
-+/*********************************/
-+/* This function decides whether I/O port map should be skipped */
-+int vga_skip_ioport_map(PCIDevice *d)
-+{
-+ struct pt_dev *dev = (struct pt_dev *)d;
-+ int skip = 0;
-+
-+ if ( !gfx_passthru || dev->pci_dev->device_class != 0x0300 )
-+ return 0;
-+
-+ switch( dev->pci_dev->vendor_id )
-+ {
-+ case PCI_VENDOR_ID_ATI:
-+ case PCI_VENDOR_ID_AMD:
-+ skip = 1;
-+ break;
-+ default:
-+ skip = 0;
-+ break;
-+ }
-+
-+ return skip;
-+}
- /*
- * register VGA resources for the domain with assigned gfx
- */
-@@ -187,18 +459,33 @@ int register_vga_regions(struct pt_dev *
- if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 )
- return ret;
-
-+ /* legacy I/O ports 0x3B0 - 0x3BC */
- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3B0,
- 0x3B0, 0xC, DPCI_ADD_MAPPING);
-
-- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-- 0x3C0, 0x20, DPCI_ADD_MAPPING);
--
-+ /* legacy video MMIO range 0xA0000 - 0xBFFFF */
- ret |= xc_domain_memory_mapping(xc_handle, domid,
- 0xa0000 >> XC_PAGE_SHIFT,
- 0xa0000 >> XC_PAGE_SHIFT,
- 0x20,
- DPCI_ADD_MAPPING);
-
-+ /* Other VGA regions are vendor specific */
-+ switch( real_device->pci_dev->vendor_id )
-+ {
-+ case PCI_VENDOR_ID_INTEL:
-+ ret = igd_register_vga_regions(real_device);
-+ break;
-+ case PCI_VENDOR_ID_ATI:
-+ case PCI_VENDOR_ID_AMD:
-+ ret = ati_register_vga_regions(real_device);
-+ break;
-+ default:
-+ PT_LOG("gfx card wasn't supported by Xen passthru!\n");
-+ ret = 1;
-+ break;
-+ }
-+
- if ( ret != 0 )
- PT_LOG("VGA region mapping failed\n");
-
-@@ -216,26 +503,31 @@ int unregister_vga_regions(struct pt_dev
- if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 )
- return ret;
-
-+ /* legacy I/O ports 0x3B0 - 0x3BC */
- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3B0,
- 0x3B0, 0xC, DPCI_REMOVE_MAPPING);
-
-- ret |= xc_domain_ioport_mapping(xc_handle, domid, 0x3C0,
-- 0x3C0, 0x20, DPCI_REMOVE_MAPPING);
--
-+ /* legacy video MMIO range 0xA0000 - 0xBFFFF */
- ret |= xc_domain_memory_mapping(xc_handle, domid,
- 0xa0000 >> XC_PAGE_SHIFT,
- 0xa0000 >> XC_PAGE_SHIFT,
- 20,
- DPCI_REMOVE_MAPPING);
-
-- vendor_id = pt_pci_host_read(real_device->pci_dev, PCI_VENDOR_ID, 2);
-- if ( (vendor_id == PCI_VENDOR_ID_INTEL) && igd_guest_opregion )
-+ /* Other VGA regions are vendor specific */
-+ switch( real_device->pci_dev->vendor_id )
- {
-- ret |= xc_domain_memory_mapping(xc_handle, domid,
-- igd_guest_opregion >> XC_PAGE_SHIFT,
-- igd_guest_opregion >> XC_PAGE_SHIFT,
-- 2,
-- DPCI_REMOVE_MAPPING);
-+ case PCI_VENDOR_ID_INTEL:
-+ ret = igd_unregister_vga_regions(real_device);
-+ break;
-+ case PCI_VENDOR_ID_ATI:
-+ case PCI_VENDOR_ID_AMD:
-+ ret = ati_unregister_vga_regions(real_device);
-+ break;
-+ default:
-+ PT_LOG("gfx card wasn't supported by Xen passthru!\n");
-+ ret = 1;
-+ break;
- }
-
- if ( ret != 0 )
diff --git a/kernels/xen/bios_workaround.patch b/kernels/xen/bios_workaround.patch
deleted file mode 100644
index 12fc00184..000000000
--- a/kernels/xen/bios_workaround.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- xen-4.3.1.orig/xen/drivers/passthrough/amd/iommu_acpi.c 2013-07-09 05:46:56.000000000 -0500
-+++ xen-4.3.1/xen/drivers/passthrough/amd/iommu_acpi.c 2013-07-18 02:31:38.767195258 -0500
-@@ -668,26 +668,26 @@
- */
- for ( apic = 0; apic < nr_ioapics; apic++ )
- {
-- if ( IO_APIC_ID(apic) != special->handle )
-+ if ( ioapic_sbdf[IO_APIC_ID(apic)].bdf != ioapic_sbdf[special->handle].bdf )
- continue;
-
-- if ( special->handle >= ARRAY_SIZE(ioapic_sbdf) )
-+ if ( IO_APIC_ID(apic) >= ARRAY_SIZE(ioapic_sbdf) )
- {
- printk(XENLOG_ERR "IVHD Error: IO-APIC %#x entry beyond bounds\n",
-- special->handle);
-+ IO_APIC_ID(apic));
- return 0;
- }
-
-- if ( ioapic_sbdf[special->handle].pin_setup )
-+ if ( ioapic_sbdf[IO_APIC_ID(apic)].pin_setup )
- {
-- if ( ioapic_sbdf[special->handle].bdf == bdf &&
-- ioapic_sbdf[special->handle].seg == seg )
-+ if ( ioapic_sbdf[IO_APIC_ID(apic)].bdf == bdf &&
-+ ioapic_sbdf[IO_APIC_ID(apic)].seg == seg )
- AMD_IOMMU_DEBUG("IVHD Warning: Duplicate IO-APIC %#x entries\n",
-- special->handle);
-+ IO_APIC_ID(apic));
- else
- {
- printk(XENLOG_ERR "IVHD Error: Conflicting IO-APIC %#x entries\n",
-- special->handle);
-+ IO_APIC_ID(apic));
- if ( amd_iommu_perdev_intremap )
- return 0;
- }
-@@ -695,10 +695,10 @@
- else
- {
- /* set device id of ioapic */
-- ioapic_sbdf[special->handle].bdf = bdf;
-- ioapic_sbdf[special->handle].seg = seg;
-+ ioapic_sbdf[IO_APIC_ID(apic)].bdf = bdf;
-+ ioapic_sbdf[IO_APIC_ID(apic)].seg = seg;
-
-- ioapic_sbdf[special->handle].pin_setup = xzalloc_array(
-+ ioapic_sbdf[IO_APIC_ID(apic)].pin_setup = xzalloc_array(
- unsigned long, BITS_TO_LONGS(nr_ioapic_entries[apic]));
- if ( nr_ioapic_entries[apic] &&
- !ioapic_sbdf[IO_APIC_ID(apic)].pin_setup )
diff --git a/kernels/xen/conf.d-xenconsoled b/kernels/xen/conf.d-xenconsoled
deleted file mode 100644
index 9dee0960a..000000000
--- a/kernels/xen/conf.d-xenconsoled
+++ /dev/null
@@ -1,14 +0,0 @@
-# No logging (default)
-#XENCONSOLED_LOG=none
-# Log guest console output only
-#XENCONSOLED_LOG=guest
-# Log hypervisor messages only
-#XENCONSOLED_LOG=hv
-# Log both guest console output and hypervisor messages
-XENCONSOLED_LOG=all
-
-# Location to store guest & hypervisor logs
-XENCONSOLED_LOG_DIR=/var/log/xen/console
-
-#XENCONSOLED_ARGS=
-
diff --git a/kernels/xen/conf.d-xenstored b/kernels/xen/conf.d-xenstored
deleted file mode 100644
index 366abf9ad..000000000
--- a/kernels/xen/conf.d-xenstored
+++ /dev/null
@@ -1,2 +0,0 @@
-#XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"
-XENDOM0_NAME="Domain-0"
diff --git a/kernels/xen/grub.conf b/kernels/xen/grub.conf
deleted file mode 100644
index 9b13008d9..000000000
--- a/kernels/xen/grub.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-#XEN_HYPERVISOR_CMDLINE="xsave=1"
-#XEN_LINUX_CMDLINE="console=tty0"
diff --git a/kernels/xen/proc-xen.mount b/kernels/xen/proc-xen.mount
deleted file mode 100644
index 0eaa59c5f..000000000
--- a/kernels/xen/proc-xen.mount
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Mount /proc/xen files
-ConditionPathExists=/proc/xen
-RefuseManualStop=true
-
-[Mount]
-What=xenfs
-Where=/proc/xen
-Type=xenfs
diff --git a/kernels/xen/tmpfiles.d-xen.conf b/kernels/xen/tmpfiles.d-xen.conf
deleted file mode 100644
index a55258b0f..000000000
--- a/kernels/xen/tmpfiles.d-xen.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-d /run/xen 0755 root root -
-d /run/xenstored 0755 root root -
diff --git a/kernels/xen/var-lib-xenstored.mount b/kernels/xen/var-lib-xenstored.mount
deleted file mode 100644
index 1c2015ca2..000000000
--- a/kernels/xen/var-lib-xenstored.mount
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=mount xenstore file system
-ConditionPathExists=/proc/xen
-RefuseManualStop=true
-
-[Mount]
-What=xenstore
-Where=/var/lib/xenstored
-Type=tmpfs
-Options=mode=755
diff --git a/kernels/xen/xen.conf b/kernels/xen/xen.conf
deleted file mode 100644
index 37a5b59f7..000000000
--- a/kernels/xen/xen.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-xen-evtchn
-xen-gntdev
-xen-gntalloc
-xen-blkback
-xen-netback
-xen-pciback
-xen-acpi-processor
-## xen-acpi-processor: This module may not work on all machines; try removing this first if it causes issues.
-
-## The following were included in xencommons, but were not inserted by systemd:
-# evtchn
-# gntdev
-# netbk
-# blkbk
-# xen-scsibk
-# usbbk
-# pciback
-# blktap2
-# blktap
diff --git a/kernels/xen/xen.install b/kernels/xen/xen.install
deleted file mode 100644
index f1a34d522..000000000
--- a/kernels/xen/xen.install
+++ /dev/null
@@ -1,64 +0,0 @@
-install_msg() {
- cat << __EOF__
-===> IMPORTANT NOTICE:
-
-In order to complete the installation, and enable Xen,
-at the very least you must:
-1. Edit your GRUB2 config files as specified at
- https://wiki.parabolagnulinux.org/index.php/Xen#Bootloader_Configuration
-2. Issue the following commands to allow you to create and start VMs:
- systemctl enable xenstored.service
- systemctl enable xenconsoled.service
-3. If you want some domains to automatically start up/shutdown, run the following:
- systemctl enable xendomains.service
-
-For more information refer to the Wiki:
- https://wiki.parabolagnulinux.org/index.php/Xen
-
-__EOF__
-
-}
-
-upgrade_msg() {
- cat << __EOF__
-
-Note: If you are upgrading from one of the previous 4.2 xen builds, and are having issues
- with graphics card passthrough, the default device model used has changed and the
- newer model can sometimes have issues. To resolve, add (or change ) the following
- line into your domain config file:
- device_model_version = "qemu-xen-traditional"
-
- Also remember to rebuild your grub configuration if upgrading from a non-xen 4.3.1
- install.
-__EOF__
-
-}
-
-post_install() {
- install_msg
- upgrade_msg
-}
-
-post_upgrade() {
- upgrade_msg
-}
-
-pre_remove() {
- systemctl stop xendomains.service
- systemctl stop xenconsoled.service
- systemctl stop xenstored.service
-
- systemctl disable xendomains.service
- systemctl disable xenconsoled.service
- systemctl disable xenstored.service
-}
-
-post_remove() {
- cat << __EOF__
-===> IMPORTANT NOTICE:
-
-In order to finish removing Xen, you will need to modify
-your bootloader configuration files to load your Linux
-kernel instead of Xen kernel.
-__EOF__
-}
diff --git a/kernels/xen/xenconsoled.service b/kernels/xen/xenconsoled.service
deleted file mode 100644
index 1e06b4537..000000000
--- a/kernels/xen/xenconsoled.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Xenconsoled - handles logging from guest consoles and hypervisor
-Requires=proc-xen.mount
-After=proc-xen.mount xenstored.service
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=simple
-Environment=XENCONSOLED_ARGS=
-Environment=XENCONSOLED_LOG=none
-Environment=XENCONSOLED_LOG_DIR=/var/log/xen/console
-EnvironmentFile=-/etc/conf.d/xenconsoled
-PIDFile=/run/xenconsoled.pid
-ExecStartPre=/usr/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/usr/bin/xenconsoled --pid-file /run/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
-
-[Install]
-WantedBy=multi-user.target
diff --git a/kernels/xen/xendomU@.service b/kernels/xen/xendomU@.service
deleted file mode 100644
index b3dd6c7d7..000000000
--- a/kernels/xen/xendomU@.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=xen domU service for domain %i
-Requires=xenstored.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/usr/bin/xl create /etc/xen/conf/%i.cfg
-ExecStop=/usr/bin/xl shutdown %i
-
-[Install]
-WantedBy=multi-user.target
diff --git a/kernels/xen/xendomains.patch b/kernels/xen/xendomains.patch
deleted file mode 100644
index 16f62b65a..000000000
--- a/kernels/xen/xendomains.patch
+++ /dev/null
@@ -1,108 +0,0 @@
---- xen-4.3.1.orig/tools/hotplug/Linux/init.d/xendomains 2013-07-19 14:52:52.159013757 -0500
-+++ xen-4.3.1/tools/hotplug/Linux/init.d/xendomains 2013-07-19 14:56:00.079145322 -0500
-@@ -51,17 +51,13 @@
- fi
-
- # See docs/misc/distro_mapping.txt
--if [ -d /var/lock/subsys ]; then
-- LOCKFILE=/var/lock/subsys/xendomains
-+if [ -d /run/lock/subsys ]; then
-+ LOCKFILE=/run/lock/subsys/xendomains
- else
-- LOCKFILE=/var/lock/xendomains
-+ LOCKFILE=/run/lock/xendomains
- fi
-
--if [ -d /etc/sysconfig ]; then
-- XENDOM_CONFIG=/etc/sysconfig/xendomains
--else
-- XENDOM_CONFIG=/etc/default/xendomains
--fi
-+XENDOM_CONFIG=/etc/conf.d/xendomains
-
- test -r $XENDOM_CONFIG || { echo "$XENDOM_CONFIG not existing";
- if [ "$1" = "stop" ]; then exit 0;
-@@ -185,8 +181,13 @@
- # read name from xen config file
- rdname()
- {
-- NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-- sed -n 's/^.*(name \(.*\))$/\1/p')
-+ if [ "$CMD" == "xm" ]; then
-+ NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-+ sed -n 's/^.*(name \(.*\))$/\1/p')
-+ else
-+ NM=$($CMD create --quiet --dryrun --defconfig "$1" |
-+ perl -pe 's|^.*"name":"(.*?)".*$|$1|')
-+ fi
- }
-
- rdnames()
-@@ -229,15 +230,15 @@
- rdname $1
- RC=1
- name=;id=
-- while read LN; do
-- parseln "$LN" || continue
-+ while read id; do
- if test $id = 0; then continue; fi
-+ name=`xenstore-read /local/domain/$id/name`
- case $name in
- ($NM)
- RC=0
- ;;
- esac
-- done < <($CMD list -l | grep "$LIST_GREP")
-+ done < <(xenstore-list /local/domain)
- return $RC
- }
-
-@@ -312,6 +313,8 @@
-
- all_zombies()
- {
-+ return 0
-+
- name=;id=
- while read LN; do
- parseln "$LN" || continue
-@@ -363,9 +366,9 @@
- fi
- echo -n "Shutting down Xen domains:"
- name=;id=
-- while read LN; do
-- parseln "$LN" || continue
-+ while read id; do
- if test $id = 0; then continue; fi
-+ name=`xenstore-read /local/domain/$id/name`
- echo -n " $name"
- if test "$XENDOMAINS_AUTO_ONLY" = "true"; then
- eval "
-@@ -450,7 +453,7 @@
- fi
- kill $WDOG_PID >/dev/null 2>&1
- fi
-- done < <($CMD list -l | grep "$LIST_GREP")
-+ done < <(xenstore-list /local/domain)
-
- # NB. this shuts down ALL Xen domains (politely), not just the ones in
- # AUTODIR/*
-@@ -479,15 +482,15 @@
- check_domain_up()
- {
- name=;id=
-- while read LN; do
-- parseln "$LN" || continue
-+ while read id; do
- if test $id = 0; then continue; fi
-+ name=`xenstore-read /local/domain/$id/name`
- case $name in
- ($1)
- return 0
- ;;
- esac
-- done < <($CMD list -l | grep "$LIST_GREP")
-+ done < <(xenstore-list /local/domain)
- return 1
- }
-
diff --git a/kernels/xen/xendomains.service b/kernels/xen/xendomains.service
deleted file mode 100644
index d49bd5593..000000000
--- a/kernels/xen/xendomains.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Xendomains - start and stop guests on boot and shutdown
-Requires=proc-xen.mount xenstored.service
-After=proc-xen.mount xenstored.service xenconsoled.service
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=oneshot
-RemainAfterExit=true
-ExecStartPre=/usr/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/etc/xen/scripts/xendomains start
-ExecStop=/etc/xen/scripts/xendomains stop
-
-[Install]
-WantedBy=multi-user.target
diff --git a/kernels/xen/xenstored.service b/kernels/xen/xenstored.service
deleted file mode 100644
index 46e0b3226..000000000
--- a/kernels/xen/xenstored.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=Xenstored - daemon managing xenstore file system
-Requires=proc-xen.mount var-lib-xenstored.mount systemd-tmpfiles-setup.service
-After=proc-xen.mount var-lib-xenstored.mount systemd-tmpfiles-setup.service
-Before=libvirtd.service libvirt-guests.service
-RefuseManualStop=true
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=forking
-Environment=XENSTORED_ARGS=
-Environment=XENDOM0_NAME=Domain-0
-EnvironmentFile=-/etc/conf.d/xenstored
-PIDFile=/run/xenstored.pid
-ExecStartPre=/usr/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/usr/bin/xenstored --pid-file /run/xenstored.pid $XENSTORED_ARGS
-ExecStartPost=/usr/bin/xenstore-write "/local/domain/0/name" "$XENDOM0_NAME"
-
-[Install]
-WantedBy=multi-user.target