rpms/kernel-xen-2.6/devel Makefile, 1.7, 1.8 Makefile.config, 1.7, 1.8 kernel.spec, 1.25, 1.26 linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch, 1.1, 1.2
Mark McLoughlin (markmc)
fedora-extras-commits at redhat.com
Tue Apr 1 12:53:26 UTC 2008
Author: markmc
Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27947
Modified Files:
Makefile Makefile.config kernel.spec
linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
Log Message:
Fix broken x86_64 patch
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/kernel.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- kernel.spec 1 Apr 2008 12:19:11 -0000 1.25
+++ kernel.spec 1 Apr 2008 12:52:48 -0000 1.26
@@ -684,7 +684,6 @@
Patch5016: linux-2.6-xen-0017-xen-x86_64-Add-64-bit-version-of-privcmd_hypercall.patch
Patch5017: linux-2.6-xen-0018-xen-x86_64-Only-define-load_user_cs_desc-on-32-bi.patch
Patch5018: linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
-
# kernel-xen patches end
# Xen hypervisor patches (20000+)
linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch:
Index: linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch 1 Apr 2008 10:38:07 -0000 1.1
+++ linux-2.6-xen-0019-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch 1 Apr 2008 12:52:48 -0000 1.2
@@ -1,4 +1,4 @@
-From 71e0f3287bad1bc651fd2ea450fef451663a0edd Mon Sep 17 00:00:00 2001
+From 42d111eabbcc4a561cacb15c67b83d2a2a52f16e Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost at redhat.com>
Date: Thu, 28 Feb 2008 12:16:04 -0300
Subject: [PATCH] xen x86_64: Initial x86_64 support for Xen paravirt_ops
@@ -40,7 +40,7 @@
arch/x86/vdso/vdso32-setup.c | 6 +-
arch/x86/xen/Kconfig | 1 -
arch/x86/xen/Makefile | 6 +
- arch/x86/xen/enlighten.c | 301 +++++++++++++------
+ arch/x86/xen/enlighten.c | 266 +++++++++++------
arch/x86/xen/entry.S | 5 +
arch/x86/xen/entry_32.S | 81 +++++
arch/x86/xen/entry_64.S | 68 ++++
@@ -88,7 +88,7 @@
include/xen/page.h | 34 ++-
init/main.c | 10 +
mm/slab.c | 8 +-
- 80 files changed, 2803 insertions(+), 673 deletions(-)
+ 80 files changed, 2768 insertions(+), 673 deletions(-)
create mode 100644 arch/x86/xen/entry.S
create mode 100644 arch/x86/xen/entry_32.S
create mode 100644 arch/x86/xen/entry_64.S
@@ -1898,7 +1898,7 @@
+
obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
-index 5c91ae7..82af000 100644
+index 5c91ae7..53ee6ac 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -36,6 +36,7 @@
@@ -1932,7 +1932,7 @@
/* Check to see if the hypervisor will put the vcpu_info
structure where we want it, which allows direct access via
a percpu-variable. */
-@@ -134,6 +140,45 @@ static void __init xen_vcpu_setup(int cpu)
+@@ -134,6 +140,10 @@ static void __init xen_vcpu_setup(int cpu)
printk(KERN_DEBUG "cpu %d using vcpu_info at %p\n",
cpu, vcpup);
}
@@ -1940,45 +1940,10 @@
+ have_vcpu_info_placement = 0;
+#endif
+
-+}
-+
-+void kcons_write_dom0(const char *s, unsigned int count)
-+{
-+#if 0
-+ int rc;
-+
-+ while ((count > 0) &&
-+ ((rc = HYPERVISOR_console_io(
-+ CONSOLEIO_write, count, (char *)s)) > 0)) {
-+ count -= rc;
-+ s += rc;
-+ }
-+#else
-+ HYPERVISOR_console_io(CONSOLEIO_write, count, (char *)s);
-+#endif
-+}
-+
-+
-+/*** Useful function for console debugging -- goes straight to Xen. ***/
-+asmlinkage int xprintk(const char *fmt, ...)
-+{
-+ va_list args;
-+ int printk_len;
-+ static char printk_buf[1024];
-+
-+ /* Emit the output into the temporary buffer */
-+ va_start(args, fmt);
-+ printk_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
-+ va_end(args);
-+
-+ /* Send the processed output directly to Xen. */
-+ kcons_write_dom0(printk_buf, printk_len);
-+
-+ return 0;
}
static void __init xen_banner(void)
-@@ -388,6 +433,7 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
+@@ -388,6 +398,7 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
xen_mc_issue(PARAVIRT_LAZY_CPU);
@@ -1986,7 +1951,7 @@
/*
* XXX sleazy hack: If we're being called in a lazy-cpu zone,
* it means we're in a context switch, and %gs has just been
-@@ -396,10 +442,29 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
+@@ -396,10 +407,29 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
* Either way, it has been saved, and the new value will get
* loaded properly. This will go away as soon as Xen has been
* modified to not save/restore %gs for normal hypercalls.
@@ -2017,7 +1982,7 @@
static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
const void *ptr)
-@@ -417,23 +482,18 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
+@@ -417,23 +447,18 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
preempt_enable();
}
@@ -2047,7 +2012,7 @@
info->flags |= 4;
return 1;
-@@ -460,11 +520,10 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g)
+@@ -460,11 +485,10 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g)
if (p >= start && (p + 8) <= end) {
struct trap_info info[2];
@@ -2060,7 +2025,7 @@
if (HYPERVISOR_set_trap_table(info))
BUG();
}
-@@ -477,13 +536,13 @@ static void xen_convert_trap_info(const struct desc_ptr *desc,
+@@ -477,13 +501,13 @@ static void xen_convert_trap_info(const struct desc_ptr *desc,
{
unsigned in, out, count;
@@ -2077,7 +2042,7 @@
out++;
}
traps[out].address = 0;
-@@ -656,7 +715,11 @@ static unsigned long xen_read_cr2(void)
+@@ -656,7 +680,11 @@ static unsigned long xen_read_cr2(void)
static unsigned long xen_read_cr2_direct(void)
{
@@ -2089,7 +2054,7 @@
}
static void xen_write_cr4(unsigned long cr4)
-@@ -683,7 +746,10 @@ static void xen_write_cr3(unsigned long cr3)
+@@ -683,7 +711,10 @@ static void xen_write_cr3(unsigned long cr3)
BUG_ON(preemptible());
@@ -2101,13 +2066,17 @@
/* Update while interrupts are disabled, so its atomic with
respect to ipis */
-@@ -699,86 +765,66 @@ static void xen_write_cr3(unsigned long cr3)
+@@ -699,86 +730,66 @@ static void xen_write_cr3(unsigned long cr3)
been submitted. */
xen_mc_callback(set_current_cr3, (void *)cr3);
- xen_mc_issue(PARAVIRT_LAZY_CPU); /* interrupts restored */
-}
--
++#ifdef CONFIG_X86_64
++ {
++ pgd_t *pgd = __va(cr3);
++ unsigned long user_mfn = virt_to_mfn(__user_pgd(pgd));
+
-/* Early in boot, while setting up the initial pagetable, assume
- everything is pinned. */
-static __init void xen_alloc_pt_init(struct mm_struct *mm, u32 pfn)
@@ -2115,10 +2084,7 @@
- BUG_ON(mem_map); /* should only be used early */
- make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
-}
-+#ifdef CONFIG_X86_64
-+ {
-+ pgd_t *pgd = __va(cr3);
-+ unsigned long user_mfn = virt_to_mfn(__user_pgd(pgd));
++ mcs = __xen_mc_entry(sizeof(*op));
-/* Early release_pt assumes that all pts are pinned, since there's
- only init_mm and anything attached to that is pinned. */
@@ -2126,8 +2092,7 @@
-{
- make_lowmem_page_readwrite(__va(PFN_PHYS(pfn)));
-}
-+ mcs = __xen_mc_entry(sizeof(*op));
-
+-
-static void pin_pagetable_pfn(unsigned cmd, unsigned long pfn)
-{
- struct mmuext_op op;
@@ -2232,7 +2197,7 @@
}
#ifdef CONFIG_HIGHPTE
-@@ -817,14 +863,25 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
+@@ -817,14 +828,25 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
xen_set_pte(ptep, pte);
}
@@ -2258,7 +2223,7 @@
/*
* copy top-level of Xen-supplied pagetable into place. For
* !PAE we can use this as-is, but for PAE it is a stand-in
-@@ -863,6 +920,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
+@@ -863,6 +885,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
* added to the table can be prepared properly for Xen.
*/
xen_write_cr3(__pa(base));
@@ -2266,7 +2231,7 @@
/* Unpin initial Xen pagetable */
pin_pagetable_pfn(MMUEXT_UNPIN_TABLE,
-@@ -879,9 +937,7 @@ static __init void setup_shared_info(void)
+@@ -879,9 +902,7 @@ static __init void setup_shared_info(void)
* Should be set_fixmap(), but shared_info is a machine
* address with no corresponding pseudo-phys address.
*/
@@ -2277,7 +2242,7 @@
HYPERVISOR_shared_info = (struct shared_info *)addr;
} else
-@@ -906,6 +962,16 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
+@@ -906,6 +927,16 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
setup_shared_info();
@@ -2294,7 +2259,7 @@
/* Actually pin the pagetable down, but we can't set PG_pinned
yet because the page structures don't exist yet. */
{
-@@ -919,6 +985,7 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
+@@ -919,6 +950,7 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
pin_pagetable_pfn(level, PFN_DOWN(__pa(base)));
}
@@ -2302,7 +2267,7 @@
}
/* This is called once we have the cpu_possible_map */
-@@ -961,10 +1028,12 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
+@@ -961,10 +993,12 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
goto patch_site
switch (type) {
@@ -2315,7 +2280,7 @@
#undef SITE
patch_site:
-@@ -1043,8 +1112,13 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
+@@ -1043,8 +1077,13 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
.read_tsc = native_read_tsc,
.read_pmc = native_read_pmc,
@@ -2329,7 +2294,7 @@
.load_tr_desc = paravirt_nop,
.set_ldt = xen_set_ldt,
-@@ -1054,6 +1128,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
+@@ -1054,6 +1093,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
.load_gdt = xen_load_gdt,
.load_idt = xen_load_idt,
.load_tls = xen_load_tls,
@@ -2339,7 +2304,7 @@
.store_gdt = native_store_gdt,
.store_idt = native_store_idt,
-@@ -1122,7 +1199,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
+@@ -1122,7 +1164,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
.kmap_atomic_pte = xen_kmap_atomic_pte,
#endif
@@ -2348,7 +2313,7 @@
.set_pte_at = xen_set_pte_at,
.set_pmd = xen_set_pmd,
-@@ -1135,13 +1212,21 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
+@@ -1135,13 +1177,21 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
#ifdef CONFIG_X86_PAE
.set_pte_atomic = xen_set_pte_atomic,
.set_pte_present = xen_set_pte_at,
@@ -2372,7 +2337,7 @@
.activate_mm = xen_activate_mm,
.dup_mmap = xen_dup_mmap,
-@@ -1206,6 +1291,7 @@ static const struct machine_ops __initdata xen_machine_ops = {
+@@ -1206,6 +1256,7 @@ static const struct machine_ops __initdata xen_machine_ops = {
};
@@ -2380,7 +2345,7 @@
static void __init xen_reserve_top(void)
{
unsigned long top = HYPERVISOR_VIRT_START;
-@@ -1216,6 +1302,11 @@ static void __init xen_reserve_top(void)
+@@ -1216,6 +1267,11 @@ static void __init xen_reserve_top(void)
reserve_top_address(-top + 2 * PAGE_SIZE);
}
@@ -2392,7 +2357,7 @@
/* First C function to be called on Xen boot */
asmlinkage void __init xen_start_kernel(void)
-@@ -1227,6 +1318,21 @@ asmlinkage void __init xen_start_kernel(void)
+@@ -1227,6 +1283,21 @@ asmlinkage void __init xen_start_kernel(void)
BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
@@ -2414,7 +2379,7 @@
/* Install Xen paravirt ops */
pv_info = xen_info;
pv_init_ops = xen_init_ops;
-@@ -1236,7 +1342,10 @@ asmlinkage void __init xen_start_kernel(void)
+@@ -1236,7 +1307,10 @@ asmlinkage void __init xen_start_kernel(void)
pv_apic_ops = xen_apic_ops;
pv_mmu_ops = xen_mmu_ops;
@@ -2425,7 +2390,7 @@
#ifdef CONFIG_SMP
smp_ops = xen_smp_ops;
-@@ -1250,19 +1359,33 @@ asmlinkage void __init xen_start_kernel(void)
+@@ -1250,19 +1324,33 @@ asmlinkage void __init xen_start_kernel(void)
pgd = (pgd_t *)xen_start_info->pt_base;
@@ -2459,7 +2424,7 @@
pv_info.kernel_rpl = 1;
if (xen_feature(XENFEAT_supervisor_mode_kernel))
pv_info.kernel_rpl = 0;
-@@ -1270,10 +1393,12 @@ asmlinkage void __init xen_start_kernel(void)
+@@ -1270,10 +1358,12 @@ asmlinkage void __init xen_start_kernel(void)
/* set the limit of our address space */
xen_reserve_top();
More information about the scm-commits
mailing list