WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 02:22:58 -0700
Delivery-date: Fri, 27 Jul 2007 02:21:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1183400427 21600
# Node ID 291e24787f8b5d0fe0af1377bd37d38da78168c3
# Parent  fbbd06d74324296047f909a0ac0e4f5732d0bcc3
# Parent  57ab8dd47580c2f726556fe1c46b5401f2bddb1e
merge with linux-2.6.18-xen.hg
---
 arch/i386/kernel/setup-xen.c               |   37 +++++++++
 arch/i386/kernel/setup.c                   |   22 +++++
 arch/i386/kernel/time-xen.c                |   36 ++++++---
 arch/i386/mm/hypervisor.c                  |  111 +++++++++++++++++++++++++++++
 arch/x86_64/kernel/e820-xen.c              |   17 +++-
 arch/x86_64/kernel/e820.c                  |    3 
 arch/x86_64/kernel/setup-xen.c             |    5 +
 buildconfigs/linux-defconfig_xen0_x86_32   |    2 
 buildconfigs/linux-defconfig_xen0_x86_64   |   16 +---
 buildconfigs/linux-defconfig_xenU_x86_32   |    2 
 buildconfigs/linux-defconfig_xenU_x86_64   |   14 +--
 buildconfigs/linux-defconfig_xen_x86_32    |    2 
 buildconfigs/linux-defconfig_xen_x86_64    |   16 +---
 drivers/char/agp/amd64-agp.c               |   13 +--
 drivers/char/agp/generic.c                 |   22 -----
 drivers/char/agp/intel-agp.c               |   15 +++
 drivers/firmware/Kconfig                   |    1 
 drivers/xen/Kconfig                        |    1 
 drivers/xen/balloon/balloon.c              |    6 +
 drivers/xen/blkback/blkback.c              |    4 -
 drivers/xen/blktap/blktap.c                |    3 
 drivers/xen/core/Makefile                  |    4 -
 drivers/xen/core/firmware.c                |   74 +++++++++++++++++++
 drivers/xen/core/hypervisor_sysfs.c        |    7 -
 include/asm-i386/agp.h                     |    6 +
 include/asm-i386/e820.h                    |    1 
 include/asm-i386/mach-xen/asm/agp.h        |   11 ++
 include/asm-i386/mach-xen/asm/hypervisor.h |    5 +
 include/asm-x86_64/agp.h                   |    6 +
 include/asm-x86_64/mach-xen/asm/agp.h      |    9 +-
 include/xen/firmware.h                     |   10 ++
 include/xen/hypervisor_sysfs.h             |    2 
 include/xen/interface/platform.h           |   40 ++++++++++
 include/xen/interface/trace.h              |    1 
 kernel/kexec.c                             |    3 
 35 files changed, 422 insertions(+), 105 deletions(-)

diff -r fbbd06d74324 -r 291e24787f8b arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c      Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/i386/kernel/setup-xen.c      Mon Jul 02 12:20:27 2007 -0600
@@ -66,6 +66,7 @@
 #include <xen/interface/physdev.h>
 #include <xen/interface/memory.h>
 #include <xen/features.h>
+#include <xen/firmware.h>
 #include <xen/xencons.h>
 #include <setup_arch.h>
 #include <bios_ebda.h>
@@ -155,6 +156,9 @@ struct sys_desc_table_struct {
 };
 struct edid_info edid_info;
 EXPORT_SYMBOL_GPL(edid_info);
+#ifndef CONFIG_XEN
+#define copy_edid() (edid_info = EDID_INFO)
+#endif
 struct ist_info ist_info;
 #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
        defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
@@ -740,6 +744,7 @@ struct edd edd;
 #ifdef CONFIG_EDD_MODULE
 EXPORT_SYMBOL(edd);
 #endif
+#ifndef CONFIG_XEN
 /**
  * copy_edd() - Copy the BIOS EDD information
  *              from boot_params into a safe place.
@@ -752,6 +757,7 @@ static inline void copy_edd(void)
      edd.mbr_signature_nr = EDD_MBR_SIG_NR;
      edd.edd_info_nr = EDD_NR;
 }
+#endif
 #else
 static inline void copy_edd(void)
 {
@@ -1022,6 +1028,35 @@ efi_memory_present_wrapper(unsigned long
        return 0;
 }
 
+/*
+ * This function checks if any part of the range <start,end> is mapped
+ * with type.
+ */
+int
+e820_any_mapped(u64 start, u64 end, unsigned type)
+{
+       int i;
+
+#ifndef CONFIG_XEN
+       for (i = 0; i < e820.nr_map; i++) {
+               const struct e820entry *ei = &e820.map[i];
+#else
+       if (!is_initial_xendomain())
+               return 0;
+       for (i = 0; i < machine_e820.nr_map; ++i) {
+               const struct e820entry *ei = &machine_e820.map[i];
+#endif
+
+               if (type && ei->type != type)
+                       continue;
+               if (ei->addr >= end || ei->addr + ei->size <= start)
+                       continue;
+               return 1;
+       }
+       return 0;
+}
+EXPORT_SYMBOL_GPL(e820_any_mapped);
+
  /*
   * This function checks if the entire range <start,end> is mapped with type.
   *
@@ -1621,7 +1656,7 @@ void __init setup_arch(char **cmdline_p)
        ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
        drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
-       edid_info = EDID_INFO;
+       copy_edid();
        apm_info.bios = APM_BIOS_INFO;
        ist_info = IST_INFO;
        saved_videomode = VIDEO_MODE;
diff -r fbbd06d74324 -r 291e24787f8b arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c  Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/i386/kernel/setup.c  Mon Jul 02 12:20:27 2007 -0600
@@ -956,6 +956,28 @@ efi_memory_present_wrapper(unsigned long
        return 0;
 }
 
+/*
+ * This function checks if any part of the range <start,end> is mapped
+ * with type.
+ */
+int
+e820_any_mapped(u64 start, u64 end, unsigned type)
+{
+       int i;
+
+       for (i = 0; i < e820.nr_map; i++) {
+               const struct e820entry *ei = &e820.map[i];
+
+               if (type && ei->type != type)
+                       continue;
+               if (ei->addr >= end || ei->addr + ei->size <= start)
+                       continue;
+               return 1;
+       }
+       return 0;
+}
+EXPORT_SYMBOL_GPL(e820_any_mapped);
+
  /*
   * This function checks if the entire range <start,end> is mapped with type.
   *
diff -r fbbd06d74324 -r 291e24787f8b arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/i386/kernel/time-xen.c       Mon Jul 02 12:20:27 2007 -0600
@@ -113,6 +113,9 @@ static struct timespec shadow_tv;
 static struct timespec shadow_tv;
 static u32 shadow_tv_version;
 
+static struct timeval monotonic_tv;
+static spinlock_t monotonic_lock = SPIN_LOCK_UNLOCKED;
+
 /* Keep track of last time we did processing/updating of jiffies and xtime. */
 static u64 processed_system_time;   /* System time (ns) at last processing. */
 static DEFINE_PER_CPU(u64, processed_system_time);
@@ -363,6 +366,7 @@ void do_gettimeofday(struct timeval *tv)
        unsigned long seq;
        unsigned long usec, sec;
        unsigned long max_ntp_tick;
+       unsigned long flags;
        s64 nsec;
        unsigned int cpu;
        struct shadow_time_info *shadow;
@@ -380,19 +384,7 @@ void do_gettimeofday(struct timeval *tv)
                usec = get_usec_offset(shadow);
                lost = jiffies - wall_jiffies;
 
-               /*
-                * If time_adjust is negative then NTP is slowing the clock
-                * so make sure not to go into next possible interval.
-                * Better to lose some accuracy than have time go backwards..
-                */
-               if (unlikely(time_adjust < 0)) {
-                       max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
-                       usec = min(usec, max_ntp_tick);
-
-                       if (lost)
-                               usec += lost * max_ntp_tick;
-               }
-               else if (unlikely(lost))
+               if (unlikely(lost))
                        usec += lost * (USEC_PER_SEC / HZ);
 
                sec = xtime.tv_sec;
@@ -423,6 +415,18 @@ void do_gettimeofday(struct timeval *tv)
                sec++;
        }
 
+       spin_lock_irqsave(&monotonic_lock, flags);
+       if ((sec > monotonic_tv.tv_sec) ||
+           ((sec == monotonic_tv.tv_sec) && (usec > monotonic_tv.tv_usec)))
+       {
+               monotonic_tv.tv_sec = sec;
+               monotonic_tv.tv_usec = usec;
+       } else {
+               sec = monotonic_tv.tv_sec;
+               usec = monotonic_tv.tv_usec;
+       }
+       spin_unlock_irqrestore(&monotonic_lock, flags);
+
        tv->tv_sec = sec;
        tv->tv_usec = usec;
 }
@@ -471,6 +475,12 @@ int do_settimeofday(struct timespec *tv)
                __normalize_time(&sec, &nsec);
                __update_wallclock(sec, nsec);
        }
+
+       /* Reset monotonic gettimeofday() timeval. */
+       spin_lock(&monotonic_lock);
+       monotonic_tv.tv_sec = 0;
+       monotonic_tv.tv_usec = 0;
+       spin_unlock(&monotonic_lock);
 
        write_sequnlock_irq(&xtime_lock);
 
diff -r fbbd06d74324 -r 291e24787f8b arch/i386/mm/hypervisor.c
--- a/arch/i386/mm/hypervisor.c Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/i386/mm/hypervisor.c Mon Jul 02 12:20:27 2007 -0600
@@ -42,6 +42,7 @@
 #include <linux/module.h>
 #include <linux/percpu.h>
 #include <asm/tlbflush.h>
+#include <linux/highmem.h>
 
 void xen_l1_entry_update(pte_t *ptr, pte_t val)
 {
@@ -234,6 +235,7 @@ static void contiguous_bitmap_clear(
 /* Protected by balloon_lock. */
 #define MAX_CONTIG_ORDER 9 /* 2MB */
 static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
+static unsigned long limited_frames[1<<MAX_CONTIG_ORDER];
 static multicall_entry_t cr_mcl[1<<MAX_CONTIG_ORDER];
 
 /* Ensure multi-page extents are contiguous in machine memory. */
@@ -421,6 +423,115 @@ void xen_destroy_contiguous_region(unsig
 }
 EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region);
 
+int xen_limit_pages_to_max_mfn(
+       struct page *pages, unsigned int order, unsigned int address_bits)
+{
+       unsigned long flags, frame;
+       unsigned long *in_frames = discontig_frames, *out_frames = 
limited_frames;
+       void *v;
+       struct page *page;
+       int i, nr_mcl, rc, success;
+
+       struct xen_memory_exchange exchange = {
+               .in = {
+                       .nr_extents   = 1UL << order,
+                       .extent_order = 0,
+                       .domid        = DOMID_SELF
+               },
+               .out = {
+                       .nr_extents   = 1UL << order,
+                       .extent_order = 0,
+                       .address_bits = address_bits,
+                       .domid        = DOMID_SELF
+               }
+       };
+
+       if (xen_feature(XENFEAT_auto_translated_physmap))
+               return 0;
+
+       if (unlikely(order > MAX_CONTIG_ORDER))
+               return -ENOMEM;
+
+       set_xen_guest_handle(exchange.in.extent_start, in_frames);
+       set_xen_guest_handle(exchange.out.extent_start, out_frames);
+
+       /* 0. Scrub the pages. */
+       for ( i = 0 ; i < 1UL<<order ; i++ ) {
+               page = &pages[i];
+
+               if (!PageHighMem(page)) {
+                       v = page_address(page);
+                       scrub_pages(v, 1);
+               } else {
+                       v = kmap(page);
+                       scrub_pages(v, 1);
+                       kunmap(page);
+               }
+       }
+
+       kmap_flush_unused();
+
+       balloon_lock(flags);
+
+       /* 1. Zap current PTEs (if any), remembering MFNs. */
+       for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
+               page = &pages[i];
+
+               out_frames[i] = page_to_pfn(page);
+               in_frames[i] = pfn_to_mfn(out_frames[i]);
+
+               if (!PageHighMem(page))
+                       MULTI_update_va_mapping(cr_mcl + nr_mcl++,
+                                               (unsigned 
long)page_address(page),
+                                               __pte_ma(0), 0);
+
+               set_phys_to_machine(out_frames[i], INVALID_P2M_ENTRY);
+       }
+       if (HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
+               BUG();
+
+       /* 2. Get new memory below the required limit. */
+       rc = HYPERVISOR_memory_op(XENMEM_exchange, &exchange);
+       success = (exchange.nr_exchanged == (1UL << order));
+       BUG_ON(!success && ((exchange.nr_exchanged != 0) || (rc == 0)));
+       BUG_ON(success && (rc != 0));
+#if CONFIG_XEN_COMPAT <= 0x030002
+       if (unlikely(rc == -ENOSYS)) {
+               /* Compatibility when XENMEM_exchange is unsupported. */
+               if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
+                                        &exchange.in) != (1UL << order))
+                       BUG();
+               success = (HYPERVISOR_memory_op(XENMEM_populate_physmap,
+                                               &exchange.out) != (1UL 
<<order));
+       }
+#endif
+
+       /* 3. Map the new pages in place of old pages. */
+       for (i = 0, nr_mcl = 0; i < (1UL<<order); i++) {
+               page = &pages[i];
+               unsigned long pfn = page_to_pfn(page);
+
+               frame = success ? out_frames[i] : in_frames[i];
+
+               if (!PageHighMem(page))
+                       MULTI_update_va_mapping(cr_mcl + nr_mcl++,
+                                               (unsigned 
long)page_address(page),
+                                               pfn_pte_ma(frame, PAGE_KERNEL), 
0);
+
+               set_phys_to_machine(pfn, frame);
+       }
+       cr_mcl[nr_mcl - 1].args[MULTI_UVMFLAGS_INDEX] = order
+                                                       ? 
UVMF_TLB_FLUSH|UVMF_ALL
+                                                       : UVMF_INVLPG|UVMF_ALL;
+       if (HYPERVISOR_multicall_check(cr_mcl, nr_mcl, NULL))
+               BUG();
+
+       balloon_unlock(flags);
+
+       return success ? 0 : -ENOMEM;
+}
+EXPORT_SYMBOL_GPL(xen_limit_pages_to_max_mfn);
+
 #ifdef __i386__
 int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b)
 {
diff -r fbbd06d74324 -r 291e24787f8b arch/x86_64/kernel/e820-xen.c
--- a/arch/x86_64/kernel/e820-xen.c     Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/x86_64/kernel/e820-xen.c     Mon Jul 02 12:20:27 2007 -0600
@@ -97,17 +97,26 @@ static inline int bad_addr(unsigned long
        return 0;
 } 
 
-#ifndef CONFIG_XEN
 /*
  * This function checks if any part of the range <start,end> is mapped
  * with type.
  */
-int __meminit
-e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
+int e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
 { 
        int i;
+
+#ifndef CONFIG_XEN
        for (i = 0; i < e820.nr_map; i++) { 
                struct e820entry *ei = &e820.map[i]; 
+#else
+       extern struct e820map machine_e820;
+
+       if (!is_initial_xendomain())
+               return 0;
+       for (i = 0; i < machine_e820.nr_map; i++) {
+               const struct e820entry *ei = &machine_e820.map[i];
+#endif
+
                if (type && ei->type != type) 
                        continue;
                if (ei->addr >= end || ei->addr + ei->size <= start)
@@ -116,7 +125,7 @@ e820_any_mapped(unsigned long start, uns
        } 
        return 0;
 }
-#endif
+EXPORT_SYMBOL_GPL(e820_any_mapped);
 
 /*
  * This function checks if the entire range <start,end> is mapped with type.
diff -r fbbd06d74324 -r 291e24787f8b arch/x86_64/kernel/e820.c
--- a/arch/x86_64/kernel/e820.c Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/x86_64/kernel/e820.c Mon Jul 02 12:20:27 2007 -0600
@@ -93,7 +93,7 @@ static inline int bad_addr(unsigned long
  * This function checks if any part of the range <start,end> is mapped
  * with type.
  */
-int __meminit
+int
 e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
 { 
        int i;
@@ -107,6 +107,7 @@ e820_any_mapped(unsigned long start, uns
        } 
        return 0;
 }
+EXPORT_SYMBOL_GPL(e820_any_mapped);
 
 /*
  * This function checks if the entire range <start,end> is mapped with type.
diff -r fbbd06d74324 -r 291e24787f8b arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Mon Jul 02 09:56:35 2007 -0600
+++ b/arch/x86_64/kernel/setup-xen.c    Mon Jul 02 12:20:27 2007 -0600
@@ -71,6 +71,7 @@
 #include <asm/hypervisor.h>
 #include <xen/interface/nmi.h>
 #include <xen/features.h>
+#include <xen/firmware.h>
 #include <xen/xencons.h>
 #define PFN_UP(x)       (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
 #define PFN_PHYS(x)     ((x) << PAGE_SHIFT)
@@ -534,6 +535,7 @@ struct edd edd;
 #ifdef CONFIG_EDD_MODULE
 EXPORT_SYMBOL(edd);
 #endif
+#ifndef CONFIG_XEN
 /**
  * copy_edd() - Copy the BIOS EDD information
  *              from boot_params into a safe place.
@@ -546,6 +548,7 @@ static inline void copy_edd(void)
      edd.mbr_signature_nr = EDD_MBR_SIG_NR;
      edd.edd_info_nr = EDD_NR;
 }
+#endif
 #else
 static inline void copy_edd(void)
 {
@@ -613,7 +616,7 @@ void __init setup_arch(char **cmdline_p)
        } else
                screen_info.orig_video_isVGA = 0;
 
-       edid_info = EDID_INFO;
+       copy_edid();
        saved_video_mode = SAVED_VIDEO_MODE;
        bootloader_type = LOADER_TYPE;
 
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xen0_x86_32
--- a/buildconfigs/linux-defconfig_xen0_x86_32  Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xen0_x86_32  Mon Jul 02 12:20:27 2007 -0600
@@ -155,12 +155,14 @@ CONFIG_VM86=y
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
+CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xen0_x86_64
--- a/buildconfigs/linux-defconfig_xen0_x86_64  Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xen0_x86_64  Mon Jul 02 12:20:27 2007 -0600
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-xen0
-# Wed Jan 17 18:26:35 2007
+# Linux kernel version: 2.6.18
+# Wed Jun 27 12:48:41 2007
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -132,7 +132,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_SPLIT_PTLOCK_CPUS=4096
 CONFIG_RESOURCES_64BIT=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_CALGARY_IOMMU is not set
 CONFIG_SWIOTLB=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
@@ -341,7 +340,7 @@ CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 # CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_SYS_HYPERVISOR=y
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -1096,6 +1095,7 @@ CONFIG_RTC_DRV_V3020=m
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 
@@ -1353,6 +1353,7 @@ CONFIG_XEN_PCIDEV_BACKEND=y
 # CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
 CONFIG_XEN_PCIDEV_BACKEND_PASS=y
 # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
+# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
 # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
 CONFIG_XEN_TPMDEV_BACKEND=m
 CONFIG_XEN_BLKDEV_FRONTEND=y
@@ -1363,14 +1364,9 @@ CONFIG_XEN_COMPAT_030002_AND_LATER=y
 CONFIG_XEN_COMPAT_030002_AND_LATER=y
 # CONFIG_XEN_COMPAT_030004_AND_LATER is not set
 # CONFIG_XEN_COMPAT_LATEST_ONLY is not set
-CONFIG_XEN_COMPAT_030002=y
-CONFIG_XEN_COMPAT_030004=y
+CONFIG_XEN_COMPAT=0x030002
 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
 CONFIG_NO_IDLE_HZ=y
-CONFIG_XEN_UTIL=y
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_DEVMEM=y
-CONFIG_XEN_REBOOT=y
 
 #
 # Library routines
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xenU_x86_32
--- a/buildconfigs/linux-defconfig_xenU_x86_32  Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xenU_x86_32  Mon Jul 02 12:20:27 2007 -0600
@@ -152,12 +152,14 @@ CONFIG_VM86=y
 # CONFIG_TOSHIBA is not set
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
+# CONFIG_X86_MSR is not set
 CONFIG_X86_CPUID=y
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+# CONFIG_EDD is not set
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xenU_x86_64
--- a/buildconfigs/linux-defconfig_xenU_x86_64  Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xenU_x86_64  Mon Jul 02 12:20:27 2007 -0600
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-xenU
-# Wed Jan 17 18:28:53 2007
+# Linux kernel version: 2.6.18
+# Wed Jun 27 12:48:56 2007
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -506,7 +506,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_SYS_HYPERVISOR=y
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -913,6 +913,7 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # Firmware Drivers
 #
+# CONFIG_EDD is not set
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 
@@ -1218,14 +1219,9 @@ CONFIG_XEN_COMPAT_030002_AND_LATER=y
 CONFIG_XEN_COMPAT_030002_AND_LATER=y
 # CONFIG_XEN_COMPAT_030004_AND_LATER is not set
 # CONFIG_XEN_COMPAT_LATEST_ONLY is not set
-CONFIG_XEN_COMPAT_030002=y
-CONFIG_XEN_COMPAT_030004=y
+CONFIG_XEN_COMPAT=0x030002
 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
 CONFIG_NO_IDLE_HZ=y
-CONFIG_XEN_UTIL=y
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_DEVMEM=y
-CONFIG_XEN_REBOOT=y
 CONFIG_XEN_SMPBOOT=y
 
 #
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xen_x86_32
--- a/buildconfigs/linux-defconfig_xen_x86_32   Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xen_x86_32   Mon Jul 02 12:20:27 2007 -0600
@@ -160,12 +160,14 @@ CONFIG_VM86=y
 # CONFIG_I8K is not set
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
+CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=m
 CONFIG_SWIOTLB=y
 
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 # CONFIG_NOHIGHMEM is not set
diff -r fbbd06d74324 -r 291e24787f8b buildconfigs/linux-defconfig_xen_x86_64
--- a/buildconfigs/linux-defconfig_xen_x86_64   Mon Jul 02 09:56:35 2007 -0600
+++ b/buildconfigs/linux-defconfig_xen_x86_64   Mon Jul 02 12:20:27 2007 -0600
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-xen
-# Wed Jan 17 18:33:45 2007
+# Linux kernel version: 2.6.18
+# Wed Jun 27 12:49:06 2007
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -141,7 +141,6 @@ CONFIG_NR_CPUS=32
 CONFIG_NR_CPUS=32
 CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_CALGARY_IOMMU is not set
 CONFIG_SWIOTLB=y
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
@@ -749,7 +748,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_SYS_HYPERVISOR=y
 
 #
 # Connector - unified userspace <-> kernelspace linker
@@ -2750,6 +2749,7 @@ CONFIG_INTEL_IOATDMA=m
 #
 # Firmware Drivers
 #
+CONFIG_EDD=y
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 
@@ -3091,6 +3091,7 @@ CONFIG_XEN_PCIDEV_BACKEND=m
 # CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
 CONFIG_XEN_PCIDEV_BACKEND_PASS=y
 # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
+# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
 # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
 CONFIG_XEN_TPMDEV_BACKEND=m
 CONFIG_XEN_BLKDEV_FRONTEND=y
@@ -3103,14 +3104,9 @@ CONFIG_XEN_COMPAT_030002_AND_LATER=y
 CONFIG_XEN_COMPAT_030002_AND_LATER=y
 # CONFIG_XEN_COMPAT_030004_AND_LATER is not set
 # CONFIG_XEN_COMPAT_LATEST_ONLY is not set
-CONFIG_XEN_COMPAT_030002=y
-CONFIG_XEN_COMPAT_030004=y
+CONFIG_XEN_COMPAT=0x030002
 CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y
 CONFIG_NO_IDLE_HZ=y
-CONFIG_XEN_UTIL=y
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_DEVMEM=y
-CONFIG_XEN_REBOOT=y
 CONFIG_XEN_SMPBOOT=y
 
 #
diff -r fbbd06d74324 -r 291e24787f8b drivers/char/agp/amd64-agp.c
--- a/drivers/char/agp/amd64-agp.c      Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/char/agp/amd64-agp.c      Mon Jul 02 12:20:27 2007 -0600
@@ -15,6 +15,7 @@
 #include <linux/mmzone.h>
 #include <asm/page.h>          /* PAGE_SIZE */
 #include <asm/k8.h>
+#include <asm/e820.h>
 #include "agp.h"
 
 /* PTE bits. */
@@ -252,7 +253,6 @@ static struct agp_bridge_driver amd_8151
 /* Some basic sanity checks for the aperture. */
 static int __devinit aperture_valid(u64 aper, u32 size)
 {
-       u32 pfn, c;
        if (aper == 0) {
                printk(KERN_ERR PFX "No aperture\n");
                return 0;
@@ -265,14 +265,9 @@ static int __devinit aperture_valid(u64 
                printk(KERN_ERR PFX "Aperture out of bounds\n");
                return 0;
        }
-       pfn = aper >> PAGE_SHIFT;
-       for (c = 0; c < size/PAGE_SIZE; c++) {
-               if (!pfn_valid(pfn + c))
-                       break;
-               if (!PageReserved(pfn_to_page(pfn + c))) {
-                       printk(KERN_ERR PFX "Aperture pointing to RAM\n");
-                       return 0;
-               }
+       if (e820_any_mapped(aper, aper + size, E820_RAM)) {
+               printk(KERN_ERR PFX "Aperture pointing to RAM\n");
+               return 0;
        }
 
        /* Request the Aperture. This catches cases when someone else
diff -r fbbd06d74324 -r 291e24787f8b drivers/char/agp/generic.c
--- a/drivers/char/agp/generic.c        Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/char/agp/generic.c        Mon Jul 02 12:20:27 2007 -0600
@@ -50,28 +50,6 @@ int agp_memory_reserved;
  * nice to do this some other way instead of needing this export.
  */
 EXPORT_SYMBOL_GPL(agp_memory_reserved);
-
-#if defined(CONFIG_X86)
-int map_page_into_agp(struct page *page)
-{
-       int i;
-       i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
-       /* Caller's responsibility to call global_flush_tlb() for
-        * performance reasons */
-       return i;
-}
-EXPORT_SYMBOL_GPL(map_page_into_agp);
-
-int unmap_page_from_agp(struct page *page)
-{
-       int i;
-       i = change_page_attr(page, 1, PAGE_KERNEL);
-       /* Caller's responsibility to call global_flush_tlb() for
-        * performance reasons */
-       return i;
-}
-EXPORT_SYMBOL_GPL(unmap_page_from_agp);
-#endif
 
 /*
  * Generic routines for handling agp_memory structures -
diff -r fbbd06d74324 -r 291e24787f8b drivers/char/agp/intel-agp.c
--- a/drivers/char/agp/intel-agp.c      Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/char/agp/intel-agp.c      Mon Jul 02 12:20:27 2007 -0600
@@ -164,9 +164,17 @@ static void *i8xx_alloc_pages(void)
        if (page == NULL)
                return NULL;
 
+#ifdef CONFIG_XEN
+       if (xen_create_contiguous_region((unsigned long)page_address(page), 2, 
32)) {
+               __free_pages(page, 2);
+               return NULL;
+       }
+#endif
+
        if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
+               change_page_attr(page, 4, PAGE_KERNEL);
                global_flush_tlb();
-               __free_page(page);
+               __free_pages(page, 2);
                return NULL;
        }
        global_flush_tlb();
@@ -186,9 +194,12 @@ static void i8xx_destroy_pages(void *add
        page = virt_to_page(addr);
        change_page_attr(page, 4, PAGE_KERNEL);
        global_flush_tlb();
+#ifdef CONFIG_XEN
+       xen_destroy_contiguous_region((unsigned long)page_address(page), 2);
+#endif
        put_page(page);
        unlock_page(page);
-       free_pages((unsigned long)addr, 2);
+       __free_pages(page, 2);
        atomic_dec(&agp_bridge->current_memory_agp);
 }
 
diff -r fbbd06d74324 -r 291e24787f8b drivers/firmware/Kconfig
--- a/drivers/firmware/Kconfig  Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/firmware/Kconfig  Mon Jul 02 12:20:27 2007 -0600
@@ -8,7 +8,6 @@ config EDD
 config EDD
        tristate "BIOS Enhanced Disk Drive calls determine boot disk"
        depends on !IA64
-       depends on !XEN
        help
          Say Y or M here if you want to enable BIOS Enhanced Disk Drive
          Services real mode BIOS calls to determine which disk
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/Kconfig
--- a/drivers/xen/Kconfig       Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/Kconfig       Mon Jul 02 12:20:27 2007 -0600
@@ -232,6 +232,7 @@ config XEN_SYSFS
 config XEN_SYSFS
        tristate "Export Xen attributes in sysfs"
        depends on SYSFS
+       select SYS_HYPERVISOR
        default y
        help
          Xen hypervisor attributes will show up under /sys/hypervisor/.
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c     Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/balloon/balloon.c     Mon Jul 02 12:20:27 2007 -0600
@@ -83,6 +83,7 @@ static unsigned long frame_list[PAGE_SIZ
 
 /* VM /proc information for memory */
 extern unsigned long totalram_pages;
+extern unsigned long totalhigh_pages;
 
 /* List of ballooned pages, threaded through the mem_map array. */
 static LIST_HEAD(ballooned_pages);
@@ -118,6 +119,7 @@ static void balloon_append(struct page *
        if (PageHighMem(page)) {
                list_add_tail(PAGE_TO_LIST(page), &ballooned_pages);
                bs.balloon_high++;
+               totalhigh_pages--;
        } else {
                list_add(PAGE_TO_LIST(page), &ballooned_pages);
                bs.balloon_low++;
@@ -135,8 +137,10 @@ static struct page *balloon_retrieve(voi
        page = LIST_TO_PAGE(ballooned_pages.next);
        UNLIST_PAGE(page);
 
-       if (PageHighMem(page))
+       if (PageHighMem(page)) {
                bs.balloon_high--;
+               totalhigh_pages++;
+       }
        else
                bs.balloon_low--;
 
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c     Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/blkback/blkback.c     Mon Jul 02 12:20:27 2007 -0600
@@ -208,9 +208,9 @@ int blkif_schedule(void *arg)
                printk(KERN_DEBUG "%s: started\n", current->comm);
 
        while (!kthread_should_stop()) {
-               if(try_to_freeze())
+               if (try_to_freeze())
                        continue;
-            
+
                wait_event_interruptible(
                        blkif->wq,
                        blkif->waiting_reqs || kthread_should_stop());
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/blktap/blktap.c       Mon Jul 02 12:20:27 2007 -0600
@@ -1057,6 +1057,9 @@ int tap_blkif_schedule(void *arg)
                printk(KERN_DEBUG "%s: started\n", current->comm);
 
        while (!kthread_should_stop()) {
+               if (try_to_freeze())
+                       continue;
+
                wait_event_interruptible(
                        blkif->wq,
                        blkif->waiting_reqs || kthread_should_stop());
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/core/Makefile
--- a/drivers/xen/core/Makefile Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/core/Makefile Mon Jul 02 12:20:27 2007 -0600
@@ -2,10 +2,10 @@
 # Makefile for the linux kernel.
 #
 
-obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o
+obj-y := evtchn.o gnttab.o features.o reboot.o machine_reboot.o firmware.o
 
 obj-$(CONFIG_PROC_FS)          += xen_proc.o
-obj-$(CONFIG_SYSFS)            += hypervisor_sysfs.o
+obj-$(CONFIG_SYS_HYPERVISOR)   += hypervisor_sysfs.o
 obj-$(CONFIG_HOTPLUG_CPU)      += cpu_hotplug.o
 obj-$(CONFIG_XEN_SYSFS)                += xen_sysfs.o
 obj-$(CONFIG_XEN_SMPBOOT)      += smpboot.o
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/core/firmware.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/drivers/xen/core/firmware.c       Mon Jul 02 12:20:27 2007 -0600
@@ -0,0 +1,74 @@
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/edd.h>
+#include <video/edid.h>
+#include <xen/interface/platform.h>
+#include <asm/hypervisor.h>
+
+#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
+void __init copy_edd(void)
+{
+       int ret;
+       struct xen_platform_op op;
+
+       if (!is_initial_xendomain())
+               return;
+
+       op.cmd = XENPF_firmware_info;
+
+       op.u.firmware_info.type = XEN_FW_DISK_INFO;
+       for (op.u.firmware_info.index = 0;
+            edd.edd_info_nr < EDDMAXNR;
+            op.u.firmware_info.index++) {
+               struct edd_info *info = edd.edd_info + edd.edd_info_nr;
+
+               info->params.length = sizeof(info->params);
+               set_xen_guest_handle(op.u.firmware_info.u.disk_info.edd_params,
+                                    &info->params);
+               ret = HYPERVISOR_platform_op(&op);
+               if (ret)
+                       break;
+
+#define C(x) info->x = op.u.firmware_info.u.disk_info.x
+               C(device);
+               C(version);
+               C(interface_support);
+               C(legacy_max_cylinder);
+               C(legacy_max_head);
+               C(legacy_sectors_per_track);
+#undef C
+
+               edd.edd_info_nr++;
+       }
+
+       op.u.firmware_info.type = XEN_FW_DISK_MBR_SIGNATURE;
+       for (op.u.firmware_info.index = 0;
+            edd.mbr_signature_nr < EDD_MBR_SIG_MAX;
+            op.u.firmware_info.index++) {
+               ret = HYPERVISOR_platform_op(&op);
+               if (ret)
+                       break;
+               edd.mbr_signature[edd.mbr_signature_nr++] =
+                       op.u.firmware_info.u.disk_mbr_signature.mbr_signature;
+       }
+}
+#endif
+
+void __init copy_edid(void)
+{
+#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86)
+       struct xen_platform_op op;
+
+       if (!is_initial_xendomain())
+               return;
+
+       op.cmd = XENPF_firmware_info;
+       op.u.firmware_info.index = 0;
+       op.u.firmware_info.type = XEN_FW_VBEDDC_INFO;
+       set_xen_guest_handle(op.u.firmware_info.u.vbeddc_info.edid,
+                            edid_info.dummy);
+       if (HYPERVISOR_platform_op(&op) != 0)
+               memset(edid_info.dummy, 0x13, sizeof(edid_info.dummy));
+#endif
+}
diff -r fbbd06d74324 -r 291e24787f8b drivers/xen/core/hypervisor_sysfs.c
--- a/drivers/xen/core/hypervisor_sysfs.c       Mon Jul 02 09:56:35 2007 -0600
+++ b/drivers/xen/core/hypervisor_sysfs.c       Mon Jul 02 12:20:27 2007 -0600
@@ -11,8 +11,6 @@
 #include <linux/module.h>
 #include <linux/kobject.h>
 #include <xen/hypervisor_sysfs.h>
-
-decl_subsys(hypervisor, NULL, NULL);
 
 static ssize_t hyp_sysfs_show(struct kobject *kobj,
                              struct attribute *attr,
@@ -37,7 +35,7 @@ static ssize_t hyp_sysfs_store(struct ko
        return 0;
 }
 
-struct sysfs_ops hyp_sysfs_ops = {
+static struct sysfs_ops hyp_sysfs_ops = {
        .show = hyp_sysfs_show,
        .store = hyp_sysfs_store,
 };
@@ -52,8 +50,7 @@ static int __init hypervisor_subsys_init
                return -ENODEV;
 
        hypervisor_subsys.kset.kobj.ktype = &hyp_sysfs_kobj_type;
-       return subsystem_register(&hypervisor_subsys);
+       return 0;
 }
 
 device_initcall(hypervisor_subsys_init);
-EXPORT_SYMBOL_GPL(hypervisor_subsys);
diff -r fbbd06d74324 -r 291e24787f8b include/asm-i386/agp.h
--- a/include/asm-i386/agp.h    Mon Jul 02 09:56:35 2007 -0600
+++ b/include/asm-i386/agp.h    Mon Jul 02 12:20:27 2007 -0600
@@ -12,8 +12,10 @@
  * data corruption on some CPUs.
  */
 
-int map_page_into_agp(struct page *page);
-int unmap_page_from_agp(struct page *page);
+/* Caller's responsibility to call global_flush_tlb() for
+ * performance reasons */
+#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
+#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -r fbbd06d74324 -r 291e24787f8b include/asm-i386/e820.h
--- a/include/asm-i386/e820.h   Mon Jul 02 09:56:35 2007 -0600
+++ b/include/asm-i386/e820.h   Mon Jul 02 12:20:27 2007 -0600
@@ -38,6 +38,7 @@ extern struct e820map e820;
 
 extern int e820_all_mapped(unsigned long start, unsigned long end,
                           unsigned type);
+extern int e820_any_mapped(u64 start, u64 end, unsigned type);
 
 #endif/*!__ASSEMBLY__*/
 
diff -r fbbd06d74324 -r 291e24787f8b include/asm-i386/mach-xen/asm/agp.h
--- a/include/asm-i386/mach-xen/asm/agp.h       Mon Jul 02 09:56:35 2007 -0600
+++ b/include/asm-i386/mach-xen/asm/agp.h       Mon Jul 02 12:20:27 2007 -0600
@@ -13,8 +13,15 @@
  * data corruption on some CPUs.
  */
 
-int map_page_into_agp(struct page *page);
-int unmap_page_from_agp(struct page *page);
+/* Caller's responsibility to call global_flush_tlb() for
+ * performance reasons */
+#define map_page_into_agp(page) ( \
+       xen_create_contiguous_region((unsigned long)page_address(page), 0, 32) \
+       ?: change_page_attr(page, 1, PAGE_KERNEL_NOCACHE))
+#define unmap_page_from_agp(page) ( \
+       xen_destroy_contiguous_region((unsigned long)page_address(page), 0), \
+       /* only a fallback: xen_destroy_contiguous_region uses PAGE_KERNEL */ \
+       change_page_attr(page, 1, PAGE_KERNEL))
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -r fbbd06d74324 -r 291e24787f8b include/asm-i386/mach-xen/asm/hypervisor.h
--- a/include/asm-i386/mach-xen/asm/hypervisor.h        Mon Jul 02 09:56:35 
2007 -0600
+++ b/include/asm-i386/mach-xen/asm/hypervisor.h        Mon Jul 02 12:20:27 
2007 -0600
@@ -121,6 +121,11 @@ void xen_destroy_contiguous_region(
 void xen_destroy_contiguous_region(
     unsigned long vstart, unsigned int order);
 
+struct page;
+
+int xen_limit_pages_to_max_mfn(
+       struct page *pages, unsigned int order, unsigned int address_bits);
+
 /* Turn jiffies into Xen system time. */
 u64 jiffies_to_st(unsigned long jiffies);
 
diff -r fbbd06d74324 -r 291e24787f8b include/asm-x86_64/agp.h
--- a/include/asm-x86_64/agp.h  Mon Jul 02 09:56:35 2007 -0600
+++ b/include/asm-x86_64/agp.h  Mon Jul 02 12:20:27 2007 -0600
@@ -10,8 +10,10 @@
  * with different cachability attributes for the same page.
  */
 
-int map_page_into_agp(struct page *page);
-int unmap_page_from_agp(struct page *page);
+/* Caller's responsibility to call global_flush_tlb() for
+ * performance reasons */
+#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE)
+#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL)
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -r fbbd06d74324 -r 291e24787f8b include/asm-x86_64/mach-xen/asm/agp.h
--- a/include/asm-x86_64/mach-xen/asm/agp.h     Mon Jul 02 09:56:35 2007 -0600
+++ b/include/asm-x86_64/mach-xen/asm/agp.h     Mon Jul 02 12:20:27 2007 -0600
@@ -11,8 +11,13 @@
  * with different cachability attributes for the same page.
  */
 
-int map_page_into_agp(struct page *page);
-int unmap_page_from_agp(struct page *page);
+#define map_page_into_agp(page) ( \
+       xen_create_contiguous_region((unsigned long)page_address(page), 0, 32) \
+       ?: change_page_attr(page, 1, PAGE_KERNEL_NOCACHE))
+#define unmap_page_from_agp(page) ( \
+       xen_destroy_contiguous_region((unsigned long)page_address(page), 0), \
+       /* only a fallback: xen_destroy_contiguous_region uses PAGE_KERNEL */ \
+       change_page_attr(page, 1, PAGE_KERNEL))
 #define flush_agp_mappings() global_flush_tlb()
 
 /* Could use CLFLUSH here if the cpu supports it. But then it would
diff -r fbbd06d74324 -r 291e24787f8b include/xen/firmware.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/firmware.h    Mon Jul 02 12:20:27 2007 -0600
@@ -0,0 +1,10 @@
+#ifndef __XEN_FIRMWARE_H__
+#define __XEN_FIRMWARE_H__
+
+#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
+void copy_edd(void);
+#endif
+
+void copy_edid(void);
+
+#endif /* __XEN_FIRMWARE_H__ */
diff -r fbbd06d74324 -r 291e24787f8b include/xen/hypervisor_sysfs.h
--- a/include/xen/hypervisor_sysfs.h    Mon Jul 02 09:56:35 2007 -0600
+++ b/include/xen/hypervisor_sysfs.h    Mon Jul 02 12:20:27 2007 -0600
@@ -20,8 +20,6 @@ static struct hyp_sysfs_attr _name##_att
 static struct hyp_sysfs_attr _name##_attr = \
        __ATTR(_name, 0644, _name##_show, _name##_store)
 
-extern struct subsystem hypervisor_subsys;
-
 struct hyp_sysfs_attr {
        struct attribute attr;
        ssize_t (*show)(struct hyp_sysfs_attr *, char *);
diff -r fbbd06d74324 -r 291e24787f8b include/xen/interface/platform.h
--- a/include/xen/interface/platform.h  Mon Jul 02 09:56:35 2007 -0600
+++ b/include/xen/interface/platform.h  Mon Jul 02 12:20:27 2007 -0600
@@ -114,6 +114,45 @@ typedef struct xenpf_platform_quirk xenp
 typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
 DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
 
+#define XENPF_firmware_info       50
+#define XEN_FW_DISK_INFO          1 /* from int 13 AH=08/41/48 */
+#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
+#define XEN_FW_VBEDDC_INFO        3 /* from int 10 AX=4f15 */
+struct xenpf_firmware_info {
+    /* IN variables. */
+    uint32_t type;
+    uint32_t index;
+    /* OUT variables. */
+    union {
+        struct {
+            /* Int13, Fn48: Check Extensions Present. */
+            uint8_t device;                   /* %dl: bios device number */
+            uint8_t version;                  /* %ah: major version      */
+            uint16_t interface_support;       /* %cx: support bitmap     */
+            /* Int13, Fn08: Legacy Get Device Parameters. */
+            uint16_t legacy_max_cylinder;     /* %cl[7:6]:%ch: max cyl # */
+            uint8_t legacy_max_head;          /* %dh: max head #         */
+            uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector #  */
+            /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
+            /* NB. First uint16_t of buffer must be set to buffer size.      */
+            XEN_GUEST_HANDLE(void) edd_params;
+        } disk_info; /* XEN_FW_DISK_INFO */
+        struct {
+            uint8_t device;                   /* bios device number  */
+            uint32_t mbr_signature;           /* offset 0x1b8 in mbr */
+        } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
+        struct {
+            /* Int10, AX=4F15: Get EDID info. */
+            uint8_t capabilities;
+            uint8_t edid_transfer_time;
+            /* must refer to 128-byte buffer */
+            XEN_GUEST_HANDLE(uint8_t) edid;
+        } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
+    } u;
+};
+typedef struct xenpf_firmware_info xenpf_firmware_info_t;
+DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t);
+
 struct xen_platform_op {
     uint32_t cmd;
     uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
@@ -124,6 +163,7 @@ struct xen_platform_op {
         struct xenpf_read_memtype      read_memtype;
         struct xenpf_microcode_update  microcode;
         struct xenpf_platform_quirk    platform_quirk;
+        struct xenpf_firmware_info     firmware_info;
         uint8_t                        pad[128];
     } u;
 };
diff -r fbbd06d74324 -r 291e24787f8b include/xen/interface/trace.h
--- a/include/xen/interface/trace.h     Mon Jul 02 09:56:35 2007 -0600
+++ b/include/xen/interface/trace.h     Mon Jul 02 12:20:27 2007 -0600
@@ -88,6 +88,7 @@
 #define TRC_HVM_VMMCALL         (TRC_HVM_HANDLER + 0x12)
 #define TRC_HVM_HLT             (TRC_HVM_HANDLER + 0x13)
 #define TRC_HVM_INVLPG          (TRC_HVM_HANDLER + 0x14)
+#define TRC_HVM_MCE             (TRC_HVM_HANDLER + 0x15)
 
 /* This structure represents a single trace buffer record. */
 struct t_rec {
diff -r fbbd06d74324 -r 291e24787f8b kernel/kexec.c
--- a/kernel/kexec.c    Mon Jul 02 09:56:35 2007 -0600
+++ b/kernel/kexec.c    Mon Jul 02 12:20:27 2007 -0600
@@ -345,8 +345,7 @@ static struct page *kimage_alloc_pages(g
                else
                        address_bits = long_log2(limit);
 
-               if (xen_create_contiguous_region((unsigned 
long)page_address(pages),
-                                                order, address_bits) < 0) {
+               if (xen_limit_pages_to_max_mfn(pages, order, address_bits) < 0) 
{
                        __free_pages(pages, order);
                        return NULL;
                }

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

<Prev in Thread] Current Thread [Next in Thread>