]> xenbits.xensource.com Git - people/aperard/centos-package-xen.git/commitdiff
aarch64 + upgrade to 4.5 + use upstream systemd.services master
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 14 Aug 2015 15:45:49 +0000 (16:45 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 14 Aug 2015 15:45:49 +0000 (16:45 +0100)
This have only been tested on aarch64. So the ifnarch aarch64 might hide
changes not specifig to aarch64 but only due to upgrate of xen from 4.4 to
4.5.

SOURCES/efi-xen.cfg [new file with mode: 0644]
SOURCES/proc-xen.mount [deleted file]
SOURCES/tmpfiles.d.xen.conf [deleted file]
SOURCES/var-lib-xenstored.mount [deleted file]
SOURCES/xen-queue.am
SOURCES/xen-watchdog.service [deleted file]
SOURCES/xenconsoled.service [deleted file]
SOURCES/xend.service [deleted file]
SOURCES/xendomains.service [deleted file]
SOURCES/xenstored.service [deleted file]
SPECS/xen.spec

diff --git a/SOURCES/efi-xen.cfg b/SOURCES/efi-xen.cfg
new file mode 100644 (file)
index 0000000..1fa9fca
--- /dev/null
@@ -0,0 +1,6 @@
+[global] default=Xen
+
+[Xen]
+options=conswitch=x dom0_mem=2G dom0_max_vcpus=4 console=dtuart dtuart=/soc/serial@1c020000 no-bootscrub
+kernel=vmlinuz-3.19.0-0.79.aa7a.aarch64 loglevel=9 root=/dev/sda4 ro xencons=hvc console=hvc0 earlyprintk=uart8250-32bit,0x1c020000
+ramdisk=initramfs-3.19.0-0.79.aa7a.aarch64.img
diff --git a/SOURCES/proc-xen.mount b/SOURCES/proc-xen.mount
deleted file mode 100644 (file)
index 0eaa59c..0000000
+++ /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/SOURCES/tmpfiles.d.xen.conf b/SOURCES/tmpfiles.d.xen.conf
deleted file mode 100644 (file)
index 5041017..0000000
+++ /dev/null
@@ -1 +0,0 @@
-d /run/xen 0755 root root -
diff --git a/SOURCES/var-lib-xenstored.mount b/SOURCES/var-lib-xenstored.mount
deleted file mode 100644 (file)
index 49e0695..0000000
+++ /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,context="system_u:object_r:xenstored_var_lib_t:s0"
index bb7a139a064cd94e834ab9df887143be5ccbfabd..1140ea815c8c1e98eb5d2d04638a5651b25e2699 100644 (file)
-From 672c65dc360624107cf0195e8b443d55d11d2deb Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:10 +0100
-Subject: [PATCH] Fix up xend init scripts
-
----
- tools/python/xen/xend/osdep.py            |  2 +-
- tools/python/xen/xend/server/SrvDaemon.py |  9 +++-
- tools/python/xen/xend/xend                | 89 +------------------------------
- 3 files changed, 11 insertions(+), 89 deletions(-)
-
-diff --git a/tools/python/xen/xend/osdep.py b/tools/python/xen/xend/osdep.py
-index b51dd2e..c1260a8 100644
---- a/tools/python/xen/xend/osdep.py
-+++ b/tools/python/xen/xend/osdep.py
-@@ -22,7 +22,7 @@ import commands
- _xend_autorestart = {
-     "NetBSD": True,
--    "Linux": True,
-+    "Linux": False,
-     "SunOS": False,
- }
-diff --git a/tools/python/xen/xend/server/SrvDaemon.py b/tools/python/xen/xend/server/SrvDaemon.py
-index 0a330f1..0d7583c 100644
---- a/tools/python/xen/xend/server/SrvDaemon.py
-+++ b/tools/python/xen/xend/server/SrvDaemon.py
-@@ -110,7 +110,14 @@ class Daemon:
-         # Fork, this allows the group leader to exit,
-         # which means the child can never again regain control of the
-         # terminal
--        if os.fork():
-+        child = os.fork()
-+        if child:
-+            if not osdep.xend_autorestart:
-+                pidfile = open(XEND_PID_FILE, 'w')
-+                try:
-+                    pidfile.write(str(child))
-+                finally:
-+                    pidfile.close()
-             os._exit(0)
-         # Detach from standard file descriptors, and redirect them to
-diff --git a/tools/python/xen/xend/xend b/tools/python/xen/xend/xend
-index 9ef0210..0876ee2 100644
---- a/tools/python/xen/xend/xend
-+++ b/tools/python/xen/xend/xend
-@@ -8,103 +8,18 @@
- """Xen management daemon.
-    Provides console server and HTTP management api.
--   Run:
--   xend start
--
--   Restart:
--   xend restart
--
--   The daemon is stopped with:
--   xend stop
--
-    The daemon should reconnect to device control interfaces
-    and recover its state when restarted.
--   On Solaris, the daemons are SMF managed, and you should not attempt
--   to start xend by hand.
- """
--import fcntl
--import glob
--import os
--import os.path
- import sys
--import socket
--import signal
--import time
--import commands
--
- from xen.xend.server import SrvDaemon
--class CheckError(ValueError):
--    pass
--
--def hline():
--    print >>sys.stderr, "*" * 70
--
--def msg(message):
--    print >>sys.stderr, "*" * 3, message
--
--def check_logging():
--    """Check python logging is installed and raise an error if not.
--    Logging is standard from Python 2.3 on.
--    """
--    try:
--        import logging
--    except ImportError:
--        hline()
--        msg("Python logging is not installed.")
--        msg("Use 'make install-logging' at the xen root to install.")
--        msg("")
--        msg("Alternatively download and install from")
--        msg("http://www.red-dove.com/python_logging.html")
--        hline()
--        raise CheckError("logging is not installed")
--
--def check_user():
--    """Check that the effective user id is 0 (root).
--    """
--    if os.geteuid() != 0:
--        hline()
--        msg("Xend must be run as root.")
--        hline()
--        raise CheckError("invalid user")
--
--def start_daemon(daemon, *args):
--    if os.fork() == 0:
--        os.execvp(daemon, (daemon,) + args)
--
--def start_blktapctrl():
--    start_daemon("blktapctrl", "")
--
- def main():
--    try:
--        check_logging()
--        check_user()
--    except CheckError:
--        sys.exit(1)
--    
-     daemon = SrvDaemon.instance()
--    if not sys.argv[1:]:
--        print 'usage: %s {start|stop|reload|restart}' % sys.argv[0]
--    elif sys.argv[1] == 'start':
--        if os.uname()[0] != "SunOS":
--            start_blktapctrl()
--        return daemon.start()
--    elif sys.argv[1] == 'trace_start':
--        start_blktapctrl()
--        return daemon.start(trace=1)
--    elif sys.argv[1] == 'stop':
--        return daemon.stop()
--    elif sys.argv[1] == 'reload':
--        return daemon.reloadConfig()
--    elif sys.argv[1] == 'restart':
--        start_blktapctrl()
--        return daemon.stop() or daemon.start()
--    elif sys.argv[1] == 'status':
-+    if sys.argv[1:] and sys.argv[1] == 'status':
-         return daemon.status()
--    else:
--        print 'not an option:', sys.argv[1]
--    return 1
-+    return daemon.start()
- if __name__ == '__main__':
-     sys.exit(main())
--- 
-1.9.1
-
-
-From fcdb630d2a7ec4dd657125c3de5999491d9f6fe7 Mon Sep 17 00:00:00 2001
+From 37a372475c1f3d3ed53647358d374d60de0f208e Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:10 +0100
 Subject: [PATCH] Change dumpdir to /var/lib/xen
 
 ---
- tools/Makefile                          | 2 +-
- tools/python/xen/xend/XendDomainInfo.py | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
+ tools/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/tools/Makefile b/tools/Makefile
-index d548e5e..6610a8d 100644
+index af9798a..77a598a 100644
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -60,7 +60,7 @@ all: subdirs-all
+@@ -59,7 +59,7 @@ build all: subdirs-all
  
  .PHONY: install
  install: subdirs-install
@@ -178,54 +19,30 @@ index d548e5e..6610a8d 100644
 +      $(INSTALL_DIR) $(DESTDIR)/var/lib/xen/dump
        $(INSTALL_DIR) $(DESTDIR)/var/log/xen
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
-       $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
-diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
-index 8d4ff5c..895fc01 100644
---- a/tools/python/xen/xend/XendDomainInfo.py
-+++ b/tools/python/xen/xend/XendDomainInfo.py
-@@ -2288,7 +2288,7 @@ class XendDomainInfo:
-             # To prohibit directory traversal
-             based_name = os.path.basename(self.info['name_label'])
-             
--            coredir = "/var/xen/dump/%s" % (based_name)
-+            coredir = "/var/lib/xen/dump/%s" % (based_name)
-             if not os.path.exists(coredir):
-                 try:
-                     mkdir.parents(coredir, stat.S_IRWXU)
-@@ -2297,7 +2297,7 @@ class XendDomainInfo:
-             if not os.path.isdir(coredir):
-                 # Use former directory to dump core
--                coredir = '/var/xen/dump'
-+                coredir = '/var/lib/xen/dump'
  
-             this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
-             corefile = "%s/%s-%s.%s.core" % (coredir, this_time,
 -- 
-1.9.1
+Anthony PERARD
 
 
-From 0db2982fcd00e8bcd7f30b3baa87d293a28dbd6d Mon Sep 17 00:00:00 2001
+From cd5f76c14c84b84748a149194236bdc402fcc6cc Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:10 +0100
 Subject: [PATCH] Disable iptables on the bridge
 
 ---
- tools/hotplug/Linux/vif-bridge            | 4 ----
+ tools/hotplug/Linux/vif-bridge            | --
  tools/hotplug/Linux/xen-network-common.sh | 7 +++++++
- 2 files changed, 7 insertions(+), 4 deletions(-)
+ 2 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
-index b7dcbd6..178bf66 100644
+index 3d72ca4..79220d3 100644
 --- a/tools/hotplug/Linux/vif-bridge
 +++ b/tools/hotplug/Linux/vif-bridge
-@@ -97,10 +97,6 @@ case "$command" in
+@@ -93,8 +93,6 @@ case "$command" in
          ;;
  esac
  
--if [ "$type_if" = vif ]; then
--    handle_iptable
--fi
+-handle_iptable
 -
  call_hooks vif post
  
@@ -249,10 +66,10 @@ index 3c63c55..f74de3d 100644
  }
  
 -- 
-1.9.1
+Anthony PERARD
 
 
-From 72e95dc962312b8b2f05e188926c2a9c2c96bc5d Mon Sep 17 00:00:00 2001
+From 2fe6220d8e656bc4cc3a4bda3e1aa2c4c71dd880 Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:10 +0100
 Subject: [PATCH] pygrubfix.patch
@@ -262,10 +79,10 @@ Subject: [PATCH] pygrubfix.patch
  1 file changed, 5 insertions(+)
 
 diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
-index c7b6aa7..8ff6964 100755
+index 3ec52fd..2cdd2d4 100755
 --- a/tools/pygrub/src/pygrub
 +++ b/tools/pygrub/src/pygrub
-@@ -119,6 +119,7 @@ def get_partition_offsets(file):
+@@ -128,6 +128,7 @@ def get_partition_offsets(file):
      fd = os.open(file, os.O_RDONLY)
      buf = os.read(fd, 512)
      os.close(fd)
@@ -273,7 +90,7 @@ index c7b6aa7..8ff6964 100755
      for poff in (446, 462, 478, 494): # partition offsets
  
          # MBR contains a 16 byte descriptor per partition
-@@ -128,6 +129,7 @@ def get_partition_offsets(file):
+@@ -137,6 +138,7 @@ def get_partition_offsets(file):
          
          # offset == 0 implies this partition is not enabled
          if offset == 0:
@@ -281,7 +98,7 @@ index c7b6aa7..8ff6964 100755
              continue
  
          if type == FDISK_PART_SOLARIS or type == FDISK_PART_SOLARIS_OLD:
-@@ -148,6 +150,9 @@ def get_partition_offsets(file):
+@@ -157,6 +159,9 @@ def get_partition_offsets(file):
          else:
              part_offs.append(offset)
  
@@ -292,169 +109,40 @@ index c7b6aa7..8ff6964 100755
  
  class GrubLineEditor(curses.textpad.Textbox):
 -- 
-1.9.1
+Anthony PERARD
 
 
-From 0a27e5b00e33d44d500a2113d996b37a7da87e93 Mon Sep 17 00:00:00 2001
+From 8740bd1ec041b6031fb8a1a36c4226c561686d91 Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:10 +0100
-Subject: [PATCH] xend.catchbt.patch
-
----
- tools/python/xen/xend/XendLogging.py | 6 +++++-
- tools/python/xen/xend/image.py       | 6 +++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/tools/python/xen/xend/XendLogging.py b/tools/python/xen/xend/XendLogging.py
-index d95133b..3e6b8ba 100644
---- a/tools/python/xen/xend/XendLogging.py
-+++ b/tools/python/xen/xend/XendLogging.py
-@@ -132,7 +132,11 @@ def init(filename, level):
-         fileHandler = openFileHandler(filename)
-         logfilename = filename
-     except IOError:
--        logfilename = tempfile.mkstemp("-xend.log")[1]
-+        try:
-+            logfilename = tempfile.mkstemp("-xend.log")[1]
-+        except IOError:
-+            print >>sys.stderr, ('xend/XendLogging.py: Unable to open standard or temporary log file for xend')
-+            os._exit(1)
-         fileHandler = openFileHandler(logfilename)
-     fileHandler.setFormatter(logging.Formatter(LOGFILE_FORMAT, DATE_FORMAT))
-diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py
-index 832c168..161aeb5 100644
---- a/tools/python/xen/xend/image.py
-+++ b/tools/python/xen/xend/image.py
-@@ -43,7 +43,11 @@ from xen.util import oshelp
- from xen.util import utils
- from xen.xend import osdep
--xc = xen.lowlevel.xc.xc()
-+try:
-+    xc = xen.lowlevel.xc.xc()
-+except Exception:
-+    print >>sys.stderr, ('xend/image.py: Error connecting to hypervisor')
-+    os._exit(1)
- MAX_GUEST_CMDLINE = 1024
--- 
-1.9.1
-
-
-From 86c7061a7d6e0f6d3a7bab29841c71afd4073025 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:10 +0100
-Subject: [PATCH] xend-pci-loop.patch # Don't crash due to weird PCI cards (Bug
- 767742)
-
----
- tools/python/xen/util/pci.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py
-index adeca4b..94326b3 100644
---- a/tools/python/xen/util/pci.py
-+++ b/tools/python/xen/util/pci.py
-@@ -1275,7 +1275,12 @@ class PciDevice:
-             pass
-     def get_info_from_sysfs(self):
--        self.find_capability(0x11)
-+        try:
-+            self.find_capability(0x11)
-+        except PciDeviceParseError, err:
-+            log.error("Caught '%s'" % err)
-+            return False
-+
-         sysfs_mnt = find_sysfs_mnt()
-         if sysfs_mnt == None:
-             return False
--- 
-1.9.1
-
-
-From 1c48fb2eb756ff1ad4f9729baf91351f6f4e2b83 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:10 +0100
-Subject: [PATCH] xend.selinux.fixes.patch
-
----
- tools/python/xen/xend/server/SrvDaemon.py | 3 ++-
- tools/python/xen/xend/xend                | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/tools/python/xen/xend/server/SrvDaemon.py b/tools/python/xen/xend/server/SrvDaemon.py
-index 0d7583c..af1f546 100644
---- a/tools/python/xen/xend/server/SrvDaemon.py
-+++ b/tools/python/xen/xend/server/SrvDaemon.py
-@@ -325,7 +325,8 @@ class Daemon:
-     def set_user(self):
-         # Set the UID.
-         try:
--            os.setuid(pwd.getpwnam(XEND_USER)[2])
-+            if XEND_USER != "root":
-+                os.setuid(pwd.getpwnam(XEND_USER)[2])
-             return 0
-         except KeyError:
-             print >>sys.stderr, "Error: no such user '%s'" % XEND_USER
-diff --git a/tools/python/xen/xend/xend b/tools/python/xen/xend/xend
-index 0876ee2..05afc0e 100644
---- a/tools/python/xen/xend/xend
-+++ b/tools/python/xen/xend/xend
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python -Es
- #  -*- mode: python; -*-
- #============================================================================
- # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
--- 
-1.9.1
-
-
-From cb5b2911fac846bee9f902e3564f78ac95451347 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:10 +0100
-Subject: [PATCH] xen.use.fedora.ipxe.patch
+Date: Thu, 23 Apr 2015 15:06:11 +0100
+Subject: [PATCH] xen.fedora.efi.build.patch
 
 ---
  Config.mk                         | 2 +-
- tools/firmware/Makefile           | 2 +-
  tools/firmware/hvmloader/Makefile | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ xen/Makefile                      | 2 ++
+ xen/arch/x86/Makefile             | 6 +++---
+ xen/arch/x86/efi/Makefile         | 2 +-
+ 5 files changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/Config.mk b/Config.mk
-index 4a73ef9..b041144 100644
+index a235904..f2f8139 100644
 --- a/Config.mk
 +++ b/Config.mk
-@@ -239,7 +239,7 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.7.3.1
- # Fri Aug 2 14:12:09 2013 -0400
- # Fix bug in CBFS file walking with compressed files.
+@@ -257,7 +257,7 @@ SEABIOS_UPSTREAM_REVISION ?= rel-1.7.5
+ # Thu May 22 16:59:16 2014 -0400
+ # python3 fixes for vgabios and csm builds.
  
 -ETHERBOOT_NICS ?= rtl8139 8086100e
 +ETHERBOOT_NICS ?= 10ec8139 8086100e
  
- # Specify which qemu-dm to use. This may be `ioemu' to use the old
- # Mercurial in-tree version, or a local directory, or a git URL.
-diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
-index 97de642..118dd75 100644
---- a/tools/firmware/Makefile
-+++ b/tools/firmware/Makefile
-@@ -14,7 +14,7 @@ SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
- endif
- SUBDIRS-$(CONFIG_ROMBIOS) += rombios
- SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
--SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
-+#SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
- SUBDIRS-y += hvmloader
  
- ovmf-dir:
+ QEMU_TRADITIONAL_REVISION ?= xen-4.5.1
 diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
-index 00ee952..b0c6f37 100644
+index 46a79c5..8af7785 100644
 --- a/tools/firmware/hvmloader/Makefile
 +++ b/tools/firmware/hvmloader/Makefile
-@@ -48,7 +48,7 @@ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.debug.bin
+@@ -49,7 +49,7 @@ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.debug.bin
  else
  CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
  endif
@@ -463,39 +151,23 @@ index 00ee952..b0c6f37 100644
  endif
  
  ROMS := 
--- 
-1.9.1
-
-
-From ba819cdfb1cca3ec22896324189e3cffae8687ee Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:11 +0100
-Subject: [PATCH] xen.fedora.efi.build.patch
-
----
- xen/Makefile              | 2 ++
- xen/arch/x86/Makefile     | 6 +++---
- xen/arch/x86/efi/Makefile | 2 +-
- 3 files changed, 6 insertions(+), 4 deletions(-)
-
 diff --git a/xen/Makefile b/xen/Makefile
-index c5c40df..03874b1 100644
+index df1d539..5fb6a59 100644
 --- a/xen/Makefile
 +++ b/xen/Makefile
-@@ -13,6 +13,8 @@ export BASEDIR := $(CURDIR)
+@@ -13,6 +13,7 @@ export BASEDIR := $(CURDIR)
  export XEN_ROOT := $(BASEDIR)/..
  
- EFI_MOUNTPOINT ?= /boot/efi
-+EFI_VENDOR=fedora
+ EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
 +LD_EFI ?= $(LD)
  
  .PHONY: default
  default: build
 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
-index d502bdf..4dd6846 100644
+index 86ca5f8..056267f 100644
 --- a/xen/arch/x86/Makefile
 +++ b/xen/arch/x86/Makefile
-@@ -126,18 +126,18 @@ $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_
+@@ -128,18 +128,18 @@ $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_
  $(TARGET).efi: guard = $(if $(shell echo efi/dis* | grep disabled),:)
  $(TARGET).efi: prelink-efi.o efi.lds efi/relocs-dummy.o $(BASEDIR)/common/symbols-dummy.o efi/mkreloc
        $(foreach base, $(VIRT_BASE) $(ALT_BASE), \
@@ -531,10 +203,10 @@ index 1daa7ac..f5398c4 100644
  
  extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o
 -- 
-1.9.1
+Anthony PERARD
 
 
-From b242416f71e17431a253c7797a5ef36aea4e8a72 Mon Sep 17 00:00:00 2001
+From 7c220841a6fb521ccc26861b6a14a78ad0ea2f68 Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:11 +0100
 Subject: [PATCH] xen.fedora19.buildfix.patch
@@ -544,14 +216,14 @@ Subject: [PATCH] xen.fedora19.buildfix.patch
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
-index 0fc3f82..0d43727 100644
+index c95e4ed..0d43727 100644
 --- a/tools/debugger/gdbsx/xg/xg_main.c
 +++ b/tools/debugger/gdbsx/xg/xg_main.c
 @@ -180,7 +180,7 @@ _domctl_hcall(uint32_t cmd,            /* which domctl hypercall */
      hypercall.op = __HYPERVISOR_domctl;
      hypercall.arg[0] = (unsigned long)&domctl;
  
--    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, (ulong)&hypercall);
+-    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, &hypercall);
 +    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, (unsigned long)&hypercall);
      if (domctlarg && sz)
          munlock(domctlarg, sz);
@@ -560,402 +232,16 @@ index 0fc3f82..0d43727 100644
      hypercall.arg[0] = (unsigned long)XENVER_capabilities;
      hypercall.arg[1] = (unsigned long)&xen_caps;
  
--    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, (ulong)&hypercall);
+-    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, &hypercall);
 +    rc = ioctl(_dom0_fd, IOCTL_PRIVCMD_HYPERCALL, (unsigned long)&hypercall);
      munlock(&xen_caps, sizeof(xen_caps));
      XGTRC("XENCAPS:%s\n", xen_caps);
  
 -- 
-1.9.1
-
-
-From e31fc86fdd20698b5cb011cbb4cf09410113645f Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:11 +0100
-Subject: [PATCH] xen-configure-xend.patch
-
----
- tools/examples/xend-config.sxp | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp
-index 0896a27..cea12e1 100644
---- a/tools/examples/xend-config.sxp
-+++ b/tools/examples/xend-config.sxp
-@@ -58,11 +58,11 @@
- #(xend-http-server no)
--#(xend-unix-server no)
-+(xend-unix-server yes)
- #(xend-tcp-xmlrpc-server no)
- #(xend-unix-xmlrpc-server yes)
--#(xend-relocation-server no)
--(xend-relocation-server yes)
-+(xend-relocation-server no)
-+#(xend-relocation-server yes)
- #(xend-relocation-ssl-server no)
- #(xend-udev-event-server no)
-@@ -170,7 +170,8 @@
- # two fake interfaces per guest domain.  To do things like this, write
- # yourself a wrapper script, and call network-bridge from it, as appropriate.
- #
--(network-script network-bridge)
-+#(network-script network-bridge)
-+(network-script /bin/true)
- # The script used to control virtual interfaces.  This can be overridden on a
- # per-vif basis when creating a domain or a configuring a new vif.  The
-@@ -203,7 +204,7 @@
- # dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
- # This is a minimum both for auto-ballooning (as enabled by
- # enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
--(dom0-min-mem 196)
-+(dom0-min-mem 256)
- # Whether to enable auto-ballooning of dom0 to allow domUs to be created.
- # If enable-dom0-ballooning = no, dom0 will never balloon out.
--- 
-1.9.1
-
-
-From 562971344fe649291934c6a9f07f1077b6946a64 Mon Sep 17 00:00:00 2001
-From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-Date: Thu, 23 Apr 2015 15:06:13 +0100
-Subject: [PATCH] From df2922ce672cc35500e2f3ba041441021f44b41c Mon Sep 17
- 00:00:00 2001 Subject: [PATCH] Limit XEN_DOMCTL_memory_mapping hypercall to
- only process up  to 64 GFNs (or less)
-
-Said hypercall for large BARs can take quite a while. As such
-we can require that the hypercall MUST break up the request
-in smaller values.
-
-Another approach is to add preemption to it - whether we do the
-preemption using hypercall_create_continuation or returning
-EAGAIN to userspace (and have it re-invocate the call) - either
-way the issue we cannot easily solve is that in 'map_mmio_regions'
-if we encounter an error we MUST call 'unmap_mmio_regions' for the
-whole BAR region.
-
-Since the preemption would re-use input fields such as nr_mfns,
-first_gfn, first_mfn - we would lose the original values -
-and only undo what was done in the current round (i.e. ignoring
-anything that was done prior to earlier preemptions).
-
-Unless we re-used the return value as 'EAGAIN|nr_mfns_done<<10' but
-that puts a limit (since the return value is a long) on the amount
-of nr_mfns that can provided.
-
-This patch sidesteps this problem by:
- - Setting an hard limit of nr_mfns having to be 64 or less.
- - Toolstack adjusts correspondingly to the nr_mfn limit.
- - If the there is an error when adding the toolstack will call the
-   remove operation to remove the whole region.
-
-The need to break this hypercall down is for large BARs can take
-more than the guest (initial domain usually) time-slice. This has
-the negative result in that the guest is locked out for a long
-duration and is unable to act on any pending events.
-
-We also augment the code to return zero if nr_mfns instead
-of trying to the hypercall.
-
-Suggested-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Jan Beulich <jbeulich@suse.com>
-Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
----
- tools/libxc/xc_domain.c     | 55 ++++++++++++++++++++++++++++++++++++++++-----
- xen/arch/x86/domctl.c       |  5 +++++
- xen/include/public/domctl.h |  1 +
- 3 files changed, 56 insertions(+), 5 deletions(-)
-
-diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
-index 369c3f3..40ca771 100644
---- a/tools/libxc/xc_domain.c
-+++ b/tools/libxc/xc_domain.c
-@@ -1641,6 +1641,13 @@ failed:
-     return -1;
- }
-+#ifndef min
-+#define min(X, Y) ({                             \
-+            const typeof (X) _x = (X);           \
-+            const typeof (Y) _y = (Y);           \
-+            (void) (&_x == &_y);                 \
-+            (_x < _y) ? _x : _y; })
-+#endif
- int xc_domain_memory_mapping(
-     xc_interface *xch,
-     uint32_t domid,
-@@ -1650,17 +1657,55 @@ int xc_domain_memory_mapping(
-     uint32_t add_mapping)
- {
-     DECLARE_DOMCTL;
-+    int ret = 0, err;
-+    unsigned long done = 0, nr, max_batch_sz;
-+
-+    if ( !nr_mfns )
-+        return 0;
-     domctl.cmd = XEN_DOMCTL_memory_mapping;
-     domctl.domain = domid;
--    domctl.u.memory_mapping.first_gfn = first_gfn;
--    domctl.u.memory_mapping.first_mfn = first_mfn;
--    domctl.u.memory_mapping.nr_mfns = nr_mfns;
-     domctl.u.memory_mapping.add_mapping = add_mapping;
-+    max_batch_sz = nr_mfns;
-+    do
-+    {
-+        nr = min(nr_mfns - done, max_batch_sz);
-+        domctl.u.memory_mapping.nr_mfns = nr;
-+        domctl.u.memory_mapping.first_gfn = first_gfn + done;
-+        domctl.u.memory_mapping.first_mfn = first_mfn + done;
-+        err = do_domctl(xch, &domctl);
-+        if ( err && errno == E2BIG )
-+        {
-+            if ( max_batch_sz <= 1 )
-+                break;
-+            max_batch_sz >>= 1;
-+            continue;
-+        }
-+        /* Save the first error... */
-+        if ( !ret )
-+            ret = err;
-+        /* .. and ignore the rest of them when removing. */
-+        if ( err && add_mapping != DPCI_REMOVE_MAPPING )
-+            break;
--    return do_domctl(xch, &domctl);
--}
-+        done += nr;
-+    } while ( done < nr_mfns );
-+    /*
-+     * Undo what we have done unless unmapping, by unmapping the entire region.
-+     * Errors here are ignored.
-+     */
-+    if ( ret && add_mapping != DPCI_REMOVE_MAPPING )
-+        xc_domain_memory_mapping(xch, domid, first_gfn, first_mfn, nr_mfns,
-+                                 DPCI_REMOVE_MAPPING);
-+
-+    /* We might get E2BIG so many times that we never advance. */
-+    if ( !done && !ret )
-+        ret = -1;
-+
-+    return ret;
-+}
-+#undef min
- int xc_domain_ioport_mapping(
-     xc_interface *xch,
-     uint32_t domid,
-diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
-index f5e9e2c..ea76a4f 100644
---- a/xen/arch/x86/domctl.c
-+++ b/xen/arch/x86/domctl.c
-@@ -655,6 +655,11 @@ long arch_do_domctl(
-              (gfn + nr_mfns - 1) < gfn ) /* wrap? */
-             break;
-+        ret = -E2BIG;
-+        /* Must break hypercall up as this could take a while. */
-+        if ( nr_mfns > 64 )
-+            break;
-+
-         ret = -EPERM;
-         if ( !iomem_access_permitted(current->domain, mfn, mfn + nr_mfns - 1) )
-             break;
-diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
-index 7e0b517..a151b29 100644
---- a/xen/include/public/domctl.h
-+++ b/xen/include/public/domctl.h
-@@ -519,6 +519,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_pt_irq_t);
- /* Bind machine I/O address range -> HVM address range. */
-+/* If this returns -E2BIG lower nr_mfns value. */
- /* XEN_DOMCTL_memory_mapping */
- #define DPCI_ADD_MAPPING         1
- #define DPCI_REMOVE_MAPPING      0
--- 
-1.9.1
-
-
-From 28c31f5a03835a594ff55664e5072ca89034b5d4 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:13 +0100
-Subject: [PATCH] domctl: don't allow a toolstack domain to call domain_pause()
- on itself
-
-These DOMCTL subops were accidentally declared safe for disaggregation
-in the wake of XSA-77.
+Anthony PERARD
 
-This is XSA-127.
 
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
----
- xen/arch/x86/domctl.c | 8 ++++++++
- xen/common/domctl.c   | 6 ++++--
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
-index ea76a4f..f01771d 100644
---- a/xen/arch/x86/domctl.c
-+++ b/xen/arch/x86/domctl.c
-@@ -960,6 +960,10 @@ long arch_do_domctl(
-     {
-         xen_guest_tsc_info_t info;
-+        ret = -EINVAL;
-+        if ( d == current->domain ) /* no domain_pause() */
-+            break;
-+
-         domain_pause(d);
-         tsc_get_info(d, &info.tsc_mode,
-                         &info.elapsed_nsec,
-@@ -975,6 +979,10 @@ long arch_do_domctl(
-     case XEN_DOMCTL_settscinfo:
-     {
-+        ret = -EINVAL;
-+        if ( d == current->domain ) /* no domain_pause() */
-+            break;
-+
-         domain_pause(d);
-         tsc_set_info(d, domctl->u.tsc_info.info.tsc_mode,
-                      domctl->u.tsc_info.info.elapsed_nsec,
-diff --git a/xen/common/domctl.c b/xen/common/domctl.c
-index 49e2c23..0e7ad3d 100644
---- a/xen/common/domctl.c
-+++ b/xen/common/domctl.c
-@@ -396,8 +396,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
-     case XEN_DOMCTL_resumedomain:
-     {
--        domain_resume(d);
--        ret = 0;
-+        if ( d == current->domain ) /* no domain_pause() */
-+            ret = -EINVAL;
-+        else
-+            domain_resume(d);
-     }
-     break;
--- 
-1.9.1
-
-
-From fba3d4f0d46b13002feb7f122b587ff855593e82 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:09:19 +0100
-Subject: [PATCH] domctl/sysctl: don't leak hypervisor stack to toolstacks
-
-This is XSA-132.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
- xen/arch/x86/domctl.c | 2 +-
- xen/common/sysctl.c   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
-index f01771d..434dc59 100644
---- a/xen/arch/x86/domctl.c
-+++ b/xen/arch/x86/domctl.c
-@@ -958,7 +958,7 @@ long arch_do_domctl(
-     case XEN_DOMCTL_gettscinfo:
-     {
--        xen_guest_tsc_info_t info;
-+        xen_guest_tsc_info_t info = { 0 };
-         ret = -EINVAL;
-         if ( d == current->domain ) /* no domain_pause() */
-diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
-index 0cb6ee1..70202e8 100644
---- a/xen/common/sysctl.c
-+++ b/xen/common/sysctl.c
-@@ -76,7 +76,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
-     case XEN_SYSCTL_getdomaininfolist:
-     { 
-         struct domain *d;
--        struct xen_domctl_getdomaininfo info;
-+        struct xen_domctl_getdomaininfo info = { 0 };
-         u32 num_domains = 0;
-         rcu_read_lock(&domlist_read_lock);
--- 
-1.9.1
-
-
-From 8df95318fde4be67647c8ba557c9afdb91e74009 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Mon, 1 Jun 2015 11:47:24 +0100
-Subject: [PATCH] gnttab: add missing version check to GNTTABOP_swap_grant_ref
- handling
-
-... avoiding NULL derefs when the version to use wasn't set yet (via
-GNTTABOP_setup_table or GNTTABOP_set_version).
-
-This is XSA-134.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
----
- xen/common/grant_table.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
-index 107b000..34e1c25 100644
---- a/xen/common/grant_table.c
-+++ b/xen/common/grant_table.c
-@@ -2393,6 +2393,9 @@ __gnttab_swap_grant_ref(grant_ref_t ref_a, grant_ref_t ref_b)
-     spin_lock(&gt->lock);
-+    if ( gt->gt_version == 0 )
-+        PIN_FAIL(out, GNTST_general_error, "grant table not yet set up\n");
-+
-     /* Bounds check on the grant refs */
-     if ( unlikely(ref_a >= nr_grant_entries(d->grant_table)))
-         PIN_FAIL(out, GNTST_bad_gntref, "Bad ref-a (%d).\n", ref_a);
--- 
-1.9.1
-
-
-From b1d22106579832b31b496dd632ee4bf065a12d40 Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Tue, 9 Jun 2015 12:07:14 +0100
-Subject: [PATCH] x86/traps: loop in the correct direction in compat_iret()
-
-This is XSA-136.
-
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
- xen/arch/x86/x86_64/compat/traps.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
-index 5f0ea0a..0b78445 100644
---- a/xen/arch/x86/x86_64/compat/traps.c
-+++ b/xen/arch/x86/x86_64/compat/traps.c
-@@ -119,7 +119,7 @@ unsigned int compat_iret(void)
-         }
-         else if ( ksp > regs->_esp )
-         {
--            for (i = 9; i > 0; ++i)
-+            for ( i = 9; i > 0; --i )
-             {
-                 rc |= __get_user(x, (u32 *)regs->rsp + i);
-                 rc |= __put_user(x, (u32 *)(unsigned long)ksp + i);
--- 
-1.9.1
-
-
-From 29163aac514ea212ec912d417d2b2f13079d1148 Mon Sep 17 00:00:00 2001
+From 12d5ce31545c05ae79658b9a94725b9960dfd648 Mon Sep 17 00:00:00 2001
 From: Ian Jackson <ian.jackson@eu.citrix.com>
 Date: Mon, 15 Jun 2015 14:50:42 +0100
 Subject: [PATCH] From 593fe52faa1b85567a7ec20c69d8cfbc7368ae5b Mon Sep 17
@@ -1010,7 +296,7 @@ Acked-by: Ian Campbell <ian,campbell@citrix.com>
  1 file changed, 40 insertions(+), 24 deletions(-)
 
 diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
-index d1c45e4..f5c8656 100644
+index ed0d478..4a8af47 100644
 --- a/tools/libxl/xl_cmdimpl.c
 +++ b/tools/libxl/xl_cmdimpl.c
 @@ -151,7 +151,7 @@ struct domain_create {
@@ -1022,7 +308,7 @@ index d1c45e4..f5c8656 100644
      const char *restore_file;
      int migrate_fd; /* -1 means none */
      char **migration_domname_r; /* from malloc */
-@@ -4319,11 +4319,25 @@ int main_vm_list(int argc, char **argv)
+@@ -4570,11 +4570,25 @@ int main_vm_list(int argc, char **argv)
      return 0;
  }
  
@@ -1050,7 +336,7 @@ index d1c45e4..f5c8656 100644
      struct domain_create dom_info;
      int paused = 0, debug = 0, daemonize = 1, console_autoconnect = 0,
          quiet = 0, monitor = 1, vnc = 0, vncautopass = 0;
-@@ -4338,6 +4352,8 @@ int main_create(int argc, char **argv)
+@@ -4589,6 +4603,8 @@ int main_create(int argc, char **argv)
          {0, 0, 0, 0}
      };
  
@@ -1059,7 +345,7 @@ index d1c45e4..f5c8656 100644
      if (argv[1] && argv[1][0] != '-' && !strchr(argv[1], '=')) {
          filename = argv[1];
          argc--; argv++;
-@@ -4377,20 +4393,21 @@ int main_create(int argc, char **argv)
+@@ -4628,20 +4644,21 @@ int main_create(int argc, char **argv)
          break;
      }
  
@@ -1086,7 +372,7 @@ index d1c45e4..f5c8656 100644
      dom_info.debug = debug;
      dom_info.daemonize = daemonize;
      dom_info.monitor = monitor;
-@@ -4398,16 +4415,18 @@ int main_create(int argc, char **argv)
+@@ -4649,16 +4666,18 @@ int main_create(int argc, char **argv)
      dom_info.dryrun = dryrun_only;
      dom_info.quiet = quiet;
      dom_info.config_file = filename;
@@ -1107,7 +393,7 @@ index d1c45e4..f5c8656 100644
      return 0;
  }
  
-@@ -4415,8 +4434,7 @@ int main_config_update(int argc, char **argv)
+@@ -4666,8 +4685,7 @@ int main_config_update(int argc, char **argv)
  {
      uint32_t domid;
      const char *filename = NULL;
@@ -1117,7 +403,7 @@ index d1c45e4..f5c8656 100644
      void *config_data = 0;
      int config_len = 0;
      libxl_domain_config d_config;
-@@ -4451,15 +4469,15 @@ int main_config_update(int argc, char **argv)
+@@ -4705,15 +4723,15 @@ int main_config_update(int argc, char **argv)
          break;
      }
  
@@ -1137,7 +423,7 @@ index d1c45e4..f5c8656 100644
              return 2;
          }
      }
-@@ -4468,7 +4486,8 @@ int main_config_update(int argc, char **argv)
+@@ -4722,7 +4740,8 @@ int main_config_update(int argc, char **argv)
          rc = libxl_read_file_contents(ctx, filename,
                                        &config_data, &config_len);
          if (rc) { fprintf(stderr, "Failed to read config file: %s: %s\n",
@@ -1147,7 +433,7 @@ index d1c45e4..f5c8656 100644
          if (strlen(extra_config)) {
              if (config_len > INT_MAX - (strlen(extra_config) + 2 + 1)) {
                  fprintf(stderr, "Failed to attach extra configration\n");
-@@ -4509,7 +4528,7 @@ int main_config_update(int argc, char **argv)
+@@ -4763,7 +4782,7 @@ int main_config_update(int argc, char **argv)
      libxl_domain_config_dispose(&d_config);
  
      free(config_data);
@@ -1156,7 +442,7 @@ index d1c45e4..f5c8656 100644
      return 0;
  }
  
-@@ -6558,7 +6577,7 @@ int main_cpupoolcreate(int argc, char **argv)
+@@ -7020,7 +7039,7 @@ int main_cpupoolcreate(int argc, char **argv)
  {
      const char *filename = NULL, *config_src=NULL;
      const char *p;
@@ -1165,7 +451,7 @@ index d1c45e4..f5c8656 100644
      int opt;
      static struct option opts[] = {
          {"defconfig", 1, 0, 'f'},
-@@ -6592,13 +6611,10 @@ int main_cpupoolcreate(int argc, char **argv)
+@@ -7054,13 +7073,10 @@ int main_cpupoolcreate(int argc, char **argv)
          break;
      }
  
@@ -1182,139 +468,10 @@ index d1c45e4..f5c8656 100644
              filename = argv[optind];
          } else {
 -- 
-1.9.1
-
+Anthony PERARD
 
-From f987dd961ef49b5f24e0b5748eef497e61c74db7 Mon Sep 17 00:00:00 2001
-From: Wen Congyang <wency@cn.fujitsu.com>
-Date: Thu, 23 Apr 2015 15:06:13 +0100
-Subject: [PATCH] tools: libxl: pass correct file to qemu if we use blktap2
 
-If we use blktap2, the correct file should be blktap device
-not the pdev_path.
-
-Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
-Cc: Shriram Rajagopalan <rshriram@cs.ubc.ca>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
----
- tools/libxl/libxl_dm.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
-index 4dbfddc..d855fc6 100644
---- a/tools/libxl/libxl_dm.c
-+++ b/tools/libxl/libxl_dm.c
-@@ -696,6 +696,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
-                 libxl__device_disk_dev_number(disks[i].vdev, &disk, &part);
-             const char *format = qemu_disk_format_string(disks[i].format);
-             char *drive;
-+            const char *pdev_path;
-             if (dev_number == -1) {
-                 LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "unable to determine"
-@@ -725,6 +726,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
-                     continue;
-                 }
-+                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
-+                    pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
-+                                                      disks[i].format);
-+                else
-+                    pdev_path = disks[i].pdev_path;
-+
-                 /*
-                  * Explicit sd disks are passed through as is.
-                  *
-@@ -734,11 +741,11 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
-                 if (strncmp(disks[i].vdev, "sd", 2) == 0)
-                     drive = libxl__sprintf
-                         (gc, "file=%s,if=scsi,bus=0,unit=%d,format=%s,cache=writeback",
--                         disks[i].pdev_path, disk, format);
-+                         pdev_path, disk, format);
-                 else if (disk < 4)
-                     drive = libxl__sprintf
-                         (gc, "file=%s,if=ide,index=%d,media=disk,format=%s,cache=writeback",
--                         disks[i].pdev_path, disk, format);
-+                         pdev_path, disk, format);
-                 else
-                     continue; /* Do not emulate this disk */
-             }
--- 
-1.9.1
-
-
-From bfa867b527e5610ec846061ee1e7b534ef5ad19f Mon Sep 17 00:00:00 2001
-From: George Dunlap <george.dunlap@eu.citrix.com>
-Date: Thu, 23 Apr 2015 15:06:13 +0100
-Subject: [PATCH] it: George Dunlap <george.dunlap@eu.citrix.com>
-
-libxl: Tell qemu to use raw format when using a tapdisk
-
-At the moment libxl unconditinally passes the underlying file format
-to qemu in the device string.  However, when tapdisk is in use,
-tapdisk handles the underlying format and presents qemu with
-effectively a raw disk.  When qemu looks at the tapdisk block device
-and doesn't find the image format it was looking for, it will fail.
-
-This effectively means that tapdisk cannot be used with HVM domains at
-the moment except for raw files.
-
-Instead, if we're using a tapdisk backend, tell qemu to use a raw file
-format.
-
-Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
----
-CC: Ian Campbell <ian.campbell@citrix.com>
-CC: Ian Jackson <ian.jackson@citrix.com>
-CC: Wei Liu <wei.liu2@citrix.com>
-CC: Konrad Wilk <konrad.wilk@oracle.com>
-
-Release exception justification: This fixes a bug in functionality, in
-that at the moment HVM guests cannot boot with tapdisk and vhd format.
-
-This is not a regression in xl functionality per se, since (AFAICT)
-this has never worked.  However, given that 4.5 is the first release
-without xend, this *does* represent a regression in functionality for
-Xen as a whole (since before people using hvm guest with vhd on blktap
-could use xend).
-
-The fix is very simple and should only affect codepaths that already
-don't work, so the risk of regressions should be very low.
-
-While preparing this patch, I also noticed that cdroms will ignore the
-backend parameter and treat everything as a file.  This is a bug but I
-think it's a much less important one to address this late in the
-release cycle.
----
- tools/libxl/libxl_dm.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
-index d855fc6..44c3db0 100644
---- a/tools/libxl/libxl_dm.c
-+++ b/tools/libxl/libxl_dm.c
-@@ -726,11 +726,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
-                     continue;
-                 }
--                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP)
-+                if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
-+                    format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
-                     pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
-                                                       disks[i].format);
--                else
-+                } else {
-                     pdev_path = disks[i].pdev_path;
-+                }
-+
-                 /*
-                  * Explicit sd disks are passed through as is.
--- 
-1.9.1
-
-
-From 78bb4fadfb3171b532a2e7fabe7f037398201fa5 Mon Sep 17 00:00:00 2001
+From ccef6592070bc9c80a1f79480c50677cd1d11e4c Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:13 +0100
 Subject: [PATCH] Revert "libxl: prefer qdisk over blktap when choosing disk
@@ -1333,10 +490,10 @@ Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
-index 29ed547..0f9fe2d 100644
+index 4b51ded..d506913 100644
 --- a/tools/libxl/libxl_device.c
 +++ b/tools/libxl/libxl_device.c
-@@ -278,8 +278,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
+@@ -290,8 +290,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
      } else {
          ok=
              disk_try_backend(&a, LIBXL_DISK_BACKEND_PHY) ?:
@@ -1348,10 +505,10 @@ index 29ed547..0f9fe2d 100644
              LOG(DEBUG, "Disk vdev=%s, using backend %s",
                         disk->vdev,
 -- 
-1.9.1
+Anthony PERARD
 
 
-From e9c4f5d7e40163c9a8a3febcb0ad5a5d174f750e Mon Sep 17 00:00:00 2001
+From e78c86659cfc8bd983245be0407bebb5111bc76c Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:13 +0100
 Subject: [PATCH] xen-centos-disable-CFLAGS-for-qemu.patch
@@ -1361,22 +518,22 @@ Subject: [PATCH] xen-centos-disable-CFLAGS-for-qemu.patch
  1 file changed, 1 insertion(+)
 
 diff --git a/tools/Makefile b/tools/Makefile
-index 6610a8d..86d8a58 100644
+index 77a598a..cf6beff 100644
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -186,6 +186,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
+@@ -204,6 +204,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
                source=.; \
        fi; \
        cd qemu-xen-dir; \
 +      env -u CFLAGS \
        $$source/configure --enable-xen --target-list=i386-softmmu \
                $(QEMU_XEN_ENABLE_DEBUG) \
-               --prefix=$(PREFIX) \
+               --prefix=$(LIBEXEC) \
 -- 
-1.9.1
+Anthony PERARD
 
 
-From 9fb513d9e6443e663e433e5172c1b53365cdc47c Mon Sep 17 00:00:00 2001
+From cf57c86edbaa9df0ce9eab1c2b9174a5869a35b5 Mon Sep 17 00:00:00 2001
 From: George Dunlap <george.dunlap@eu.citrix.com>
 Date: Thu, 23 Apr 2015 15:06:13 +0100
 Subject: [PATCH] Adapt libxl to use blktap 2.5 v0.9.2
@@ -1391,11 +548,11 @@ Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
  5 files changed, 59 insertions(+), 17 deletions(-)
 
 diff --git a/tools/Rules.mk b/tools/Rules.mk
-index 13d8fc1..df84f98 100644
+index 87a56dc..3ac9397 100644
 --- a/tools/Rules.mk
 +++ b/tools/Rules.mk
-@@ -46,9 +46,9 @@ LIBXL_BLKTAP ?= n
- endif
+@@ -57,9 +57,9 @@ SHLIB_libxenvchan  = -Wl,-rpath-link=$(XEN_LIBVCHAN)
+ LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
  
  ifeq ($(LIBXL_BLKTAP),y)
 -CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude)
@@ -1408,10 +565,10 @@ index 13d8fc1..df84f98 100644
  CFLAGS_libblktapctl =
  LDLIBS_libblktapctl =
 diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
-index 59e3292..5ff2bd6 100644
+index 489d5f8..39bdac1 100644
 --- a/tools/libxl/libxl.c
 +++ b/tools/libxl/libxl.c
-@@ -2143,7 +2143,8 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
+@@ -2474,7 +2474,8 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
              case LIBXL_DISK_BACKEND_TAP:
                  if (dev == NULL) {
                      dev = libxl__blktap_devpath(gc, disk->pdev_path,
@@ -1421,7 +578,7 @@ index 59e3292..5ff2bd6 100644
                      if (!dev) {
                          LOG(ERROR, "failed to get blktap devpath for %p\n",
                              disk->pdev_path);
-@@ -2645,7 +2646,8 @@ void libxl__device_disk_local_initiate_attach(libxl__egc *egc,
+@@ -3068,7 +3069,8 @@ void libxl__device_disk_local_initiate_attach(libxl__egc *egc,
                  break;
              case LIBXL_DISK_FORMAT_VHD:
                  dev = libxl__blktap_devpath(gc, disk->pdev_path,
@@ -1539,10 +696,10 @@ index 2053403..24939d7 100644
      }
  
 diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
-index 44c3db0..579957a 100644
+index 094a133..b6a7546 100644
 --- a/tools/libxl/libxl_dm.c
 +++ b/tools/libxl/libxl_dm.c
-@@ -729,7 +729,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
+@@ -817,7 +817,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                  if (disks[i].backend == LIBXL_DISK_BACKEND_TAP) {
                      format = qemu_disk_format_string(LIBXL_DISK_FORMAT_RAW);
                      pdev_path = libxl__blktap_devpath(gc, disks[i].pdev_path,
@@ -1553,10 +710,10 @@ index 44c3db0..579957a 100644
                      pdev_path = disks[i].pdev_path;
                  }
 diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
-index 9d17586..144d571 100644
+index a1624fd..149dc0b 100644
 --- a/tools/libxl/libxl_internal.h
 +++ b/tools/libxl/libxl_internal.h
-@@ -1394,7 +1394,8 @@ _hidden int libxl__blktap_enabled(libxl__gc *gc);
+@@ -1550,7 +1550,8 @@ _hidden int libxl__blktap_enabled(libxl__gc *gc);
   */
  _hidden char *libxl__blktap_devpath(libxl__gc *gc,
                                      const char *disk,
@@ -1567,5 +724,321 @@ index 9d17586..144d571 100644
  /* libxl__device_destroy_tapdisk:
   *   Destroys any tapdisk process associated with the backend represented
 -- 
-1.9.1
+Anthony PERARD
+
+
+From 20c7f36f3485d84ba2dd8c6c37b92f325794c29f Mon Sep 17 00:00:00 2001
+From: Julien Grall <julien.grall@linaro.org>
+Date: Sun, 27 Apr 2014 20:53:20 +0100
+Subject: [PATCH] WORKAROUND: arm64: Fixup PSR
+
+---
+ xen/include/public/arch-arm.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
+index e711606..72d641f 100644
+--- a/xen/include/public/arch-arm.h
++++ b/xen/include/public/arch-arm.h
+@@ -341,6 +341,15 @@ typedef uint64_t xen_callback_t;
+ #define PSR_MODE_SYS 0x1f
+ /* 64 bit modes */
++#undef PSR_MODE_BIT
++#undef PSR_MODE_EL3h
++#undef PSR_MODE_EL3t
++#undef PSR_MODE_EL2h
++#undef PSR_MODE_EL2t
++#undef PSR_MODE_EL1h
++#undef PSR_MODE_EL1t
++#undef PSR_MODE_EL0t
++
+ #define PSR_MODE_BIT  0x10 /* Set iff AArch32 */
+ #define PSR_MODE_EL3h 0x0d
+ #define PSR_MODE_EL3t 0x0c
+-- 
+Anthony PERARD
+
+From 40438b3e343e28738a51cd9075783fae0c42ba75 Mon Sep 17 00:00:00 2001
+From: Anthony PERARD <anthony.perard@citrix.com>
+Date: Tue, 11 Aug 2015 11:06:20 +0000
+Subject: [PATCH] fix with --disable-blktap2
+
+---
+ tools/libxl/libxl_noblktap2.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tools/libxl/libxl_noblktap2.c b/tools/libxl/libxl_noblktap2.c
+index 5a86ed1..da55ab1 100644
+--- a/tools/libxl/libxl_noblktap2.c
++++ b/tools/libxl/libxl_noblktap2.c
+@@ -23,7 +23,8 @@ int libxl__blktap_enabled(libxl__gc *gc)
+ char *libxl__blktap_devpath(libxl__gc *gc,
+                             const char *disk,
+-                            libxl_disk_format format)
++                            libxl_disk_format format,
++                            int readwrite)
+ {
+     return NULL;
+ }
+-- 
+Anthony PERARD
+
+From stefano.stabellini@eu.citrix.com Wed Aug 12 16:01:30 2015
+Date: Wed, 12 Aug 2015 16:00:00 +0100
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Subject: updated backport patch for centos
+
+xen/arm: support compressed kernels
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+---
+ xen/arch/arm/kernel.c |  156 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 156 insertions(+)
+
+diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
+index f641b12..35692e1 100644
+--- a/xen/arch/arm/kernel.c
++++ b/xen/arch/arm/kernel.c
+@@ -13,6 +13,7 @@
+ #include <asm/byteorder.h>
+ #include <asm/setup.h>
+ #include <xen/libfdt/libfdt.h>
++#include <xen/vmap.h>
+ #include "kernel.h"
+@@ -258,6 +259,122 @@ static int kernel_uimage_probe(struct kernel_info *info,
+ }
+ #ifdef CONFIG_ARM_64
++
++#define HEAPORDER 3
++
++static unsigned char *__initdata window;
++#define memptr long
++static memptr __initdata free_mem_ptr;
++static memptr __initdata free_mem_end_ptr;
++
++#define WSIZE           0x80000000
++
++static unsigned char *__initdata inbuf;
++static unsigned __initdata insize;
++
++/* Index of next byte to be processed in inbuf: */
++static unsigned __initdata inptr;
++
++/* Bytes in output buffer: */
++static unsigned __initdata outcnt;
++
++#define OF(args)        args
++#define STATIC          static
++
++#define memzero(s, n)   memset((s), 0, (n))
++
++typedef unsigned char   uch;
++typedef unsigned short  ush;
++typedef unsigned long   ulg;
++
++#define INIT            __init
++#define INITDATA        __initdata
++
++#define get_byte()      (inptr < insize ? inbuf[inptr++] : fill_inbuf())
++
++#ifdef DEBUG
++#  define Assert(cond, msg) do { if (!(cond)) error(msg); } while (0)
++#  define Trace(x)      do { fprintf x; } while (0)
++#  define Tracev(x)     do { if (verbose) fprintf x ; } while (0)
++#  define Tracevv(x)    do { if (verbose > 1) fprintf x ; } while (0)
++#  define Tracec(c, x)  do { if (verbose && (c)) fprintf x ; } while (0)
++#  define Tracecv(c, x) do { if (verbose > 1 && (c)) fprintf x ; } while (0)
++#else
++#  define Assert(cond, msg)
++#  define Trace(x)
++#  define Tracev(x)
++#  define Tracevv(x)
++#  define Tracec(c, x)
++#  define Tracecv(c, x)
++#endif
++
++static long __initdata bytes_out;
++static void flush_window(void);
++
++static __init void error(char *x)
++{
++    panic("%s", x);
++}
++
++static __init int fill_inbuf(void)
++{
++        error("ran out of input data");
++        return 0;
++}
++
++#include "../../common/inflate.c"
++
++static __init void flush_window(void)
++{
++    /*
++     * The window is equal to the output buffer therefore only need to
++     * compute the crc.
++     */
++    unsigned long c = crc;
++    unsigned n;
++    unsigned char *in, ch;
++
++    in = window;
++    for ( n = 0; n < outcnt; n++ )
++    {
++        ch = *in++;
++        c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
++    }
++    crc = c;
++
++    bytes_out += (unsigned long)outcnt;
++    outcnt = 0;
++}
++
++static __init int perform_gunzip(char *output, char *image, unsigned long image_len)
++{
++    int rc;
++
++    window = (unsigned char *)output;
++
++    free_mem_ptr = (unsigned long)alloc_xenheap_pages(HEAPORDER, 0);
++    free_mem_end_ptr = free_mem_ptr + (PAGE_SIZE << HEAPORDER);
++
++    inbuf = (unsigned char *)image;
++    insize = image_len;
++    inptr = 0;
++
++    makecrc();
++
++    if ( gunzip() < 0 )
++    {
++        rc = -EINVAL;
++    }
++    else
++    {
++        rc = 0;
++    }
++
++    free_xenheap_pages((void *)free_mem_ptr, HEAPORDER);
++
++    return rc;
++}
++
+ /*
+  * Check if the image is a 64-bit Image.
+  */
+@@ -310,6 +427,43 @@ static int kernel_zimage64_probe(struct kernel_info *info,
+     return 0;
+ }
++
++static unsigned long output_length(char *image, unsigned long image_len)
++{
++    return *(uint32_t *)&image[image_len - 4];
++}
++
++static int kernel_zimage64_compressed_probe(struct kernel_info *info,
++                                 paddr_t addr, paddr_t size)
++{
++    char *output, *input;
++    unsigned char magic[2];
++    int rc;
++    unsigned kernel_order_in;
++    unsigned kernel_order_out;
++    paddr_t output_size;
++    
++    copy_from_paddr(magic, addr, sizeof(magic));
++
++    if (!((magic[0] == 0x1f) && ((magic[1] == 0x8b) || (magic[1] == 0x9e))))
++        return -EINVAL;
++
++    kernel_order_in = get_order_from_bytes(size);
++    input = (char *)ioremap_cache(addr, size);
++
++    output_size = output_length(input, size);
++    kernel_order_out = get_order_from_bytes(output_size);
++    output = (char *)alloc_xenheap_pages(kernel_order_out, 0);
++
++    rc = perform_gunzip(output, input, size);
++    clean_dcache_va_range(output, output_size);
++    iounmap(input);
++
++    if (rc != 0)
++        return rc;
++
++    return kernel_zimage64_probe(info, virt_to_maddr(output), output_size);
++}
+ #endif
+ /*
+@@ -466,6 +620,8 @@ int kernel_probe(struct kernel_info *info)
+ #ifdef CONFIG_ARM_64
+     rc = kernel_zimage64_probe(info, start, size);
+     if (rc < 0)
++        rc = kernel_zimage64_compressed_probe(info, start, size);
++    if (rc < 0)
+ #endif
+         rc = kernel_uimage_probe(info, start, size);
+     if (rc < 0)
+-- 
+1.7.10.4
+
+
+From f64a891386fc89a8c1642dba02b2f9a13d2500af Mon Sep 17 00:00:00 2001
+From: Anthony PERARD <anthony.perard@citrix.com>
+Date: Wed, 12 Aug 2015 16:43:52 +0000
+Subject: [PATCH] context of var-lib-xenstored.
+
+---
+ tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in b/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in
+index 11a7d50..ed8f4d0 100644
+--- a/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in
++++ b/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in
+@@ -9,4 +9,4 @@ RefuseManualStop=true
+ What=xenstore
+ Where=@XEN_LIB_STORED@
+ Type=tmpfs
+-Options=mode=755
++Options=mode=755,context="system_u:object_r:xenstored_var_lib_t:s0"
+-- 
+Anthony PERARD
+
+From ad91ab02e9809395d743dc5a1175be1426ff2c99 Mon Sep 17 00:00:00 2001
+From: Anthony PERARD <anthony.perard@citrix.com>
+Date: Thu, 13 Aug 2015 18:11:56 +0000
+Subject: [PATCH] fix xenstore launch.
+
+the sh -c exec xenstore does not appear to works with centos systemd 208 + socket + selinux.
+---
+ tools/hotplug/Linux/systemd/xenstored.service.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in b/tools/hotplug/Linux/systemd/xenstored.service.in
+index a5f836b..1d43487 100644
+--- a/tools/hotplug/Linux/systemd/xenstored.service.in
++++ b/tools/hotplug/Linux/systemd/xenstored.service.in
+@@ -10,12 +10,11 @@ ConditionPathExists=/proc/xen/capabilities
+ Type=notify
+ KillMode=none
+ Environment=XENSTORED_ARGS=
+-Environment=XENSTORED=@XENSTORED@
+ EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
+ ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
+ ExecStartPre=-/bin/rm -f @XEN_LIB_STORED@/tdb*
+ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@
+-ExecStart=/bin/sh -c "exec $XENSTORED --no-fork $XENSTORED_ARGS"
++ExecStart=@XENSTORED@ --no-fork $XENSTORED_ARGS"
+ [Install]
+ WantedBy=multi-user.target
+-- 
+Anthony PERARD
 
diff --git a/SOURCES/xen-watchdog.service b/SOURCES/xen-watchdog.service
deleted file mode 100644 (file)
index 8fd225a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Xen-watchdog - run xen watchdog daemon
-Requires=proc-xen.mount
-After=proc-xen.mount xend.service
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/xenwatchdogd 30 15
-KillSignal=USR1
-
-[Install]
-WantedBy=multi-user.target
diff --git a/SOURCES/xenconsoled.service b/SOURCES/xenconsoled.service
deleted file mode 100644 (file)
index 4c5429f..0000000
+++ /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/sysconfig/xenconsoled
-PIDFile=/var/run/xenconsoled.pid
-ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/usr/sbin/xenconsoled --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
-
-[Install]
-WantedBy=multi-user.target
diff --git a/SOURCES/xend.service b/SOURCES/xend.service
deleted file mode 100644 (file)
index c9abb9f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=Xend - interface between hypervisor and some applications
-Requires=proc-xen.mount
-After=proc-xen.mount
-Before=libvirtd.service libvirt-guests.service
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=forking
-PIDFile=/var/run/xend.pid
-Environment=HOME=/root
-ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/usr/sbin/xend
-
-[Install]
-WantedBy=multi-user.target
diff --git a/SOURCES/xendomains.service b/SOURCES/xendomains.service
deleted file mode 100644 (file)
index 0bd72d7..0000000
+++ /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=/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=-/usr/libexec/xendomains start
-ExecStop=/usr/libexec/xendomains stop
-
-[Install]
-WantedBy=multi-user.target
diff --git a/SOURCES/xenstored.service b/SOURCES/xenstored.service
deleted file mode 100644 (file)
index 59b640a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Xenstored - daemon managing xenstore file system
-Requires=proc-xen.mount var-lib-xenstored.mount
-After=proc-xen.mount var-lib-xenstored.mount
-Before=libvirtd.service libvirt-guests.service
-RefuseManualStop=true
-ConditionPathExists=/proc/xen
-
-[Service]
-Type=forking
-Environment=XENSTORED_ARGS=
-EnvironmentFile=-/etc/sysconfig/xenstored
-PIDFile=/var/run/xenstored.pid
-ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
-ExecStart=/usr/sbin/xenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
-
-[Install]
-WantedBy=multi-user.target
index e1fb176aecf826d9ee701d703a92fae4fbcf51ce..4760fd58ea5c8b697fdee293448bf46979e431c4 100644 (file)
@@ -1,31 +1,39 @@
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 # Build ocaml bits unless rpmbuild was run with --without ocaml 
 # or ocamlopt is missing (the xen makefile doesn't build ocaml bits if it isn't there)
-%define with_ocaml  1
+%define with_ocaml 0
+# need to fix dependency, xenstored.service will not start unless xen-ocaml is install.
 %define build_ocaml %(test -x %{_bindir}/ocamlopt && echo %{with_ocaml} || echo 0)
 # build an efi boot image (where supported) unless rpmbuild was run with
 # --without efi
 %define build_efi %{?_without_efi: 0} %{?!_without_efi: 1}
 # xen only supports efi boot images on x86_64
 
-#for el6
-%define build_efi 0
-%define with_sysv 1
-%define with_systemd 0
+#for arm64
+%define build_efi 1
+%define with_sysv 0
+%define with_systemd 1
+
+%ifarch aarch64
+%define xen_efi_vendor Xen
+%else
+%define xen_efi_vendor fedora
+%endif
 
 # Hypervisor ABI
-%define hv_abi  4.4
+%define hv_abi  4.5
 
 Summary: Xen is a virtual machine monitor
 Name:    xen
-Version: 4.4.2
-Release: 8%{?dist}
+Version: 4.5.1
+Release: 1%{?dist}
 Group:   Development/Libraries
 License: GPLv2+ and LGPLv2+ and BSD
 URL:     http://xen.org/
 Source0: http://bits.xensource.com/oss-xen/release/%{version}/xen-%{version}.tar.gz
 Source1: %{name}.modules
 Source2: %{name}.logrotate
+%ifnarch aarch64
 # used by stubdoms
 Source10: lwip-1.3.0.tar.gz
 Source11: newlib-1.16.0.tar.gz
@@ -37,69 +45,25 @@ Source15: polarssl-1.1.4-gpl.tgz
 Source23: init.xend
 # sysconfig bits
 Source33: sysconfig.xend
+%endif
 # systemd bits
-Source40: proc-xen.mount
-Source41: var-lib-xenstored.mount
-Source42: xenstored.service
-Source44: xend.service
-Source45: xenconsoled.service
-Source46: xen-watchdog.service
-Source47: xendomains.service
 Source48: libexec.xendomains
 Source49: tmpfiles.d.xen.conf
+%ifarch aarch64
+# This might need to be generated in postinstall
+Source50: efi-xen.cfg
+%endif
 
+%ifnarch aarch64
 Source101: blktap-d73c74874a449c18dc1528076e5c0671cc5ed409.tar.gz
+%endif
 
 Patch1: xen-queue.am
 
+%ifnarch aarch64
 Patch1001: xen-centos-disableWerror-blktap25.patch
 Patch1005: xen-centos-blktap25-ctl-ipc-restart.patch
-
-Patch2001: xsa126-qemuu.patch
-Patch2002: xsa128-qemuu.patch
-Patch2003: xsa129-qemuu.patch
-Patch2004: xsa130-qemuu.patch
-Patch2005: xsa131-qemuu-4.4-1.patch
-Patch2006: xsa131-qemuu-2.patch
-Patch2007: xsa131-qemuu-3.patch
-Patch2008: xsa131-qemuu-4.patch
-Patch2009: xsa131-qemuu-5.patch
-Patch2010: xsa131-qemuu-6.patch
-Patch2011: xsa131-qemuu-7.patch
-Patch2012: xsa131-qemuu-8.patch
-Patch2013: xsa133-qemuu.patch
-Patch2014: xsa135-qemuu-4.5-1.patch
-Patch2015: xsa135-qemuu-4.5-2.patch
-Patch2016: xsa138-qemuu-1.patch
-Patch2017: xsa138-qemuu-2.patch
-Patch2018: xsa138-qemuu-3.patch
-Patch2019: xsa139-qemuu-4.5.patch
-Patch2020: xsa140-qemuu-unstable-1.patch
-Patch2021: xsa140-qemuu-unstable-2.patch
-Patch2022: xsa140-qemuu-unstable-3.patch
-Patch2023: xsa140-qemuu-unstable-4.patch
-Patch2024: xsa140-qemuu-unstable-5.patch
-Patch2025: xsa140-qemuu-unstable-6.patch
-Patch2026: xsa140-qemuu-unstable-7.patch
-
-Patch3001: xsa126-qemut.patch
-Patch3002: xsa128-qemut.patch
-Patch3003: xsa129-qemut.patch
-Patch3004: xsa130-qemut.patch
-Patch3005: xsa131-qemut-1.patch
-Patch3006: xsa131-qemut-2.patch
-Patch3007: xsa131-qemut-3.patch
-Patch3008: xsa131-qemut-4.patch
-Patch3009: xsa131-qemut-5.patch
-Patch3010: xsa131-qemut-6.patch
-Patch3011: xsa131-qemut-7.patch
-Patch3012: xsa131-qemut-8.patch
-Patch3013: xsa133-qemut.patch
-Patch3014: xsa135-qemut-1.patch
-Patch3015: xsa135-qemut-2.patch
-Patch3016: xsa138-qemut-1.patch
-Patch3017: xsa138-qemut-2.patch
-
+%endif
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: transfig libidn-devel zlib-devel texi2html SDL-devel curl-devel
@@ -109,7 +73,7 @@ BuildRequires: ncurses-devel gtk2-devel libaio-devel libtool
 BuildRequires: perl texinfo graphviz
 # so that the makefile knows to install udev rules
 BuildRequires: udev
-%ifnarch ia64
+%ifnarch ia64 aarch64
 # so that x86_64 builds pick up glibc32 correctly
 BuildRequires: /usr/include/gnu/stubs-32.h
 # for the VMX "bios"
@@ -124,8 +88,10 @@ BuildRequires: pciutils-devel
 BuildRequires: libuuid-devel
 # iasl needed to build hvmloader
 BuildRequires: iasl
+%ifnarch aarch64
 # build using Fedora seabios and ipxe packages for roms
 BuildRequires: seabios ipxe-roms-qemu
+%endif
 # modern compressed kernels
 BuildRequires: bzip2-devel xz-devel
 # libfsimage
@@ -146,14 +112,16 @@ Requires: chkconfig
 Requires: module-init-tools
 Requires: gawk
 Requires: grep
-ExclusiveArch: x86_64
+ExclusiveArch: x86_64 aarch64
 %if %with_ocaml
 BuildRequires: ocaml, ocaml-findlib
 %endif
 # efi image needs an ld that has -mi386pep option
+%ifnarch aarch64
 %if %build_efi
 BuildRequires: mingw64-binutils
 %endif
+%endif
 
 %description
 This package contains the XenD daemon and xm command line
@@ -176,7 +144,9 @@ which manage Xen virtual machines.
 Summary: Core Xen runtime environment
 Group: Development/Libraries
 Requires: xen-libs = %{version}-%{release}
+%ifnarch aarch64
 Requires: /usr/bin/qemu-img
+%endif
 # Ensure we at least have a suitable kernel installed, though we can't
 # force user to actually boot it.
 Requires: xen-hypervisor-abi = %{hv_abi}
@@ -264,6 +234,7 @@ git am %{PATCH1}
 
 # Now apply patches to things not in the core Xen repo
 
+%ifnarch aarch64
 pushd `pwd`
 rm -rf ${RPM_BUILD_DIR}/%{name}-%{version}/tools/blktap2
 %{__tar} -C ${RPM_BUILD_DIR}/%{name}-%{version}/tools/ -zxf %{SOURCE101} 
@@ -273,9 +244,11 @@ XEN_VENDORVERSION="-%{release}" ./configure --libdir=%{_libdir} --prefix=/user -
 popd 
 %patch1001 -p1
 %patch1005 -p1
+%endif
 
 %define _default_patch_fuzz 2
 
+%ifnarch aarch64
 pushd tools/qemu-xen
 %patch2001 -p1
 %patch2002 -p1
@@ -324,9 +297,12 @@ pushd tools/qemu-xen-traditional
 %patch3016 -p1
 %patch3017 -p1
 popd
+%endif
 
+%ifnarch aarch64
 # stubdom sources
 cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} stubdom
+%endif
 
 
 %build
@@ -334,18 +310,33 @@ cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} st
 %define ocaml_flags OCAML_TOOLS=n
 %endif
 %if %build_efi
+%ifnarch aarch64
 %define efi_flags LD_EFI=/usr/x86_64-w64-mingw32/bin/ld
-mkdir -p dist/install/boot/efi/efi/fedora
+%endif
+mkdir -p dist/install/boot/efi/efi/Xen
 %endif
 export XEN_VENDORVERSION="-$(echo %{release} | sed 's/.centos.alt//g')"
 export XEN_DOMAIN="centos.org"
 export CFLAGS="$RPM_OPT_FLAGS"
 make %{?_smp_mflags} %{?efi_flags} prefix=/usr dist-xen
-WGET=/bin/false ./configure --enable-xend --libdir=%{_libdir} --with-system-seabios=/usr/share/seabios/bios.bin
+%ifarch aarch64
+%define extra_config_arch --disable-blktap2
+%else
+%define extra_config_arch  --with-system-seabios=/usr/share/seabios/bios.bin --enable-xend
+%endif
+%if %with_systemd
+%define extra_config_systemd --enable-systemd
+%else
+%define extra_config_systemd --disable-systemd
+%endif
+%define extra_config %{?extra_config_systemd} %{?extra_config_arch}
+WGET=/bin/false ./configure --prefix=/usr --libdir=%{_libdir} %{?extra_config}
 make %{?_smp_mflags} %{?ocaml_flags} prefix=/usr dist-tools
 make                 prefix=/usr dist-docs
 unset CFLAGS
+%ifnarch aarch64
 make %{?ocaml_flags} dist-stubdom
+%endif
 
 
 %install
@@ -354,15 +345,19 @@ rm -rf %{buildroot}
 mkdir -p %{buildroot}%{_libdir}/ocaml/stublibs
 %endif
 %if %build_efi
-mkdir -p %{buildroot}/boot/efi/efi/fedora
+mkdir -p %{buildroot}/boot/efi/efi/%{xen_efi_vendor}
 %endif
 export XEN_VENDORVERSION="-$(echo %{release} | sed 's/.centos.alt//g')"
 export XEN_DOMAIN="centos.org"
+export EFI_VENDOR="%{xen_efi_vendor}"
 make DESTDIR=%{buildroot} %{?efi_flags}  prefix=/usr install-xen
 make DESTDIR=%{buildroot} %{?ocaml_flags} prefix=/usr install-tools
 make DESTDIR=%{buildroot} prefix=/usr install-docs
+%ifnarch aarch64
 make DESTDIR=%{buildroot} %{?ocaml_flags} prefix=/usr install-stubdom
+%endif
 %if %build_efi
+install -m 644 %{SOURCE50} %{buildroot}/boot/efi/efi/%{xen_efi_vendor}/xen-%{version}${XEN_VENDORVERSION}.cfg.sample
 mv %{buildroot}/boot/efi/efi %{buildroot}/boot/efi/EFI
 %endif
 
@@ -390,8 +385,10 @@ rm -f %{buildroot}%{_sbindir}/xen-python-path
 rm -rf %{buildroot}/usr/share/xen/man
 rm -rf %{buildroot}/usr/bin/qemu-*-xen
 rm %{buildroot}/usr/libexec/qemu-bridge-helper
+%ifnarch aarch64
 ln -s qemu-img %{buildroot}/%{_bindir}/qemu-img-xen
 ln -s qemu-img %{buildroot}/%{_bindir}/qemu-nbd-xen
+%endif
 for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \
          pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \
          vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb
@@ -403,6 +400,12 @@ rm -f %{buildroot}/%{_mandir}/man8/qemu*
 mkdir -p %{buildroot}/%{_sysconfdir}/qemu/
 mv %{buildroot}/%{_prefix}/%{_sysconfdir}/qemu/* %{buildroot}/%{_sysconfdir}/qemu/
 rm -rf %{buildroot}/%{_prefix}/%{_sysconfdir}
+%ifarch aarch64
+# is this new in Xen 4.5?
+rm %{buildroot}/usr/share/locale/*/LC_MESSAGES/qemu.mo
+rmdir --ignore-fail-on-non-empty -p %{buildroot}/usr/share/locale/*/LC_MESSAGES
+%endif
+
 
 # README's not intended for end users
 rm -f %{buildroot}/%{_sysconfdir}/xen/README*
@@ -426,6 +429,7 @@ rm -rf %{buildroot}/%{_libdir}/efi
 #mv %{buildroot}/etc/udev/xen*.rules %{buildroot}/etc/udev/rules.d
 
 # modules
+# this list sholuld also be available from xen source
 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/modules
 install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/modules/%{name}.modules
 
@@ -442,7 +446,9 @@ install -m 755 %{SOURCE23} %{buildroot}%{_sysconfdir}/rc.d/init.d/xend
 %else
 rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xen-watchdog
 rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xencommons
+%ifnarch aarch64
 rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xend
+%endif
 rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xendomains
 %endif
 
@@ -451,25 +457,22 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
 
 # systemd
 %if %with_systemd
-mkdir -p %{buildroot}%{_unitdir}
-install -m 644 %{SOURCE40} %{buildroot}%{_unitdir}/proc-xen.mount
-install -m 644 %{SOURCE41} %{buildroot}%{_unitdir}/var-lib-xenstored.mount
-install -m 644 %{SOURCE42} %{buildroot}%{_unitdir}/xenstored.service
-install -m 644 %{SOURCE44} %{buildroot}%{_unitdir}/xend.service
-install -m 644 %{SOURCE45} %{buildroot}%{_unitdir}/xenconsoled.service
-install -m 644 %{SOURCE46} %{buildroot}%{_unitdir}/xen-watchdog.service
-install -m 644 %{SOURCE47} %{buildroot}%{_unitdir}/xendomains.service
-mkdir -p %{buildroot}%{_libexecdir}
-install -m 644 %{SOURCE48} %{buildroot}%{_libexecdir}/xendomains
+#mkdir -p %{buildroot}%{_libexecdir}
+#install -m 644 %{SOURCE48} %{buildroot}%{_libexecdir}/xendomains
 mkdir -p %{buildroot}/usr/lib/tmpfiles.d
 install -m 644 %{SOURCE49} %{buildroot}/usr/lib/tmpfiles.d/xen.conf
+
+# there is something to load modules from the package
+rm %{buildroot}/usr/lib/modules-load.d/xen.conf
 %endif
 
 # config file only used for hotplug, Fedora uses udev instead
 rm -f %{buildroot}/%{_sysconfdir}/sysconfig/xend
 
+%ifnarch aarch64
 #add new sysconfig/xend
 install -m 644 %{SOURCE33} %{buildroot}%{_sysconfdir}/sysconfig/xend
+%endif
 
 ############ create dirs in /var ############
 
@@ -482,9 +485,11 @@ mkdir -p %{buildroot}%{_localstatedir}/run/xenstored
 
 ############ create symlink for x86_64 for compatibility with 3.4 ############
 
+%ifnarch aarch64
 %if "%{_libdir}" != "/usr/lib"
 ln -s /usr/lib/%{name}/bin/qemu-dm %{buildroot}/%{_libdir}/%{name}/bin/qemu-dm
 %endif
+%endif
 
 ############ debug packaging: list files ############
 
@@ -493,7 +498,7 @@ diff -u f1.list f2.list || true
 
 ############ assemble license files ############
 
-mkdir licensedir
+mkdir -p licensedir
 # avoid licensedir to avoid recursion, also stubdom/ioemu and dist
 # which are copies of files elsewhere
 find . -path licensedir -prune -o -path stubdom/ioemu -prune -o \
@@ -534,7 +539,7 @@ if [ $1 = 0 ]; then
   /sbin/chkconfig --del xendomains
 %endif
 %if %with_systemd
-/bin/systemctl enable xendomains.service
+  /bin/systemctl disable xendomains.service
 %endif
 fi
 
@@ -543,9 +548,9 @@ fi
 /sbin/chkconfig --add xencommons
 %endif
 %if %with_systemd
-/bin/systemctl enable xenstored.service
+/bin/systemctl enable xen-init-dom0.service
+/bin/systemctl enable xen-qemu-dom0-disk-backend.service
 /bin/systemctl enable xenconsoled.service
-/bin/systemctl enable xencommons.service
 %endif
 
 %if %with_sysv
@@ -560,7 +565,8 @@ if [ $1 = 0 ]; then
   /sbin/chkconfig --del xencommons
 %endif
 %if %with_systemd
-  /bin/systemctl disable xenstored.service
+  /bin/systemctl disable xen-init-dom0.service
+  /bin/systemctl disable xen-qemu-dom0-disk-backend.service
   /bin/systemctl disable xenconsoled.service
 %endif
 fi
@@ -593,44 +599,57 @@ rm -rf %{buildroot}
 %defattr(-,root,root)
 %doc COPYING README
 %{_bindir}/xencons
+%ifnarch aarch64
 %{_sbindir}/xend
 %{_sbindir}/xm
+%endif
 %{python_sitearch}/%{name}
 %{python_sitearch}/xen-*.egg-info
+%ifnarch aarch64
 %{_mandir}/man1/xm.1*
 %{_mandir}/man5/xend-config.sxp.5*
 %{_mandir}/man5/xmdomain.cfg.5*
 %{_datadir}/%{name}/create.dtd
+%endif
 
 # Startup script
 %if %with_sysv
 %{_sysconfdir}/rc.d/init.d/xend
 %{_sysconfdir}/rc.d/init.d/xendomains
 %endif
+%ifnarch aarch64
 # Guest config files
 %config(noreplace) %{_sysconfdir}/%{name}/xmexample*
 # Daemon config
 %config(noreplace) %{_sysconfdir}/%{name}/xend-*
 # xm config
 %config(noreplace) %{_sysconfdir}/%{name}/xm-*
+%endif
 # Guest autostart links
 %dir %attr(0700,root,root) %{_sysconfdir}/%{name}/auto
 # Autostart of guests
 %config(noreplace) %{_sysconfdir}/sysconfig/xendomains
+%ifnarch aarch64
 # xemd sysconfig file
 %config(noreplace) %{_sysconfdir}/sysconfig/xend
+%endif
 
 %if %with_systemd
+%ifnarch aarch64
 %{_unitdir}/xend.service
+%endif
 %{_unitdir}/xendomains.service
-%{_libexecdir}/xendomains
+#%dir /usr/lib/%{name}/bin
+/usr/lib/%{name}/bin/*
 %endif
 
+%ifnarch aarch64
 # Persistent state for XenD
 %dir %{_localstatedir}/lib/%{name}/xend-db/
 %dir %{_localstatedir}/lib/%{name}/xend-db/domain
 %dir %{_localstatedir}/lib/%{name}/xend-db/migrate
 %dir %{_localstatedir}/lib/%{name}/xend-db/vnet
+%endif
 
 %files libs
 %defattr(-,root,root)
@@ -659,6 +678,10 @@ rm -rf %{buildroot}
 %{_unitdir}/xenstored.service
 %{_unitdir}/xenconsoled.service
 %{_unitdir}/xen-watchdog.service
+%{_unitdir}/xen-init-dom0.service
+%{_unitdir}/xen-qemu-dom0-disk-backend.service
+%{_unitdir}/xenstored_ro.socket
+%{_unitdir}/xenstored.socket
 /usr/lib/tmpfiles.d/xen.conf
 %endif
 
@@ -673,20 +696,29 @@ rm -rf %{buildroot}
 # Rotate console log files
 %config(noreplace) %{_sysconfdir}/logrotate.d/xen
 
+%ifnarch aarch64
+# is this new in xen 4.5?
 # Programs run by other programs
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/bin
 %attr(0700,root,root) %{_libdir}/%{name}/bin/*
+%endif
 # QEMU-xen runtime files
 %dir %{_datadir}/qemu-xen
 %{_datadir}/qemu-xen/*
 %dir %{_sysconfdir}/qemu/
+%ifnarch aarch64
 %{_sysconfdir}/qemu/target-%{_arch}.conf
+%else
+%{_sysconfdir}/qemu/target-x86_64.conf
+%endif
 
+%ifnarch aarch64
 # QEMU runtime files
 %dir %{_datadir}/%{name}/qemu
 %dir %{_datadir}/%{name}/qemu/keymaps
 %{_datadir}/%{name}/qemu/keymaps/*
+%endif
 
 # man pages
 %{_mandir}/man1/xentop.1*
@@ -713,6 +745,7 @@ rm -rf %{buildroot}
 %dir /usr/lib/%{name}/bin
 /usr/lib/%{name}/bin/*
 %endif
+%ifnarch aarch64
 %dir /usr/lib/%{name}/boot
 # HVM loader is always in /usr/lib regardless of multilib
 /usr/lib/xen/boot/hvmloader
@@ -720,6 +753,7 @@ rm -rf %{buildroot}
 /usr/lib/xen/boot/xenstore-stubdom.gz
 /usr/lib/xen/boot/pv-grub*.gz
 %endif
+%endif
 # General Xen state
 %dir %{_localstatedir}/lib/%{name}
 %dir %{_localstatedir}/lib/%{name}/dump
@@ -729,28 +763,40 @@ rm -rf %{buildroot}
 # Xenstore runtime state
 %dir %attr(0700,root,root) %{_localstatedir}/run/xenstored
 # XenD runtime state
+%ifnarch aarch64
 %ghost %attr(0700,root,root) %{_localstatedir}/run/xend
 #%ghost %attr(0700,root,root) %{_localstatedir}/run/xend/boot
+%endif
 
 # All xenstore CLI tools
+%ifnarch aarch64
 %{_bindir}/qemu-*-xen
+%endif
 %{_bindir}/xenstore
 %{_bindir}/xenstore-*
 %{_bindir}/pygrub
 %{_bindir}/xentrace*
+%ifnarch aarch64
 %{_bindir}/remus
+%endif
 %{_bindir}/xencov_split
 # Misc stuff
+%ifnarch aarch64
 %{_bindir}/xen-detect
 %{_sbindir}/gdbsx
+%endif
 %{_sbindir}/gtrace*
+%ifnarch aarch64
 %{_sbindir}/kdd
 %{_sbindir}/tap-ctl
 %{_sbindir}/td-util
+%endif
 %{_sbindir}/xen-bugtool
+%ifnarch aarch64
 %{_sbindir}/xen-hptool
 %{_sbindir}/xen-hvmcrash
 %{_sbindir}/xen-hvmctx
+%endif
 %{_sbindir}/xen-tmem-list-parse
 %{_sbindir}/xenconsoled
 %{_sbindir}/xenlockprof
@@ -764,11 +810,16 @@ rm -rf %{buildroot}
 %{_sbindir}/xenperf
 %{_sbindir}/xenwatchdogd
 %{_sbindir}/xl
+%ifnarch aarch64
 %{_sbindir}/xen-lowmemd
+%endif
 %{_sbindir}/xen-ringwatch
 %{_sbindir}/xencov
+%ifnarch aarch64
 %{_sbindir}/xen-mfndump
+%endif
 #blktap
+%ifnarch aarch64
 %{_bindir}/vhd-index
 %{_bindir}/vhd-update
 %{_bindir}/vhd-util
@@ -776,6 +827,7 @@ rm -rf %{buildroot}
 %{_sbindir}/part-util
 %{_sbindir}/td-rated
 %{_sbindir}/vhdpartx
+%endif
 
 # Xen logfiles
 %dir %attr(0700,root,root) %{_localstatedir}/log/xen
@@ -785,10 +837,19 @@ rm -rf %{buildroot}
 %files hypervisor
 %defattr(-,root,root)
 /boot/xen-syms-*
+%ifnarch aarch64
 /boot/xen-*.gz
 /boot/xen.gz
+%else
+# fixme, what is this on arch?
+/boot/xen-%{version}-1.el7.centos
+/boot/xen
+/boot/xen-?
+/boot/xen-?.?
+%endif
 %if %build_efi
-/boot/efi/EFI/fedora/*.efi
+/boot/efi/EFI/%{xen_efi_vendor}/xen-%{version}-1.el7.centos.efi
+/boot/efi/EFI/%{xen_efi_vendor}/xen-%{version}-1.el7.centos.cfg.sample
 %endif
 
 %files doc
@@ -803,13 +864,17 @@ rm -rf %{buildroot}
 %{_includedir}/xen/*
 %dir %{_includedir}/xenstore-compat
 %{_includedir}/xenstore-compat/*
+%ifnarch aarch64
 %dir %{_includedir}/blktap
 %{_includedir}/blktap/*
 %dir %{_includedir}/vhd
 %{_includedir}/vhd/*
+%endif
 
 %{_libdir}/*.so
+%ifnarch aarch64
 %{_libdir}/*.la
+%endif
 
 
 %files licenses