Skip to contentSkip to conversation

tools changes

PATCH In review Olaf Hering 5 participants 33 messages Mar 6, 2014 – Mar 12, 2014

lore
Share & tools
lore
#0 lore raw

cover tools changes

Resend of changes from the 4.4 freeze time.

Olaf Hering (11):
docs: remove ia64 from kexec_and_kdump.txt
unmodified_drivers: remove ia64 parts of the code
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
pygrub: remote ia64 from pygrub
xend: remove ia64 from xend sources
libxl: add option for discard support to xl disk configuration tools/xc: pass errno to callers of xc_domain_save xend/pvscsi: recognize also SCSI CDROM devices tools/xend: move assert to exception block

 docs/misc/kexec_and_kdump.txt                      |  9 +--
 docs/misc/tmem-internals.html                      |  7 --
 docs/misc/xl-disk-configuration.txt                | 15 ++++
 stubdom/Makefile                                   |  3 -
 stubdom/newlib.patch                               | 22 ------
 tools/libxc/xc_domain_save.c                       | 88 ++++++++++++++++++++--
 tools/libxc/xg_private.h                           |  4 -
 tools/libxl/check-xl-disk-parse                    | 21 ++++--
 tools/libxl/libxl.c                                |  3 +
 tools/libxl/libxl.h                                |  5 ++
 tools/libxl/libxl_types.idl                        |  1 +
 tools/libxl/libxlu_disk_l.l                        |  4 +
 tools/pygrub/src/pygrub                            | 35 +++------
 tools/python/xen/util/vscsi_util.py                |  3 +
 tools/python/xen/xend/XendCheckpoint.py            |  6 +-
 tools/python/xen/xend/XendNode.py                  | 10 ---
 tools/python/xen/xend/arch.py                      |  1 -
 tools/python/xen/xend/image.py                     | 56 --------------
 tools/python/xen/xend/server/pciif.py              |  2 +-
 tools/xm-test/lib/XmTestLib/arch.py                | 14 +---
 tools/xm-test/lib/XmTestReport/arch.py             |  4 -
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 -
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---
 unmodified_drivers/linux-2.6/overrides.mk          |  3 -
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 -
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ----
 .../linux-2.6/platform-pci/platform-pci.c          | 23 ------
 .../linux-2.6/platform-pci/xen_support.c           | 36 ---------
 xen/include/public/io/blkif.h                      |  8 ++
 29 files changed, 157 insertions(+), 264 deletions(-)
#1 lore raw

PATCH 1/11 docs: remove ia64 from kexec_and_kdump.txt

---
 docs/misc/kexec_and_kdump.txt | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
docs/misc/kexec_and_kdump.txt +3 -6
index 9ec3fcc..2f93771 100644
@@ -137,10 +137,9 @@ command line parameter to the Xen hypervisor. It has two forms:
       e.g. crashkernel=128M@256M
 
    Regardless of which of the two forms of the crashkernel command line you
-   use, the crash kernel region should appear in /proc/iomem on x86 or
-   /proc/iomem_machine on ia64. If it doesn't then either the crashkernel
-   parameter is missing, or for some reason the region couldn't be placed -
-   for instance because it is too large.
+   use, the crash kernel region should appear in /proc/iomem on x86. If it
+   doesn't then either the crashkernel parameter is missing, or for some
+   reason the region couldn't be placed - for instance because it is too large.
 
    # cat /proc/iomem
    ...
@@ -179,8 +178,6 @@ On x86 systems the crash kernel may be either
 - Relocatability is controlled by the CONFIG_RELOCATABLE kernel
   compile configuration parameter. This option may not be available
   depending on the kernel version
-On ia64
-  Either a vmlinuz or vmlinux.gz image may be used
 
 
 2. Execute
#2 lore raw

PATCH 2/11 unmodified_drivers: remove ia64 parts of the code

In reply to Olaf Hering
---
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 ---
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---------
 unmodified_drivers/linux-2.6/overrides.mk          |  3 --
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 ---
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ---------
 .../linux-2.6/platform-pci/platform-pci.c          | 23 --------------
 .../linux-2.6/platform-pci/xen_support.c           | 36 ----------------------
 7 files changed, 1 insertion(+), 99 deletions(-)
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +0 -4
index 57afc72..240ca12 100644
@@ -42,10 +42,6 @@
 #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
 #endif
 
-#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H)
-#include <asm-generic/pgtable-nopud.h>
-#endif
-
 /* Some kernels have this typedef backported so we cannot reliably
  * detect based on version number, hence we forcibly #define it.
  */
unmodified_drivers/linux-2.6/mkbuildtree +1 -15
index 3aca16d..379b39b 100755
@@ -5,7 +5,7 @@ if [ $1 ]; then
 else
     uname=`uname -m`
     echo "Defaulting to this machine's architecture, $uname, for linking."
-    echo "This may be overridden on the command line (i386,x86_64,ia64)."
+    echo "This may be overridden on the command line (i386,x86_64)."
 fi
 
 C=$(cd $(dirname $0) && pwd)
@@ -79,20 +79,6 @@ i[34567]86|x86_64)
         ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm
     fi
   ;;
-"ia64")
-    ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
-    ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
-    ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
-    ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
-    ln -sf ${XL}/include/asm-ia64/gnttab_dma.h include/asm
-    mkdir -p include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
-    ln -sf ${XL}/arch/ia64/xen/xcom_hcall.c platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xcom_asm.S platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci/xencomm_arch.c
-    ln -sf ${XL}/drivers/xen/core/xencomm.c platform-pci
-  ;;
 *)
     echo unknown architecture $uname
     exit 1
unmodified_drivers/linux-2.6/overrides.mk +0 -3
index 803eccd..6c278ad 100644
@@ -7,9 +7,6 @@
 _XEN_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205
 _XEN_CPPFLAGS += -DCONFIG_XEN_COMPAT=0xffffff
 _XEN_CPPFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H
-ifeq ($(ARCH),ia64)
-  _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST
-endif
 
 _XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h)
 
unmodified_drivers/linux-2.6/platform-pci/Kbuild +0 -4
index 7b332ee..4701aa6 100644
@@ -16,7 +16,3 @@ xen-platform-pci-objs += ../xenbus/xenbus_dev.o
 xen-platform-pci-objs += ../xenbus/xenbus_client.o 
 xen-platform-pci-objs += ../xenbus/xen_proc.o
 
-# Can we do better ?
-ifeq ($(ARCH),ia64)
-  xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o xcom_asm.o
-endif
unmodified_drivers/linux-2.6/platform-pci/panic-handler.c +0 -14
index 7564d0c..2b1895f 100644
@@ -9,24 +9,10 @@
 
 MODULE_LICENSE("GPL");
 
-#ifdef __ia64__
-static void
-xen_panic_hypercall(struct unw_frame_info *info, void *arg)
-{
-	current->thread.ksp = (__u64)info->sw - 16;
-	HYPERVISOR_shutdown(SHUTDOWN_crash);
-	/* we're never actually going to get here... */
-}
-#endif
-
 static int
 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-#ifdef __ia64__
-	unw_init_running(xen_panic_hypercall, NULL);
-#else /* !__ia64__ */
 	HYPERVISOR_shutdown(SHUTDOWN_crash);
-#endif
 	/* we're never actually going to get here... */
 	return NOTIFY_DONE;
 }
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +0 -23
index 163b168..895e19d 100644
@@ -39,9 +39,6 @@
 #include <xen/interface/hvm/params.h>
 #include <xen/features.h>
 #include <xen/evtchn.h>
-#ifdef __ia64__
-#include <asm/xen/xencomm.h>
-#endif
 
 #include "platform-pci.h"
 
@@ -78,10 +75,6 @@ static int __devinit init_xen_info(void)
 	struct xen_add_to_physmap xatp;
 	extern void *shared_info_area;
 
-#ifdef __ia64__
-	xencomm_initialize();
-#endif
-
 	setup_xen_features();
 
 	shared_info_frame = alloc_xen_mmio(PAGE_SIZE) >> PAGE_SHIFT;
@@ -115,8 +108,6 @@ unsigned long alloc_xen_mmio(unsigned long len)
 	return addr;
 }
 
-#ifndef __ia64__
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 static uint32_t xen_cpuid_base(void)
 {
@@ -212,28 +203,14 @@ static void resume_hypercall_stubs(void)
 	nr_hypercall_stub_pages = pages;
 }
 
-#else /* __ia64__ */
-
-#define init_hypercall_stubs()		(0)
-#define resume_hypercall_stubs()	((void)0)
-
-#endif
-
 static uint64_t get_callback_via(struct pci_dev *pdev)
 {
 	u8 pin;
 	int irq;
 
-#ifdef __ia64__
-	for (irq = 0; irq < 16; irq++) {
-		if (isa_irq_to_vector(irq) == pdev->irq)
-			return irq; /* ISA IRQ */
-	}
-#else /* !__ia64__ */
 	irq = pdev->irq;
 	if (irq < 16)
 		return irq; /* ISA IRQ */
-#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
 	pin = pdev->pin;
unmodified_drivers/linux-2.6/platform-pci/xen_support.c +0 -36
index 510a2b7..c8aadc0 100644
@@ -30,42 +30,6 @@
 #include <xen/platform-compat.h>
 #endif
 
-#if defined (__ia64__)
-unsigned long __hypercall(unsigned long a1, unsigned long a2,
-			  unsigned long a3, unsigned long a4,
-			  unsigned long a5, unsigned long cmd)
-{
-	unsigned long __res;
-	__asm__ __volatile__ (";;\n"
-		"mov r2=%1\n"
-		"break 0x1000 ;;\n"
-		"mov %0=r8 ;;\n"
-		: "=r"(__res) : "r"(cmd) : "r2", "r8", "memory");
-
-	return __res;
-}
-EXPORT_SYMBOL(__hypercall);
-
-int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count)
-{
-	return xencomm_hypercall_grant_table_op(cmd, uop, count);
-}
-EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
-
-/* without using balloon driver on PV-on-HVM for ia64 */
-void balloon_update_driver_allowance(long delta)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
-
-void balloon_release_driver_page(struct page *page)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_release_driver_page);
-#endif /* __ia64__ */
-
 void xen_machphys_update(unsigned long mfn, unsigned long pfn)
 {
 	BUG();
#3 lore raw

Re: [PATCH 02/11] unmodified_drivers: remove ia64 parts of the code

Quoted 1 line · Olaf Hering

./scripts/get_maintainer.pl says:
Keir Fraser <[email protected]>
Jan Beulich <[email protected]>

CC added for you.

Quoted 224 lines
---
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 ---
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---------
 unmodified_drivers/linux-2.6/overrides.mk          |  3 --
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 ---
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ---------
 .../linux-2.6/platform-pci/platform-pci.c          | 23 --------------
 .../linux-2.6/platform-pci/xen_support.c           | 36 ----------------------
 7 files changed, 1 insertion(+), 99 deletions(-)
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +0 -4
index 57afc72..240ca12 100644
@@ -42,10 +42,6 @@
 #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
 #endif
 
-#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H)
-#include <asm-generic/pgtable-nopud.h>
-#endif
-
 /* Some kernels have this typedef backported so we cannot reliably
  * detect based on version number, hence we forcibly #define it.
  */
unmodified_drivers/linux-2.6/mkbuildtree +1 -15
index 3aca16d..379b39b 100755
@@ -5,7 +5,7 @@ if [ $1 ]; then
 else
     uname=`uname -m`
     echo "Defaulting to this machine's architecture, $uname, for linking."
-    echo "This may be overridden on the command line (i386,x86_64,ia64)."
+    echo "This may be overridden on the command line (i386,x86_64)."
 fi
 
 C=$(cd $(dirname $0) && pwd)
@@ -79,20 +79,6 @@ i[34567]86|x86_64)
         ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm
     fi
   ;;
-"ia64")
-    ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
-    ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
-    ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
-    ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
-    ln -sf ${XL}/include/asm-ia64/gnttab_dma.h include/asm
-    mkdir -p include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
-    ln -sf ${XL}/arch/ia64/xen/xcom_hcall.c platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xcom_asm.S platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci/xencomm_arch.c
-    ln -sf ${XL}/drivers/xen/core/xencomm.c platform-pci
-  ;;
 *)
     echo unknown architecture $uname
     exit 1
unmodified_drivers/linux-2.6/overrides.mk +0 -3
index 803eccd..6c278ad 100644
@@ -7,9 +7,6 @@
 _XEN_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205
 _XEN_CPPFLAGS += -DCONFIG_XEN_COMPAT=0xffffff
 _XEN_CPPFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H
-ifeq ($(ARCH),ia64)
-  _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST
-endif
 
 _XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h)
 
unmodified_drivers/linux-2.6/platform-pci/Kbuild +0 -4
index 7b332ee..4701aa6 100644
@@ -16,7 +16,3 @@ xen-platform-pci-objs += ../xenbus/xenbus_dev.o
 xen-platform-pci-objs += ../xenbus/xenbus_client.o 
 xen-platform-pci-objs += ../xenbus/xen_proc.o
 
-# Can we do better ?
-ifeq ($(ARCH),ia64)
-  xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o xcom_asm.o
-endif
unmodified_drivers/linux-2.6/platform-pci/panic-handler.c +0 -14
index 7564d0c..2b1895f 100644
@@ -9,24 +9,10 @@
 
 MODULE_LICENSE("GPL");
 
-#ifdef __ia64__
-static void
-xen_panic_hypercall(struct unw_frame_info *info, void *arg)
-{
-	current->thread.ksp = (__u64)info->sw - 16;
-	HYPERVISOR_shutdown(SHUTDOWN_crash);
-	/* we're never actually going to get here... */
-}
-#endif
-
 static int
 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-#ifdef __ia64__
-	unw_init_running(xen_panic_hypercall, NULL);
-#else /* !__ia64__ */
 	HYPERVISOR_shutdown(SHUTDOWN_crash);
-#endif
 	/* we're never actually going to get here... */
 	return NOTIFY_DONE;
 }
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +0 -23
index 163b168..895e19d 100644
@@ -39,9 +39,6 @@
 #include <xen/interface/hvm/params.h>
 #include <xen/features.h>
 #include <xen/evtchn.h>
-#ifdef __ia64__
-#include <asm/xen/xencomm.h>
-#endif
 
 #include "platform-pci.h"
 
@@ -78,10 +75,6 @@ static int __devinit init_xen_info(void)
 	struct xen_add_to_physmap xatp;
 	extern void *shared_info_area;
 
-#ifdef __ia64__
-	xencomm_initialize();
-#endif
-
 	setup_xen_features();
 
 	shared_info_frame = alloc_xen_mmio(PAGE_SIZE) >> PAGE_SHIFT;
@@ -115,8 +108,6 @@ unsigned long alloc_xen_mmio(unsigned long len)
 	return addr;
 }
 
-#ifndef __ia64__
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 static uint32_t xen_cpuid_base(void)
 {
@@ -212,28 +203,14 @@ static void resume_hypercall_stubs(void)
 	nr_hypercall_stub_pages = pages;
 }
 
-#else /* __ia64__ */
-
-#define init_hypercall_stubs()		(0)
-#define resume_hypercall_stubs()	((void)0)
-
-#endif
-
 static uint64_t get_callback_via(struct pci_dev *pdev)
 {
 	u8 pin;
 	int irq;
 
-#ifdef __ia64__
-	for (irq = 0; irq < 16; irq++) {
-		if (isa_irq_to_vector(irq) == pdev->irq)
-			return irq; /* ISA IRQ */
-	}
-#else /* !__ia64__ */
 	irq = pdev->irq;
 	if (irq < 16)
 		return irq; /* ISA IRQ */
-#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
 	pin = pdev->pin;
unmodified_drivers/linux-2.6/platform-pci/xen_support.c +0 -36
index 510a2b7..c8aadc0 100644
@@ -30,42 +30,6 @@
 #include <xen/platform-compat.h>
 #endif
 
-#if defined (__ia64__)
-unsigned long __hypercall(unsigned long a1, unsigned long a2,
-			  unsigned long a3, unsigned long a4,
-			  unsigned long a5, unsigned long cmd)
-{
-	unsigned long __res;
-	__asm__ __volatile__ (";;\n"
-		"mov r2=%1\n"
-		"break 0x1000 ;;\n"
-		"mov %0=r8 ;;\n"
-		: "=r"(__res) : "r"(cmd) : "r2", "r8", "memory");
-
-	return __res;
-}
-EXPORT_SYMBOL(__hypercall);
-
-int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count)
-{
-	return xencomm_hypercall_grant_table_op(cmd, uop, count);
-}
-EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
-
-/* without using balloon driver on PV-on-HVM for ia64 */
-void balloon_update_driver_allowance(long delta)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
-
-void balloon_release_driver_page(struct page *page)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_release_driver_page);
-#endif /* __ia64__ */
-
 void xen_machphys_update(unsigned long mfn, unsigned long pfn)
 {
 	BUG();
#4 lore raw

Re: [PATCH 02/11] unmodified_drivers: remove ia64 parts of the code

In reply to Olaf Hering
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
---
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 ---
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---------
 unmodified_drivers/linux-2.6/overrides.mk          |  3 --
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 ---
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ---------
 .../linux-2.6/platform-pci/platform-pci.c          | 23 --------------
 .../linux-2.6/platform-pci/xen_support.c           | 36 ----------------------
 7 files changed, 1 insertion(+), 99 deletions(-)

Why? In fact I think it was a mistake too to remove the ia64 bits from the public headers - there's nothing wrong with someone still wanting to build ia64 PV drivers against an old Linux tree (e.g. linux-2.6.18-xen.hg itself, where I intentionally avoided mirroring that public header cleanup), and the implementation going away is unrelated to the interface definitions remaining the same.

Jan

Quoted 226 lines
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +0 -4
@@ -42,10 +42,6 @@
 #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
 #endif
 
-#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H)
-#include <asm-generic/pgtable-nopud.h>
-#endif
-
 /* Some kernels have this typedef backported so we cannot reliably
  * detect based on version number, hence we forcibly #define it.
  */
unmodified_drivers/linux-2.6/mkbuildtree +1 -15
index 3aca16d..379b39b 100755
@@ -5,7 +5,7 @@ if [ $1 ]; then
 else
     uname=`uname -m`
     echo "Defaulting to this machine's architecture, $uname, for linking."
-    echo "This may be overridden on the command line (i386,x86_64,ia64)."
+    echo "This may be overridden on the command line (i386,x86_64)."
 fi
 
 C=$(cd $(dirname $0) && pwd)
@@ -79,20 +79,6 @@ i[34567]86|x86_64)
         ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm
     fi
   ;;
-"ia64")
-    ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
-    ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
-    ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
-    ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
-    ln -sf ${XL}/include/asm-ia64/gnttab_dma.h include/asm
-    mkdir -p include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
-    ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
-    ln -sf ${XL}/arch/ia64/xen/xcom_hcall.c platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xcom_asm.S platform-pci/
-    ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci/xencomm_arch.c
-    ln -sf ${XL}/drivers/xen/core/xencomm.c platform-pci
-  ;;
 *)
     echo unknown architecture $uname
     exit 1
unmodified_drivers/linux-2.6/overrides.mk +0 -4
index 803eccd..6c278ad 100644
@@ -7,9 +7,6 @@
 _XEN_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205
 _XEN_CPPFLAGS += -DCONFIG_XEN_COMPAT=0xffffff
 _XEN_CPPFLAGS += -I$(M)/include -I$(M)/compat-include 
-DHAVE_XEN_PLATFORM_COMPAT_H
-ifeq ($(ARCH),ia64)
-  _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST
-endif
 
 _XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h)
unmodified_drivers/linux-2.6/platform-pci/Kbuild +0 -4
index 7b332ee..4701aa6 100644
@@ -16,7 +16,3 @@ xen-platform-pci-objs += ../xenbus/xenbus_dev.o
 xen-platform-pci-objs += ../xenbus/xenbus_client.o 
 xen-platform-pci-objs += ../xenbus/xen_proc.o
 
-# Can we do better ?
-ifeq ($(ARCH),ia64)
-  xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o xcom_asm.o
-endif
unmodified_drivers/linux-2.6/platform-pci/panic-handler.c +0 -14
index 7564d0c..2b1895f 100644
@@ -9,24 +9,10 @@
 
 MODULE_LICENSE("GPL");
 
-#ifdef __ia64__
-static void
-xen_panic_hypercall(struct unw_frame_info *info, void *arg)
-{
-	current->thread.ksp = (__u64)info->sw - 16;
-	HYPERVISOR_shutdown(SHUTDOWN_crash);
-	/* we're never actually going to get here... */
-}
-#endif
-
 static int
 xen_panic_event(struct notifier_block *this, unsigned long event, void 
 *ptr)
 {
-#ifdef __ia64__
-	unw_init_running(xen_panic_hypercall, NULL);
-#else /* !__ia64__ */
 	HYPERVISOR_shutdown(SHUTDOWN_crash);
-#endif
 	/* we're never actually going to get here... */
 	return NOTIFY_DONE;

}

unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +0 -23
index 163b168..895e19d 100644
@@ -39,9 +39,6 @@
 #include <xen/interface/hvm/params.h>
 #include <xen/features.h>
 #include <xen/evtchn.h>
-#ifdef __ia64__
-#include <asm/xen/xencomm.h>
-#endif
 
 #include "platform-pci.h"
 
@@ -78,10 +75,6 @@ static int __devinit init_xen_info(void)
 	struct xen_add_to_physmap xatp;
 	extern void *shared_info_area;
 
-#ifdef __ia64__
-	xencomm_initialize();
-#endif
-
 	setup_xen_features();
 
 	shared_info_frame = alloc_xen_mmio(PAGE_SIZE) >> PAGE_SHIFT;
@@ -115,8 +108,6 @@ unsigned long alloc_xen_mmio(unsigned long len)
 	return addr;
 }
 
-#ifndef __ia64__
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 static uint32_t xen_cpuid_base(void)
 {
@@ -212,28 +203,14 @@ static void resume_hypercall_stubs(void)
 	nr_hypercall_stub_pages = pages;
 }
 
-#else /* __ia64__ */
-
-#define init_hypercall_stubs()		(0)
-#define resume_hypercall_stubs()	((void)0)
-
-#endif
-
 static uint64_t get_callback_via(struct pci_dev *pdev)
 {
 	u8 pin;
 	int irq;
 
-#ifdef __ia64__
-	for (irq = 0; irq < 16; irq++) {
-		if (isa_irq_to_vector(irq) == pdev->irq)
-			return irq; /* ISA IRQ */
-	}
-#else /* !__ia64__ */
 	irq = pdev->irq;
 	if (irq < 16)
 		return irq; /* ISA IRQ */
-#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
 	pin = pdev->pin;
unmodified_drivers/linux-2.6/platform-pci/xen_support.c +0 -36
index 510a2b7..c8aadc0 100644
@@ -30,42 +30,6 @@
 #include <xen/platform-compat.h>
 #endif
 
-#if defined (__ia64__)
-unsigned long __hypercall(unsigned long a1, unsigned long a2,
-			  unsigned long a3, unsigned long a4,
-			  unsigned long a5, unsigned long cmd)
-{
-	unsigned long __res;
-	__asm__ __volatile__ (";;\n"
-		"mov r2=%1\n"
-		"break 0x1000 ;;\n"
-		"mov %0=r8 ;;\n"
-		: "=r"(__res) : "r"(cmd) : "r2", "r8", "memory");
-
-	return __res;
-}
-EXPORT_SYMBOL(__hypercall);
-
-int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int 
 count)
-{
-	return xencomm_hypercall_grant_table_op(cmd, uop, count);
-}
-EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
-
-/* without using balloon driver on PV-on-HVM for ia64 */
-void balloon_update_driver_allowance(long delta)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
-
-void balloon_release_driver_page(struct page *page)
-{
-	/* nothing */
-}
-EXPORT_SYMBOL_GPL(balloon_release_driver_page);
-#endif /* __ia64__ */
-
 void xen_machphys_update(unsigned long mfn, unsigned long pfn)
 {

BUG();

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

Re: [PATCH 02/11] unmodified_drivers: remove ia64 parts of the code

Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
---
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 ---
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---------
 unmodified_drivers/linux-2.6/overrides.mk          |  3 --
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 ---
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ---------
 .../linux-2.6/platform-pci/platform-pci.c          | 23 --------------
 .../linux-2.6/platform-pci/xen_support.c           | 36 ----------------------
 7 files changed, 1 insertion(+), 99 deletions(-)
Quoted 6 lines

Why? In fact I think it was a mistake too to remove the ia64 bits from the public headers - there's nothing wrong with someone still wanting to build ia64 PV drivers against an old Linux tree (e.g. linux-2.6.18-xen.hg itself, where I intentionally avoided mirroring that public header cleanup), and the implementation going away is unrelated to the interface definitions remaining the same.

Wouldnt they pick 4.3 or older for that task, given that there are no relevant changes? But I'm fine with dropping that patch.

Olaf

#6 lore raw

Re: [PATCH 02/11] unmodified_drivers: remove ia64 parts of the code

Quoted 23 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · Olaf Hering
---
 .../linux-2.6/compat-include/xen/platform-compat.h |  4 ---
 unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---------
 unmodified_drivers/linux-2.6/overrides.mk          |  3 --
 unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 ---
 .../linux-2.6/platform-pci/panic-handler.c         | 14 ---------
 .../linux-2.6/platform-pci/platform-pci.c          | 23 --------------
 .../linux-2.6/platform-pci/xen_support.c           | 36 

----------------------

Quoted 8 lines
Quoted 1 line
 7 files changed, 1 insertion(+), 99 deletions(-)

Why? In fact I think it was a mistake too to remove the ia64 bits from the public headers - there's nothing wrong with someone still wanting to build ia64 PV drivers against an old Linux tree (e.g. linux-2.6.18-xen.hg itself, where I intentionally avoided mirroring that public header cleanup), and the implementation going away is unrelated to the interface definitions remaining the same.

Quoted 2 lines

Wouldnt they pick 4.3 or older for that task, given that there are no relevant changes?

As long as there are no relevant changes, sure. The moment some bug fix shows up, this could change.

Quoted 1 line

But I'm fine with dropping that patch.

Please do, at least until we decided whether the related public header pruning was premature.

Jan

#7 lore raw

PATCH 3/11 docs: remove ia64 from tmem-internals.html

In reply to Olaf Hering
---
 docs/misc/tmem-internals.html | 7 -------
 1 file changed, 7 deletions(-)
docs/misc/tmem-internals.html +0 -7
index ccc34c3..2d8635d 100644
@@ -728,13 +728,6 @@ However, the Xen heap is limited in size on
 32-bit Xen so tmem did not work very well.
 There are still 32-bit ifdefs in some places in the code, but things may
 have bit-rotted so using tmem on a 32-bit Xen is not recommended.
-<P>
-<b><i>IA-64 implementation. </i></b>
-The vast majority of the tmem
-implementation is architecture-independent.
-For tmem to run on Xen/ia64, it is believed that only one or two
-routines needs to be written.(See the
-#ifdef __ia64__ at <i>cli_mfn_to_va()</i>.)
 
 <h2>Known Issues</h2>
#8 lore raw

PATCH 4/11 stubdom: remove ia64 from stubdom

In reply to Olaf Hering
---
 stubdom/Makefile     |  3 ---
 stubdom/newlib.patch | 22 ----------------------
 2 files changed, 25 deletions(-)
stubdom/Makefile +0 -3
index 19f2228..b1822b7 100644
@@ -23,9 +23,6 @@ TARGET_CFLAGS=-mno-red-zone
 NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
 STUBDOM_SUPPORTED=1
 endif
-ifeq ($(GNU_TARGET_ARCH), ia64)
-TARGET_CFLAGS=-mconstant-gp
-endif
 
 CROSS_ROOT=cross-root-$(GNU_TARGET_ARCH)
 CROSS_PREFIX=$(CURDIR)/$(CROSS_ROOT)
stubdom/newlib.patch +0 -22
index 733dc13..ee9b6f2 100644
@@ -81,28 +81,6 @@ diff -u -p -r1.10 stdint.h
 
 Define the basic ia64 jump buffer
 
-Index: newlib/libc/include/machine/setjmp.h
-===================================================================
-RCS file: /cvs/src/src/newlib/libc/include/machine/setjmp.h,v
-retrieving revision 1.34
-diff -u -p -r1.34 setjmp.h
---- newlib/libc/include/machine/setjmp.h	7 Nov 2007 21:42:24 -0000	1.34
-+++ newlib/libc/include/machine/setjmp.h	11 Jan 2008 18:10:43 -0000
-@@ -72,6 +72,11 @@ _BEGIN_STD_C
- #define _JBLEN  8
- #endif
- 
-+#ifdef __ia64__
-+#define _JBTYPE long
-+#define _JBLEN 70
-+#endif
-+
- #ifdef __i960__
- #define _JBLEN 35
- #endif
-
-In mini-os we use a dynamic reentrency buffer.
-
 Index: newlib/libc/include/sys/config.h
 ===================================================================
 RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
#9 lore raw

PATCH 5/11 libxc: remove ia64 from xg_private.h

In reply to Olaf Hering
---
 tools/libxc/xg_private.h | 4 ----
 1 file changed, 4 deletions(-)
tools/libxc/xg_private.h +0 -4
index 5ff2124..f5755fd 100644
@@ -120,10 +120,6 @@ typedef uint64_t l4_pgentry_64_t;
 #define PAGE_SIZE_X86           (1UL << PAGE_SHIFT_X86)
 #define PAGE_MASK_X86           (~(PAGE_SIZE_X86-1))
 
-#define PAGE_SHIFT_IA64         14
-#define PAGE_SIZE_IA64          (1UL << PAGE_SHIFT_IA64)
-#define PAGE_MASK_IA64          (~(PAGE_SIZE_IA64-1))
-
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #define NRPAGES(x) (ROUNDUP(x, PAGE_SHIFT) >> PAGE_SHIFT)
#10 lore raw

PATCH 6/11 pygrub: remote ia64 from pygrub

In reply to Olaf Hering
---
 tools/pygrub/src/pygrub | 35 +++++++++++------------------------
 1 file changed, 11 insertions(+), 24 deletions(-)
tools/pygrub/src/pygrub +11 -24
index ee4e741..54fecee 100644
@@ -360,11 +360,7 @@ class Grub:
                 curline = len(img.lines) - 1
 
         if self.isdone:
-           # Fix to allow pygrub command-line editing in Lilo bootloader (used by IA64)
-           if platform.machine() == 'ia64':
-              origimg.reset(img.lines, img.path)
-           else:
-              origimg.reset(img.lines)
+           origimg.reset(img.lines)
 
     def edit_line(self, line):
         self.screen.erase()
@@ -416,25 +412,16 @@ class Grub:
         if not os.access(fn, os.R_OK):
             raise RuntimeError, "Unable to access %s" %(fn,)
 
-        if platform.machine() == 'ia64':
-            cfg_list = map(lambda x: (x,grub.LiloConf.LiloConfigFile), 
-                           # common distributions
-                           ["/efi/debian/elilo.conf", "/efi/gentoo/elilo.conf", 
-                            "/efi/redflag/elilo.conf", "/efi/redhat/elilo.conf", 
-                            "/efi/SuSE/elilo.conf",] + 
-                           # fallbacks
-                           ["/efi/boot/elilo.conf", "/elilo.conf",])
-        else:
-            cfg_list = map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
-                           ["/boot/grub/grub.cfg", "/grub/grub.cfg",
-                            "/boot/grub2/grub.cfg", "/grub2/grub.cfg"]) + \
-                       map(lambda x: (x,grub.ExtLinuxConf.ExtLinuxConfigFile),
-                           ["/boot/isolinux/isolinux.cfg",
-                            "/boot/extlinux/extlinux.conf",
-                            "/boot/extlinux.conf"]) + \
-                       map(lambda x: (x,grub.GrubConf.GrubConfigFile),
-                           ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
-                            "/grub/menu.lst", "/grub/grub.conf"])
+        cfg_list = map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
+                       ["/boot/grub/grub.cfg", "/grub/grub.cfg",
+                        "/boot/grub2/grub.cfg", "/grub2/grub.cfg"]) + \
+                   map(lambda x: (x,grub.ExtLinuxConf.ExtLinuxConfigFile),
+                       ["/boot/isolinux/isolinux.cfg",
+                        "/boot/extlinux/extlinux.conf",
+                        "/boot/extlinux.conf"]) + \
+                   map(lambda x: (x,grub.GrubConf.GrubConfigFile),
+                       ["/boot/grub/menu.lst", "/boot/grub/grub.conf",
+                        "/grub/menu.lst", "/grub/grub.conf"])
 
         if not fs:
             # set the config file and parse it
#11 lore raw

Re: [PATCH 06/11] pygrub: remote ia64 from pygrub

Olaf Hering writes ("[PATCH 06/11] pygrub: remote ia64 from pygrub"):

Quoted 1 line

...

tools/pygrub/src/pygrub class Grub: · line 423

Quoted 5 lines
tools/pygrub/src/pygrub +0 -5
-        if platform.machine() == 'ia64':
-            cfg_list = map(lambda x: (x,grub.LiloConf.LiloConfigFile), 
-                           # common distributions
-                           ["/efi/debian/elilo.conf", "/efi/gentoo/elilo.conf", 
-                            "/efi/redflag/elilo.conf", "/efi/redhat/elilo.conf", 

This seems related to ia64 using EFI. Do we want to preserve this code for EFI support on other platforms ?

Ian.
;4~

#12 lore raw

Re: [PATCH 06/11] pygrub: remote ia64 from pygrub

Quoted 11 lines · Ian Jackson

Olaf Hering writes ("[PATCH 06/11] pygrub: remote ia64 from pygrub"):

Quoted 1 line

...

tools/pygrub/src/pygrub class Grub: · line 423

Quoted 5 lines
tools/pygrub/src/pygrub +0 -5
-        if platform.machine() == 'ia64':
-            cfg_list = map(lambda x: (x,grub.LiloConf.LiloConfigFile), 
-                           # common distributions
-                           ["/efi/debian/elilo.conf", "/efi/gentoo/elilo.conf", 
-                            "/efi/redflag/elilo.conf", "/efi/redhat/elilo.conf", 

This seems related to ia64 using EFI. Do we want to preserve this code for EFI support on other platforms ?

Do we have any guests supporting EFI as firmware? If so, the guest most likely uses grub2 instead of elilo.

Olaf

Acked-by
#13 lore raw

Re: [PATCH 06/11] pygrub: remote ia64 from pygrub

Olaf Hering writes ("Re: [PATCH 06/11] pygrub: remote ia64 from pygrub"):

Quoted 6 lines · Ian Jackson
Quoted 2 lines

This seems related to ia64 using EFI. Do we want to preserve this code for EFI support on other platforms ?

Do we have any guests supporting EFI as firmware? If so, the guest most likely uses grub2 instead of elilo.

This is a good point. So, for the patch, I think:

Ian.

#14 lore raw

PATCH 7/11 xend: remove ia64 from xend sources

In reply to Olaf Hering
---
 tools/python/xen/xend/XendNode.py      | 10 ------
 tools/python/xen/xend/arch.py          |  1 -
 tools/python/xen/xend/image.py         | 56 ----------------------------------
 tools/python/xen/xend/server/pciif.py  |  2 +-
 tools/xm-test/lib/XmTestLib/arch.py    | 14 ++-------
 tools/xm-test/lib/XmTestReport/arch.py |  4 ---
 6 files changed, 4 insertions(+), 83 deletions(-)
tools/python/xen/xend/XendNode.py +0 -10
index f16932c..a26383b 100644
@@ -132,16 +132,6 @@ class XendNode:
                       'stepping' : cpuinfo[number]['stepping'],
                       'flags'    : cpuinfo[number]['flags'],
                     })
-            elif arch.type == "ia64":
-                self.cpus[u].update(
-                    { 'host'     : self.uuid,
-                      'features' : cpu_features,
-                      'speed'    : int(float(cpuinfo[number]['cpu MHz'])),
-                      'vendor'   : cpuinfo[number]['vendor'],
-                      'modelname': cpuinfo[number]['family'],
-                      'stepping' : cpuinfo[number]['model'],
-                      'flags'    : cpuinfo[number]['features'],
-                    })
             else:
                 self.cpus[u].update(
                     { 'host'     : self.uuid,
tools/python/xen/xend/arch.py +0 -1
index 6d789d9..2af55e8 100644
@@ -27,6 +27,5 @@ _types = {
     "x86_64": "x86",
     "amd64": "x86",
     "i86pc": "x86",
-    "ia64": "ia64",
 }
 type = _types.get(os.uname()[4], "unknown")
tools/python/xen/xend/image.py +0 -56

74 lines not on this page · raw message

tools/python/xen/xend/server/pciif.py +1 -1
index 27c1b75..165953f 100644
@@ -412,7 +412,7 @@ class PciController(DevController):
                                     ' the same guest with %s'
                                 raise VmError(err_msg % (f, dev.name))
             elif dev.dev_type == DEV_TYPE_PCI:
-                if dev.bus == 0 or arch.type == "ia64":
+                if dev.bus == 0:
                     if not dev.pci_af_flr:
                         # We cope with this case by using the Dstate transition
                         # method or some vendor specific methods for now.
tools/xm-test/lib/XmTestLib/arch.py +3 -11
index d505cc0..f3d8455 100644
@@ -39,16 +39,13 @@ def getRdPath():
 
     return rdpath
 
-# Begin: Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors
+# Begin: Intel as well as AMD 32-bit and 64-bit processors
 def ia_checkBuffer(buffer):
     return
 
 def ia_minSafeMem():
     return 32
 
-def ia64_minSafeMem():
-    return 128
-
 def ia_getDeviceModel():
     """Get the path to the device model based on
     the architecture reported in uname"""
@@ -85,7 +82,7 @@ ia_HVMDefaults =      {"memory"       : 64,
                        "serial"       : "pty",
                        "device_model" : ia_getDeviceModel(),
 }
-# End  : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors
+# End  : Intel as well as AMD 32-bit and 64-bit processors
 
 """Convert from uname specification to a more general platform."""
 _uname_to_arch_map = {
@@ -94,12 +91,11 @@ _uname_to_arch_map = {
     "i586"  : "x86",
     "i686"  : "x86",
     "x86_64": "x86_64",
-    "ia64"  : "ia64",
 }
 
 # Lookup current platform.
 _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown")
-if _arch == "x86" or _arch == "x86_64" or _arch == "ia64":
+if _arch == "x86" or _arch == "x86_64":
     minSafeMem = ia_minSafeMem
     getDefaultKernel = ia_getDefaultKernel
     checkBuffer = ia_checkBuffer
@@ -118,9 +114,5 @@ if _arch == "x86" or _arch == "x86_64" or _arch == "ia64":
         else:
             configDefaults['extra'] = clause
 
-    if _arch == "ia64":
-        minSafeMem = ia64_minSafeMem
-        configDefaults['memory'] = ia64_minSafeMem()
-
 else:
     raise ValueError, "Unknown architecture!"
tools/xm-test/lib/XmTestReport/arch.py +0 -4
index 920526d..b1f4bc8 100644
@@ -29,7 +29,6 @@ _uname_to_arch_map = {
     "i586"  : "x86",
     "i686"  : "x86",
     "x86_64": "x86_64",
-    "ia64"  : "ia64",
 }
 
 _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown")
@@ -39,8 +38,5 @@ if _arch == "x86":
 elif _arch == "x86_64":
     cpuValues = {"model_name" : "Unknown",
                  "flags"      : "Unknown"}
-elif _arch == "ia64":
-    cpuValues = {"arch"     : "Unknown",
-                 "features" : "Unknown"}
 else:
     raise ValueError, "Unknown architecture!"
#15 lore raw

PATCH 8/11 libxl: add option for discard support to xl disk configuration

In reply to Olaf Hering

Handle new option discard=on|off for disk configuration. It is supposed to disable discard support if file based backing storage was intentionally created non-sparse to avoid fragmentation of the file.

The option is a boolean and intended for the backend driver. A new boolean property "discard-enable" is written to the backend node. An upcoming patch for qemu will make use of this property. The kernel blkback driver may be updated as well to disable discard for phy based backing storage.

v2:
rename xenstore property from discard_enable to discard-enable update description in xl-disk-configuration.txt
use libxl_defbool as type for discard_enable
update check-xl-disk-parse to use "<default>"
add LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE to libxl.h

---
 docs/misc/xl-disk-configuration.txt | 15 +++++++++++++++
 tools/libxl/check-xl-disk-parse     | 21 ++++++++++++++-------
 tools/libxl/libxl.c                 |  3 +++
 tools/libxl/libxl.h                 |  5 +++++
 tools/libxl/libxl_types.idl         |  1 +
 tools/libxl/libxlu_disk_l.l         |  4 ++++
 xen/include/public/io/blkif.h       |  8 ++++++++
 7 files changed, 50 insertions(+), 7 deletions(-)
docs/misc/xl-disk-configuration.txt +15 -0
index cf22397..b8077da 100644
@@ -178,6 +178,21 @@ information to be interpreted by the executable program <script>,
 These scripts are normally called "block-<script>".
 
 
+discard=<boolean>
+---------------
+
+Description:           Instruct backend to advertise discard support to frontend
+Supported values:      on, off, 0, 1
+Mandatory:             No
+Default value:         on if, available for that backend typ
+
+This option is an advisory setting for the backend driver, depending of the
+value, to advertise discard support (TRIM, UNMAP) to the frontend. The real
+benefit of this option is to be able to force it off rather than on. It allows
+to disable "hole punching" for file based backends which were intentionally
+created non-sparse to avoid fragmentation of the file.
+
+
 
 ============================================
 DEPRECATED PARAMETERS, PREFIXES AND SYNTAXES
tools/libxl/check-xl-disk-parse +14 -7
index 797277c..4d26ca3 100755
@@ -61,7 +61,8 @@ disk: {
     "script": null,
     "removable": 0,
     "readwrite": 1,
-    "is_cdrom": 0
+    "is_cdrom": 0,
+    "discard_enable": "<default>"
 }
 
 END
@@ -82,7 +83,8 @@ disk: {
     "script": null,
     "removable": 1,
     "readwrite": 0,
-    "is_cdrom": 1
+    "is_cdrom": 1,
+    "discard_enable": "<default>"
 }
 
 END
@@ -104,7 +106,8 @@ disk: {
     "script": null,
     "removable": 0,
     "readwrite": 1,
-    "is_cdrom": 0
+    "is_cdrom": 0,
+    "discard_enable": "<default>"
 }
 
 EOF
@@ -121,7 +124,8 @@ disk: {
     "script": null,
     "removable": 1,
     "readwrite": 0,
-    "is_cdrom": 1
+    "is_cdrom": 1,
+    "discard_enable": "<default>"
 }
 
 EOF
@@ -142,7 +146,8 @@ disk: {
     "script": null,
     "removable": 1,
     "readwrite": 0,
-    "is_cdrom": 1
+    "is_cdrom": 1,
+    "discard_enable": "<default>"
 }
 
 EOF
@@ -160,7 +165,8 @@ disk: {
     "script": "block-iscsi",
     "removable": 0,
     "readwrite": 1,
-    "is_cdrom": 0
+    "is_cdrom": 0,
+    "discard_enable": "<default>"
 }
 
 EOF
@@ -180,7 +186,8 @@ disk: {
     "script": "block-drbd",
     "removable": 0,
     "readwrite": 1,
-    "is_cdrom": 0
+    "is_cdrom": 0,
+    "discard_enable": "<default>"
 }
 
 EOF
tools/libxl/libxl.c +3 -0
index 730f6e1..a18929b 100644
@@ -2192,6 +2192,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
         flexarray_append(back, disk->readwrite ? "w" : "r");
         flexarray_append(back, "device-type");
         flexarray_append(back, disk->is_cdrom ? "cdrom" : "disk");
+        if (!libxl_defbool_is_default(disk->discard_enable))
+            flexarray_append_pair(back, "discard-enable",
+                                  libxl_defbool_val(disk->discard_enable) ? "1" : "0");
 
         flexarray_append(front, "backend-id");
         flexarray_append(front, libxl__sprintf(gc, "%d", disk->backend_domid));
tools/libxl/libxl.h +5 -0
index 06bbca6..f3a8ea0 100644
@@ -95,6 +95,11 @@
 #define LIBXL_HAVE_BUILDINFO_EVENT_CHANNELS 1
 
 /*
+ * The libxl_device_disk has the discard_enable field.
+ */
+#define LIBXL_HAVE_LIBXL_DEVICE_DISK_DISCARD_ENABLE 1
+
+/*
  * libxl ABI compatibility
  *
  * The only guarantee which libxl makes regarding ABI compatibility
tools/libxl/libxl_types.idl +1 -0
index 649ce50..6575515 100644
@@ -415,6 +415,7 @@ libxl_device_disk = Struct("device_disk", [
     ("removable", integer),
     ("readwrite", integer),
     ("is_cdrom", integer),
+    ("discard_enable", libxl_defbool),
     ])
 
 libxl_device_nic = Struct("device_nic", [
tools/libxl/libxlu_disk_l.l +4 -0
index 7c4e7f1..2585bee 100644
@@ -173,6 +173,10 @@ backendtype=[^,]*,? { STRIP(','); setbackendtype(DPC,FROMEQUALS); }
 
 vdev=[^,]*,?	{ STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); }
 script=[^,]*,?	{ STRIP(','); SAVESTRING("script", script, FROMEQUALS); }
+discard=on,?	{ libxl_defbool_set(&DPC->disk->discard_enable, true); }
+discard=1,?	{ libxl_defbool_set(&DPC->disk->discard_enable, true); }
+discard=off,?	{ libxl_defbool_set(&DPC->disk->discard_enable, false); }
+discard=0,?	{ libxl_defbool_set(&DPC->disk->discard_enable, false); }
 
  /* the target magic parameter, eats the rest of the string */
 
xen/include/public/io/blkif.h +8 -0
index c3e169c..dad32d2 100644
@@ -175,6 +175,14 @@
  *
  *------------------------- Backend Device Properties -------------------------
  *
+ * discard-enable
+ *      Values:         0/1 (boolean)
+ *      Default Value:  1
+ *
+ *      This optional property, set by the toolstack, instructs the backend to
+ *      offer discard to the frontend. If the property is missing the backend
+ *      should offer discard if the backing storage actually supports it.
+ *
  * discard-alignment
  *      Values:         <uint32_t>
  *      Default Value:  0
#16 lore raw

Re: [PATCH 08/11] libxl: add option for discard support to xl disk configuration

Olaf Hering writes ("[PATCH 08/11] libxl: add option for discard support to xl disk configuration"):

Quoted 9 lines

Handle new option discard=on|off for disk configuration. It is supposed to disable discard support if file based backing storage was intentionally created non-sparse to avoid fragmentation of the file.

The option is a boolean and intended for the backend driver. A new boolean property "discard-enable" is written to the backend node. An upcoming patch for qemu will make use of this property. The kernel blkback driver may be updated as well to disable discard for phy based backing storage.

Thanks.

Quoted 2 lines

+discard=<boolean>
+---------------

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+This option is an advisory setting for the backend driver, depending of the
+value, to advertise discard support (TRIM, UNMAP) to the frontend.

I think the semantics of this are unclear. Calling it an "advisory" setting doesn't help. The documentation should explicitly explain under what circumstances it might be honoured.

tools/libxl/libxl.c static void device_disk_add(libxl__egc *egc, uint32_t d... · line 2194

Quoted 8 lines
tools/libxl/libxl.c +3 -0
index 730f6e1..a18929b 100644
@@ -2192,6 +2192,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t d...
+        if (!libxl_defbool_is_default(disk->discard_enable))
+            flexarray_append_pair(back, "discard-enable",
+                                  libxl_defbool_val(disk->discard_enable) ? "1" : "0");

This approach is quite unusual, and arguably wrong. I think it would be better if the default were (essentially) fixed. This would result in discard-enable always being written here.

tools/libxl/libxl.c static void device_disk_add(libxl__egc *egc, uint32_t d...

Quoted 8 lines
tools/libxl/libxl.c +8 -0
+ * discard-enable
+ *      Values:         0/1 (boolean)
+ *      Default Value:  1
+ *
+ *      This optional property, set by the toolstack, instructs the
+ *      backend to offer discard to the frontend. If the property
+ *      is missing the backend should offer discard if the backing
+ *      storage actually supports it.

What should the backend do if the property is set but the backend doesn't support the requested value ?

Ian.

#17 lore raw

Re: [PATCH 08/11] libxl: add option for discard support to xl disk configuration

Quoted 10 lines · Ian Jackson

Olaf Hering writes ("[PATCH 08/11] libxl: add option for discard support to xl disk configuration"):

Review

Quoted 2 lines
(quoted diff) +2 -0
+This option is an advisory setting for the backend driver, depending of the
+value, to advertise discard support (TRIM, UNMAP) to the frontend.

I think the semantics of this are unclear. Calling it an "advisory" setting doesn't help. The documentation should explicitly explain under what circumstances it might be honoured.

Quoted 1 line

+ if (!libxl_defbool_is_default(disk->discard_enable))

This approach is quite unusual, and arguably wrong. I think it would be better if the default were (essentially) fixed. This would result in discard-enable always being written here.

I'm fine with writing discard-enable="1" always.

Quoted 2 lines

What should the backend do if the property is set but the backend doesn't support the requested value ?

The backend could advertise feature-discard anyway, so that error paths will be executed when the frontend actually sends a discard request. Right now the backend will catch this and both frontend/backend will internally disable discard.

Olaf

#18 lore raw

PATCH 9/11 tools/xc: pass errno to callers of xc_domain_save

In reply to Olaf Hering

Callers of xc_domain_save use errno to print diagnostics if the call fails. But xc_domain_save does not preserve the actual errno in case of a failure.

This change preserves errno in all cases where code jumps to the label "out". In addition a new label "exit" is added to catch also code which used to do just "return 1".

Now libxl_save_helper:complete can print the actual error string.

Note: some of the functions used in xc_domain_save do not use errno to indicate a reason. In these cases the errno remains undefined as it used to be without this change.

---
 tools/libxc/xc_domain_save.c | 88 +++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 82 insertions(+), 6 deletions(-)
tools/libxc/xc_domain_save.c +82 -6
index 42c4752..f32ac81 100644
@@ -806,6 +806,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     xc_dominfo_t info;
     DECLARE_DOMCTL;
 
+    int errnoval = 0;
     int rc = 1, frc, i, j, last_iter = 0, iter = 0;
     int live  = (flags & XCFLAGS_LIVE);
     int debug = (flags & XCFLAGS_DEBUG);
@@ -898,8 +899,8 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     if ( hvm && !callbacks->switch_qemu_logdirty )
     {
         ERROR("No switch_qemu_logdirty callback provided.");
-        errno = EINVAL;
-        return 1;
+        errnoval = EINVAL;
+        goto exit;
     }
 
     outbuf_init(xch, &ob_pagebuf, OUTBUF_SIZE);
@@ -913,14 +914,16 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     if ( !get_platform_info(xch, dom,
                             &ctx->max_mfn, &ctx->hvirt_start, &ctx->pt_levels, &dinfo->guest_width) )
     {
+        errnoval = errno;
         ERROR("Unable to get platform info.");
-        return 1;
+        goto exit;
     }
 
     if ( xc_domain_getinfo(xch, dom, 1, &info) != 1 )
     {
+        errnoval = errno;
         PERROR("Could not get domain info");
-        return 1;
+        goto exit;
     }
 
     shared_info_frame = info.shared_info_frame;
@@ -932,6 +935,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                            PROT_READ, shared_info_frame);
         if ( !live_shinfo )
         {
+            errnoval = errno;
             PERROR("Couldn't map live_shinfo");
             goto out;
         }
@@ -942,6 +946,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
     if ( dinfo->p2m_size > ~XEN_DOMCTL_PFINFO_LTAB_MASK )
     {
+        errnoval = E2BIG;
         ERROR("Cannot save this big a guest");
         goto out;
     }
@@ -967,6 +972,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
             
             if ( frc < 0 )
             {
+                errnoval = errno;
                 PERROR("Couldn't enable shadow mode (rc %d) (errno %d)", frc, errno );
                 goto out;
             }
@@ -975,6 +981,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         /* Enable qemu-dm logging dirty pages to xen */
         if ( hvm && callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) )
         {
+            errnoval = errno;
             PERROR("Couldn't enable qemu log-dirty mode (errno %d)", errno);
             goto out;
         }
@@ -985,6 +992,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( suspend_and_state(callbacks->suspend, callbacks->data, xch,
                                io_fd, dom, &info) )
         {
+            errnoval = errno;
             ERROR("Domain appears not to have suspended");
             goto out;
         }
@@ -994,6 +1002,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     {
         if (!(compress_ctx = xc_compression_create_context(xch, dinfo->p2m_size)))
         {
+            errnoval = errno;
             ERROR("Failed to create compression context");
             goto out;
         }
@@ -1012,6 +1021,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
     if ( !to_send || !to_fix || !to_skip )
     {
+        errnoval = ENOMEM;
         ERROR("Couldn't allocate to_send array");
         goto out;
     }
@@ -1024,12 +1034,14 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         hvm_buf_size = xc_domain_hvm_getcontext(xch, dom, 0, 0);
         if ( hvm_buf_size == -1 )
         {
+            errnoval = errno;
             PERROR("Couldn't get HVM context size from Xen");
             goto out;
         }
         hvm_buf = malloc(hvm_buf_size);
         if ( !hvm_buf )
         {
+            errnoval = ENOMEM;
             ERROR("Couldn't allocate memory");
             goto out;
         }
@@ -1043,7 +1055,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     if ( (pfn_type == NULL) || (pfn_batch == NULL) || (pfn_err == NULL) )
     {
         ERROR("failed to alloc memory for pfn_type and/or pfn_batch arrays");
-        errno = ENOMEM;
+        errnoval = ENOMEM;
         goto out;
     }
     memset(pfn_type, 0,
@@ -1052,6 +1064,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     /* Setup the mfn_to_pfn table mapping */
     if ( !(ctx->live_m2p = xc_map_m2p(xch, ctx->max_mfn, PROT_READ, &ctx->m2p_mfn0)) )
     {
+        errnoval = errno;
         PERROR("Failed to map live M2P table");
         goto out;
     }
@@ -1059,6 +1072,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     /* Start writing out the saved-domain record. */
     if ( write_exact(io_fd, &dinfo->p2m_size, sizeof(unsigned long)) )
     {
+        errnoval = errno;
         PERROR("write: p2m_size");
         goto out;
     }
@@ -1071,6 +1085,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         ctx->live_p2m = map_and_save_p2m_table(xch, io_fd, dom, ctx, live_shinfo);
         if ( ctx->live_p2m == NULL )
         {
+            errnoval = errno;
             PERROR("Failed to map/save the p2m frame list");
             goto out;
         }
@@ -1097,12 +1112,14 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     tmem_saved = xc_tmem_save(xch, dom, io_fd, live, XC_SAVE_ID_TMEM);
     if ( tmem_saved == -1 )
     {
+        errnoval = errno;
         PERROR("Error when writing to state file (tmem)");
         goto out;
     }
 
     if ( !live && save_tsc_info(xch, dom, io_fd) < 0 )
     {
+        errnoval = errno;
         PERROR("Error when writing to state file (tsc)");
         goto out;
     }
@@ -1143,6 +1160,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                     dinfo->p2m_size, NULL, 0, NULL);
                 if ( frc != dinfo->p2m_size )
                 {
+                    errnoval = errno;
                     ERROR("Error peeking shadow bitmap");
                     goto out;
                 }
@@ -1257,6 +1275,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                 xch, dom, PROT_READ, pfn_type, pfn_err, batch);
             if ( region_base == NULL )
             {
+                errnoval = errno;
                 PERROR("map batch failed");
                 goto out;
             }
@@ -1264,6 +1283,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
             /* Get page types */
             if ( xc_get_pfn_type_batch(xch, dom, batch, pfn_type) )
             {
+                errnoval = errno;
                 PERROR("get_pfn_type_batch failed");
                 goto out;
             }
@@ -1332,6 +1352,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
             if ( wrexact(io_fd, &batch, sizeof(unsigned int)) )
             {
+                errnoval = errno;
                 PERROR("Error when writing to state file (2)");
                 goto out;
             }
@@ -1341,6 +1362,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                     ((unsigned long *)pfn_type)[j] = pfn_type[j];
             if ( wrexact(io_fd, pfn_type, sizeof(unsigned long)*batch) )
             {
+                errnoval = errno;
                 PERROR("Error when writing to state file (3)");
                 goto out;
             }
@@ -1368,6 +1390,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                        (char*)region_base+(PAGE_SIZE*(j-run)), 
                                        PAGE_SIZE*run) != PAGE_SIZE*run )
                         {
+                            errnoval = errno;
                             PERROR("Error when writing to state file (4a)"
                                   " (errno %d)", errno);
                             goto out;
@@ -1396,6 +1419,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
                     if ( race && !live )
                     {
+                        errnoval = errno;
                         ERROR("Fatal PT race (pfn %lx, type %08lx)", pfn,
                               pagetype);
                         goto out;
@@ -1409,6 +1433,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                                         pfn, 1 /* raw page */);
                         if (c_err == -2) /* OOB PFN */
                         {
+                            errnoval = errno;
                             ERROR("Could not add pagetable page "
                                   "(pfn:%" PRIpfn "to page buffer\n", pfn);
                             goto out;
@@ -1428,6 +1453,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                              */
                             if (wrcompressed(io_fd) < 0)
                             {
+                                errnoval = errno;
                                 ERROR("Error when writing compressed"
                                       " data (4b)\n");
                                 goto out;
@@ -1437,6 +1463,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                     else if ( wruncached(io_fd, live, page,
                                          PAGE_SIZE) != PAGE_SIZE )
                     {
+                        errnoval = errno;
                         PERROR("Error when writing to state file (4b)"
                               " (errno %d)", errno);
                         goto out;
@@ -1456,6 +1483,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
                         if (c_err == -2) /* OOB PFN */
                         {
+                            errnoval = errno;
                             ERROR("Could not add page "
                                   "(pfn:%" PRIpfn "to page buffer\n", pfn);
                             goto out;
@@ -1465,6 +1493,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                         {
                             if (wrcompressed(io_fd) < 0)
                             {
+                                errnoval = errno;
                                 ERROR("Error when writing compressed"
                                       " data (4c)\n");
                                 goto out;
@@ -1483,6 +1512,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                (char*)region_base+(PAGE_SIZE*(j-run)), 
                                PAGE_SIZE*run) != PAGE_SIZE*run )
                 {
+                    errnoval = errno;
                     PERROR("Error when writing to state file (4c)"
                           " (errno %d)", errno);
                     goto out;
@@ -1520,6 +1550,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
             /* send "-1" to put receiver into debug mode */
             if ( wrexact(io_fd, &id, sizeof(int)) )
             {
+                errnoval = errno;
                 PERROR("Error when writing to state file (6)");
                 goto out;
             }
@@ -1542,6 +1573,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                 if ( suspend_and_state(callbacks->suspend, callbacks->data,
                                        xch, io_fd, dom, &info) )
                 {
+                    errnoval = errno;
                     ERROR("Domain appears not to have suspended");
                     goto out;
                 }
@@ -1550,12 +1582,14 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                 if ( (tmem_saved > 0) &&
                      (xc_tmem_save_extra(xch,dom,io_fd,XC_SAVE_ID_TMEM_EXTRA) == -1) )
                 {
+                        errnoval = errno;
                         PERROR("Error when writing to state file (tmem)");
                         goto out;
                 }
 
                 if ( save_tsc_info(xch, dom, io_fd) < 0 )
                 {
+                    errnoval = errno;
                     PERROR("Error when writing to state file (tsc)");
                     goto out;
                 }
@@ -1567,6 +1601,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                    XEN_DOMCTL_SHADOW_OP_CLEAN, HYPERCALL_BUFFER(to_send),
                                    dinfo->p2m_size, NULL, 0, &shadow_stats) != dinfo->p2m_size )
             {
+                errnoval = errno;
                 PERROR("Error flushing shadow PT");
                 goto out;
             }
@@ -1598,6 +1633,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
         if ( info.max_vcpu_id >= XC_SR_MAX_VCPUS )
         {
+            errnoval = E2BIG;
             ERROR("Too many VCPUS in guest!");
             goto out;
         }
@@ -1614,6 +1650,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( wrexact(io_fd, &chunk, offsetof(struct chunk, vcpumap)
                      + vcpumap_sz(info.max_vcpu_id)) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file");
             goto out;
         }
@@ -1633,6 +1670,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the generation id buffer location for guest");
             goto out;
         }
@@ -1645,6 +1683,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the ident_pt for EPT guest");
             goto out;
         }
@@ -1657,6 +1696,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the paging ring pfn for guest");
             goto out;
         }
@@ -1669,6 +1709,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the access ring pfn for guest");
             goto out;
         }
@@ -1681,6 +1722,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the sharing ring pfn for guest");
             goto out;
         }
@@ -1693,6 +1735,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the vm86 TSS for guest");
             goto out;
         }
@@ -1705,6 +1748,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the console pfn for guest");
             goto out;
         }
@@ -1716,6 +1760,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
         if ((chunk.data != 0) && wrexact(io_fd, &chunk, sizeof(chunk)))
         {
+            errnoval = errno;
             PERROR("Error when writing the firmware ioport version");
             goto out;
         }
@@ -1728,6 +1773,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (chunk.data != 0) &&
              wrexact(io_fd, &chunk, sizeof(chunk)) )
         {
+            errnoval = errno;
             PERROR("Error when writing the viridian flag");
             goto out;
         }
@@ -1741,6 +1787,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
         if ( callbacks->toolstack_save(dom, &buf, &len, callbacks->data) < 0 )
         {
+            errnoval = errno;
             PERROR("Error calling toolstack_save");
             goto out;
         }
@@ -1759,6 +1806,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         i = XC_SAVE_ID_LAST_CHECKPOINT;
         if ( wrexact(io_fd, &i, sizeof(int)) )
         {
+            errnoval = errno;
             PERROR("Error when writing last checkpoint chunk");
             goto out;
         }
@@ -1778,6 +1826,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         i = XC_SAVE_ID_ENABLE_COMPRESSION;
         if ( wrexact(io_fd, &i, sizeof(int)) )
         {
+            errnoval = errno;
             PERROR("Error when writing enable_compression marker");
             goto out;
         }
@@ -1787,6 +1836,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     i = 0;
     if ( wrexact(io_fd, &i, sizeof(int)) )
     {
+        errnoval = errno;
         PERROR("Error when writing to state file (6')");
         goto out;
     }
@@ -1805,6 +1855,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                          (unsigned long *)&magic_pfns[2]);
         if ( wrexact(io_fd, magic_pfns, sizeof(magic_pfns)) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file (7)");
             goto out;
         }
@@ -1813,18 +1864,21 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( (rec_size = xc_domain_hvm_getcontext(xch, dom, hvm_buf, 
                                                   hvm_buf_size)) == -1 )
         {
+            errnoval = errno;
             PERROR("HVM:Could not get hvm buffer");
             goto out;
         }
         
         if ( wrexact(io_fd, &rec_size, sizeof(uint32_t)) )
         {
+            errnoval = errno;
             PERROR("error write hvm buffer size");
             goto out;
         }
         
         if ( wrexact(io_fd, hvm_buf, rec_size) )
         {
+            errnoval = errno;
             PERROR("write HVM info failed!");
             goto out;
         }
@@ -1849,6 +1903,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
         if ( wrexact(io_fd, &j, sizeof(unsigned int)) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file (6a)");
             goto out;
         }
@@ -1863,6 +1918,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
             {
                 if ( wrexact(io_fd, &pfntab, sizeof(unsigned long)*j) )
                 {
+                    errnoval = errno;
                     PERROR("Error when writing to state file (6b)");
                     goto out;
                 }
@@ -1873,6 +1929,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
     if ( xc_vcpu_getcontext(xch, dom, 0, &ctxt) )
     {
+        errnoval = errno;
         PERROR("Could not get vcpu context");
         goto out;
     }
@@ -1888,6 +1945,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     mfn = GET_FIELD(&ctxt, user_regs.edx);
     if ( !MFN_IS_IN_PSEUDOPHYS_MAP(mfn) )
     {
+        errnoval = ERANGE;
         ERROR("Suspend record is not in range of pseudophys map");
         goto out;
     }
@@ -1900,6 +1958,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
 
         if ( (i != 0) && xc_vcpu_getcontext(xch, dom, i, &ctxt) )
         {
+            errnoval = errno;
             PERROR("No context for VCPU%d", i);
             goto out;
         }
@@ -1910,6 +1969,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
             mfn = GET_FIELD(&ctxt, gdt_frames[j]);
             if ( !MFN_IS_IN_PSEUDOPHYS_MAP(mfn) )
             {
+                errnoval = ERANGE;
                 ERROR("GDT frame is not in range of pseudophys map");
                 goto out;
             }
@@ -1920,6 +1980,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3(
                                            GET_FIELD(&ctxt, ctrlreg[3]))) )
         {
+            errnoval = ERANGE;
             ERROR("PT base is not in range of pseudophys map");
             goto out;
         }
@@ -1931,6 +1992,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         {
             if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3(ctxt.x64.ctrlreg[1])) )
             {
+                errnoval = ERANGE;
                 ERROR("PT base is not in range of pseudophys map");
                 goto out;
             }
@@ -1943,6 +2005,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                                         ? sizeof(ctxt.x64) 
                                         : sizeof(ctxt.x32))) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file (1)");
             goto out;
         }
@@ -1953,11 +2016,13 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         domctl.u.ext_vcpucontext.vcpu = i;
         if ( xc_domctl(xch, &domctl) < 0 )
         {
+            errnoval = errno;
             PERROR("No extended context for VCPU%d", i);
             goto out;
         }
         if ( wrexact(io_fd, &domctl.u.ext_vcpucontext, 128) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file (2)");
             goto out;
         }
@@ -1971,6 +2036,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         domctl.u.vcpuextstate.size = 0;
         if ( xc_domctl(xch, &domctl) < 0 )
         {
+            errnoval = errno;
             PERROR("No eXtended states (XSAVE) for VCPU%d", i);
             goto out;
         }
@@ -1982,6 +2048,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         buffer = xc_hypercall_buffer_alloc(xch, buffer, domctl.u.vcpuextstate.size);
         if ( !buffer )
         {
+            errnoval = errno;
             PERROR("Insufficient memory for getting eXtended states for"
                    "VCPU%d", i);
             goto out;
@@ -1989,6 +2056,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         set_xen_guest_handle(domctl.u.vcpuextstate.buffer, buffer);
         if ( xc_domctl(xch, &domctl) < 0 )
         {
+            errnoval = errno;
             PERROR("No eXtended states (XSAVE) for VCPU%d", i);
             xc_hypercall_buffer_free(xch, buffer);
             goto out;
@@ -2000,6 +2068,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
                      sizeof(domctl.u.vcpuextstate.size)) ||
              wrexact(io_fd, buffer, domctl.u.vcpuextstate.size) )
         {
+            errnoval = errno;
             PERROR("Error when writing to state file VCPU extended state");
             xc_hypercall_buffer_free(xch, buffer);
             goto out;
@@ -2015,6 +2084,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
               arch.pfn_to_mfn_frame_list_list, 0);
     if ( wrexact(io_fd, page, PAGE_SIZE) )
     {
+        errnoval = errno;
         PERROR("Error when writing to state file (1)");
         goto out;
     }
@@ -2022,6 +2092,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     /* Flush last write and check for errors. */
     if ( fsync(io_fd) && errno != EINVAL )
     {
+        errnoval = errno;
         PERROR("Error when flushing state file");
         goto out;
     }
@@ -2043,6 +2114,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         ob = &ob_pagebuf;
         if (wrcompressed(io_fd) < 0)
         {
+            errnoval = errno;
             ERROR("Error when writing compressed data, after postcopy\n");
             rc = 1;
             goto out;
@@ -2051,6 +2123,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( wrexact(io_fd, ob_tailbuf.buf, ob_tailbuf.pos) )
         {
             rc = 1;
+            errnoval = errno;
             PERROR("Error when copying tailbuf into outbuf");
             goto out;
         }
@@ -2079,6 +2152,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
         if ( suspend_and_state(callbacks->suspend, callbacks->data, xch,
                                io_fd, dom, &info) )
         {
+            errnoval = errno;
             ERROR("Domain appears not to have suspended");
             goto out;
         }
@@ -2130,7 +2204,9 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
     free(hvm_buf);
     outbuf_free(&ob_pagebuf);
 
-    DPRINTF("Save exit of domid %u with rc=%d\n", dom, rc);
+exit:
+    DPRINTF("Save exit of domid %u with rc=%d, errno=%d\n", dom, rc, errnoval);
+    errno = errnoval;
 
     return !!rc;
 }
#19 lore raw

Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save

Olaf Hering writes ("[PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save"):

Quoted 7 lines

Callers of xc_domain_save use errno to print diagnostics if the call fails. But xc_domain_save does not preserve the actual errno in case of a failure.

This change preserves errno in all cases where code jumps to the label "out". In addition a new label "exit" is added to catch also code which used to do just "return 1".

I can't help wondering if this patch would be a lot smaller if it were done by having ERROR and PERROR, and the cleanup part of xc_domain_save, preserve errno.

Quoted 3 lines

Note: some of the functions used in xc_domain_save do not use errno to indicate a reason. In these cases the errno remains undefined as it used to be without this change.

Do you intend to fix this too ?

Thanks,
Ian.

#20 lore raw

Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save

Quoted 5 lines · Ian Jackson

Olaf Hering writes ("[PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save"):

Quoted 4 lines

Callers of xc_domain_save use errno to print diagnostics if the call fails. But xc_domain_save does not preserve the actual errno in case of a failure.

Quoted 7 lines
Quoted 3 lines

This change preserves errno in all cases where code jumps to the label "out". In addition a new label "exit" is added to catch also code which used to do just "return 1".

I can't help wondering if this patch would be a lot smaller if it were done by having ERROR and PERROR, and the cleanup part of xc_domain_save, preserve errno.

Something like this for the macros?

tools/libxc/xc_private.h +9 -3
index a610f0c..8b791b6 100644
@@ -123,9 +123,15 @@ void xc_report_progress_step(xc_interface *xch,
 #define DPRINTF(_f, _a...) xc_report(xch, xch->error_handler, XTL_DETAIL,0, _f , ## _a)
 #define DBGPRINTF(_f, _a...) xc_report(xch, xch->error_handler, XTL_DEBUG,0, _f , ## _a)
 
-#define ERROR(_m, _a...)  xc_report_error(xch,XC_INTERNAL_ERROR,_m , ## _a )
-#define PERROR(_m, _a...) xc_report_error(xch,XC_INTERNAL_ERROR,_m \
-                  " (%d = %s)", ## _a , errno, xc_strerror(xch, errno))
+#define ERROR(_m, _a...)  do { int __errno = errno; \
+        xc_report_error(xch,XC_INTERNAL_ERROR,_m , ## _a ); \
+        errno = __errno; \
+        } while (0)
+#define PERROR(_m, _a...) do { int __errno = errno; \
+        xc_report_error(xch,XC_INTERNAL_ERROR,_m " (%d = %s)", \
+        ## _a , errno, xc_strerror(xch, errno)); \
+        errno = __errno; \
+        } while (0)
 
 /*
  * HYPERCALL ARGUMENT BUFFERS
Quoted 5 lines
Quoted 3 lines

Note: some of the functions used in xc_domain_save do not use errno to indicate a reason. In these cases the errno remains undefined as it used to be without this change.

Do you intend to fix this too ?

I will have a look.

Olaf

#21 lore raw

Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save

Olaf Hering writes ("Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save"):

Quoted 17 lines · Ian Jackson
Quoted 3 lines

I can't help wondering if this patch would be a lot smaller if it were done by having ERROR and PERROR, and the cleanup part of xc_domain_save, preserve errno.

Something like this for the macros?

tools/libxc/xc_private.h +0 -2
index a610f0c..8b791b6 100644
@@ -123,9 +123,15 @@ void xc_report_progress_step(xc_interface *xch,
 #define DPRINTF(_f, _a...) xc_report(xch, xch->error_handler, XTL_DETAIL,0, _f , ## _a)
 #define DBGPRINTF(_f, _a...) xc_report(xch, xch->error_handler, XTL_DEBUG,0, _f , ## _a)
 
-#define ERROR(_m, _a...)  xc_report_error(xch,XC_INTERNAL_ERROR,_m , ## _a )
-#define PERROR(_m, _a...) xc_report_error(xch,XC_INTERNAL_ERROR,_m \

tools/libxc/xc_private.h void xc_report_progress_step(xc_interface *xch, · line 134

Quoted 10 lines
tools/libxc/xc_private.h +9 -1
-                  " (%d = %s)", ## _a , errno, xc_strerror(xch, errno))
+#define ERROR(_m, _a...)  do { int __errno = errno; \
+        xc_report_error(xch,XC_INTERNAL_ERROR,_m , ## _a ); \
+        errno = __errno; \
+        } while (0)
+#define PERROR(_m, _a...) do { int __errno = errno; \
+        xc_report_error(xch,XC_INTERNAL_ERROR,_m " (%d = %s)", \
+        ## _a , errno, xc_strerror(xch, errno)); \
+        errno = __errno; \
+        } while (0)

Yes, except the temporary should be called "error_macro_errno" or something.

The "__thing" convention is one found in various places (including parts of the hypervisor) but it is wrong because:

* Identifiers starting with "__" (and in some contexts "_") are reserved for the C implementation (ie the compiler and libc) and must not be used.

* The names of these internal variables should contain the macro name, so that if several different macros are combined in one bit of code, they don't end up with name clashes. (That leaves only sort-of-recursive invocations which is not usually a problem.)

Thanks,
Ian.

#22 lore raw

Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save

Quoted 2 lines · Ian Jackson

Yes, except the temporary should be called "error_macro_errno" or something.

I have changed it, now it looks like this:

+#define PERROR(_m, _a...) do { int PERROR_errno = errno; \

+        xc_report_error(xch,XC_INTERNAL_ERROR,_m " (%d = %s)", \
+        ## _a , errno, xc_strerror(xch, errno)); \
+        errno = PERROR_errno; \
+        } while (0)

Olaf

#23 lore raw

Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save

Olaf Hering writes ("Re: [PATCH 09/11] tools/xc: pass errno to callers of xc_domain_save"):

tools/libxc/xc_private.h void xc_report_progress_step(xc_interface *xch, · line 134

Quoted 12 lines · Ian Jackson
Quoted 3 lines

Yes, except the temporary should be called "error_macro_errno" or something.

I have changed it, now it looks like this:

tools/libxc/xc_private.h +5 -0
+#define PERROR(_m, _a...) do { int PERROR_errno = errno; \
+        xc_report_error(xch,XC_INTERNAL_ERROR,_m " (%d = %s)", \
+        ## _a , errno, xc_strerror(xch, errno)); \
+        errno = PERROR_errno; \
+        } while (0)

That looks fine to me.

Thanks,
Ian.

#24 lore raw

PATCH 10/11 xend/pvscsi: recognize also SCSI CDROM devices

In reply to Olaf Hering

Attaching a CDROM device with 'xm scsi-attach domU /dev/sr0 0:0:0:0' fails because for some reason the sr driver was not handled at all in the match list. With the change the above command succeeds and the device is attached.

---
 tools/python/xen/util/vscsi_util.py | 3 +++
 1 file changed, 3 insertions(+)
tools/python/xen/util/vscsi_util.py +3 -0
index 5872e65..a4f5ad3 100644
@@ -66,6 +66,9 @@ def _vscsi_get_hctl_by(phyname, scsi_devices):
     if re.match('/dev/sd[a-z]+([1-9]|1[0-5])?$', phyname):
         # sd driver
         name = re.sub('(^/dev/)|([1-9]|1[0-5])?$', '', phyname)
+    elif re.match('/dev/sr[0-9]+$', phyname):
+        # sr driver
+        name = re.sub('^/dev/', '', phyname)
     elif re.match('/dev/sg[0-9]+$', phyname):
         # sg driver
         name = re.sub('^/dev/', '', phyname)
Acked-by on v1 10/11
#25 lore raw

Re: [PATCH 10/11] xend/pvscsi: recognize also SCSI CDROM devices

Olaf Hering writes ("[PATCH 10/11] xend/pvscsi: recognize also SCSI CDROM devices"):

Quoted 6 lines

Attaching a CDROM device with 'xm scsi-attach domU /dev/sr0 0:0:0:0' fails because for some reason the sr driver was not handled at all in the match list. With the change the above command succeeds and the device is attached.

I'm going to wait with applying this to give anyone who is still interested in xend a chance to comment.

(Also, we are perhaps going to be removing xend in the 4.5 cycle...)

Ian.

#26 lore raw

Re: [PATCH 10/11] xend/pvscsi: recognize also SCSI CDROM devices

Quoted 4 lines · Ian Jackson

I'm going to wait with applying this to give anyone who is still interested in xend a chance to comment.

(Also, we are perhaps going to be removing xend in the 4.5 cycle...)

It would be nice to have this backported to 4.2+ at some point.

Olaf

#27 lore raw

PATCH 11/11 tools/xend: move assert to exception block

In reply to Olaf Hering

The two assert in restore trigger sometimes after hundreds of migrations. If they trigger the destination host will not destroy the newly created, yet empty guest. After a second migration attempt to this host there will be two guets with the same name and uuid. This situation is poorly handled by the xm tools.
With this change the empty guest will be destroyed.

---
 tools/python/xen/xend/XendCheckpoint.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/python/xen/xend/XendCheckpoint.py +3 -3
index a433ffa..b8caf02 100644
@@ -249,9 +249,6 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False):
     store_port   = dominfo.getStorePort()
     console_port = dominfo.getConsolePort()
 
-    assert store_port
-    assert console_port
-
     # if hvm, pass mem size to calculate the store_mfn
     if is_hvm:
         apic = int(dominfo.info['platform'].get('apic', 0))
@@ -263,6 +260,9 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False):
         pae  = 0
 
     try:
+        assert store_port
+        assert console_port
+
         restore_image = image.create(dominfo, dominfo.info)
         memory = restore_image.getRequiredAvailableMemory(
             dominfo.info['memory_dynamic_max'] / 1024)
#28 lore raw
In reply to Olaf Hering

Olaf Hering writes ("[PATCH 00/11] tools changes"):

Quoted 1 line

Resend of changes from the 4.4 freeze time.

Thanks. I think this would benefit from being split up into an ia64-removal series, and a miscellaneous fixes series.

When you resend, please add my ack to these patches:

Quoted 6 lines

docs: remove ia64 from kexec_and_kdump.txt
unmodified_drivers: remove ia64 parts of the code
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
xend: remove ia64 from xend sources

I haven't just applied them to give others a chance to comment.

I have commented on this one already:

Quoted 1 line

pygrub: remote ia64 from pygrub

The others I'm going to deal with individually, although having them in a series of misc patches is helpful. If you get acks on some but not all of them, moving the acked patches to the start of the series would allow them to be applied while the others are still being discussed.

Thanks,
Ian.

#29 lore raw
In reply to Olaf Hering
Quoted 9 lines · Olaf Hering

Resend of changes from the 4.4 freeze time.

Olaf Hering (11):
docs: remove ia64 from kexec_and_kdump.txt
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
pygrub: remote ia64 from pygrub
xend: remove ia64 from xend sources

I have applied these with Ian J and my acks.

But not:

Quoted 1 line

unmodified_drivers: remove ia64 parts of the code

which needs other acks.

Nor

Quoted 4 lines

libxl: add option for discard support to xl disk configuration tools/xc: pass errno to callers of xc_domain_save xend/pvscsi: recognize also SCSI CDROM devices tools/xend: move assert to exception block

which were non trivial looking and/or Ian J has commented.

Ian.

#30 lore raw
In reply to Olaf Hering
Quoted 14 lines · Olaf Hering

Resend of changes from the 4.4 freeze time.

Olaf Hering (11):
docs: remove ia64 from kexec_and_kdump.txt
unmodified_drivers: remove ia64 parts of the code
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
pygrub: remote ia64 from pygrub
xend: remove ia64 from xend sources
libxl: add option for discard support to xl disk configuration tools/xc: pass errno to callers of xc_domain_save xend/pvscsi: recognize also SCSI CDROM devices tools/xend: move assert to exception block

This reminds me: do we still need xencomm? My understanding is that it was only used by ia64 (and ppc?) and Linux recently removed support for it. I don't know whether other OSs use it.

-boris

Quoted 37 lines
  docs/misc/kexec_and_kdump.txt                      |  9 +--
  docs/misc/tmem-internals.html                      |  7 --
  docs/misc/xl-disk-configuration.txt                | 15 ++++
  stubdom/Makefile                                   |  3 -
  stubdom/newlib.patch                               | 22 ------
  tools/libxc/xc_domain_save.c                       | 88 ++++++++++++++++++++--
  tools/libxc/xg_private.h                           |  4 -
  tools/libxl/check-xl-disk-parse                    | 21 ++++--
  tools/libxl/libxl.c                                |  3 +
  tools/libxl/libxl.h                                |  5 ++
  tools/libxl/libxl_types.idl                        |  1 +
  tools/libxl/libxlu_disk_l.l                        |  4 +
  tools/pygrub/src/pygrub                            | 35 +++------
  tools/python/xen/util/vscsi_util.py                |  3 +
  tools/python/xen/xend/XendCheckpoint.py            |  6 +-
  tools/python/xen/xend/XendNode.py                  | 10 ---
  tools/python/xen/xend/arch.py                      |  1 -
  tools/python/xen/xend/image.py                     | 56 --------------
  tools/python/xen/xend/server/pciif.py              |  2 +-
  tools/xm-test/lib/XmTestLib/arch.py                | 14 +---
  tools/xm-test/lib/XmTestReport/arch.py             |  4 -
  .../linux-2.6/compat-include/xen/platform-compat.h |  4 -
  unmodified_drivers/linux-2.6/mkbuildtree           | 16 +---
  unmodified_drivers/linux-2.6/overrides.mk          |  3 -
  unmodified_drivers/linux-2.6/platform-pci/Kbuild   |  4 -
  .../linux-2.6/platform-pci/panic-handler.c         | 14 ----
  .../linux-2.6/platform-pci/platform-pci.c          | 23 ------
  .../linux-2.6/platform-pci/xen_support.c           | 36 ---------
  xen/include/public/io/blkif.h                      |  8 ++
  29 files changed, 157 insertions(+), 264 deletions(-)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#31 lore raw
Quoted 17 lines · Boris Ostrovsky
Quoted 14 lines · Olaf Hering

Resend of changes from the 4.4 freeze time.

Olaf Hering (11):
docs: remove ia64 from kexec_and_kdump.txt
unmodified_drivers: remove ia64 parts of the code
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
pygrub: remote ia64 from pygrub
xend: remove ia64 from xend sources
libxl: add option for discard support to xl disk configuration tools/xc: pass errno to callers of xc_domain_save xend/pvscsi: recognize also SCSI CDROM devices tools/xend: move assert to exception block

Quoted 3 lines

This reminds me: do we still need xencomm? My understanding is that it was only used by ia64 (and ppc?) and Linux recently removed support for it. I don't know whether other OSs use it.

My understanding was that it was a ppc thing, not sure about ia64.

Neither x86 nor arm uses it AFAIK. I'm not entirely sure what its purpose actually was.

Ian.

#32 lore raw
Quoted 17 lines · Ian Campbell
Quoted 16 lines · Boris Ostrovsky
Quoted 14 lines · Olaf Hering

Resend of changes from the 4.4 freeze time.

Olaf Hering (11):
docs: remove ia64 from kexec_and_kdump.txt
unmodified_drivers: remove ia64 parts of the code
docs: remove ia64 from tmem-internals.html
stubdom: remove ia64 from stubdom
libxc: remove ia64 from xg_private.h
pygrub: remote ia64 from pygrub
xend: remove ia64 from xend sources
libxl: add option for discard support to xl disk configuration tools/xc: pass errno to callers of xc_domain_save xend/pvscsi: recognize also SCSI CDROM devices tools/xend: move assert to exception block

Quoted 7 lines
Quoted 3 lines

This reminds me: do we still need xencomm? My understanding is that it was only used by ia64 (and ppc?) and Linux recently removed support for it. I don't know whether other OSs use it.

My understanding was that it was a ppc thing, not sure about ia64.

Neither x86 nor arm uses it AFAIK. I'm not entirely sure what its purpose actually was.

Then it sounds like we should be able to remove it.

I can send a patch unless one of the maintainers wants to do it (i.e. remove relevant files and update Makefiles).

-boris