[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] Pull in changes from xen-ia64 tree



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1181595593 21600
# Node ID 245902ee7ce0c1499c172b3a9240b8e2ede45a5f
# Parent  c09686d2bbffa5ec2152f685df0eaa090ddddd83
[IA64] Pull in changes from xen-ia64 tree

Includes changes to old sparse tree and interface changes from
xen-ia64-unstable.hg csets:
15115:24463758319b - 15169:8655f7b7d50c

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 arch/ia64/kernel/setup.c                     |    2 -
 arch/ia64/xen/hypervisor.c                   |    4 +-
 arch/ia64/xen/xcom_hcall.c                   |    7 +++
 arch/ia64/xen/xcom_mini.c                    |   16 ++++++++
 arch/ia64/xen/xcom_privcmd.c                 |   49 +++++++++++++++++++++++++++
 arch/ia64/xen/xen_dma.c                      |   15 ++++----
 include/asm-ia64/hypercall.h                 |    9 ++++
 include/asm-ia64/hypervisor.h                |    1 
 include/asm-ia64/pal.h                       |    1 
 include/xen/interface/arch-ia64.h            |   24 ++++++++++++-
 include/xen/interface/foreign/reference.size |    4 +-
 11 files changed, 118 insertions(+), 14 deletions(-)

diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/kernel/setup.c
--- a/arch/ia64/kernel/setup.c  Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/kernel/setup.c  Mon Jun 11 14:59:53 2007 -0600
@@ -610,7 +610,7 @@ setup_arch (char **cmdline_p)
 #endif
        paging_init();
 #ifdef CONFIG_XEN
-       contiguous_bitmap_init(max_pfn);
+       xen_contiguous_bitmap_init(max_pfn);
 #endif
 }
 
diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c        Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/xen/hypervisor.c        Mon Jun 11 14:59:53 2007 -0600
@@ -158,7 +158,7 @@ __contiguous_bitmap_init(unsigned long s
 }
 
 void
-contiguous_bitmap_init(unsigned long end_pfn)
+xen_contiguous_bitmap_init(unsigned long end_pfn)
 {
        unsigned long size = (end_pfn + 2 * BITS_PER_LONG) >> 3;
 #ifndef CONFIG_VIRTUAL_MEM_MAP
@@ -1208,7 +1208,7 @@ xen_ia64_allocate_resource(unsigned long
        struct resource* res;
        int error;
        
-       res = kmalloc(sizeof(*res), GFP_KERNEL);
+       res = kzalloc(sizeof(*res), GFP_KERNEL);
        if (res == NULL)
                return ERR_PTR(-ENOMEM);
 
diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/xen/xcom_hcall.c
--- a/arch/ia64/xen/xcom_hcall.c        Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/xen/xcom_hcall.c        Mon Jun 11 14:59:53 2007 -0600
@@ -395,3 +395,10 @@ xencomm_hypercall_vcpu_op(int cmd, int c
        return xencomm_arch_hypercall_vcpu_op(cmd, cpu,
                                              xencomm_create_inline(arg));
 }
+
+int
+xencomm_hypercall_fpswa_revision(unsigned int *revision)
+{
+       return xencomm_arch_hypercall_fpswa_revision(
+               xencomm_create_inline(revision));
+}
diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/xen/xcom_mini.c
--- a/arch/ia64/xen/xcom_mini.c Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/xen/xcom_mini.c Mon Jun 11 14:59:53 2007 -0600
@@ -467,3 +467,19 @@ xencomm_mini_hypercall_sched_op(int cmd,
        return xencomm_arch_hypercall_sched_op(cmd, desc);
 }
 EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_sched_op);
+
+int
+xencomm_mini_hypercall_fpswa_revision(unsigned int *revision)
+{
+       int nbr_area = 2;
+       struct xencomm_mini xc_area[2];
+       struct xencomm_handle *desc;
+       int rc;
+
+       rc = xencomm_create_mini(xc_area, &nbr_area,
+                                revision, sizeof(*revision), &desc);
+       if (rc)
+               return rc;
+       return xencomm_arch_hypercall_fpswa_revision(desc);
+}
+EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_fpswa_revision);
diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/xen/xcom_privcmd.c      Mon Jun 11 14:59:53 2007 -0600
@@ -430,6 +430,21 @@ xencomm_privcmd_memory_op(privcmd_hyperc
 
                return ret;
        }
+       case XENMEM_maximum_gpfn:
+       {
+               domid_t kern_domid;
+               domid_t __user *user_domid;
+               struct xencomm_handle *desc;
+
+               user_domid = (domid_t __user *)hypercall->arg[1];
+               if (copy_from_user(&kern_domid, user_domid, sizeof(domid_t)))
+                       return -EFAULT;
+               desc = xencomm_create_inline(&kern_domid);
+
+               ret = xencomm_arch_hypercall_memory_op(cmd, desc);
+
+               return ret;
+       }
        case XENMEM_translate_gpfn_list:
        {
                xen_translate_gpfn_list_t kern_op;
@@ -640,6 +655,38 @@ xencomm_privcmd_sched_op(privcmd_hyperca
        ret = xencomm_arch_hypercall_sched_op(cmd, desc);
 
        xencomm_free(desc);
+       return ret;
+}
+
+static int
+xencomm_privcmd_ia64_dom0vp_op(privcmd_hypercall_t *hypercall)
+{
+       int cmd = hypercall->arg[0];
+       int ret;
+       
+       switch (cmd) {
+       case IA64_DOM0VP_fpswa_revision: {
+               unsigned int revision;
+               unsigned int __user *revision_user =
+                       (unsigned int* __user)hypercall->arg[1];
+               struct xencomm_handle *desc;
+               ret = xencomm_create(&revision, sizeof(revision),
+                                    &desc, GFP_KERNEL);
+               if (ret)
+                       break;
+               ret = xencomm_arch_hypercall_fpswa_revision(desc);
+               xencomm_free(desc);
+               if (ret)
+                       break;
+               if (copy_to_user(revision_user, &revision, sizeof(revision)))
+                       ret = -EFAULT;
+               break;
+       }
+       default:
+               printk("%s: unknown IA64 DOM0VP op %d\n", __func__, cmd);
+               ret = -EINVAL;
+               break;
+       }
        return ret;
 }
 
@@ -665,6 +712,8 @@ privcmd_hypercall(privcmd_hypercall_t *h
                return xencomm_privcmd_hvm_op(hypercall);
        case __HYPERVISOR_sched_op:
                return xencomm_privcmd_sched_op(hypercall);
+       case __HYPERVISOR_ia64_dom0vp_op:
+               return xencomm_privcmd_ia64_dom0vp_op(hypercall);
        default:
                printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op);
                return -ENOSYS;
diff -r c09686d2bbff -r 245902ee7ce0 arch/ia64/xen/xen_dma.c
--- a/arch/ia64/xen/xen_dma.c   Mon Jun 11 15:56:06 2007 +0100
+++ b/arch/ia64/xen/xen_dma.c   Mon Jun 11 14:59:53 2007 -0600
@@ -22,6 +22,7 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
+#include <linux/bitops.h>
 #include <linux/dma-mapping.h>
 #include <linux/mm.h>
 #include <asm/scatterlist.h>
@@ -40,18 +41,18 @@ do {                                                        
        \
  * when merged with upstream Linux.
  */
 static inline int
-address_needs_mapping(struct device *hwdev, dma_addr_t addr)
+address_needs_mapping(struct device *dev, dma_addr_t addr)
 {
        dma_addr_t mask = 0xffffffff;
 
        /* If the device has a mask, use it, otherwise default to 32 bits */
-       if (hwdev && hwdev->dma_mask)
-               mask = *hwdev->dma_mask;
+       if (dev && dev->dma_mask)
+               mask = *dev->dma_mask;
        return (addr & ~mask) != 0;
 }
 
 int
-xen_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+xen_map_sg(struct device *dev, struct scatterlist *sg, int nents,
           int direction)
 {
        int i;
@@ -60,7 +61,7 @@ xen_map_sg(struct device *hwdev, struct 
                sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
                sg[i].dma_length  = sg[i].length;
 
-               IOMMU_BUG_ON(address_needs_mapping(hwdev, sg[i].dma_address));
+               IOMMU_BUG_ON(address_needs_mapping(dev, sg[i].dma_address));
        }
 
        return nents;
@@ -68,7 +69,7 @@ EXPORT_SYMBOL(xen_map_sg);
 EXPORT_SYMBOL(xen_map_sg);
 
 void
-xen_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+xen_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
             int direction)
 {
 }
@@ -101,7 +102,7 @@ xen_alloc_coherent(struct device *dev, s
                return NULL;
 
        if (xen_create_contiguous_region(vaddr, order,
-                                        dev->coherent_dma_mask)) {
+                                        fls64(dev->coherent_dma_mask))) {
                free_pages(vaddr, order);
                return NULL;
        }
diff -r c09686d2bbff -r 245902ee7ce0 include/asm-ia64/hypercall.h
--- a/include/asm-ia64/hypercall.h      Mon Jun 11 15:56:06 2007 +0100
+++ b/include/asm-ia64/hypercall.h      Mon Jun 11 14:59:53 2007 -0600
@@ -380,6 +380,13 @@ xencomm_arch_hypercall_perfmon_op(unsign
 {
        return _hypercall4(int, ia64_dom0vp_op,
                           IA64_DOM0VP_perfmon, cmd, arg, count);
+}
+
+static inline int
+xencomm_arch_hypercall_fpswa_revision(struct xencomm_handle *arg)
+{
+       return _hypercall2(int, ia64_dom0vp_op,
+                          IA64_DOM0VP_fpswa_revision, arg);
 }
 
 // for balloon driver
@@ -397,6 +404,7 @@ xencomm_arch_hypercall_perfmon_op(unsign
 #define HYPERVISOR_memory_op xencomm_mini_hypercall_memory_op
 #define HYPERVISOR_xenoprof_op xencomm_mini_hypercall_xenoprof_op
 #define HYPERVISOR_perfmon_op xencomm_mini_hypercall_perfmon_op
+#define HYPERVISOR_fpswa_revision xencomm_mini_hypercall_fpswa_revision
 #else
 #define HYPERVISOR_sched_op xencomm_hypercall_sched_op
 #define HYPERVISOR_event_channel_op xencomm_hypercall_event_channel_op
@@ -408,6 +416,7 @@ xencomm_arch_hypercall_perfmon_op(unsign
 #define HYPERVISOR_memory_op xencomm_hypercall_memory_op
 #define HYPERVISOR_xenoprof_op xencomm_hypercall_xenoprof_op
 #define HYPERVISOR_perfmon_op xencomm_hypercall_perfmon_op
+#define HYPERVISOR_fpswa_revision xencomm_hypercall_fpswa_revision
 #endif
 
 #define HYPERVISOR_suspend xencomm_hypercall_suspend
diff -r c09686d2bbff -r 245902ee7ce0 include/asm-ia64/hypervisor.h
--- a/include/asm-ia64/hypervisor.h     Mon Jun 11 15:56:06 2007 +0100
+++ b/include/asm-ia64/hypervisor.h     Mon Jun 11 14:59:53 2007 -0600
@@ -145,6 +145,7 @@ int privcmd_mmap(struct file * file, str
 #define pfn_pte_ma(_x,_y)      __pte_ma(0)     /* unmodified use */
 
 #ifndef CONFIG_VMX_GUEST
+void xen_contiguous_bitmap_init(unsigned long end_pfn);
 int __xen_create_contiguous_region(unsigned long vstart, unsigned int order, 
unsigned int address_bits);
 static inline int
 xen_create_contiguous_region(unsigned long vstart,
diff -r c09686d2bbff -r 245902ee7ce0 include/asm-ia64/pal.h
--- a/include/asm-ia64/pal.h    Mon Jun 11 15:56:06 2007 +0100
+++ b/include/asm-ia64/pal.h    Mon Jun 11 14:59:53 2007 -0600
@@ -82,7 +82,6 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
-#include <asm/processor.h>
 #include <asm/fpu.h>
 
 /*
diff -r c09686d2bbff -r 245902ee7ce0 include/xen/interface/arch-ia64.h
--- a/include/xen/interface/arch-ia64.h Mon Jun 11 15:56:06 2007 +0100
+++ b/include/xen/interface/arch-ia64.h Mon Jun 11 14:59:53 2007 -0600
@@ -78,6 +78,10 @@ typedef unsigned long xen_ulong_t;
 #define MEM_G   (1UL << 30)
 #define MEM_M   (1UL << 20)
 #define MEM_K   (1UL << 10)
+
+/* Guest physical address of IO ports space.  */
+#define IO_PORTS_PADDR          0x00000ffffc000000UL
+#define IO_PORTS_SIZE           0x0000000004000000UL
 
 #define MMIO_START       (3 * MEM_G)
 #define MMIO_SIZE        (512 * MEM_M)
@@ -344,7 +348,12 @@ struct arch_shared_info {
     /* Interrupt vector for event channel.  */
     int evtchn_vector;
 
-    uint64_t pad[32];
+    /* PFN of memmap_info page */
+    unsigned int memmap_info_num_pages;/* currently only = 1 case is
+                                          supported. */
+    unsigned long memmap_info_pfn;
+
+    uint64_t pad[31];
 };
 typedef struct arch_shared_info arch_shared_info_t;
 
@@ -460,8 +469,18 @@ struct vcpu_guest_context_regs {
 
         struct vcpu_tr_regs tr;
 
+#if 0
+       /*
+        * The vcpu_guest_context structure is allocated on the stack in
+        * a few places.  With this array for RBS storage, that structure
+        * is a bit over 21k.  It looks like maybe we're blowing the stack
+        * and causing rather random looking failures on a couple systems.
+        * Remove since we're not actually using it for now.
+        */
+
         /* Note: loadrs is 2**14 bytes == 2**11 slots.  */
         unsigned long rbs[2048];
+#endif
 };
 
 struct vcpu_guest_context {
@@ -508,6 +527,9 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_conte
 
 /* gmfn version of IA64_DOM0VP_add_physmap */
 #define IA64_DOM0VP_add_physmap_with_gmfn       9
+
+/* get fpswa revision */
+#define IA64_DOM0VP_fpswa_revision      10
 
 // flags for page assignement to pseudo physical address space
 #define _ASSIGN_readonly                0
diff -r c09686d2bbff -r 245902ee7ce0 
include/xen/interface/foreign/reference.size
--- a/include/xen/interface/foreign/reference.size      Mon Jun 11 15:56:06 
2007 +0100
+++ b/include/xen/interface/foreign/reference.size      Mon Jun 11 14:59:53 
2007 -0600
@@ -8,8 +8,8 @@ xen_ia64_boot_param       |       -     
 xen_ia64_boot_param       |       -       -      96
 ia64_tr_entry             |       -       -      32
 vcpu_tr_regs              |       -       -     512
-vcpu_guest_context_regs   |       -       -   21872
-vcpu_guest_context        |    2800    5168   21904
+vcpu_guest_context_regs   |       -       -    5488
+vcpu_guest_context        |    2800    5168    5520
 arch_vcpu_info            |      24      16       0
 vcpu_time_info            |      32      32      32
 vcpu_info                 |      64      64      48

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.