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

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



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1225770217 -32400
# Node ID 61d1f2810617b4d0a15ba192fcf679918d5b0438
# Parent  45c3a3dfa5b54619676d9de026452ee062a7e8af
# Parent  2fb13b8cbe134fdb3f18ee21e641e52655066c62
merge with linux-2.6.18-xen.hg
---
 arch/i386/kernel/irq-xen.c                 |    4 
 arch/i386/kernel/pci-dma-xen.c             |   10 -
 arch/i386/mm/highmem-xen.c                 |   47 ++++++++
 arch/i386/mm/hypervisor.c                  |   57 ----------
 arch/i386/mm/init-xen.c                    |    7 -
 arch/ia64/kernel/setup.c                   |    3 
 arch/ia64/xen/hypervisor.c                 |  155 -----------------------------
 arch/ia64/xen/xen_dma.c                    |    3 
 arch/x86_64/kernel/entry-xen.S             |   32 ++---
 arch/x86_64/kernel/irq-xen.c               |    6 -
 arch/x86_64/mm/init-xen.c                  |    7 -
 drivers/acpi/processor_core.c              |   13 ++
 drivers/acpi/processor_idle.c              |   12 +-
 drivers/pci/bus.c                          |    7 -
 drivers/pci/quirks.c                       |   41 +------
 drivers/xen/core/evtchn.c                  |   10 +
 drivers/xen/core/gnttab.c                  |    5 
 drivers/xen/core/xen_sysfs.c               |    3 
 include/asm-i386/mach-xen/asm/highmem.h    |   17 +++
 include/asm-ia64/hypercall.h               |    6 -
 include/asm-ia64/hypervisor.h              |    1 
 include/linux/highmem.h                    |    8 +
 include/xen/gnttab.h                       |    1 
 include/xen/interface/arch-ia64/hvm/save.h |   10 +
 include/xen/interface/arch-x86/hvm/save.h  |   13 ++
 include/xen/interface/domctl.h             |    4 
 include/xen/interface/features.h           |    3 
 include/xen/interface/hvm/params.h         |    7 +
 include/xen/interface/kexec.h              |    2 
 include/xen/interface/trace.h              |   10 +
 include/xen/interface/xen.h                |   14 ++
 31 files changed, 196 insertions(+), 322 deletions(-)

diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/i386/kernel/irq-xen.c
--- a/arch/i386/kernel/irq-xen.c        Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/i386/kernel/irq-xen.c        Tue Nov 04 12:43:37 2008 +0900
@@ -66,7 +66,7 @@ fastcall unsigned int do_IRQ(struct pt_r
                BUG();
        }
 
-       irq_enter();
+       /*irq_enter();*/
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
        /* Debugging check for stack overflow: is there less than 1KB free? */
        {
@@ -121,7 +121,7 @@ fastcall unsigned int do_IRQ(struct pt_r
 #endif
                __do_IRQ(irq, regs);
 
-       irq_exit();
+       /*irq_exit();*/
 
        return 1;
 }
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/i386/kernel/pci-dma-xen.c
--- a/arch/i386/kernel/pci-dma-xen.c    Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/i386/kernel/pci-dma-xen.c    Tue Nov 04 12:43:37 2008 +0900
@@ -97,17 +97,11 @@ static int check_pages_physically_contig
 
 int range_straddles_page_boundary(paddr_t p, size_t size)
 {
-       extern unsigned long *contiguous_bitmap;
        unsigned long pfn = p >> PAGE_SHIFT;
        unsigned int offset = p & ~PAGE_MASK;
 
-       if (offset + size <= PAGE_SIZE)
-               return 0;
-       if (test_bit(pfn, contiguous_bitmap))
-               return 0;
-       if (check_pages_physically_contiguous(pfn, offset, size))
-               return 0;
-       return 1;
+       return ((offset + size > PAGE_SIZE) &&
+               !check_pages_physically_contiguous(pfn, offset, size));
 }
 
 int
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/i386/mm/highmem-xen.c
--- a/arch/i386/mm/highmem-xen.c        Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/i386/mm/highmem-xen.c        Tue Nov 04 12:43:37 2008 +0900
@@ -128,9 +128,56 @@ struct page *kmap_atomic_to_page(void *p
        return pte_page(*pte);
 }
 
+void clear_highpage(struct page *page)
+{
+       void *kaddr;
+
+       if (likely(xen_feature(XENFEAT_highmem_assist))
+           && PageHighMem(page)) {
+               struct mmuext_op meo;
+
+               meo.cmd = MMUEXT_CLEAR_PAGE;
+               meo.arg1.mfn = pfn_to_mfn(page_to_pfn(page));
+               if (HYPERVISOR_mmuext_op(&meo, 1, NULL, DOMID_SELF) == 0)
+                       return;
+       }
+
+       kaddr = kmap_atomic(page, KM_USER0);
+       clear_page(kaddr);
+       kunmap_atomic(kaddr, KM_USER0);
+}
+
+void copy_highpage(struct page *to, struct page *from)
+{
+       void *vfrom, *vto;
+
+       if (likely(xen_feature(XENFEAT_highmem_assist))
+           && (PageHighMem(from) || PageHighMem(to))) {
+               unsigned long from_pfn = page_to_pfn(from);
+               unsigned long to_pfn = page_to_pfn(to);
+               struct mmuext_op meo;
+
+               meo.cmd = MMUEXT_COPY_PAGE;
+               meo.arg1.mfn = pfn_to_mfn(to_pfn);
+               meo.arg2.src_mfn = pfn_to_mfn(from_pfn);
+               if (mfn_to_pfn(meo.arg2.src_mfn) == from_pfn
+                   && mfn_to_pfn(meo.arg1.mfn) == to_pfn
+                   && HYPERVISOR_mmuext_op(&meo, 1, NULL, DOMID_SELF) == 0)
+                       return;
+       }
+
+       vfrom = kmap_atomic(from, KM_USER0);
+       vto = kmap_atomic(to, KM_USER1);
+       copy_page(vto, vfrom);
+       kunmap_atomic(vfrom, KM_USER0);
+       kunmap_atomic(vto, KM_USER1);
+}
+
 EXPORT_SYMBOL(kmap);
 EXPORT_SYMBOL(kunmap);
 EXPORT_SYMBOL(kmap_atomic);
 EXPORT_SYMBOL(kmap_atomic_pte);
 EXPORT_SYMBOL(kunmap_atomic);
 EXPORT_SYMBOL(kmap_atomic_to_page);
+EXPORT_SYMBOL(clear_highpage);
+EXPORT_SYMBOL(copy_highpage);
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/i386/mm/hypervisor.c
--- a/arch/i386/mm/hypervisor.c Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/i386/mm/hypervisor.c Tue Nov 04 12:43:37 2008 +0900
@@ -190,54 +190,6 @@ void xen_set_ldt(const void *ptr, unsign
        BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
 }
 
-/*
- * Bitmap is indexed by page number. If bit is set, the page is part of a
- * xen_create_contiguous_region() area of memory.
- */
-unsigned long *contiguous_bitmap;
-
-static void contiguous_bitmap_set(
-       unsigned long first_page, unsigned long nr_pages)
-{
-       unsigned long start_off, end_off, curr_idx, end_idx;
-
-       curr_idx  = first_page / BITS_PER_LONG;
-       start_off = first_page & (BITS_PER_LONG-1);
-       end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
-       end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
-
-       if (curr_idx == end_idx) {
-               contiguous_bitmap[curr_idx] |=
-                       ((1UL<<end_off)-1) & -(1UL<<start_off);
-       } else {
-               contiguous_bitmap[curr_idx] |= -(1UL<<start_off);
-               while ( ++curr_idx < end_idx )
-                       contiguous_bitmap[curr_idx] = ~0UL;
-               contiguous_bitmap[curr_idx] |= (1UL<<end_off)-1;
-       }
-}
-
-static void contiguous_bitmap_clear(
-       unsigned long first_page, unsigned long nr_pages)
-{
-       unsigned long start_off, end_off, curr_idx, end_idx;
-
-       curr_idx  = first_page / BITS_PER_LONG;
-       start_off = first_page & (BITS_PER_LONG-1);
-       end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
-       end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
-
-       if (curr_idx == end_idx) {
-               contiguous_bitmap[curr_idx] &=
-                       -(1UL<<end_off) | ((1UL<<start_off)-1);
-       } else {
-               contiguous_bitmap[curr_idx] &= (1UL<<start_off)-1;
-               while ( ++curr_idx != end_idx )
-                       contiguous_bitmap[curr_idx] = 0;
-               contiguous_bitmap[curr_idx] &= -(1UL<<end_off);
-       }
-}
-
 /* Protected by balloon_lock. */
 #define MAX_CONTIG_ORDER 9 /* 2MB */
 static unsigned long discontig_frames[1<<MAX_CONTIG_ORDER];
@@ -334,10 +286,6 @@ int xen_create_contiguous_region(
        if (HYPERVISOR_multicall_check(cr_mcl, i, NULL))
                BUG();
 
-       if (success)
-               contiguous_bitmap_set(__pa(vstart) >> PAGE_SHIFT,
-                                     1UL << order);
-
        balloon_unlock(flags);
 
        return success ? 0 : -ENOMEM;
@@ -363,8 +311,7 @@ void xen_destroy_contiguous_region(unsig
                }
        };
 
-       if (xen_feature(XENFEAT_auto_translated_physmap) ||
-           !test_bit(__pa(vstart) >> PAGE_SHIFT, contiguous_bitmap))
+       if (xen_feature(XENFEAT_auto_translated_physmap))
                return;
 
        if (unlikely(order > MAX_CONTIG_ORDER))
@@ -376,8 +323,6 @@ void xen_destroy_contiguous_region(unsig
        scrub_pages((void *)vstart, 1 << order);
 
        balloon_lock(flags);
-
-       contiguous_bitmap_clear(__pa(vstart) >> PAGE_SHIFT, 1UL << order);
 
        /* 1. Find start MFN of contiguous extent. */
        in_frame = pfn_to_mfn(__pa(vstart) >> PAGE_SHIFT);
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/i386/mm/init-xen.c
--- a/arch/i386/mm/init-xen.c   Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/i386/mm/init-xen.c   Tue Nov 04 12:43:37 2008 +0900
@@ -47,8 +47,6 @@
 #include <asm/hypervisor.h>
 #include <asm/swiotlb.h>
 
-extern unsigned long *contiguous_bitmap;
-
 unsigned int __VMALLOC_RESERVE = 128 << 20;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -619,11 +617,6 @@ void __init mem_init(void)
        int tmp;
        int bad_ppro;
        unsigned long pfn;
-
-       contiguous_bitmap = alloc_bootmem_low_pages(
-               (max_low_pfn + 2*BITS_PER_LONG) >> 3);
-       BUG_ON(!contiguous_bitmap);
-       memset(contiguous_bitmap, 0, (max_low_pfn + 2*BITS_PER_LONG) >> 3);
 
 #if defined(CONFIG_SWIOTLB)
        swiotlb_init(); 
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/ia64/kernel/setup.c
--- a/arch/ia64/kernel/setup.c  Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/ia64/kernel/setup.c  Tue Nov 04 12:43:37 2008 +0900
@@ -684,9 +684,6 @@ setup_arch (char **cmdline_p)
        }
 #endif
        paging_init();
-#ifdef CONFIG_XEN
-       xen_contiguous_bitmap_init(max_pfn);
-#endif
 }
 
 /*
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/ia64/xen/hypervisor.c
--- a/arch/ia64/xen/hypervisor.c        Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/ia64/xen/hypervisor.c        Tue Nov 04 12:43:37 2008 +0900
@@ -77,154 +77,6 @@ xen_cpu_init(void)
 {
        extern void xen_smp_intr_init(void);
        xen_smp_intr_init();
-}
-
-/*
- *XXX same as i386, x86_64 contiguous_bitmap_set(), contiguous_bitmap_clear()
- * move those to lib/contiguous_bitmap?
- *XXX discontigmem/sparsemem
- */
-
-/*
- * Bitmap is indexed by page number. If bit is set, the page is part of a
- * xen_create_contiguous_region() area of memory.
- */
-unsigned long *contiguous_bitmap __read_mostly;
-
-#ifdef CONFIG_VIRTUAL_MEM_MAP
-/* Following logic is stolen from create_mem_map_table() for virtual memmap */
-static int
-create_contiguous_bitmap(u64 start, u64 end, void *arg)
-{
-       unsigned long address, start_page, end_page;
-       unsigned long bitmap_start, bitmap_end;
-       unsigned char *bitmap;
-       int node;
-       pgd_t *pgd;
-       pud_t *pud;
-       pmd_t *pmd;
-       pte_t *pte;
-
-       bitmap_start = (unsigned long)contiguous_bitmap +
-                      ((__pa(start) >> PAGE_SHIFT) >> 3);
-       bitmap_end = (unsigned long)contiguous_bitmap +
-                    (((__pa(end) >> PAGE_SHIFT) + 2 * BITS_PER_LONG) >> 3);
-
-       start_page = bitmap_start & PAGE_MASK;
-       end_page = PAGE_ALIGN(bitmap_end);
-       node = paddr_to_nid(__pa(start));
-
-       bitmap = alloc_bootmem_pages_node(NODE_DATA(node),
-                                         end_page - start_page);
-       BUG_ON(!bitmap);
-       memset(bitmap, 0, end_page - start_page);
-
-       for (address = start_page; address < end_page; address += PAGE_SIZE) {
-               pgd = pgd_offset_k(address);
-               if (pgd_none(*pgd))
-                       pgd_populate(&init_mm, pgd,
-                                    alloc_bootmem_pages_node(NODE_DATA(node),
-                                                             PAGE_SIZE));
-               pud = pud_offset(pgd, address);
-
-               if (pud_none(*pud))
-                       pud_populate(&init_mm, pud,
-                                    alloc_bootmem_pages_node(NODE_DATA(node),
-                                                             PAGE_SIZE));
-               pmd = pmd_offset(pud, address);
-
-               if (pmd_none(*pmd))
-                       pmd_populate_kernel(&init_mm, pmd,
-                                           alloc_bootmem_pages_node
-                                           (NODE_DATA(node), PAGE_SIZE));
-               pte = pte_offset_kernel(pmd, address);
-
-               if (pte_none(*pte))
-                       set_pte(pte,
-                               pfn_pte(__pa(bitmap + (address - start_page))
-                                       >> PAGE_SHIFT, PAGE_KERNEL));
-       }
-       return 0;
-}
-#endif
-
-static void
-__contiguous_bitmap_init(unsigned long size)
-{
-       contiguous_bitmap = alloc_bootmem_pages(size);
-       BUG_ON(!contiguous_bitmap);
-       memset(contiguous_bitmap, 0, size);
-}
-
-void
-xen_contiguous_bitmap_init(unsigned long end_pfn)
-{
-       unsigned long size = (end_pfn + 2 * BITS_PER_LONG) >> 3;
-#ifndef CONFIG_VIRTUAL_MEM_MAP
-       __contiguous_bitmap_init(size);
-#else
-       unsigned long max_gap = 0;
-
-       efi_memmap_walk(find_largest_hole, (u64*)&max_gap);
-       if (max_gap < LARGE_GAP) {
-               __contiguous_bitmap_init(size);
-       } else {
-               unsigned long map_size = PAGE_ALIGN(size);
-               vmalloc_end -= map_size;
-               contiguous_bitmap = (unsigned long*)vmalloc_end;
-               efi_memmap_walk(create_contiguous_bitmap, NULL);
-       }
-#endif
-}
-
-#if 0
-int
-contiguous_bitmap_test(void* p)
-{
-       return test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap);
-}
-#endif
-
-static void contiguous_bitmap_set(
-       unsigned long first_page, unsigned long nr_pages)
-{
-       unsigned long start_off, end_off, curr_idx, end_idx;
-
-       curr_idx  = first_page / BITS_PER_LONG;
-       start_off = first_page & (BITS_PER_LONG-1);
-       end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
-       end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
-
-       if (curr_idx == end_idx) {
-               contiguous_bitmap[curr_idx] |=
-                       ((1UL<<end_off)-1) & -(1UL<<start_off);
-       } else {
-               contiguous_bitmap[curr_idx] |= -(1UL<<start_off);
-               while ( ++curr_idx < end_idx )
-                       contiguous_bitmap[curr_idx] = ~0UL;
-               contiguous_bitmap[curr_idx] |= (1UL<<end_off)-1;
-       }
-}
-
-static void contiguous_bitmap_clear(
-       unsigned long first_page, unsigned long nr_pages)
-{
-       unsigned long start_off, end_off, curr_idx, end_idx;
-
-       curr_idx  = first_page / BITS_PER_LONG;
-       start_off = first_page & (BITS_PER_LONG-1);
-       end_idx   = (first_page + nr_pages) / BITS_PER_LONG;
-       end_off   = (first_page + nr_pages) & (BITS_PER_LONG-1);
-
-       if (curr_idx == end_idx) {
-               contiguous_bitmap[curr_idx] &=
-                       -(1UL<<end_off) | ((1UL<<start_off)-1);
-       } else {
-               contiguous_bitmap[curr_idx] &= (1UL<<start_off)-1;
-               while ( ++curr_idx != end_idx )
-                       contiguous_bitmap[curr_idx] = 0;
-               contiguous_bitmap[curr_idx] &= -(1UL<<end_off);
-       }
 }
 
 /*
@@ -303,8 +155,6 @@ __xen_create_contiguous_region(unsigned 
                } else
                        success = 1;
        }
-       if (success)
-               contiguous_bitmap_set(start_gpfn, num_gpfn);
 #if 0
        if (success) {
                unsigned long mfn;
@@ -363,9 +213,6 @@ __xen_destroy_contiguous_region(unsigned
        };
        
 
-       if (!test_bit(start_gpfn, contiguous_bitmap))
-               return;
-
        if (unlikely(order > MAX_CONTIG_ORDER))
                return;
 
@@ -375,8 +222,6 @@ __xen_destroy_contiguous_region(unsigned
        scrub_pages(vstart, num_gpfn);
 
        balloon_lock(flags);
-
-       contiguous_bitmap_clear(start_gpfn, num_gpfn);
 
        /* Do the exchange for non-contiguous MFNs. */
        in_frame = start_gpfn;
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/ia64/xen/xen_dma.c
--- a/arch/ia64/xen/xen_dma.c   Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/ia64/xen/xen_dma.c   Tue Nov 04 12:43:37 2008 +0900
@@ -57,7 +57,6 @@ static int check_pages_physically_contig
 
 int range_straddles_page_boundary(paddr_t p, size_t size)
 {
-       extern unsigned long *contiguous_bitmap;
        unsigned long pfn = p >> PAGE_SHIFT;
        unsigned int offset = p & ~PAGE_MASK;
 
@@ -65,8 +64,6 @@ int range_straddles_page_boundary(paddr_
                return 0;
 
        if (offset + size <= PAGE_SIZE)
-               return 0;
-       if (test_bit(pfn, contiguous_bitmap))
                return 0;
        if (check_pages_physically_contiguous(pfn, offset, size))
                return 0;
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/x86_64/kernel/entry-xen.S
--- a/arch/x86_64/kernel/entry-xen.S    Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/x86_64/kernel/entry-xen.S    Tue Nov 04 12:43:37 2008 +0900
@@ -117,9 +117,9 @@ NMI_MASK = 0x80000000
        .macro  CFI_DEFAULT_STACK start=1,adj=0
        .if \start
        CFI_STARTPROC   simple
-       CFI_DEF_CFA     rsp,SS+8-(\adj*ARGOFFSET)
+       CFI_DEF_CFA     rsp,SS+8 - \adj*ARGOFFSET
        .else
-       CFI_DEF_CFA_OFFSET SS+8-(\adj*ARGOFFSET)
+       CFI_DEF_CFA_OFFSET SS+8 - \adj*ARGOFFSET
        .endif
        .if \adj == 0
        CFI_REL_OFFSET  r15,R15
@@ -129,20 +129,20 @@ NMI_MASK = 0x80000000
        CFI_REL_OFFSET  rbp,RBP
        CFI_REL_OFFSET  rbx,RBX
        .endif
-       CFI_REL_OFFSET  r11,R11
-       CFI_REL_OFFSET  r10,R10
-       CFI_REL_OFFSET  r9,R9
-       CFI_REL_OFFSET  r8,R8
-       CFI_REL_OFFSET  rax,RAX
-       CFI_REL_OFFSET  rcx,RCX
-       CFI_REL_OFFSET  rdx,RDX
-       CFI_REL_OFFSET  rsi,RSI
-       CFI_REL_OFFSET  rdi,RDI
-       CFI_REL_OFFSET  rip,RIP
-       /*CFI_REL_OFFSET        cs,CS*/
-       /*CFI_REL_OFFSET        rflags,EFLAGS*/
-       CFI_REL_OFFSET  rsp,RSP
-       /*CFI_REL_OFFSET        ss,SS*/
+       CFI_REL_OFFSET  r11,R11 - \adj*ARGOFFSET
+       CFI_REL_OFFSET  r10,R10 - \adj*ARGOFFSET
+       CFI_REL_OFFSET  r9,R9 - \adj*ARGOFFSET
+       CFI_REL_OFFSET  r8,R8 - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rax,RAX - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rcx,RCX - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rdx,RDX - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rsi,RSI - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rdi,RDI - \adj*ARGOFFSET
+       CFI_REL_OFFSET  rip,RIP - \adj*ARGOFFSET
+       /*CFI_REL_OFFSET        cs,CS - \adj*ARGOFFSET*/
+       /*CFI_REL_OFFSET        rflags,EFLAGS - \adj*ARGOFFSET*/
+       CFI_REL_OFFSET  rsp,RSP - \adj*ARGOFFSET
+       /*CFI_REL_OFFSET        ss,SS - \adj*ARGOFFSET*/
        .endm
 
         /*
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/x86_64/kernel/irq-xen.c
--- a/arch/x86_64/kernel/irq-xen.c      Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/x86_64/kernel/irq-xen.c      Tue Nov 04 12:43:37 2008 +0900
@@ -124,13 +124,13 @@ asmlinkage unsigned int do_IRQ(struct pt
                BUG();
        }
 
-       exit_idle();
-       irq_enter();
+       /*exit_idle();*/
+       /*irq_enter();*/
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
        stack_overflow_check(regs);
 #endif
        __do_IRQ(irq, regs);
-       irq_exit();
+       /*irq_exit();*/
 
        return 1;
 }
diff -r 45c3a3dfa5b5 -r 61d1f2810617 arch/x86_64/mm/init-xen.c
--- a/arch/x86_64/mm/init-xen.c Fri Oct 24 11:22:02 2008 +0900
+++ b/arch/x86_64/mm/init-xen.c Tue Nov 04 12:43:37 2008 +0900
@@ -61,8 +61,6 @@ EXPORT_SYMBOL(__kernel_page_user);
 
 int after_bootmem;
 
-extern unsigned long *contiguous_bitmap;
-
 static unsigned long dma_reserve __initdata;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -972,11 +970,6 @@ void __init mem_init(void)
        long codesize, reservedpages, datasize, initsize;
        unsigned long pfn;
 
-       contiguous_bitmap = alloc_bootmem_low_pages(
-               (end_pfn + 2*BITS_PER_LONG) >> 3);
-       BUG_ON(!contiguous_bitmap);
-       memset(contiguous_bitmap, 0, (end_pfn + 2*BITS_PER_LONG) >> 3);
-
        pci_iommu_alloc();
 
        /* How many end-of-memory variables you have, grandma! */
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/acpi/processor_core.c
--- a/drivers/acpi/processor_core.c     Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/acpi/processor_core.c     Tue Nov 04 12:43:37 2008 +0900
@@ -513,8 +513,17 @@ static int acpi_processor_get_info(struc
 #if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
        acpi_processor_ppc_has_changed(pr);
 #endif
-       acpi_processor_get_throttling_info(pr);
-       acpi_processor_get_limit_info(pr);
+
+       /* 
+        * pr->id may equal to -1 while processor_cntl_external enabled.
+        * throttle and thermal module don't support this case.
+        * Tx only works when dom0 vcpu == pcpu num by far, as we give 
+        * control to dom0.
+        */
+       if (pr->id != -1) {
+               acpi_processor_get_throttling_info(pr);
+               acpi_processor_get_limit_info(pr);
+       }
 
        return 0;
 }
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/acpi/processor_idle.c
--- a/drivers/acpi/processor_idle.c     Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/acpi/processor_idle.c     Tue Nov 04 12:43:37 2008 +0900
@@ -654,7 +654,7 @@ static int acpi_processor_get_power_info
        if (nocst)
                return -ENODEV;
 
-       current_count = 1;
+       current_count = 0;
 
        /* Zero initialize C2 onwards and prepare for fresh CST lookup */
        for (i = 2; i < ACPI_PROCESSOR_MAX_POWER; i++)
@@ -728,13 +728,17 @@ static int acpi_processor_get_power_info
 
                cx.type = obj->integer.value;
 
+               /*
+                * Some buggy BIOSes won't list C1 in _CST -
+                * Let acpi_processor_get_power_info_default() handle them later
+                */
+               if (i == 1 && cx.type != ACPI_STATE_C1)
+                       current_count++;
+
                /* Following check doesn't apply to external control case */
                if (!processor_pm_external() &&
                    (cx.type != ACPI_STATE_C1) &&
                    (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO))
-                       continue;
-
-               if ((cx.type < ACPI_STATE_C2) || (cx.type > ACPI_STATE_C3))
                        continue;
 
                obj = (union acpi_object *)&(element->package.elements[2]);
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/pci/bus.c
--- a/drivers/pci/bus.c Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/pci/bus.c Tue Nov 04 12:43:37 2008 +0900
@@ -16,8 +16,6 @@
 #include <linux/init.h>
 
 #include "pci.h"
-
-extern int pci_mem_align;
 
 /**
  * pci_bus_alloc_resource - allocate a resource from a parent bus
@@ -45,11 +43,6 @@ pci_bus_alloc_resource(struct pci_bus *b
        int i, ret = -ENOMEM;
 
        type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
-
-       /* If the boot parameter 'pci-mem-align' was specified then we need to 
-          align the memory addresses, at page size alignment. */
-       if (pci_mem_align && (align < (PAGE_SIZE-1)))
-               align = PAGE_SIZE - 1;
 
        for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
                struct resource *r = bus->resource[i];
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c      Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/pci/quirks.c      Tue Nov 04 12:43:37 2008 +0900
@@ -23,25 +23,17 @@
 #include <linux/acpi.h>
 #include "pci.h"
 
-/* A global flag which signals if we should page-align PCI mem windows. */
-int pci_mem_align = 0;
-
-static int __init set_pci_mem_align(char *str)
-{
-       pci_mem_align = 1;
-       return 1;
-}
-__setup("pci-mem-align", set_pci_mem_align);
-
-
-/* This quirk function enables us to force all memory resources which are 
- * assigned to PCI devices, to be page-aligned.
- */
-static void __devinit quirk_align_mem_resources(struct pci_dev *dev)
+
+/*
+ * This quirk function disables the device and releases resources
+ * which is specified by kernel's boot parameter 'reassigndev'.
+ * Later on, kernel will assign page-aligned memory resource back
+ * to that device.
+ */
+static void __devinit quirk_release_resources(struct pci_dev *dev)
 {
        int i;
        struct resource *r;
-       resource_size_t old_start;
 
        if (is_reassigndev(dev)) {
                if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
@@ -76,21 +68,8 @@ static void __devinit quirk_align_mem_re
                }
                return;
        }
-
-       if (!pci_mem_align)
-               return;
-
-       for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
-               r = &dev->resource[i];
-               if ((r == NULL) || !(r->flags & IORESOURCE_MEM))
-                       continue;
-
-               old_start = r->start;
-               r->start = (r->start + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
-               r->end = r->end - (old_start - r->start);
-       }
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_release_resources);
 
 /* The Mellanox Tavor device gives false positive parity errors
  * Mark this device with a broken_parity_status, to allow
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/xen/core/evtchn.c Tue Nov 04 12:43:37 2008 +0900
@@ -246,6 +246,8 @@ asmlinkage void evtchn_do_upcall(struct 
        shared_info_t      *s = HYPERVISOR_shared_info;
        vcpu_info_t        *vcpu_info = &s->vcpu_info[cpu];
 
+       exit_idle();
+       irq_enter();
 
        do {
                /* Avoid a callback storm when we reenable delivery. */
@@ -253,7 +255,7 @@ asmlinkage void evtchn_do_upcall(struct 
 
                /* Nested invocations bail immediately. */
                if (unlikely(per_cpu(upcall_count, cpu)++))
-                       return;
+                       break;
 
 #ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */
                /* Clear master flag /before/ clearing selector flag. */
@@ -293,10 +295,8 @@ asmlinkage void evtchn_do_upcall(struct 
                                port = (l1i * BITS_PER_LONG) + l2i;
                                if ((irq = evtchn_to_irq[port]) != -1)
                                        do_IRQ(irq, regs);
-                               else {
-                                       exit_idle();
+                               else
                                        evtchn_device_upcall(port);
-                               }
 
                                /* if this is the final port processed, we'll 
pick up here+1 next time */
                                per_cpu(last_processed_l1i, cpu) = l1i;
@@ -314,6 +314,8 @@ asmlinkage void evtchn_do_upcall(struct 
                count = per_cpu(upcall_count, cpu);
                per_cpu(upcall_count, cpu) = 0;
        } while (unlikely(count != 1));
+
+       irq_exit();
 }
 
 static int find_unbound_irq(void)
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/xen/core/gnttab.c
--- a/drivers/xen/core/gnttab.c Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/xen/core/gnttab.c Tue Nov 04 12:43:37 2008 +0900
@@ -112,6 +112,7 @@ static void do_free_callbacks(void)
                next = callback->next;
                if (gnttab_free_count >= callback->count) {
                        callback->next = NULL;
+                       callback->queued = 0;
                        callback->fn(callback->arg);
                } else {
                        callback->next = gnttab_free_callback_list;
@@ -343,11 +344,12 @@ void gnttab_request_free_callback(struct
 {
        unsigned long flags;
        spin_lock_irqsave(&gnttab_list_lock, flags);
-       if (callback->next)
+       if (callback->queued)
                goto out;
        callback->fn = fn;
        callback->arg = arg;
        callback->count = count;
+       callback->queued = 1;
        callback->next = gnttab_free_callback_list;
        gnttab_free_callback_list = callback;
        check_free_callbacks();
@@ -365,6 +367,7 @@ void gnttab_cancel_free_callback(struct 
        for (pcb = &gnttab_free_callback_list; *pcb; pcb = &(*pcb)->next) {
                if (*pcb == callback) {
                        *pcb = callback->next;
+                       callback->queued = 0;
                        break;
                }
        }
diff -r 45c3a3dfa5b5 -r 61d1f2810617 drivers/xen/core/xen_sysfs.c
--- a/drivers/xen/core/xen_sysfs.c      Fri Oct 24 11:22:02 2008 +0900
+++ b/drivers/xen/core/xen_sysfs.c      Tue Nov 04 12:43:37 2008 +0900
@@ -336,6 +336,9 @@ static void xen_properties_destroy(void)
 }
 
 #ifdef CONFIG_KEXEC
+
+extern size_t vmcoreinfo_size_xen;
+extern unsigned long paddr_vmcoreinfo_xen;
 
 static ssize_t vmcoreinfo_show(struct hyp_sysfs_attr *attr, char *page)
 {
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/asm-i386/mach-xen/asm/highmem.h
--- a/include/asm-i386/mach-xen/asm/highmem.h   Fri Oct 24 11:22:02 2008 +0900
+++ b/include/asm-i386/mach-xen/asm/highmem.h   Tue Nov 04 12:43:37 2008 +0900
@@ -75,6 +75,23 @@ struct page *kmap_atomic_to_page(void *p
 
 #define flush_cache_kmaps()    do { } while (0)
 
+void clear_highpage(struct page *);
+static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
+{
+       clear_highpage(page);
+}
+#define __HAVE_ARCH_CLEAR_HIGHPAGE
+#define __HAVE_ARCH_CLEAR_USER_HIGHPAGE
+
+void copy_highpage(struct page *to, struct page *from);
+static inline void copy_user_highpage(struct page *to, struct page *from,
+       unsigned long vaddr)
+{
+       copy_highpage(to, from);
+}
+#define __HAVE_ARCH_COPY_HIGHPAGE
+#define __HAVE_ARCH_COPY_USER_HIGHPAGE
+
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_HIGHMEM_H */
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/asm-ia64/hypercall.h
--- a/include/asm-ia64/hypercall.h      Fri Oct 24 11:22:02 2008 +0900
+++ b/include/asm-ia64/hypercall.h      Tue Nov 04 12:43:37 2008 +0900
@@ -237,11 +237,7 @@ xencomm_arch_hypercall_opt_feature(struc
 
 extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
 static inline void exit_idle(void) {}
-#define do_IRQ(irq, regs) ({                   \
-       irq_enter();                            \
-       __do_IRQ((irq), (regs));                \
-       irq_exit();                             \
-})
+#define do_IRQ(irq, regs) __do_IRQ((irq), (regs))
 
 #include <linux/err.h>
 #ifdef HAVE_XEN_PLATFORM_COMPAT_H
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/asm-ia64/hypervisor.h
--- a/include/asm-ia64/hypervisor.h     Fri Oct 24 11:22:02 2008 +0900
+++ b/include/asm-ia64/hypervisor.h     Tue Nov 04 12:43:37 2008 +0900
@@ -140,7 +140,6 @@ int privcmd_mmap(struct file * file, str
 #define        pte_mfn(_x)     pte_pfn(_x)
 #define phys_to_machine_mapping_valid(_x)      (1)
 
-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 45c3a3dfa5b5 -r 61d1f2810617 include/linux/highmem.h
--- a/include/linux/highmem.h   Fri Oct 24 11:22:02 2008 +0900
+++ b/include/linux/highmem.h   Tue Nov 04 12:43:37 2008 +0900
@@ -50,6 +50,7 @@ static inline void *kmap(struct page *pa
 
 #endif /* CONFIG_HIGHMEM */
 
+#ifndef __HAVE_ARCH_CLEAR_USER_HIGHPAGE
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
 static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
 {
@@ -59,6 +60,7 @@ static inline void clear_user_highpage(s
        /* Make sure this page is cleared on other CPU's too before using it */
        smp_wmb();
 }
+#endif
 
 #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
 static inline struct page *
@@ -73,12 +75,14 @@ alloc_zeroed_user_highpage(struct vm_are
 }
 #endif
 
+#ifndef __HAVE_ARCH_CLEAR_HIGHPAGE
 static inline void clear_highpage(struct page *page)
 {
        void *kaddr = kmap_atomic(page, KM_USER0);
        clear_page(kaddr);
        kunmap_atomic(kaddr, KM_USER0);
 }
+#endif
 
 /*
  * Same but also flushes aliased cache contents to RAM.
@@ -95,6 +99,7 @@ static inline void memclear_highpage_flu
        kunmap_atomic(kaddr, KM_USER0);
 }
 
+#ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE
 static inline void copy_user_highpage(struct page *to, struct page *from, 
unsigned long vaddr)
 {
        char *vfrom, *vto;
@@ -107,7 +112,9 @@ static inline void copy_user_highpage(st
        /* Make sure this page is cleared on other CPU's too before using it */
        smp_wmb();
 }
+#endif
 
+#ifndef __HAVE_ARCH_COPY_HIGHPAGE
 static inline void copy_highpage(struct page *to, struct page *from)
 {
        char *vfrom, *vto;
@@ -118,5 +125,6 @@ static inline void copy_highpage(struct 
        kunmap_atomic(vfrom, KM_USER0);
        kunmap_atomic(vto, KM_USER1);
 }
+#endif
 
 #endif /* _LINUX_HIGHMEM_H */
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/gnttab.h
--- a/include/xen/gnttab.h      Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/gnttab.h      Tue Nov 04 12:43:37 2008 +0900
@@ -48,6 +48,7 @@ struct gnttab_free_callback {
        void (*fn)(void *);
        void *arg;
        u16 count;
+       u8 queued;
 };
 
 int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/arch-ia64/hvm/save.h
--- a/include/xen/interface/arch-ia64/hvm/save.h        Fri Oct 24 11:22:02 
2008 +0900
+++ b/include/xen/interface/arch-ia64/hvm/save.h        Tue Nov 04 12:43:37 
2008 +0900
@@ -106,7 +106,11 @@ DECLARE_HVM_SAVE_TYPE(VTIME, 5, struct h
  */
 #define VIOSAPIC_NUM_PINS     48
 
-union viosapic_rte
+/* To share VT-d code which uses vioapic_redir_entry.
+ * Although on ia64 this is for vsapic, but we have to vioapic_redir_entry
+ * instead of viosapic_redir_entry.
+ */
+union vioapic_redir_entry
 {
     uint64_t bits;
     struct {
@@ -124,7 +128,7 @@ union viosapic_rte
 
         uint8_t reserved[3];
         uint16_t dest_id;
-    }; 
+    } fields;
 };
 
 struct hvm_hw_ia64_viosapic {
@@ -134,7 +138,7 @@ struct hvm_hw_ia64_viosapic {
     uint32_t    pad;
     uint64_t    lowest_vcpu_id;
     uint64_t    base_address;
-    union viosapic_rte  redirtbl[VIOSAPIC_NUM_PINS];
+    union vioapic_redir_entry  redirtbl[VIOSAPIC_NUM_PINS];
 };
 DECLARE_HVM_SAVE_TYPE(VIOSAPIC, 6, struct hvm_hw_ia64_viosapic);
   
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/arch-x86/hvm/save.h
--- a/include/xen/interface/arch-x86/hvm/save.h Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/arch-x86/hvm/save.h Tue Nov 04 12:43:37 2008 +0900
@@ -421,9 +421,20 @@ struct hvm_hw_mtrr {
 
 DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct hvm_hw_mtrr);
 
+/*
+ * Viridian hypervisor context.
+ */
+
+struct hvm_viridian_context {
+    uint64_t hypercall_gpa;
+    uint64_t guest_os_id;
+};
+
+DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context);
+
 /* 
  * Largest type-code in use
  */
-#define HVM_SAVE_CODE_MAX 14
+#define HVM_SAVE_CODE_MAX 15
 
 #endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/domctl.h
--- a/include/xen/interface/domctl.h    Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/domctl.h    Tue Nov 04 12:43:37 2008 +0900
@@ -614,6 +614,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_subsc
 #define XEN_DOMCTL_set_machine_address_size  51
 #define XEN_DOMCTL_get_machine_address_size  52
 
+/*
+ * Do not inject spurious page faults into this domain.
+ */
+#define XEN_DOMCTL_suppress_spurious_page_faults 53
 
 struct xen_domctl {
     uint32_t cmd;
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/features.h
--- a/include/xen/interface/features.h  Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/features.h  Tue Nov 04 12:43:37 2008 +0900
@@ -59,6 +59,9 @@
 /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
 #define XENFEAT_mmu_pt_update_preserve_ad  5
 
+/* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */
+#define XENFEAT_highmem_assist             6
+
 #define XENFEAT_NR_SUBMAPS 1
 
 #endif /* __XEN_PUBLIC_FEATURES_H__ */
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/hvm/params.h
--- a/include/xen/interface/hvm/params.h        Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/hvm/params.h        Tue Nov 04 12:43:37 2008 +0900
@@ -51,9 +51,16 @@
 #define HVM_PARAM_BUFIOREQ_PFN 6
 
 #ifdef __ia64__
+
 #define HVM_PARAM_NVRAM_FD     7
 #define HVM_PARAM_VHPT_SIZE    8
 #define HVM_PARAM_BUFPIOREQ_PFN        9
+
+#elif defined(__i386__) || defined(__x86_64__)
+
+/* Expose Viridian interfaces to this HVM guest? */
+#define HVM_PARAM_VIRIDIAN     9
+
 #endif
 
 /*
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/kexec.h
--- a/include/xen/interface/kexec.h     Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/kexec.h     Tue Nov 04 12:43:37 2008 +0900
@@ -175,8 +175,6 @@ void vmcoreinfo_append_str(const char *f
 #define VMCOREINFO_OFFSET_ALIAS(name, field, alias) \
        vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #alias, \
                              (unsigned long)offsetof(struct name, field))
-extern size_t vmcoreinfo_size_xen;
-extern unsigned long paddr_vmcoreinfo_xen;
 
 #endif /* _XEN_PUBLIC_KEXEC_H */
 
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/trace.h
--- a/include/xen/interface/trace.h     Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/trace.h     Tue Nov 04 12:43:37 2008 +0900
@@ -38,6 +38,7 @@
 #define TRC_MEM      0x0010f000    /* Xen memory trace         */
 #define TRC_PV       0x0020f000    /* Xen PV traces            */
 #define TRC_SHADOW   0x0040f000    /* Xen shadow tracing       */
+#define TRC_PM       0x0080f000    /* Xen power management trace */
 #define TRC_ALL      0x0ffff000
 #define TRC_HD_TO_EVENT(x) ((x)&0x0fffffff)
 #define TRC_HD_CYCLE_FLAG (1UL<<31)
@@ -146,6 +147,15 @@
 #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
 #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
 
+/* trace subclasses for power management */
+#define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */
+#define TRC_PM_IDLE     0x00802000      /* xen cpu idle events */
+
+/* trace events for per class */
+#define TRC_PM_FREQ_CHANGE      (TRC_PM_FREQ + 0x01)
+#define TRC_PM_IDLE_ENTRY       (TRC_PM_IDLE + 0x01)
+#define TRC_PM_IDLE_EXIT        (TRC_PM_IDLE + 0x02)
+
 /* This structure represents a single trace buffer record. */
 struct t_rec {
     uint32_t event:28;
diff -r 45c3a3dfa5b5 -r 61d1f2810617 include/xen/interface/xen.h
--- a/include/xen/interface/xen.h       Fri Oct 24 11:22:02 2008 +0900
+++ b/include/xen/interface/xen.h       Tue Nov 04 12:43:37 2008 +0900
@@ -231,6 +231,13 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
  * cmd: MMUEXT_SET_LDT
  * linear_addr: Linear address of LDT base (NB. must be page-aligned).
  * nr_ents: Number of entries in LDT.
+ *
+ * cmd: MMUEXT_CLEAR_PAGE
+ * mfn: Machine frame number to be cleared.
+ *
+ * cmd: MMUEXT_COPY_PAGE
+ * mfn: Machine frame number of the destination page.
+ * src_mfn: Machine frame number of the source page.
  */
 #define MMUEXT_PIN_L1_TABLE      0
 #define MMUEXT_PIN_L2_TABLE      1
@@ -247,12 +254,15 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 #define MMUEXT_FLUSH_CACHE      12
 #define MMUEXT_SET_LDT          13
 #define MMUEXT_NEW_USER_BASEPTR 15
+#define MMUEXT_CLEAR_PAGE       16
+#define MMUEXT_COPY_PAGE        17
 
 #ifndef __ASSEMBLY__
 struct mmuext_op {
     unsigned int cmd;
     union {
-        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR */
+        /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR
+         * CLEAR_PAGE, COPY_PAGE */
         xen_pfn_t     mfn;
         /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
         unsigned long linear_addr;
@@ -266,6 +276,8 @@ struct mmuext_op {
 #else
         void *vcpumask;
 #endif
+        /* COPY_PAGE */
+        xen_pfn_t src_mfn;
     } arg2;
 };
 typedef struct mmuext_op mmuext_op_t;

_______________________________________________
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®.