rpms/kernel-xen-2.6/devel linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch, NONE, 1.1.2.1 linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch, NONE, 1.1.2.1 linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch, NONE, 1.1.2.1 linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch, NONE, 1.1.2.1 linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch, NONE, 1.1.2.1 linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch, NONE, 1.1.2.1 linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch, NONE, 1.1.2.1 linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch, NONE, 1.1.2.1 linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch, NONE, 1.1.2.1 linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch, NONE, 1.1.2.1 linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch, NONE, 1.1.2.1 Makefile, 1.2.6.2, 1.2.6.3 Makefile.config, 1.2.4.2, 1.2.4.3 config-xen-generic, 1.2.4.2, 1.2.4.3 config-xen-x86_64, 1.2.4.1, 1.2.4.2 kernel.spec, 1.11.2.12, 1.11.2.13 linux-2.6-xen-0002-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch, 1.1.2.3, NONE linux-2.6-xen-0003-fbdev-Make-deferred-I-O-work-as-advertized.patch, 1.1.2.3, NONE linux-2.6-xen-0004-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch, 1.1.2.3, NONE linux-2.6-xen-0005-xen-Module-autoprobing-support-for-frontend-drivers.patch, 1.1.2.2, NONE linux-2.6-xen-0006-xen-Add-compatibility-aliases-for-frontend-drivers.patch, 1.1.2.2, NONE linux-2.6-xen-0007-xen-dom0-Make-hvc_xen-console-work-for-dom0.patch, 1.1.2.2, NONE linux-2.6-xen-0008-xen-dom0-Initialize-xenbus-for-dom0.patch, 1.1.2.2, NONE linux-2.6-xen-0009-xen-dom0-Set-up-basic-IO-permissions-for-dom0.patch, 1.1.2.2, NONE linux-2.6-xen-0010-xen-dom0-Add-set_fixmap-pv_mmu_ops.patch, 1.1.2.2, NONE linux-2.6-xen-0011-xen-dom0-Add-support-for-the-platform_ops-hypercall.patch, 1.1.2.2, NONE linux-2.6-xen-0012-xen-acpi-Enable-early-access-to-ACPI-tables.patch, 1.1.2.2, NONE linux-2.6-xen-0013-xen-dom0-Add-paravirt_ops-ioremap_page_range-for.patch, 1.1.2.2, NONE linux-2.6-xen-0014-MTRR-use-cpu_callout_map-instead-of-cpu_online_map.patch, 1.1.2.2, NONE linux-2.6-xen-0015-xen-mtrr-Add-mtrr_ops-support-for-Xen-mtrr.patch, 1.1.2.2, NONE linux-2.6-xen-0016-xen-mtrr-Don-t-enable-xen-mtrr-on-bare-metal.patch, 1.1.2.2, NONE linux-2.6-xen-0017-xen-mtrr-set-cpu-in-cpu_callout_map.patch, 1.1.2.2, NONE linux-2.6-xen-0018-xen-mtrr-Clean-up-the-num_var_ranges-CPU_UNKOWN-hac.patch, 1.1.2.2, NONE linux-2.6-xen-0019-xen-mtrr-Use-specific-cpu_has_foo-macros-instead-of.patch, 1.1.2.2, NONE linux-2.6-xen-0020-xen-mtrr-Kill-some-unneccessary-includes.patch, 1.1.2.2, NONE linux-2.6-xen-0021-xen-mtrr-No-need-to-explicitly-set-use_intel_if-0.patch, 1.1.2.2, NONE linux-2.6-xen-0022-xen-mtrr-Use-generic_validate_add_page.patch, 1.1.2.2, NONE linux-2.6-xen-0023-xen-mtrr-Implement-xen_get_free_region.patch, 1.1.2.2, NONE linux-2.6-xen-0024-xen-mtrr-Add-xen_-get-set-_mtrr-implementations.patch, 1.1.2.2, NONE linux-2.6-xen-0025-irq2.diff-from-Juan-Quintela.patch, 1.1.2.2, NONE linux-2.6-xen-0026-xen-dom0-Obvious-cpuid-fix-to-domU-handling.patch, 1.1.2.2, NONE linux-2.6-xen-0027-xen-debug-Diagnose-bind_virq_to_irq-errors.patch, 1.1.2.2, NONE linux-2.6-xen-0028-xen-traps-Revert-Juan-s-traps_32.c-changes-to-debug.patch, 1.1.2.2, NONE linux-2.6-xen-0029-xen-debug-Move-init_apic_mappings-after-trap-init.patch, 1.1.2.2, NONE linux-2.6-xen-0030-xen-debug-Trace-progress-in-trap_init-around-init.patch, 1.1.2.2, NONE linux-2.6-xen-0031-xen-apic-Disable-init_apic_mappings-when-under-CO.patch, 1.1.2.2, NONE linux-2.6-xen-0032-xen-debug-Log-entry-into-virtual-console-s-xen_init.patch, 1.1.2.2, NONE linux-2.6-xen-0033-xen-debug-Log-bind_virq_to_irq-events.patch, 1.1.2.2, NONE linux-2.6-xen-0034-xen-debug-Work-around-USB-issue-triggered-by-Xen-de.patch, 1.1.2.2, NONE linux-2.6-xen-0035-Remove-duplicated-dma_alloc-free_noncoherent-define.patch, 1.1.2.2, NONE linux-2.6-xen-0036-xem-dom0-Add-hypervisor-memory_exchange-descriptor.patch, 1.1.2.2, NONE linux-2.6-xen-0037-xen-dom0-add-virt_to_pfn-macro.patch, 1.1.2.2, NONE linux-2.6-xen-0038-xen-dom0-use-virt_to_pfn-where-appropriate.patch, 1.1.2.2, NONE linux-2.6-xen-0039-xen-dom0-Add-contiguous-region-support.patch, 1.1.2.2, NONE linux-2.6-xen-0040-xen-dom0-Don-t-mask-off-PCD-bits-from-pte-entries.patch, 1.1.2.2, NONE linux-2.6-xen-0041-xen-dom0-Remove-duplicate-xen_store_interface-assig.patch, 1.1.2.2, NONE linux-2.6-xen-0042-xen-dom0-Slightly-re-arrange-xenbus_probe_init-er.patch, 1.1.2.2, NONE linux-2.6-xen-0043-xen-dom0-Use-max_low_pfn-declaration-from-linux-boo.patch, 1.1.2.2, NONE linux-2.6-xen-0044-xen-dma-Add-dma_mapping_ops-indirection-for-32-bit.patch, 1.1.2.2, NONE linux-2.6-xen-0045-xen-dma-Remove-unused-32-bit-dma_ops-map_simple-me.patch, 1.1.2.2, NONE linux-2.6-xen-0046-xen-dma-Initial-commit-of-pci-xen.c-dma-mapping-fun.patch, 1.1.2.2, NONE linux-2.6-xen-0047-xen-dma-Add-calls-to-dma_ops-alloc-free_coherent-ho.patch, 1.1.2.2, NONE linux-2.6-xen-0048-xen-dma-Add-xen_alloc-free_coherent.patch, 1.1.2.2, NONE linux-2.6-xen-0049-xen-dma-Don-t-merge-bios-on-xen-pvops.patch, 1.1.2.2, NONE linux-2.6-xen-0050-xen-dom0-Minor-coding-style-issue-in-ISA-mapping-co.patch, 1.1.2.2, NONE linux-2.6-xen-0051-xen-dom0-Use-i-PAGE_SHIFT-instead-of-PAGE_DOWN-i.patch, 1.1.2.2, NONE linux-2.6-xen-0052-xen-dom0-Match-up-set_pte_mfn-prototype-with-the.patch, 1.1.2.2, NONE linux-2.6-xen-0053-xen-dom0-Reserve-ISA-address-space-earlier.patch, 1.1.2.2, NONE linux-2.6-xen-0054-xen-Add-empty-xenctrl-module.patch, 1.1.2.2, NONE linux-2.6-xen-0055-xen-dom0-Add-proc-xen-capabilities.patch, 1.1.2.2, NONE linux-2.6-xen-0056-xen-Add-proc-xen-privcmd.patch, 1.1.2.2, NONE linux-2.6-xen-0057-xen-dom0-Add-proc-xen-xsd_-port-kva.patch, 1.1.2.2, NONE linux-2.6-xen-0058-xen-Add-proc-xen-xenbus.patch, 1.1.2.2, NONE linux-2.6-xen-0059-xen-Add-dev-xen-evtchn.patch, 1.1.2.2, NONE linux-2.6-xen-0060-xen-Add-__init-__exit-notations-to-xenctrl-function.patch, 1.1.2.2, NONE linux-2.6-xen-0061-xen-Add-Xen-s-sys-hypervisor-interface.patch, 1.1.2.2, NONE linux-2.6-xen-0062-xen-dom0-Add-basic-proc-xen-balloon.patch, 1.1.2.2, NONE linux-2.6-xen-0063-xen-dom0-Re-work-privcmd_ioctl-a-little.patch, 1.1.2.2, NONE linux-2.6-xen-0064-xen-dom0-Add-IOCTL_PRIVCMD_MMAP.patch, 1.1.2.2, NONE linux-2.6-xen-0065-xen-dom0-Add-a-vmlinuz-target.patch, 1.1.2.2, NONE linux-2.6-xen-0066-xen-dom0-Don-t-use-fixmaps-for-ACPI-mappings-in-ISA.patch, 1.1.2.1, NONE linux-2.6-xen-0067-x86-Do-not-scan-for-DMI-if-the-DMI-region-is-marked.patch, 1.1.2.1, NONE linux-2.6-xen-0068-xen-dom0-Fix-DMI-scanning.patch, 1.1.2.1, NONE linux-2.6-xen-0069-ata-scsi-Use-dma_alloc_coherent-for-ATAPI-drain-b.patch, 1.1.2.1, NONE linux-2.6-xen-0070-xen-Make-hvc0-the-preferred-console-in-domU.patch, 1.1.2.1, NONE

Mark McLoughlin (markmc) fedora-extras-commits at redhat.com
Wed Mar 5 14:02:04 UTC 2008


Author: markmc

Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29803

Modified Files:
      Tag: private-markmc-pv-ops-branch
	Makefile Makefile.config config-xen-generic config-xen-x86_64 
	kernel.spec 
Added Files:
      Tag: private-markmc-pv-ops-branch
	linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch 
	linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch 
	linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch 
	linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch 
	linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch 
	linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch 
	linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch 
	linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch 
	linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch 
	linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch 
	linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch 
Removed Files:
      Tag: private-markmc-pv-ops-branch
	linux-2.6-xen-0002-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch 
	linux-2.6-xen-0003-fbdev-Make-deferred-I-O-work-as-advertized.patch 
	linux-2.6-xen-0004-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch 
	linux-2.6-xen-0005-xen-Module-autoprobing-support-for-frontend-drivers.patch 
	linux-2.6-xen-0006-xen-Add-compatibility-aliases-for-frontend-drivers.patch 
	linux-2.6-xen-0007-xen-dom0-Make-hvc_xen-console-work-for-dom0.patch 
	linux-2.6-xen-0008-xen-dom0-Initialize-xenbus-for-dom0.patch 
	linux-2.6-xen-0009-xen-dom0-Set-up-basic-IO-permissions-for-dom0.patch 
	linux-2.6-xen-0010-xen-dom0-Add-set_fixmap-pv_mmu_ops.patch 
	linux-2.6-xen-0011-xen-dom0-Add-support-for-the-platform_ops-hypercall.patch 
	linux-2.6-xen-0012-xen-acpi-Enable-early-access-to-ACPI-tables.patch 
	linux-2.6-xen-0013-xen-dom0-Add-paravirt_ops-ioremap_page_range-for.patch 
	linux-2.6-xen-0014-MTRR-use-cpu_callout_map-instead-of-cpu_online_map.patch 
	linux-2.6-xen-0015-xen-mtrr-Add-mtrr_ops-support-for-Xen-mtrr.patch 
	linux-2.6-xen-0016-xen-mtrr-Don-t-enable-xen-mtrr-on-bare-metal.patch 
	linux-2.6-xen-0017-xen-mtrr-set-cpu-in-cpu_callout_map.patch 
	linux-2.6-xen-0018-xen-mtrr-Clean-up-the-num_var_ranges-CPU_UNKOWN-hac.patch 
	linux-2.6-xen-0019-xen-mtrr-Use-specific-cpu_has_foo-macros-instead-of.patch 
	linux-2.6-xen-0020-xen-mtrr-Kill-some-unneccessary-includes.patch 
	linux-2.6-xen-0021-xen-mtrr-No-need-to-explicitly-set-use_intel_if-0.patch 
	linux-2.6-xen-0022-xen-mtrr-Use-generic_validate_add_page.patch 
	linux-2.6-xen-0023-xen-mtrr-Implement-xen_get_free_region.patch 
	linux-2.6-xen-0024-xen-mtrr-Add-xen_-get-set-_mtrr-implementations.patch 
	linux-2.6-xen-0025-irq2.diff-from-Juan-Quintela.patch 
	linux-2.6-xen-0026-xen-dom0-Obvious-cpuid-fix-to-domU-handling.patch 
	linux-2.6-xen-0027-xen-debug-Diagnose-bind_virq_to_irq-errors.patch 
	linux-2.6-xen-0028-xen-traps-Revert-Juan-s-traps_32.c-changes-to-debug.patch 
	linux-2.6-xen-0029-xen-debug-Move-init_apic_mappings-after-trap-init.patch 
	linux-2.6-xen-0030-xen-debug-Trace-progress-in-trap_init-around-init.patch 
	linux-2.6-xen-0031-xen-apic-Disable-init_apic_mappings-when-under-CO.patch 
	linux-2.6-xen-0032-xen-debug-Log-entry-into-virtual-console-s-xen_init.patch 
	linux-2.6-xen-0033-xen-debug-Log-bind_virq_to_irq-events.patch 
	linux-2.6-xen-0034-xen-debug-Work-around-USB-issue-triggered-by-Xen-de.patch 
	linux-2.6-xen-0035-Remove-duplicated-dma_alloc-free_noncoherent-define.patch 
	linux-2.6-xen-0036-xem-dom0-Add-hypervisor-memory_exchange-descriptor.patch 
	linux-2.6-xen-0037-xen-dom0-add-virt_to_pfn-macro.patch 
	linux-2.6-xen-0038-xen-dom0-use-virt_to_pfn-where-appropriate.patch 
	linux-2.6-xen-0039-xen-dom0-Add-contiguous-region-support.patch 
	linux-2.6-xen-0040-xen-dom0-Don-t-mask-off-PCD-bits-from-pte-entries.patch 
	linux-2.6-xen-0041-xen-dom0-Remove-duplicate-xen_store_interface-assig.patch 
	linux-2.6-xen-0042-xen-dom0-Slightly-re-arrange-xenbus_probe_init-er.patch 
	linux-2.6-xen-0043-xen-dom0-Use-max_low_pfn-declaration-from-linux-boo.patch 
	linux-2.6-xen-0044-xen-dma-Add-dma_mapping_ops-indirection-for-32-bit.patch 
	linux-2.6-xen-0045-xen-dma-Remove-unused-32-bit-dma_ops-map_simple-me.patch 
	linux-2.6-xen-0046-xen-dma-Initial-commit-of-pci-xen.c-dma-mapping-fun.patch 
	linux-2.6-xen-0047-xen-dma-Add-calls-to-dma_ops-alloc-free_coherent-ho.patch 
	linux-2.6-xen-0048-xen-dma-Add-xen_alloc-free_coherent.patch 
	linux-2.6-xen-0049-xen-dma-Don-t-merge-bios-on-xen-pvops.patch 
	linux-2.6-xen-0050-xen-dom0-Minor-coding-style-issue-in-ISA-mapping-co.patch 
	linux-2.6-xen-0051-xen-dom0-Use-i-PAGE_SHIFT-instead-of-PAGE_DOWN-i.patch 
	linux-2.6-xen-0052-xen-dom0-Match-up-set_pte_mfn-prototype-with-the.patch 
	linux-2.6-xen-0053-xen-dom0-Reserve-ISA-address-space-earlier.patch 
	linux-2.6-xen-0054-xen-Add-empty-xenctrl-module.patch 
	linux-2.6-xen-0055-xen-dom0-Add-proc-xen-capabilities.patch 
	linux-2.6-xen-0056-xen-Add-proc-xen-privcmd.patch 
	linux-2.6-xen-0057-xen-dom0-Add-proc-xen-xsd_-port-kva.patch 
	linux-2.6-xen-0058-xen-Add-proc-xen-xenbus.patch 
	linux-2.6-xen-0059-xen-Add-dev-xen-evtchn.patch 
	linux-2.6-xen-0060-xen-Add-__init-__exit-notations-to-xenctrl-function.patch 
	linux-2.6-xen-0061-xen-Add-Xen-s-sys-hypervisor-interface.patch 
	linux-2.6-xen-0062-xen-dom0-Add-basic-proc-xen-balloon.patch 
	linux-2.6-xen-0063-xen-dom0-Re-work-privcmd_ioctl-a-little.patch 
	linux-2.6-xen-0064-xen-dom0-Add-IOCTL_PRIVCMD_MMAP.patch 
	linux-2.6-xen-0065-xen-dom0-Add-a-vmlinuz-target.patch 
	linux-2.6-xen-0066-xen-dom0-Don-t-use-fixmaps-for-ACPI-mappings-in-ISA.patch 
	linux-2.6-xen-0067-x86-Do-not-scan-for-DMI-if-the-DMI-region-is-marked.patch 
	linux-2.6-xen-0068-xen-dom0-Fix-DMI-scanning.patch 
	linux-2.6-xen-0069-ata-scsi-Use-dma_alloc_coherent-for-ATAPI-drain-b.patch 
	linux-2.6-xen-0070-xen-Make-hvc0-the-preferred-console-in-domU.patch 
Log Message:
* Wed Mar 05 2008 Mark McLoughlin <markmc at redhat.com>
- Re-base to kernel-2_6_25-0_78_rc3_git1_fc9
- Revert the execshield patch for now
- Include xen pv fb and kbd drivers
- Add support for auto-probing frontend drivers
- Add module aliases for xennet and xenblk
- Add first round of x86_64 xen pv_ops patches


linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch:

--- NEW FILE linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch ---
>From c1181dd0e4f28b0423877b66527c3d950b23855e Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc at hellion.org.uk>
Date: Thu, 28 Feb 2008 23:16:49 +0000
Subject: [PATCH] x86/xen: Construct e820 map with a hole between 640K-1M.

Prevents pagetables from being allocated in the 640K-1M
and dmi_scan_machine() trying to remap them as read-write.

Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 arch/x86/xen/setup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 3bad477..2341492 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -38,7 +38,8 @@ char * __init xen_memory_setup(void)
 	unsigned long max_pfn = xen_start_info->nr_pages;
 
 	e820.nr_map = 0;
-	add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
+	add_memory_region(0, LOWMEMSIZE(), E820_RAM);
+	add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM);
 
 	return "Xen";
 }
-- 
1.5.4.1


linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch:

--- NEW FILE linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch ---
>From 633826fa85ea9487f1b1298c06255836e98be944 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Wed, 5 Mar 2008 12:50:50 +0000
Subject: [PATCH] squashfs: Fix build without CONFIG_SMP

wait_event() needs various definitions from <linux/sched.h>

With CONFIG_SMP, <linux/smp_lock.h> pulls in <linux/sched.h>,
but without CONFIG_SMP it fails to build.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 fs/squashfs/inode.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
index f578528..f5829f2 100644
--- a/fs/squashfs/inode.c
+++ b/fs/squashfs/inode.c
@@ -32,6 +32,7 @@
 #include <linux/vmalloc.h>
 #include <linux/smp_lock.h>
 #include <linux/exportfs.h>
+#include <linux/sched.h>
 
 #include "squashfs.h"
 
-- 
1.5.4.1


linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch:

--- NEW FILE linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch ---
>From e66d97b053a6fb83b28f7c61e1ecd3b990c4da2c Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru at redhat.com>
Date: Fri, 29 Feb 2008 17:37:43 +0000
Subject: [PATCH] xen: Make hvc0 the preferred console in domU

This makes the Xen console just work.  Before, you had to ask for it
on the kernel command line with console=hvc0

Signed-off-by: Markus Armbruster <armbru at redhat.com>
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 arch/x86/xen/enlighten.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 49e5358..df63185 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -25,6 +25,7 @@
 #include <linux/mm.h>
 #include <linux/page-flags.h>
 #include <linux/highmem.h>
+#include <linux/console.h>
 
 #include <xen/interface/xen.h>
 #include <xen/interface/physdev.h>
@@ -1209,6 +1210,9 @@ asmlinkage void __init xen_start_kernel(void)
 		? __pa(xen_start_info->mod_start) : 0;
 	boot_params.hdr.ramdisk_size = xen_start_info->mod_len;
 
+	if (!is_initial_xendomain())
+		add_preferred_console("hvc", 0, NULL);
+
 	/* Start the world */
 	start_kernel();
 }
-- 
1.5.4.1


linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch:

--- NEW FILE linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch ---
>From 4245d02ba99d20815fff65a28aadf77d96e3f07a Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru at redhat.com>
Date: Mon, 25 Feb 2008 14:02:24 +0100
Subject: [PATCH] xen: Make xen-blkfront write its protocol ABI to xenstore

Frontends are expected to write their protocol ABI to xenstore.  Since
the protocol ABI defaults to the backend's native ABI, things work
fine without that as long as the frontend's native ABI is identical to
the backend's native ABI.  This is not the case for xen-blkfront
running 32-on-64, because its ABI differs between 32 and 64 bit, and
thus needs this fix.

Based on http://xenbits.xensource.com/xen-unstable.hg?rev/c545932a18f3
and http://xenbits.xensource.com/xen-unstable.hg?rev/ffe52263b430 by
Gerd Hoffmann <kraxel at suse.de>

Signed-off-by: Markus Armbruster <armbru at redhat.com>
---
 drivers/block/xen-blkfront.c         |    7 +++++++
 include/xen/interface/io/protocols.h |   21 +++++++++++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 include/xen/interface/io/protocols.h

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9c6f3f9..2e7c81e 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -47,6 +47,7 @@
 
 #include <xen/interface/grant_table.h>
 #include <xen/interface/io/blkif.h>
+#include <xen/interface/io/protocols.h>
 
 #include <asm/xen/hypervisor.h>
 
@@ -614,6 +615,12 @@ again:
 		message = "writing event-channel";
 		goto abort_transaction;
 	}
+	err = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
+			    XEN_IO_PROTO_ABI_NATIVE);
+	if (err) {
+		message = "writing protocol";
+		goto abort_transaction;
+	}
 
 	err = xenbus_transaction_end(xbt, 0);
 	if (err) {
diff --git a/include/xen/interface/io/protocols.h b/include/xen/interface/io/protocols.h
new file mode 100644
index 0000000..01fc8ae
--- /dev/null
+++ b/include/xen/interface/io/protocols.h
@@ -0,0 +1,21 @@
+#ifndef __XEN_PROTOCOLS_H__
+#define __XEN_PROTOCOLS_H__
+
+#define XEN_IO_PROTO_ABI_X86_32     "x86_32-abi"
+#define XEN_IO_PROTO_ABI_X86_64     "x86_64-abi"
+#define XEN_IO_PROTO_ABI_IA64       "ia64-abi"
+#define XEN_IO_PROTO_ABI_POWERPC64  "powerpc64-abi"
+
+#if defined(__i386__)
+# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_32
+#elif defined(__x86_64__)
+# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_64
+#elif defined(__ia64__)
+# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_IA64
+#elif defined(__powerpc64__)
+# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_POWERPC64
+#else
+# error arch fixup needed here
+#endif
+
+#endif
-- 
1.5.4.1


linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch:

--- NEW FILE linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch ---
>From 7f5fb8b38e6c620b1906f5a4ae755e531112bf7a Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru at redhat.com>
Date: Mon, 25 Feb 2008 14:03:52 +0100
Subject: [PATCH] fbdev: Make deferred I/O work as advertized

Deferred I/O was utterly broken.  Reading the mmap()ed framebuffer
worked, but writing it made the VM endlessly invoke
vm_ops.page_mkwrite().  That happened because we failed to set
page->mapping and page->index.

The fix is to set them, and clean up properly before the framebuffer
gets released.

Fix extracted from this linux-fbdev-devel message:

    Subject: [PATCH 1/1 2.6.24] fbdev: defio and Metronomefb
    From: Jaya Kumar <jayakumar.lkml at gmail.com>
    Date: 2008-02-18 13:41:26

Signed-off-by: Jaya Kumar <jayakumar.lkml at gmail.com>
Signed-off-by: Markus Armbruster <armbru at redhat.com>
---
 drivers/video/fb_defio.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 0f8cfb9..24843fd 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -4,7 +4,7 @@
  *  Copyright (C) 2006 Jaya Kumar
  *
  * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
+ * License. See the file COPYING in the main directory of this archive
  * for more details.
  */
 
@@ -31,7 +31,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
 	unsigned long offset;
 	struct page *page;
 	struct fb_info *info = vma->vm_private_data;
-	/* info->screen_base is in System RAM */
+	/* info->screen_base is virtual memory */
 	void *screen_base = (void __force *) info->screen_base;
 
 	offset = vmf->pgoff << PAGE_SHIFT;
@@ -43,6 +43,15 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
 		return VM_FAULT_SIGBUS;
 
 	get_page(page);
+
+	if (vma->vm_file)
+		page->mapping = vma->vm_file->f_mapping;
+	else
+		printk(KERN_ERR "no mapping available\n");
+
+	BUG_ON(!page->mapping);
+	page->index = vmf->pgoff;
+
 	vmf->page = page;
 	return 0;
 }
@@ -138,11 +147,20 @@ EXPORT_SYMBOL_GPL(fb_deferred_io_init);
 
 void fb_deferred_io_cleanup(struct fb_info *info)
 {
+	void *screen_base = (void __force *) info->screen_base;
 	struct fb_deferred_io *fbdefio = info->fbdefio;
+	struct page *page;
+	int i;
 
 	BUG_ON(!fbdefio);
 	cancel_delayed_work(&info->deferred_work);
 	flush_scheduled_work();
+
+	/* clear out the mapping that we setup */
+	for (i = 0 ; i < info->fix.smem_len; i += PAGE_SIZE) {
+		page = vmalloc_to_page(screen_base + i);
+		page->mapping = NULL;
+	}
 }
 EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
 
-- 
1.5.4.1


linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch:

--- NEW FILE linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch ---
>From 655bf28ff2f6d480a52a01de187c9de01c18fc44 Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru at redhat.com>
Date: Mon, 25 Feb 2008 14:06:46 +0100
Subject: [PATCH] xen pvfb: Para-virtual framebuffer, keyboard and pointer driver

This is a pair of Xen para-virtual frontend device drivers:
drivers/video/xen-fbfront.c provides a framebuffer, and
drivers/input/xen-kbdfront provides keyboard and mouse.

The backends run in dom0 user space.

The two drivers are not in two separate patches, because the
intermediate step (one driver, not the other) is somewhat problematic:
the backend in dom0 needs both drivers, and will refuse to complete
device initialization unless they're both present.

Signed-off-by: Markus Armbruster <armbru at redhat.com>
---
 drivers/input/Kconfig            |    9 +
 drivers/input/Makefile           |    2 +
 drivers/input/xen-kbdfront.c     |  340 +++++++++++++++++++++++
 drivers/video/Kconfig            |   14 +
 drivers/video/Makefile           |    1 +
 drivers/video/xen-fbfront.c      |  550 ++++++++++++++++++++++++++++++++++++++
 include/xen/interface/io/fbif.h  |  124 +++++++++
 include/xen/interface/io/kbdif.h |  114 ++++++++
 8 files changed, 1154 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/xen-kbdfront.c
 create mode 100644 drivers/video/xen-fbfront.c
 create mode 100644 include/xen/interface/io/fbif.h
 create mode 100644 include/xen/interface/io/kbdif.h

diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index d84ac4a..747633c 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -149,6 +149,15 @@ config INPUT_APMPOWER
 	  To compile this driver as a module, choose M here: the
 	  module will be called apm-power.
 
+config XEN_KBDDEV_FRONTEND
+	tristate "Xen virtual keyboard and mouse support"
+	depends on XEN_FBDEV_FRONTEND
+	default y
+	help
+	  This driver implements the front-end of the Xen virtual
+	  keyboard and mouse device driver.  It communicates with a back-end
+	  in another domain.
+
 comment "Input Device Drivers"
 
 source "drivers/input/keyboard/Kconfig"
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 24bdec1..606e1b9 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -24,3 +24,5 @@ obj-$(CONFIG_INPUT_MISC)	+= misc/
 obj-$(CONFIG_INPUT_LIRC)	+= lirc/
 
 obj-$(CONFIG_INPUT_APMPOWER)	+= apm-power.o
+
+obj-$(CONFIG_XEN_KBDDEV_FRONTEND)	+= xen-kbdfront.o
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
new file mode 100644
index 0000000..0f47f46
--- /dev/null
+++ b/drivers/input/xen-kbdfront.c
@@ -0,0 +1,340 @@
+/*
+ * Xen para-virtual input device
+ *
+ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
+ * Copyright (C) 2006-2008 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
+ *
+ *  Based on linux/drivers/input/mouse/sermouse.c
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License. See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+/*
+ * TODO:
+ *
+ * Switch to grant tables together with xen-fbfront.c.
+ */
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/input.h>
+#include <asm/xen/hypervisor.h>
+#include <xen/events.h>
+#include <xen/page.h>
+#include <xen/interface/io/fbif.h>
+#include <xen/interface/io/kbdif.h>
+#include <xen/xenbus.h>
+
+struct xenkbd_info {
+	struct input_dev *kbd;
+	struct input_dev *ptr;
+	struct xenkbd_page *page;
+	int irq;
+	struct xenbus_device *xbdev;
+	char phys[32];
+};
+
+static int xenkbd_remove(struct xenbus_device *);
+static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
+static void xenkbd_disconnect_backend(struct xenkbd_info *);
+
+/*
+ * Note: if you need to send out events, see xenfb_do_update() for how
+ * to do that.
+ */
+
+static irqreturn_t input_handler(int rq, void *dev_id)
+{
+	struct xenkbd_info *info = dev_id;
+	struct xenkbd_page *page = info->page;
+	__u32 cons, prod;
+
+	prod = page->in_prod;
+	if (prod == page->in_cons)
+		return IRQ_HANDLED;
+	rmb();			/* ensure we see ring contents up to prod */
+	for (cons = page->in_cons; cons != prod; cons++) {
+		union xenkbd_in_event *event;
+		struct input_dev *dev;
+		event = &XENKBD_IN_RING_REF(page, cons);
+
+		dev = info->ptr;
+		switch (event->type) {
+		case XENKBD_TYPE_MOTION:
+			input_report_rel(dev, REL_X, event->motion.rel_x);
+			input_report_rel(dev, REL_Y, event->motion.rel_y);
+			break;
+		case XENKBD_TYPE_KEY:
+			dev = NULL;
+			if (test_bit(event->key.keycode, info->kbd->keybit))
+				dev = info->kbd;
+			if (test_bit(event->key.keycode, info->ptr->keybit))
+				dev = info->ptr;
+			if (dev)
+				input_report_key(dev, event->key.keycode,
+						 event->key.pressed);
+			else
+				printk(KERN_WARNING
+				       "xenkbd: unhandled keycode 0x%x\n",
+				       event->key.keycode);
+			break;
+		case XENKBD_TYPE_POS:
+			input_report_abs(dev, ABS_X, event->pos.abs_x);
+			input_report_abs(dev, ABS_Y, event->pos.abs_y);
+			break;
+		}
+		if (dev)
+			input_sync(dev);
+	}
+	mb();			/* ensure we got ring contents */
+	page->in_cons = cons;
+	notify_remote_via_irq(info->irq);
+
+	return IRQ_HANDLED;
+}
+
+static int __devinit xenkbd_probe(struct xenbus_device *dev,
+				  const struct xenbus_device_id *id)
+{
+	int ret, i;
+	struct xenkbd_info *info;
+	struct input_dev *kbd, *ptr;
+
+	info = kzalloc(sizeof(*info), GFP_KERNEL);
+	if (!info) {
+		xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
+		return -ENOMEM;
+	}
+	dev->dev.driver_data = info;
+	info->xbdev = dev;
+	info->irq = -1;
+	snprintf(info->phys, sizeof(info->phys), "xenbus/%s", dev->nodename);
+
+	info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
+	if (!info->page)
+		goto error_nomem;
+
+	/* keyboard */
+	kbd = input_allocate_device();
+	if (!kbd)
+		goto error_nomem;
+	kbd->name = "Xen Virtual Keyboard";
+	kbd->phys = info->phys;
+	kbd->id.bustype = BUS_PCI;
+	kbd->id.vendor = 0x5853;
+	kbd->id.product = 0xffff;
+	kbd->evbit[0] = BIT(EV_KEY);
+	for (i = KEY_ESC; i < KEY_UNKNOWN; i++)
+		set_bit(i, kbd->keybit);
+	for (i = KEY_OK; i < KEY_MAX; i++)
+		set_bit(i, kbd->keybit);
+
+	ret = input_register_device(kbd);
+	if (ret) {
+		input_free_device(kbd);
+		xenbus_dev_fatal(dev, ret, "input_register_device(kbd)");
+		goto error;
+	}
+	info->kbd = kbd;
+
+	/* pointing device */
+	ptr = input_allocate_device();
+	if (!ptr)
+		goto error_nomem;
+	ptr->name = "Xen Virtual Pointer";
+	ptr->phys = info->phys;
+	ptr->id.bustype = BUS_PCI;
+	ptr->id.vendor = 0x5853;
+	ptr->id.product = 0xfffe;
+	ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
+	for (i = BTN_LEFT; i <= BTN_TASK; i++)
+		set_bit(i, ptr->keybit);
+	ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y);
+	input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
+	input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
+
+	ret = input_register_device(ptr);
+	if (ret) {
+		input_free_device(ptr);
+		xenbus_dev_fatal(dev, ret, "input_register_device(ptr)");
+		goto error;
+	}
+	info->ptr = ptr;
+
+	ret = xenkbd_connect_backend(dev, info);
+	if (ret < 0)
+		goto error;
+
+	return 0;
+
+ error_nomem:
+	ret = -ENOMEM;
+	xenbus_dev_fatal(dev, ret, "allocating device memory");
+ error:
+	xenkbd_remove(dev);
+	return ret;
+}
+
+static int xenkbd_resume(struct xenbus_device *dev)
+{
+	struct xenkbd_info *info = dev->dev.driver_data;
+
+	xenkbd_disconnect_backend(info);
+	memset(info->page, 0, PAGE_SIZE);
+	return xenkbd_connect_backend(dev, info);
+}
+
+static int xenkbd_remove(struct xenbus_device *dev)
+{
+	struct xenkbd_info *info = dev->dev.driver_data;
+
+	xenkbd_disconnect_backend(info);
+	if (info->kbd)
+		input_unregister_device(info->kbd);
+	if (info->ptr)
+		input_unregister_device(info->ptr);
+	free_page((unsigned long)info->page);
+	kfree(info);
+	return 0;
+}
+
+static int xenkbd_connect_backend(struct xenbus_device *dev,
+				  struct xenkbd_info *info)
+{
+	int ret, evtchn;
+	struct xenbus_transaction xbt;
+
+	ret = xenbus_alloc_evtchn(dev, &evtchn);
+	if (ret)
+		return ret;
+	ret = bind_evtchn_to_irqhandler(evtchn, input_handler,
+					0, dev->devicetype, info);
+	if (ret < 0) {
+		xenbus_free_evtchn(dev, evtchn);
+		xenbus_dev_fatal(dev, ret, "bind_evtchn_to_irqhandler");
+		return ret;
+	}
+	info->irq = ret;
+
+ again:
+	ret = xenbus_transaction_start(&xbt);
+	if (ret) {
+		xenbus_dev_fatal(dev, ret, "starting transaction");
+		return ret;
+	}
+	ret = xenbus_printf(xbt, dev->nodename, "page-ref", "%lu",
+			    virt_to_mfn(info->page));
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_printf(xbt, dev->nodename, "event-channel", "%u",
+			    evtchn);
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_transaction_end(xbt, 0);
+	if (ret) {
+		if (ret == -EAGAIN)
+			goto again;
+		xenbus_dev_fatal(dev, ret, "completing transaction");
+		return ret;
+	}
+
+	xenbus_switch_state(dev, XenbusStateInitialised);
+	return 0;
+
+ error_xenbus:
+	xenbus_transaction_end(xbt, 1);
+	xenbus_dev_fatal(dev, ret, "writing xenstore");
+	return ret;
+}
+
+static void xenkbd_disconnect_backend(struct xenkbd_info *info)
+{
+	if (info->irq >= 0)
+		unbind_from_irqhandler(info->irq, info);
+	info->irq = -1;
+}
+
+static void xenkbd_backend_changed(struct xenbus_device *dev,
+				   enum xenbus_state backend_state)
+{
+	struct xenkbd_info *info = dev->dev.driver_data;
+	int ret, val;
+
+	switch (backend_state) {
+	case XenbusStateInitialising:
+	case XenbusStateInitialised:
+	case XenbusStateUnknown:
+	case XenbusStateClosed:
+		break;
+
+	case XenbusStateInitWait:
+InitWait:
+		ret = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				   "feature-abs-pointer", "%d", &val);
+		if (ret < 0)
+			val = 0;
+		if (val) {
+			ret = xenbus_printf(XBT_NIL, info->xbdev->nodename,
+					    "request-abs-pointer", "1");
+			if (ret)
+				printk(KERN_WARNING
+				       "xenkbd: can't request abs-pointer");
+		}
+		xenbus_switch_state(dev, XenbusStateConnected);
+		break;
+
+	case XenbusStateConnected:
+		/*
+		 * Work around xenbus race condition: If backend goes
+		 * through InitWait to Connected fast enough, we can
+		 * get Connected twice here.
+		 */
+		if (dev->state != XenbusStateConnected)
+			goto InitWait; /* no InitWait seen yet, fudge it */
+		break;
+
+	case XenbusStateClosing:
+		xenbus_frontend_closed(dev);
+		break;
+	}
+}
+
+static struct xenbus_device_id xenkbd_ids[] = {
+	{ "vkbd" },
+	{ "" }
+};
+
+static struct xenbus_driver xenkbd = {
+	.name = "vkbd",
+	.owner = THIS_MODULE,
+	.ids = xenkbd_ids,
+	.probe = xenkbd_probe,
+	.remove = xenkbd_remove,
+	.resume = xenkbd_resume,
+	.otherend_changed = xenkbd_backend_changed,
+};
+
+static int __init xenkbd_init(void)
+{
+	if (!is_running_on_xen())
+		return -ENODEV;
+
+	/* Nothing to do if running in dom0. */
+	if (is_initial_xendomain())
+		return -ENODEV;
+
+	return xenbus_register_frontend(&xenkbd);
+}
+
+static void __exit xenkbd_cleanup(void)
+{
+	xenbus_unregister_driver(&xenkbd);
+}
+
+module_init(xenkbd_init);
+module_exit(xenkbd_cleanup);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 758435f..67de177 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1903,6 +1903,20 @@ config FB_VIRTUAL
 
 	  If unsure, say N.
 
+config XEN_FBDEV_FRONTEND
+	tristate "Xen virtual frame buffer support"
+	depends on FB && XEN
+	select FB_SYS_FILLRECT
+	select FB_SYS_COPYAREA
+	select FB_SYS_IMAGEBLIT
+	select FB_SYS_FOPS
+	select FB_DEFERRED_IO
+	default y
+	help
+	  This driver implements the front-end of the Xen virtual
+	  frame buffer driver.  It communicates with a back-end
+	  in another domain.
+
 source "drivers/video/omap/Kconfig"
 
 source "drivers/video/backlight/Kconfig"
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 83e02b3..d3ab9b2 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -113,6 +113,7 @@ obj-$(CONFIG_FB_PS3)		  += ps3fb.o
 obj-$(CONFIG_FB_SM501)            += sm501fb.o
 obj-$(CONFIG_FB_XILINX)           += xilinxfb.o
 obj-$(CONFIG_FB_OMAP)             += omap/
+obj-$(CONFIG_XEN_FBDEV_FRONTEND)  += xen-fbfront.o
 
 # Platform or fallback drivers go here
 obj-$(CONFIG_FB_UVESA)            += uvesafb.o
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
new file mode 100644
index 0000000..619a6f8
--- /dev/null
+++ b/drivers/video/xen-fbfront.c
@@ -0,0 +1,550 @@
+/*
+ * Xen para-virtual frame buffer device
+ *
+ * Copyright (C) 2005-2006 Anthony Liguori <aliguori at us.ibm.com>
+ * Copyright (C) 2006-2008 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
+ *
+ *  Based on linux/drivers/video/q40fb.c
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License. See the file COPYING in the main directory of this archive for
+ *  more details.
+ */
+
+/*
+ * TODO:
+ *
+ * Switch to grant tables when they become capable of dealing with the
+ * frame buffer.
+ */
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/fb.h>
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/mm.h>
+#include <asm/xen/hypervisor.h>
+#include <xen/events.h>
+#include <xen/page.h>
+#include <xen/interface/io/fbif.h>
+#include <xen/interface/io/protocols.h>
+#include <xen/xenbus.h>
+
+struct xenfb_info {
+	unsigned char		*fb;
+	struct fb_info		*fb_info;
+	int			x1, y1, x2, y2;	/* dirty rectangle,
+						   protected by dirty_lock */
+	spinlock_t		dirty_lock;
+	int			nr_pages;
+	int			irq;
+	struct xenfb_page	*page;
+	unsigned long 		*mfns;
+	int			update_wanted; /* XENFB_TYPE_UPDATE wanted */
+
+	struct xenbus_device	*xbdev;
+};
+
+static u32 xenfb_mem_len = XENFB_WIDTH * XENFB_HEIGHT * XENFB_DEPTH / 8;
+
+static int xenfb_remove(struct xenbus_device *);
+static void xenfb_init_shared_page(struct xenfb_info *);
+static int xenfb_connect_backend(struct xenbus_device *, struct xenfb_info *);
+static void xenfb_disconnect_backend(struct xenfb_info *);
+
+static void xenfb_do_update(struct xenfb_info *info,
+			    int x, int y, int w, int h)
+{
+	union xenfb_out_event event;
+	u32 prod;
+
+	event.type = XENFB_TYPE_UPDATE;
+	event.update.x = x;
+	event.update.y = y;
+	event.update.width = w;
+	event.update.height = h;
+
+	prod = info->page->out_prod;
+	/* caller ensures !xenfb_queue_full() */
+	mb();			/* ensure ring space available */
+	XENFB_OUT_RING_REF(info->page, prod) = event;
+	wmb();			/* ensure ring contents visible */
+	info->page->out_prod = prod + 1;
+
+	notify_remote_via_irq(info->irq);
+}
+
+static int xenfb_queue_full(struct xenfb_info *info)
+{
+	u32 cons, prod;
+
+	prod = info->page->out_prod;
+	cons = info->page->out_cons;
+	return prod - cons == XENFB_OUT_RING_LEN;
+}
+
+static void xenfb_refresh(struct xenfb_info *info,
+			  int x1, int y1, int w, int h)
+{
+	unsigned long flags;
+	int y2 = y1 + h - 1;
+	int x2 = x1 + w - 1;
+
+	if (!info->update_wanted)
+		return;
+
+	spin_lock_irqsave(&info->dirty_lock, flags);
+
+	/* Combine with dirty rectangle: */
+	if (info->y1 < y1)
+		y1 = info->y1;
+	if (info->y2 > y2)
+		y2 = info->y2;
+	if (info->x1 < x1)
+		x1 = info->x1;
+	if (info->x2 > x2)
+		x2 = info->x2;
+
+	if (xenfb_queue_full(info)) {
+		/* Can't send right now, stash it in the dirty rectangle */
+		info->x1 = x1;
+		info->x2 = x2;
+		info->y1 = y1;
+		info->y2 = y2;
+		spin_unlock_irqrestore(&info->dirty_lock, flags);
+		return;
+	}
+
+	/* Clear dirty rectangle: */
+	info->x1 = info->y1 = INT_MAX;
+	info->x2 = info->y2 = 0;
+
+	spin_unlock_irqrestore(&info->dirty_lock, flags);
+
+	if (x1 <= x2 && y1 <= y2)
+		xenfb_do_update(info, x1, y1, x2 - x1 + 1, y2 - y1 + 1);
+}
+
+static void xenfb_deferred_io(struct fb_info *fb_info,
+			      struct list_head *pagelist)
+{
+	struct xenfb_info *info = fb_info->par;
+	struct page *page;
+	unsigned long beg, end;
+	int y1, y2, miny, maxy;
+
+	miny = INT_MAX;
+	maxy = 0;
+	list_for_each_entry(page, pagelist, lru) {
+		beg = page->index << PAGE_SHIFT;
+		end = beg + PAGE_SIZE - 1;
+		y1 = beg / fb_info->fix.line_length;
+		y2 = end / fb_info->fix.line_length;
+		if (y2 >= fb_info->var.yres)
+			y2 = fb_info->var.yres - 1;
+		if (miny > y1)
+			miny = y1;
+		if (maxy < y2)
+			maxy = y2;
+	}
+	xenfb_refresh(info, 0, miny, fb_info->var.xres, maxy - miny + 1);
+}
+
+static struct fb_deferred_io xenfb_defio = {
+	.delay		= HZ / 20,
+	.deferred_io	= xenfb_deferred_io,
+};
+
+static int xenfb_setcolreg(unsigned regno, unsigned red, unsigned green,
+			   unsigned blue, unsigned transp,
+			   struct fb_info *info)
+{
+	u32 v;
+
+	if (regno > info->cmap.len)
+		return 1;
+
+#define CNVT_TOHW(val, width) ((((val)<<(width))+0x7FFF-(val))>>16)
+	red = CNVT_TOHW(red, info->var.red.length);
+	green = CNVT_TOHW(green, info->var.green.length);
+	blue = CNVT_TOHW(blue, info->var.blue.length);
+	transp = CNVT_TOHW(transp, info->var.transp.length);
+#undef CNVT_TOHW
+
+	v = (red << info->var.red.offset) |
+	    (green << info->var.green.offset) |
+	    (blue << info->var.blue.offset);
+
+	switch (info->var.bits_per_pixel) {
+	case 16:
+	case 24:
+	case 32:
+		((u32 *)info->pseudo_palette)[regno] = v;
+		break;
+	}
+
+	return 0;
+}
+
+static void xenfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
+{
+	struct xenfb_info *info = p->par;
+
+	sys_fillrect(p, rect);
+	xenfb_refresh(info, rect->dx, rect->dy, rect->width, rect->height);
+}
+
+static void xenfb_imageblit(struct fb_info *p, const struct fb_image *image)
+{
+	struct xenfb_info *info = p->par;
+
+	sys_imageblit(p, image);
+	xenfb_refresh(info, image->dx, image->dy, image->width, image->height);
+}
+
+static void xenfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
+{
+	struct xenfb_info *info = p->par;
+
+	sys_copyarea(p, area);
+	xenfb_refresh(info, area->dx, area->dy, area->width, area->height);
+}
+
+static ssize_t xenfb_write(struct fb_info *p, const char __user *buf,
+			size_t count, loff_t *ppos)
+{
+	struct xenfb_info *info = p->par;
+	ssize_t res;
+
+	res = fb_sys_write(p, buf, count, ppos);
+	xenfb_refresh(info, 0, 0, info->page->width, info->page->height);
+	return res;
+}
+
+static struct fb_ops xenfb_fb_ops = {
+	.owner		= THIS_MODULE,
+	.fb_read	= fb_sys_read,
+	.fb_write	= xenfb_write,
+	.fb_setcolreg	= xenfb_setcolreg,
+	.fb_fillrect	= xenfb_fillrect,
+	.fb_copyarea	= xenfb_copyarea,
+	.fb_imageblit	= xenfb_imageblit,
+};
+
+static irqreturn_t xenfb_event_handler(int rq, void *dev_id)
+{
+	/*
+	 * No in events recognized, simply ignore them all.
+	 * If you need to recognize some, see xen-kbdfront's
+	 * input_handler() for how to do that.
+	 */
+	struct xenfb_info *info = dev_id;
+	struct xenfb_page *page = info->page;
+
+	if (page->in_cons != page->in_prod) {
+		info->page->in_cons = info->page->in_prod;
+		notify_remote_via_irq(info->irq);
+	}
+
+	/* Flush dirty rectangle: */
+	xenfb_refresh(info, INT_MAX, INT_MAX, -INT_MAX, -INT_MAX);
+
+	return IRQ_HANDLED;
+}
+
+static int __devinit xenfb_probe(struct xenbus_device *dev,
+				 const struct xenbus_device_id *id)
+{
+	struct xenfb_info *info;
+	struct fb_info *fb_info;
+	int ret;
+
+	info = kzalloc(sizeof(*info), GFP_KERNEL);
+	if (info == NULL) {
+		xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
+		return -ENOMEM;
+	}
+	dev->dev.driver_data = info;
+	info->xbdev = dev;
+	info->irq = -1;
+	info->x1 = info->y1 = INT_MAX;
+	spin_lock_init(&info->dirty_lock);
+
+	info->fb = vmalloc(xenfb_mem_len);
+	if (info->fb == NULL)
+		goto error_nomem;
+	memset(info->fb, 0, xenfb_mem_len);
+
+	info->nr_pages = (xenfb_mem_len + PAGE_SIZE - 1) >> PAGE_SHIFT;
+
+	info->mfns = vmalloc(sizeof(unsigned long) * info->nr_pages);
+	if (!info->mfns)
+		goto error_nomem;
+
+	/* set up shared page */
+	info->page = (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
+	if (!info->page)
+		goto error_nomem;
+
+	xenfb_init_shared_page(info);
+
+	/* abusing framebuffer_alloc() to allocate pseudo_palette */
+	fb_info = framebuffer_alloc(sizeof(u32) * 256, NULL);
+	if (fb_info == NULL)
+		goto error_nomem;
+
+	/* complete the abuse: */
+	fb_info->pseudo_palette = fb_info->par;
+	fb_info->par = info;
+
+	fb_info->screen_base = info->fb;
+
+	fb_info->fbops = &xenfb_fb_ops;
+	fb_info->var.xres_virtual = fb_info->var.xres = info->page->width;
+	fb_info->var.yres_virtual = fb_info->var.yres = info->page->height;
+	fb_info->var.bits_per_pixel = info->page->depth;
+
+	fb_info->var.red = (struct fb_bitfield){16, 8, 0};
+	fb_info->var.green = (struct fb_bitfield){8, 8, 0};
+	fb_info->var.blue = (struct fb_bitfield){0, 8, 0};
+
+	fb_info->var.activate = FB_ACTIVATE_NOW;
+	fb_info->var.height = -1;
+	fb_info->var.width = -1;
+	fb_info->var.vmode = FB_VMODE_NONINTERLACED;
+
+	fb_info->fix.visual = FB_VISUAL_TRUECOLOR;
+	fb_info->fix.line_length = info->page->line_length;
+	fb_info->fix.smem_start = 0;
+	fb_info->fix.smem_len = xenfb_mem_len;
+	strcpy(fb_info->fix.id, "xen");
+	fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
+	fb_info->fix.accel = FB_ACCEL_NONE;
+
+	fb_info->flags = FBINFO_FLAG_DEFAULT;
+
+	ret = fb_alloc_cmap(&fb_info->cmap, 256, 0);
+	if (ret < 0) {
+		framebuffer_release(fb_info);
+		xenbus_dev_fatal(dev, ret, "fb_alloc_cmap");
+		goto error;
+	}
+
+	fb_info->fbdefio = &xenfb_defio;
+	fb_deferred_io_init(fb_info);
+
+	ret = register_framebuffer(fb_info);
+	if (ret) {
+		fb_deferred_io_cleanup(fb_info);
+		fb_dealloc_cmap(&fb_info->cmap);
+		framebuffer_release(fb_info);
+		xenbus_dev_fatal(dev, ret, "register_framebuffer");
+		goto error;
+	}
+	info->fb_info = fb_info;
+
+	ret = xenfb_connect_backend(dev, info);
+	if (ret < 0)
+		goto error;
+
+	return 0;
+
+ error_nomem:
+	ret = -ENOMEM;
+	xenbus_dev_fatal(dev, ret, "allocating device memory");
+ error:
+	xenfb_remove(dev);
+	return ret;
+}
+
+static int xenfb_resume(struct xenbus_device *dev)
+{
+	struct xenfb_info *info = dev->dev.driver_data;
+
+	xenfb_disconnect_backend(info);
+	xenfb_init_shared_page(info);
+	return xenfb_connect_backend(dev, info);
+}
+
+static int xenfb_remove(struct xenbus_device *dev)
+{
+	struct xenfb_info *info = dev->dev.driver_data;
+
+	xenfb_disconnect_backend(info);
+	if (info->fb_info) {
+		fb_deferred_io_cleanup(info->fb_info);
+		unregister_framebuffer(info->fb_info);
+		fb_dealloc_cmap(&info->fb_info->cmap);
+		framebuffer_release(info->fb_info);
+	}
+	free_page((unsigned long)info->page);
+	vfree(info->mfns);
+	vfree(info->fb);
+	kfree(info);
+
+	return 0;
+}
+
+static unsigned long vmalloc_to_mfn(void *address)
+{
+	return pfn_to_mfn(vmalloc_to_pfn(address));
+}
+
+static void xenfb_init_shared_page(struct xenfb_info *info)
+{
+	int i;
+
+	for (i = 0; i < info->nr_pages; i++)
+		info->mfns[i] = vmalloc_to_mfn(info->fb + i * PAGE_SIZE);
+
+	info->page->pd[0] = vmalloc_to_mfn(info->mfns);
+	info->page->pd[1] = 0;
+	info->page->width = XENFB_WIDTH;
+	info->page->height = XENFB_HEIGHT;
+	info->page->depth = XENFB_DEPTH;
+	info->page->line_length = (info->page->depth / 8) * info->page->width;
+	info->page->mem_length = xenfb_mem_len;
+	info->page->in_cons = info->page->in_prod = 0;
+	info->page->out_cons = info->page->out_prod = 0;
+}
+
+static int xenfb_connect_backend(struct xenbus_device *dev,
+				 struct xenfb_info *info)
+{
+	int ret, evtchn;
+	struct xenbus_transaction xbt;
+
+	ret = xenbus_alloc_evtchn(dev, &evtchn);
+	if (ret)
+		return ret;
+	ret = bind_evtchn_to_irqhandler(evtchn, xenfb_event_handler,
+					0, dev->devicetype, info);
+	if (ret < 0) {
+		xenbus_free_evtchn(dev, evtchn);
+		xenbus_dev_fatal(dev, ret, "bind_evtchn_to_irqhandler");
+		return ret;
+	}
+	info->irq = ret;
+
+ again:
+	ret = xenbus_transaction_start(&xbt);
+	if (ret) {
+		xenbus_dev_fatal(dev, ret, "starting transaction");
+		return ret;
+	}
+	ret = xenbus_printf(xbt, dev->nodename, "page-ref", "%lu",
+			    virt_to_mfn(info->page));
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_printf(xbt, dev->nodename, "event-channel", "%u",
+			    evtchn);
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_printf(xbt, dev->nodename, "protocol", "%s",
+			    XEN_IO_PROTO_ABI_NATIVE);
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_printf(xbt, dev->nodename, "feature-update", "1");
+	if (ret)
+		goto error_xenbus;
+	ret = xenbus_transaction_end(xbt, 0);
+	if (ret) {
+		if (ret == -EAGAIN)
+			goto again;
+		xenbus_dev_fatal(dev, ret, "completing transaction");
+		return ret;
+	}
+
+	xenbus_switch_state(dev, XenbusStateInitialised);
+	return 0;
+
+ error_xenbus:
+	xenbus_transaction_end(xbt, 1);
+	xenbus_dev_fatal(dev, ret, "writing xenstore");
+	return ret;
+}
+
+static void xenfb_disconnect_backend(struct xenfb_info *info)
+{
+	if (info->irq >= 0)
+		unbind_from_irqhandler(info->irq, info);
+	info->irq = -1;
+}
+
+static void xenfb_backend_changed(struct xenbus_device *dev,
+				  enum xenbus_state backend_state)
+{
+	struct xenfb_info *info = dev->dev.driver_data;
+	int val;
+
+	switch (backend_state) {
+	case XenbusStateInitialising:
+	case XenbusStateInitialised:
+	case XenbusStateUnknown:
+	case XenbusStateClosed:
+		break;
+
+	case XenbusStateInitWait:
+InitWait:
+		xenbus_switch_state(dev, XenbusStateConnected);
+		break;
+
+	case XenbusStateConnected:
+		/*
+		 * Work around xenbus race condition: If backend goes
+		 * through InitWait to Connected fast enough, we can
+		 * get Connected twice here.
+		 */
+		if (dev->state != XenbusStateConnected)
+			goto InitWait; /* no InitWait seen yet, fudge it */
+
+		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
+				 "request-update", "%d", &val) < 0)
+			val = 0;
+		if (val)
+			info->update_wanted = 1;
+		break;
+
+	case XenbusStateClosing:
+		xenbus_frontend_closed(dev);
+		break;
+	}
+}
+
+static struct xenbus_device_id xenfb_ids[] = {
+	{ "vfb" },
+	{ "" }
+};
+
+static struct xenbus_driver xenfb = {
+	.name = "vfb",
+	.owner = THIS_MODULE,
+	.ids = xenfb_ids,
+	.probe = xenfb_probe,
+	.remove = xenfb_remove,
+	.resume = xenfb_resume,
+	.otherend_changed = xenfb_backend_changed,
+};
+
+static int __init xenfb_init(void)
+{
+	if (!is_running_on_xen())
+		return -ENODEV;
+
+	/* Nothing to do if running in dom0. */
+	if (is_initial_xendomain())
+		return -ENODEV;
+
+	return xenbus_register_frontend(&xenfb);
+}
+
+static void __exit xenfb_cleanup(void)
+{
+	xenbus_unregister_driver(&xenfb);
+}
+
+module_init(xenfb_init);
+module_exit(xenfb_cleanup);
+
+MODULE_LICENSE("GPL");
diff --git a/include/xen/interface/io/fbif.h b/include/xen/interface/io/fbif.h
new file mode 100644
index 0000000..5a934dd
--- /dev/null
+++ b/include/xen/interface/io/fbif.h
@@ -0,0 +1,124 @@
+/*
+ * fbif.h -- Xen virtual frame buffer device
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
+ * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
+ */
+
+#ifndef __XEN_PUBLIC_IO_FBIF_H__
+#define __XEN_PUBLIC_IO_FBIF_H__
+
+/* Out events (frontend -> backend) */
+
+/*
+ * Out events may be sent only when requested by backend, and receipt
+ * of an unknown out event is an error.
+ */
+
+/* Event type 1 currently not used */
+/*
+ * Framebuffer update notification event
+ * Capable frontend sets feature-update in xenstore.
+ * Backend requests it by setting request-update in xenstore.
+ */
+#define XENFB_TYPE_UPDATE 2
+
+struct xenfb_update {
+	uint8_t type;		/* XENFB_TYPE_UPDATE */
+	int32_t x;		/* source x */
+	int32_t y;		/* source y */
+	int32_t width;		/* rect width */
+	int32_t height;		/* rect height */
+};
+
+#define XENFB_OUT_EVENT_SIZE 40
+
+union xenfb_out_event {
+	uint8_t type;
+	struct xenfb_update update;
+	char pad[XENFB_OUT_EVENT_SIZE];
+};
+
+/* In events (backend -> frontend) */
+
+/*
+ * Frontends should ignore unknown in events.
+ * No in events currently defined.
+ */
+
+#define XENFB_IN_EVENT_SIZE 40
+
+union xenfb_in_event {
+	uint8_t type;
+	char pad[XENFB_IN_EVENT_SIZE];
+};
+
+/* shared page */
+
+#define XENFB_IN_RING_SIZE 1024
+#define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE)
+#define XENFB_IN_RING_OFFS 1024
+#define XENFB_IN_RING(page) \
+	((union xenfb_in_event *)((char *)(page) + XENFB_IN_RING_OFFS))
+#define XENFB_IN_RING_REF(page, idx) \
+	(XENFB_IN_RING((page))[(idx) % XENFB_IN_RING_LEN])
+
+#define XENFB_OUT_RING_SIZE 2048
+#define XENFB_OUT_RING_LEN (XENFB_OUT_RING_SIZE / XENFB_OUT_EVENT_SIZE)
+#define XENFB_OUT_RING_OFFS (XENFB_IN_RING_OFFS + XENFB_IN_RING_SIZE)
+#define XENFB_OUT_RING(page) \
+	((union xenfb_out_event *)((char *)(page) + XENFB_OUT_RING_OFFS))
+#define XENFB_OUT_RING_REF(page, idx) \
+	(XENFB_OUT_RING((page))[(idx) % XENFB_OUT_RING_LEN])
+
+struct xenfb_page {
+	uint32_t in_cons, in_prod;
+	uint32_t out_cons, out_prod;
+
+	int32_t width;          /* width of the framebuffer (in pixels) */
+	int32_t height;         /* height of the framebuffer (in pixels) */
+	uint32_t line_length;   /* length of a row of pixels (in bytes) */
+	uint32_t mem_length;    /* length of the framebuffer (in bytes) */
+	uint8_t depth;          /* depth of a pixel (in bits) */
+
+	/*
+	 * Framebuffer page directory
+	 *
+	 * Each directory page holds PAGE_SIZE / sizeof(*pd)
+	 * framebuffer pages, and can thus map up to PAGE_SIZE *
+	 * PAGE_SIZE / sizeof(*pd) bytes.  With PAGE_SIZE == 4096 and
+	 * sizeof(unsigned long) == 4, that's 4 Megs.  Two directory
+	 * pages should be enough for a while.
+	 */
+	unsigned long pd[2];
+};
+
+/*
+ * Wart: xenkbd needs to know resolution.  Put it here until a better
+ * solution is found, but don't leak it to the backend.
+ */
+#ifdef __KERNEL__
+#define XENFB_WIDTH 800
+#define XENFB_HEIGHT 600
+#define XENFB_DEPTH 32
+#endif
+
+#endif
diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h
new file mode 100644
index 0000000..fb97f42
--- /dev/null
+++ b/include/xen/interface/io/kbdif.h
@@ -0,0 +1,114 @@
+/*
+ * kbdif.h -- Xen virtual keyboard/mouse
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Copyright (C) 2005 Anthony Liguori <aliguori at us.ibm.com>
+ * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru at redhat.com>
+ */
+
+#ifndef __XEN_PUBLIC_IO_KBDIF_H__
+#define __XEN_PUBLIC_IO_KBDIF_H__
+
+/* In events (backend -> frontend) */
+
+/*
+ * Frontends should ignore unknown in events.
+ */
+
+/* Pointer movement event */
+#define XENKBD_TYPE_MOTION  1
+/* Event type 2 currently not used */
+/* Key event (includes pointer buttons) */
+#define XENKBD_TYPE_KEY     3
+/*
+ * Pointer position event
+ * Capable backend sets feature-abs-pointer in xenstore.
+ * Frontend requests ot instead of XENKBD_TYPE_MOTION by setting
+ * request-abs-update in xenstore.
+ */
+#define XENKBD_TYPE_POS     4
+
+struct xenkbd_motion {
+	uint8_t type;		/* XENKBD_TYPE_MOTION */
+	int32_t rel_x;		/* relative X motion */
+	int32_t rel_y;		/* relative Y motion */
+};
+
+struct xenkbd_key {
+	uint8_t type;		/* XENKBD_TYPE_KEY */
+	uint8_t pressed;	/* 1 if pressed; 0 otherwise */
+	uint32_t keycode;	/* KEY_* from linux/input.h */
+};
+
+struct xenkbd_position {
+	uint8_t type;		/* XENKBD_TYPE_POS */
+	int32_t abs_x;		/* absolute X position (in FB pixels) */
+	int32_t abs_y;		/* absolute Y position (in FB pixels) */
+};
+
+#define XENKBD_IN_EVENT_SIZE 40
+
+union xenkbd_in_event {
+	uint8_t type;
+	struct xenkbd_motion motion;
+	struct xenkbd_key key;
+	struct xenkbd_position pos;
+	char pad[XENKBD_IN_EVENT_SIZE];
+};
+
+/* Out events (frontend -> backend) */
+
+/*
+ * Out events may be sent only when requested by backend, and receipt
+ * of an unknown out event is an error.
+ * No out events currently defined.
+ */
+
+#define XENKBD_OUT_EVENT_SIZE 40
+
+union xenkbd_out_event {
+	uint8_t type;
+	char pad[XENKBD_OUT_EVENT_SIZE];
+};
+
+/* shared page */
+
+#define XENKBD_IN_RING_SIZE 2048
+#define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE)
+#define XENKBD_IN_RING_OFFS 1024
+#define XENKBD_IN_RING(page) \
+	((union xenkbd_in_event *)((char *)(page) + XENKBD_IN_RING_OFFS))
+#define XENKBD_IN_RING_REF(page, idx) \
+	(XENKBD_IN_RING((page))[(idx) % XENKBD_IN_RING_LEN])
+
+#define XENKBD_OUT_RING_SIZE 1024
+#define XENKBD_OUT_RING_LEN (XENKBD_OUT_RING_SIZE / XENKBD_OUT_EVENT_SIZE)
+#define XENKBD_OUT_RING_OFFS (XENKBD_IN_RING_OFFS + XENKBD_IN_RING_SIZE)
+#define XENKBD_OUT_RING(page) \
+	((union xenkbd_out_event *)((char *)(page) + XENKBD_OUT_RING_OFFS))
+#define XENKBD_OUT_RING_REF(page, idx) \
+	(XENKBD_OUT_RING((page))[(idx) % XENKBD_OUT_RING_LEN])
+
+struct xenkbd_page {
+	uint32_t in_cons, in_prod;
+	uint32_t out_cons, out_prod;
+};
+
+#endif
-- 
1.5.4.1


linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch:

--- NEW FILE linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch ---
>From c6d9804064e6c203a6b66d906c264e63e5727e38 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Fri, 22 Feb 2008 12:42:52 +0000
Subject: [PATCH] xen: Module autoprobing support for frontend drivers

Add module aliases to support autoprobing modules
for xen frontend devices.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 drivers/block/xen-blkfront.c      |    1 +
 drivers/net/xen-netfront.c        |    1 +
 drivers/xen/xenbus/xenbus_probe.c |   27 +++++++++++++++++++++++++--
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2e7c81e..0c47c02 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1005,3 +1005,4 @@ module_exit(xlblk_exit);
 MODULE_DESCRIPTION("Xen virtual block device frontend");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR);
+MODULE_ALIAS("xen:vbd");
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 7483d45..b3fa27e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1809,3 +1809,4 @@ module_exit(netif_exit);
 
 MODULE_DESCRIPTION("Xen virtual network device frontend");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("xen:vif");
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 4750de3..336363c 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -88,6 +88,16 @@ int xenbus_match(struct device *_dev, struct device_driver *_drv)
 	return match_device(drv->ids, to_xenbus_device(_dev)) != NULL;
 }
 
+static int xenbus_uevent(struct device *_dev, struct kobj_uevent_env *env)
+{
+	struct xenbus_device *dev = to_xenbus_device(_dev);
+
+	if (add_uevent_var(env, "MODALIAS=xen:%s", dev->devicetype))
+		return -ENOMEM;
+
+	return 0;
+}
+
 /* device/<type>/<id> => <type>-<id> */
 static int frontend_bus_id(char bus_id[BUS_ID_SIZE], const char *nodename)
 {
@@ -166,6 +176,7 @@ static struct xen_bus_type xenbus_frontend = {
 	.bus = {
 		.name     = "xen",
 		.match    = xenbus_match,
+		.uevent   = xenbus_uevent,
 		.probe    = xenbus_dev_probe,
 		.remove   = xenbus_dev_remove,
 		.shutdown = xenbus_dev_shutdown,
@@ -438,6 +449,12 @@ static ssize_t xendev_show_devtype(struct device *dev,
 }
 DEVICE_ATTR(devtype, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_devtype, NULL);
 
+static ssize_t xendev_show_modalias(struct device *dev,
+				    struct device_attribute *attr, char *buf)
+{
+	return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
+}
+DEVICE_ATTR(modalias, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_modalias, NULL);
 
 int xenbus_probe_node(struct xen_bus_type *bus,
 		      const char *type,
@@ -492,10 +509,16 @@ int xenbus_probe_node(struct xen_bus_type *bus,
 
 	err = device_create_file(&xendev->dev, &dev_attr_devtype);
 	if (err)
-		goto fail_remove_file;
+		goto fail_remove_nodename;
+
+	err = device_create_file(&xendev->dev, &dev_attr_modalias);
+	if (err)
+		goto fail_remove_devtype;
 
 	return 0;
-fail_remove_file:
+fail_remove_devtype:
+	device_remove_file(&xendev->dev, &dev_attr_devtype);
+fail_remove_nodename:
 	device_remove_file(&xendev->dev, &dev_attr_nodename);
 fail_unregister:
 	device_unregister(&xendev->dev);
-- 
1.5.4.1


linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch:

--- NEW FILE linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch ---
>From 4f83bc3295a85cc1451393dfff9a3db4520a58cf Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Thu, 21 Feb 2008 11:13:12 +0000
Subject: [PATCH] xen: Add compatibility aliases for frontend drivers

Before getting merged, xen-blkfront was xenblk and
xen-netfront was xennet.

Add compatibility module aliases to ease upgrades.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 drivers/block/xen-blkfront.c |    1 +
 drivers/net/xen-netfront.c   |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 0c47c02..8ce168d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1006,3 +1006,4 @@ MODULE_DESCRIPTION("Xen virtual block device frontend");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR);
 MODULE_ALIAS("xen:vbd");
+MODULE_ALIAS("xenblk");
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index b3fa27e..e62018a 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1810,3 +1810,4 @@ module_exit(netif_exit);
 MODULE_DESCRIPTION("Xen virtual network device frontend");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("xen:vif");
+MODULE_ALIAS("xennet");
-- 
1.5.4.1


linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch:

--- NEW FILE linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch ---
>From a552ba0377ead54568ec4f7946546ece97159d66 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Tue, 19 Feb 2008 15:34:32 +0000
Subject: [PATCH] xen dom0: Add a vmlinuz target

Although patches are in progress to allow Xen boot
a DomU using a bzImage, support for booting a Dom0
using a bzImage is still a ways off.

For now, just add a target to build a gzip-ed ELF
file which Xen can use to boot Dom0.

Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 arch/x86/Makefile        |    9 +++++++++
 arch/x86/boot/.gitignore |    1 +
 arch/x86/boot/Makefile   |    9 +++++++++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f1e739a..14a752e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -206,6 +206,15 @@ boot := arch/x86/boot
 PHONY += zImage bzImage compressed zlilo bzlilo \
          zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
 
+ifdef CONFIG_XEN
+PHONY += vmlinuz
+all: vmlinuz
+
+vmlinuz: KBUILD_IMAGE := $(boot)/vmlinuz
+vmlinuz: vmlinux
+	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
+endif
+
 # Default kernel to build
 all: bzImage
 
diff --git a/arch/x86/boot/.gitignore b/arch/x86/boot/.gitignore
index b1bdc4c..35e7956 100644
--- a/arch/x86/boot/.gitignore
+++ b/arch/x86/boot/.gitignore
@@ -5,3 +5,4 @@ setup.bin
 setup.elf
 cpustr.h
 mkcpustr
+vmlinuz
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index f88458e..61bba92 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -26,6 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
 #RAMDISK := -DRAMDISK=512
 
 targets		:= vmlinux.bin setup.bin setup.elf zImage bzImage
+targets		+= vmlinuz vmlinux-stripped
 subdir-		:= compressed
 
 setup-y		+= a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
@@ -105,6 +106,14 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
 $(obj)/compressed/vmlinux: FORCE
 	$(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
 
+$(obj)/vmlinuz: $(obj)/vmlinux-stripped FORCE
+	$(call if_changed,gzip)
+	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
+
+$(obj)/vmlinux-stripped: OBJCOPYFLAGS := -g --strip-unneeded
+$(obj)/vmlinux-stripped: vmlinux FORCE
+	$(call if_changed,objcopy)
+
 # Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
 FDARGS =
 # Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
-- 
1.5.4.1


linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch:

--- NEW FILE linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch ---
>From f322926f33a4a0f10713f7ae3cdc47815c5a5062 Mon Sep 17 00:00:00 2001
From: Stephen Tweedie <sct at redhat.com>
Date: Wed, 21 Nov 2007 18:40:31 +0000
Subject: [PATCH] xen debug: Add xprintk to log directly via hypercall

For early debugging, it is useful to have a way of doing debugging output
direct to the hypervisor without having to rely on console being fully
initialised.

Signed-off-by: Stephen Tweedie <sct at redhat.com>
---
 arch/x86/xen/enlighten.c  |   32 ++++++++++++++++++++++++++++++++
 include/xen/hvc-console.h |    1 +
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index df63185..44629d4 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -33,6 +33,7 @@
 #include <xen/interface/sched.h>
 #include <xen/features.h>
 #include <xen/page.h>
+#include <xen/hvc-console.h>
 
 #include <asm/paravirt.h>
 #include <asm/page.h>
@@ -142,6 +143,37 @@ static void __init xen_banner(void)
 	printk(KERN_INFO "Hypervisor signature: %s\n", xen_start_info->magic);
 }
 
+static void kcons_write_dom0(const char *s, unsigned int count)
+{
+       int rc;
+
+       while ((count > 0) &&
+              ((rc = HYPERVISOR_console_io(
+                       CONSOLEIO_write, count, (char *)s)) > 0)) {
+               count -= rc;
+               s += rc;
+       }
+}
+
+
+/*** 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 xen_cpuid(unsigned int *ax, unsigned int *bx,
 		      unsigned int *cx, unsigned int *dx)
 {
diff --git a/include/xen/hvc-console.h b/include/xen/hvc-console.h
index 21c0ecf..cb7a3c9 100644
--- a/include/xen/hvc-console.h
+++ b/include/xen/hvc-console.h
@@ -2,5 +2,6 @@
 #define XEN_HVC_CONSOLE_H
 
 extern struct console xenboot_console;
+extern asmlinkage int xprintk(const char *fmt, ...);
 
 #endif	/* XEN_HVC_CONSOLE_H */
-- 
1.5.4.1


linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch:

--- NEW FILE linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch ---
>From aadd2db42c85ad8796b9304164d67a7a492f7fd7 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Tue, 4 Mar 2008 17:59:50 +0000
Subject: [PATCH] xen x86_64: Initial x86_64 support for Xen paravirt_ops

Signed-off-by: Eduardo Habkost <ehabkost at redhat.com>
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
---
 arch/x86/Kconfig                     |    3 +-
 arch/x86/kernel/acpi/boot.c          |    4 +-
 arch/x86/kernel/apic_32.c            |    4 +-
 arch/x86/kernel/apic_64.c            |    2 +-
 arch/x86/kernel/asm-offsets_64.c     |   15 +
 arch/x86/kernel/early_printk.c       |    5 +-
 arch/x86/kernel/efi_64.c             |    4 +-
 arch/x86/kernel/entry_32.S           |   83 +-----
 arch/x86/kernel/entry_64.S           |   72 ++++-
 arch/x86/kernel/genapic_64.c         |   12 +
 arch/x86/kernel/head64.c             |    4 +
 arch/x86/kernel/head_64.S            |   23 ++
 arch/x86/kernel/hpet.c               |    4 +-
 arch/x86/kernel/io_apic_64.c         |    2 +-
 arch/x86/kernel/irq_64.c             |    5 +
 arch/x86/kernel/mpparse_32.c         |    4 +-
 arch/x86/kernel/mpparse_64.c         |    4 +-
 arch/x86/kernel/paravirt.c           |    3 +
 arch/x86/kernel/process_64.c         |    9 +
 arch/x86/kernel/setup64.c            |    5 +
 arch/x86/kernel/setup_64.c           |   41 +++-
 arch/x86/kernel/smpboot_64.c         |    4 +-
 arch/x86/kernel/vsyscall_64.c        |   31 ++-
 arch/x86/mach-visws/traps.c          |   10 +-
 arch/x86/mm/init_32.c                |    2 +-
 arch/x86/mm/init_64.c                |  558 ++++++++++++++++++++++++++++++++--
 arch/x86/mm/ioremap.c                |    4 +-
 arch/x86/mm/pgtable_32.c             |   25 ++-
 arch/x86/pci/mmconfig_32.c           |    2 +-
 arch/x86/vdso/vdso32-setup.c         |    6 +-
 arch/x86/xen/Kconfig                 |    1 -
 arch/x86/xen/Makefile                |    6 +
 arch/x86/xen/enlighten.c             |  268 +++++++++++-----
 arch/x86/xen/entry.S                 |    5 +
 arch/x86/xen/entry_32.S              |   81 +++++
 arch/x86/xen/entry_64.S              |   68 ++++
 arch/x86/xen/events.c                |   13 +-
 arch/x86/xen/genapic.c               |  190 ++++++++++++
 arch/x86/xen/init.h                  |   20 ++
 arch/x86/xen/init_32.c               |    3 +
 arch/x86/xen/init_64.c               |  181 +++++++++++
 arch/x86/xen/mmu.c                   |  407 ++++++++++++++++++-------
 arch/x86/xen/mmu.h                   |   46 ++--
 arch/x86/xen/multicalls.c            |    9 +-
 arch/x86/xen/setup.c                 |   22 ++
 arch/x86/xen/smp.c                   |   16 +
 arch/x86/xen/xen-asm.S               |  219 +++-----------
 arch/x86/xen/xen-asm_32.S            |  184 +++++++++++
 arch/x86/xen/xen-asm_64.S            |   75 +++++
 arch/x86/xen/xen-head.S              |   21 +-
 arch/x86/xen/xen-ops.h               |   11 +
 drivers/acpi/thermal.c               |    5 +
 drivers/char/hvc_xen.c               |    6 +
 drivers/ieee1394/init_ohci1394_dma.c |    2 +-
 drivers/serial/8250_early.c          |    2 +-
 include/asm-x86/asm-hack.h           |   27 ++
 include/asm-x86/cmpxchg_64.h         |   36 +++
 include/asm-x86/desc_defs.h          |    4 +
 include/asm-x86/fixmap_32.h          |   22 +-
 include/asm-x86/fixmap_64.h          |   31 ++-
 include/asm-x86/mmu_context_64.h     |    6 +-
 include/asm-x86/page_64.h            |    2 +-
 include/asm-x86/paravirt.h           |   46 ++-
 include/asm-x86/percpu.h             |   32 ++
 include/asm-x86/pgalloc_64.h         |   69 ++++-
 include/asm-x86/pgtable.h            |   15 +-
 include/asm-x86/pgtable_64.h         |    3 +-
 include/asm-x86/proto.h              |    1 +
 include/asm-x86/smp_64.h             |    3 +
 include/asm-x86/system.h             |    3 +-
 include/asm-x86/xen/hypercall.h      |  205 ++++++++++---
 include/asm-x86/xen/hypervisor.h     |    3 -
 include/asm-x86/xen/interface.h      |   35 ++-
 include/linux/dmi.h                  |    1 +
 include/linux/elfnote.h              |    2 +-
 include/xen/events.h                 |    2 +
 include/xen/interface/elfnote.h      |   16 +
 include/xen/page.h                   |   34 ++-
 init/main.c                          |   10 +
 mm/slab.c                            |    8 +-
 80 files changed, 2759 insertions(+), 668 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
 create mode 100644 arch/x86/xen/genapic.c
 create mode 100644 arch/x86/xen/init.h
 create mode 100644 arch/x86/xen/init_32.c
 create mode 100644 arch/x86/xen/init_64.c
 create mode 100644 arch/x86/xen/xen-asm_32.S
 create mode 100644 arch/x86/xen/xen-asm_64.S
 create mode 100644 include/asm-x86/asm-hack.h

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 4a88cf7..1f0d4ae 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -91,7 +91,7 @@ config ARCH_MAY_HAVE_PC_FDC
 	def_bool y
 
 config DMI
-	def_bool y
+	def_bool !XEN
 
 config RWSEM_GENERIC_SPINLOCK
 	def_bool !X86_XADD
@@ -329,6 +329,7 @@ config X86_RDC321X
 
 config X86_VSMP
 	bool "Support for ScaleMP vSMP"
+	depends on !XEN
 	depends on X86_64 && PCI
 	 help
 	  Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 2cdc9de..cfc79ac 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -141,7 +141,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
 
 	offset = phys & (PAGE_SIZE - 1);
 	mapped_size = PAGE_SIZE - offset;
-	set_fixmap(FIX_ACPI_END, phys);
+	set_fixmap_ma(FIX_ACPI_END, phys);
 	base = fix_to_virt(FIX_ACPI_END);
 
 	/*
@@ -152,7 +152,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
 		if (--idx < FIX_ACPI_BEGIN)
 			return NULL;	/* cannot handle this */
 		phys += PAGE_SIZE;
-		set_fixmap(idx, phys);
+		set_fixmap_ma(idx, phys);
 		mapped_size += PAGE_SIZE;
 	}
 
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 35a568e..40fc1b3 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1138,7 +1138,7 @@ void __init init_apic_mappings(void)
 	} else
 		apic_phys = mp_lapic_addr;
 
-	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
+	set_fixmap_ma_nocache(FIX_APIC_BASE, apic_phys);
 	printk(KERN_DEBUG "mapped APIC to %08lx (%08lx)\n", APIC_BASE,
 	       apic_phys);
 
@@ -1172,7 +1172,7 @@ fake_ioapic_page:
 					      alloc_bootmem_pages(PAGE_SIZE);
 				ioapic_phys = __pa(ioapic_phys);
 			}
-			set_fixmap_nocache(idx, ioapic_phys);
+			set_fixmap_ma_nocache(idx, ioapic_phys);
 			printk(KERN_DEBUG "mapped IOAPIC to %08lx (%08lx)\n",
 			       __fix_to_virt(idx), ioapic_phys);
 			idx++;
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index d8d03e0..a611520 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -877,7 +877,7 @@ void __init init_apic_mappings(void)
 	} else
 		apic_phys = mp_lapic_addr;
 
-	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
+	set_fixmap_ma_nocache(FIX_APIC_BASE, apic_phys);
 	apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
 				APIC_BASE, apic_phys);
 
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index 494e1e0..d0fabfd 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -25,6 +25,8 @@
 #define OFFSET(sym, str, mem) \
 	DEFINE(sym, offsetof(struct str, mem))
 
+#include <xen/interface/xen.h>
+
 #define __NO_STUBS 1
 #undef __SYSCALL
 #undef _ASM_X86_64_UNISTD_H_
@@ -92,6 +94,13 @@ int main(void)
 	       offsetof (struct rt_sigframe32, uc.uc_mcontext));
 	BLANK();
 #endif
+
+#ifdef CONFIG_XEN
+	BLANK();
+	OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
[...5539 lines suppressed...]
-#define ELFNOTE(name, type, desc)		\
+#define ELFNOTE(name, type, desc...)		\
 	ELFNOTE_START(name, type, "")		\
 		desc			;	\
 	ELFNOTE_END
diff --git a/include/xen/events.h b/include/xen/events.h
index 2bde54d..c18d2bf 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -3,6 +3,8 @@
 
 #include <linux/interrupt.h>
 
+#include <asm/xen/interface.h>
+#include <xen/interface/xen.h>
 #include <xen/interface/event_channel.h>
 #include <asm/xen/hypercall.h>
 
diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h
index a64d3df..ee5501d 100644
--- a/include/xen/interface/elfnote.h
+++ b/include/xen/interface/elfnote.h
@@ -120,6 +120,22 @@
  */
 #define XEN_ELFNOTE_BSD_SYMTAB    11
 
+/*
+ * The lowest address the hypervisor hole can begin at (numeric).
+ *
+ * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
+ * also indicates to the hypervisor that the kernel can deal with the
+ * hole starting at a higher address.
+ */
+#define XEN_ELFNOTE_HV_START_LOW  12
+
+/*
+ * List of maddr_t-sized mask/value pairs describing how to recognize
+ * (non-present) L1 page table entries carrying valid MFNs (numeric).
+ */
+#define XEN_ELFNOTE_L1_MFN_VALID  13
+
+
 #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
 
 /*
diff --git a/include/xen/page.h b/include/xen/page.h
index 031ef22..158fb60 100644
--- a/include/xen/page.h
+++ b/include/xen/page.h
@@ -8,6 +8,10 @@
 
 #include <xen/features.h>
 
+#include <asm/xen/interface.h>
+
+#include <xen/hvc-console.h>
+
 #ifdef CONFIG_X86_PAE
 /* Xen machine address */
 typedef struct xmaddr {
@@ -70,6 +74,8 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
 #endif
 
 	pfn = 0;
+	//xprintk("mfn_to_pfn(%lx):\n", mfn);
+
 	/*
 	 * The array access can fail (e.g., device space beyond end of RAM).
 	 * In such cases it doesn't matter what we return (we return garbage),
@@ -77,6 +83,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
 	 */
 	__get_user(pfn, &machine_to_phys_mapping[mfn]);
 
+	//xprintk("mfn_to_pfn(%lx) = %lx\n", mfn, pfn);
 	return pfn;
 }
 
@@ -143,34 +150,29 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
 
 static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
 {
-	pte_t pte;
-
-	pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) |
-		(pgprot_val(pgprot) >> 32);
-	pte.pte_high &= (__supported_pte_mask >> 32);
-	pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
-	pte.pte_low &= __supported_pte_mask;
-
-	return pte;
+	pteval_t val;
+	
+	val = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
+	val &= __supported_pte_mask;
+	return native_make_pte(val);
 }
 
-static inline unsigned long long pte_val_ma(pte_t x)
+static inline pteval_t pte_val_ma(pte_t x)
 {
-	return x.pte;
+	return native_pte_val(x);
 }
-#define pmd_val_ma(v) ((v).pmd)
-#define pud_val_ma(v) ((v).pgd.pgd)
-#define __pte_ma(x)	((pte_t) { .pte = (x) })
+#define __pte_ma(x)	(native_make_pte(x))
 #define __pmd_ma(x)	((pmd_t) { (x) } )
 #else  /* !X86_PAE */
-#define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT)
+#define pte_mfn(_pte) ((native_pte_val(_pte) & __PHYSICAL_MASK) >> PAGE_SHIFT)
 #define mfn_pte(pfn, prot)	__pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 #define pte_val_ma(x)	((x).pte)
-#define pmd_val_ma(v)	((v).pud.pgd.pgd)
 #define __pte_ma(x)	((pte_t) { (x) } )
 #endif	/* CONFIG_X86_PAE */
 
 #define pgd_val_ma(x)	((x).pgd)
+#define pmd_val_ma(x)	(native_pmd_val((x)))
+#define pud_val_ma(x)	(native_pud_val((x)))
 
 
 xmaddr_t arbitrary_virt_to_machine(unsigned long address);
diff --git a/init/main.c b/init/main.c
index 384bc45..2661b20 100644
--- a/init/main.c
+++ b/init/main.c
@@ -590,17 +590,25 @@ asmlinkage void __init start_kernel(void)
 	rcu_init();
 	init_IRQ();
 	pidhash_init();
+	printk("init_timers:\n");
 	init_timers();
 	hrtimers_init();
 	softirq_init();
+	printk("timekeeping:\n");
 	timekeeping_init();
+	printk("time:\n");
 	time_init();
+	printk("profile:\n");
 	profile_init();
+	printk("irqs_disabled:\n");
 	if (!irqs_disabled())
 		printk("start_kernel(): bug: interrupts were enabled early\n");
+	printk("early_boot_irqs_on:\n");
 	early_boot_irqs_on();
+	printk("local_irq_enable:\n");
 	local_irq_enable();
 
+	printk("console_init:\n");
 	/*
 	 * HACK ALERT! This is early. We're enabling the console before
 	 * we've done PCI setups etc, and console_init() must be aware of
@@ -637,7 +645,9 @@ asmlinkage void __init start_kernel(void)
 	numa_policy_init();
 	if (late_time_init)
 		late_time_init();
+	printk("calibrate_delay:\n");
 	calibrate_delay();
+	printk("pidmap_init:\n");
 	pidmap_init();
 	pgtable_cache_init();
 	prio_tree_init();
diff --git a/mm/slab.c b/mm/slab.c
index e499669..c18daa3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3202,6 +3202,8 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
 		STATS_INC_ALLOCHIT(cachep);
 		ac->touched = 1;
 		objp = ac->entry[--ac->avail];
+		if (!objp)
+			printk("really weird: avail objp for cache %s is null\n", cachep->name);
 	} else {
 		STATS_INC_ALLOCMISS(cachep);
 		objp = cache_alloc_refill(cachep, flags);
@@ -3464,8 +3466,10 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
 	unsigned long save_flags;
 	void *objp;
 
-	if (should_failslab(cachep, flags))
+	if (should_failslab(cachep, flags)) {
+		printk("cache %s should fail\n", cachep->name);
 		return NULL;
+	}
 
 	cache_alloc_debugcheck_before(cachep, flags);
 	local_irq_save(save_flags);
@@ -3477,6 +3481,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
 	if (unlikely((flags & __GFP_ZERO) && objp))
 		memset(objp, 0, obj_size(cachep));
 
+	if (!objp)
+		printk("allocation from cache %s failed!!!\n", cachep->name);
 	return objp;
 }
 
-- 
1.5.4.1







Index: config-xen-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-generic,v
retrieving revision 1.2.4.2
retrieving revision 1.2.4.3
diff -u -r1.2.4.2 -r1.2.4.3
--- config-xen-generic	21 Feb 2008 13:36:23 -0000	1.2.4.2
+++ config-xen-generic	5 Mar 2008 14:01:21 -0000	1.2.4.3
@@ -1,6 +1,5 @@
 CONFIG_XEN=y
 CONFIG_HVC_XEN=y
-CONFIG_XENCTRL=y
 CONFIG_XEN_BLKDEV_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=m
 


Index: config-xen-x86_64
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/config-xen-x86_64,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -u -r1.2.4.1 -r1.2.4.2
--- config-xen-x86_64	18 Feb 2008 16:55:16 -0000	1.2.4.1
+++ config-xen-x86_64	5 Mar 2008 14:01:21 -0000	1.2.4.2
@@ -0,0 +1,4 @@
+CONFIG_PARAVIRT_GUEST=y
+# CONFIG_SMP is not set
+# CONFIG_NUMA is not set
+# CONFIG_NEED_MULTIPLE_NODES is not set


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/devel/kernel.spec,v
retrieving revision 1.11.2.12
retrieving revision 1.11.2.13
diff -u -r1.11.2.12 -r1.11.2.13
--- kernel.spec	3 Mar 2008 11:58:02 -0000	1.11.2.12
+++ kernel.spec	5 Mar 2008 14:01:21 -0000	1.11.2.13
@@ -233,8 +233,8 @@
 %define with_pae 0
 %endif
 
-# xen only builds on i686
-%ifnarch i686
+# xen only builds on i686 and x86_64
+%ifnarch i686 x86_64
 %define with_xen 0
 %endif
 
@@ -457,7 +457,7 @@
 Release: %{pkg_release}
 # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
 # SET %%nobuildarches (ABOVE) INSTEAD
-ExclusiveArch: noarch i686
+ExclusiveArch: noarch i686 x86_64
 ExclusiveOS: Linux
 
 %kernel_reqprovconf
@@ -664,77 +664,17 @@
 
 # kernel-xen patches start
 Patch5000: linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch-from-kernel-2_6_25.patch
-Patch5001: linux-2.6-xen-0002-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
-Patch5002: linux-2.6-xen-0003-fbdev-Make-deferred-I-O-work-as-advertized.patch
-Patch5003: linux-2.6-xen-0004-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
-Patch5004: linux-2.6-xen-0005-xen-Module-autoprobing-support-for-frontend-drivers.patch
-Patch5005: linux-2.6-xen-0006-xen-Add-compatibility-aliases-for-frontend-drivers.patch
-Patch5006: linux-2.6-xen-0007-xen-dom0-Make-hvc_xen-console-work-for-dom0.patch
-Patch5007: linux-2.6-xen-0008-xen-dom0-Initialize-xenbus-for-dom0.patch
-Patch5008: linux-2.6-xen-0009-xen-dom0-Set-up-basic-IO-permissions-for-dom0.patch
-Patch5009: linux-2.6-xen-0010-xen-dom0-Add-set_fixmap-pv_mmu_ops.patch
-Patch5010: linux-2.6-xen-0011-xen-dom0-Add-support-for-the-platform_ops-hypercall.patch
-Patch5011: linux-2.6-xen-0012-xen-acpi-Enable-early-access-to-ACPI-tables.patch
-Patch5012: linux-2.6-xen-0013-xen-dom0-Add-paravirt_ops-ioremap_page_range-for.patch
-Patch5013: linux-2.6-xen-0014-MTRR-use-cpu_callout_map-instead-of-cpu_online_map.patch
-Patch5014: linux-2.6-xen-0015-xen-mtrr-Add-mtrr_ops-support-for-Xen-mtrr.patch
-Patch5015: linux-2.6-xen-0016-xen-mtrr-Don-t-enable-xen-mtrr-on-bare-metal.patch
-Patch5016: linux-2.6-xen-0017-xen-mtrr-set-cpu-in-cpu_callout_map.patch
-Patch5017: linux-2.6-xen-0018-xen-mtrr-Clean-up-the-num_var_ranges-CPU_UNKOWN-hac.patch
-Patch5018: linux-2.6-xen-0019-xen-mtrr-Use-specific-cpu_has_foo-macros-instead-of.patch
-Patch5019: linux-2.6-xen-0020-xen-mtrr-Kill-some-unneccessary-includes.patch
-Patch5020: linux-2.6-xen-0021-xen-mtrr-No-need-to-explicitly-set-use_intel_if-0.patch
-Patch5021: linux-2.6-xen-0022-xen-mtrr-Use-generic_validate_add_page.patch
-Patch5022: linux-2.6-xen-0023-xen-mtrr-Implement-xen_get_free_region.patch
-Patch5023: linux-2.6-xen-0024-xen-mtrr-Add-xen_-get-set-_mtrr-implementations.patch
-Patch5024: linux-2.6-xen-0025-irq2.diff-from-Juan-Quintela.patch
-Patch5025: linux-2.6-xen-0026-xen-dom0-Obvious-cpuid-fix-to-domU-handling.patch
-Patch5026: linux-2.6-xen-0027-xen-debug-Diagnose-bind_virq_to_irq-errors.patch
-Patch5027: linux-2.6-xen-0028-xen-traps-Revert-Juan-s-traps_32.c-changes-to-debug.patch
-Patch5028: linux-2.6-xen-0029-xen-debug-Move-init_apic_mappings-after-trap-init.patch
-Patch5029: linux-2.6-xen-0030-xen-debug-Trace-progress-in-trap_init-around-init.patch
-Patch5030: linux-2.6-xen-0031-xen-apic-Disable-init_apic_mappings-when-under-CO.patch
-Patch5031: linux-2.6-xen-0032-xen-debug-Log-entry-into-virtual-console-s-xen_init.patch
-Patch5032: linux-2.6-xen-0033-xen-debug-Log-bind_virq_to_irq-events.patch
-Patch5033: linux-2.6-xen-0034-xen-debug-Work-around-USB-issue-triggered-by-Xen-de.patch
-Patch5034: linux-2.6-xen-0035-Remove-duplicated-dma_alloc-free_noncoherent-define.patch
-Patch5035: linux-2.6-xen-0036-xem-dom0-Add-hypervisor-memory_exchange-descriptor.patch
-Patch5036: linux-2.6-xen-0037-xen-dom0-add-virt_to_pfn-macro.patch
-Patch5037: linux-2.6-xen-0038-xen-dom0-use-virt_to_pfn-where-appropriate.patch
-Patch5038: linux-2.6-xen-0039-xen-dom0-Add-contiguous-region-support.patch
-Patch5039: linux-2.6-xen-0040-xen-dom0-Don-t-mask-off-PCD-bits-from-pte-entries.patch
-Patch5040: linux-2.6-xen-0041-xen-dom0-Remove-duplicate-xen_store_interface-assig.patch
-Patch5041: linux-2.6-xen-0042-xen-dom0-Slightly-re-arrange-xenbus_probe_init-er.patch
-Patch5042: linux-2.6-xen-0043-xen-dom0-Use-max_low_pfn-declaration-from-linux-boo.patch
-Patch5043: linux-2.6-xen-0044-xen-dma-Add-dma_mapping_ops-indirection-for-32-bit.patch
-Patch5044: linux-2.6-xen-0045-xen-dma-Remove-unused-32-bit-dma_ops-map_simple-me.patch
-Patch5045: linux-2.6-xen-0046-xen-dma-Initial-commit-of-pci-xen.c-dma-mapping-fun.patch
-Patch5046: linux-2.6-xen-0047-xen-dma-Add-calls-to-dma_ops-alloc-free_coherent-ho.patch
-Patch5047: linux-2.6-xen-0048-xen-dma-Add-xen_alloc-free_coherent.patch
-Patch5048: linux-2.6-xen-0049-xen-dma-Don-t-merge-bios-on-xen-pvops.patch
-Patch5049: linux-2.6-xen-0050-xen-dom0-Minor-coding-style-issue-in-ISA-mapping-co.patch
-Patch5050: linux-2.6-xen-0051-xen-dom0-Use-i-PAGE_SHIFT-instead-of-PAGE_DOWN-i.patch
-Patch5051: linux-2.6-xen-0052-xen-dom0-Match-up-set_pte_mfn-prototype-with-the.patch
-Patch5052: linux-2.6-xen-0053-xen-dom0-Reserve-ISA-address-space-earlier.patch
-Patch5053: linux-2.6-xen-0054-xen-Add-empty-xenctrl-module.patch
-Patch5054: linux-2.6-xen-0055-xen-dom0-Add-proc-xen-capabilities.patch
-Patch5055: linux-2.6-xen-0056-xen-Add-proc-xen-privcmd.patch
-Patch5056: linux-2.6-xen-0057-xen-dom0-Add-proc-xen-xsd_-port-kva.patch
-Patch5057: linux-2.6-xen-0058-xen-Add-proc-xen-xenbus.patch
-Patch5058: linux-2.6-xen-0059-xen-Add-dev-xen-evtchn.patch
-Patch5059: linux-2.6-xen-0060-xen-Add-__init-__exit-notations-to-xenctrl-function.patch
-Patch5060: linux-2.6-xen-0061-xen-Add-Xen-s-sys-hypervisor-interface.patch
-Patch5061: linux-2.6-xen-0062-xen-dom0-Add-basic-proc-xen-balloon.patch
-Patch5062: linux-2.6-xen-0063-xen-dom0-Re-work-privcmd_ioctl-a-little.patch
-Patch5063: linux-2.6-xen-0064-xen-dom0-Add-IOCTL_PRIVCMD_MMAP.patch
-Patch5064: linux-2.6-xen-0065-xen-dom0-Add-a-vmlinuz-target.patch
-Patch5065: linux-2.6-xen-0066-xen-dom0-Don-t-use-fixmaps-for-ACPI-mappings-in-ISA.patch
-Patch5066: linux-2.6-xen-0067-x86-Do-not-scan-for-DMI-if-the-DMI-region-is-marked.patch
-Patch5067: linux-2.6-xen-0068-xen-dom0-Fix-DMI-scanning.patch
-Patch5068: linux-2.6-xen-0069-ata-scsi-Use-dma_alloc_coherent-for-ATAPI-drain-b.patch
-Patch5069: linux-2.6-xen-0070-xen-Make-hvc0-the-preferred-console-in-domU.patch
-
-
+Patch5001: linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch
+Patch5002: linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch
+Patch5003: linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch
+Patch5004: linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
+Patch5005: linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch
+Patch5006: linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
+Patch5007: linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch
+Patch5008: linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch
+Patch5009: linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch
+Patch5010: linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
+Patch5011: linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
 # kernel-xen patches end
 
 # Xen hypervisor patches (20000+)
@@ -1272,77 +1212,19 @@
 
 # kernel-xen apply start
 ApplyPatch linux-2.6-xen-0001-Revert-linux-2.6-execshield.patch-from-kernel-2_6_25.patch
-ApplyPatch linux-2.6-xen-0002-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
-ApplyPatch linux-2.6-xen-0003-fbdev-Make-deferred-I-O-work-as-advertized.patch
-ApplyPatch linux-2.6-xen-0004-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
-ApplyPatch linux-2.6-xen-0005-xen-Module-autoprobing-support-for-frontend-drivers.patch
-ApplyPatch linux-2.6-xen-0006-xen-Add-compatibility-aliases-for-frontend-drivers.patch
-ApplyPatch linux-2.6-xen-0007-xen-dom0-Make-hvc_xen-console-work-for-dom0.patch
-ApplyPatch linux-2.6-xen-0008-xen-dom0-Initialize-xenbus-for-dom0.patch
-ApplyPatch linux-2.6-xen-0009-xen-dom0-Set-up-basic-IO-permissions-for-dom0.patch
-ApplyPatch linux-2.6-xen-0010-xen-dom0-Add-set_fixmap-pv_mmu_ops.patch
-ApplyPatch linux-2.6-xen-0011-xen-dom0-Add-support-for-the-platform_ops-hypercall.patch
-ApplyPatch linux-2.6-xen-0012-xen-acpi-Enable-early-access-to-ACPI-tables.patch
-ApplyPatch linux-2.6-xen-0013-xen-dom0-Add-paravirt_ops-ioremap_page_range-for.patch
-ApplyPatch linux-2.6-xen-0014-MTRR-use-cpu_callout_map-instead-of-cpu_online_map.patch
-ApplyPatch linux-2.6-xen-0015-xen-mtrr-Add-mtrr_ops-support-for-Xen-mtrr.patch
-ApplyPatch linux-2.6-xen-0016-xen-mtrr-Don-t-enable-xen-mtrr-on-bare-metal.patch
-ApplyPatch linux-2.6-xen-0017-xen-mtrr-set-cpu-in-cpu_callout_map.patch
-ApplyPatch linux-2.6-xen-0018-xen-mtrr-Clean-up-the-num_var_ranges-CPU_UNKOWN-hac.patch
-ApplyPatch linux-2.6-xen-0019-xen-mtrr-Use-specific-cpu_has_foo-macros-instead-of.patch
-ApplyPatch linux-2.6-xen-0020-xen-mtrr-Kill-some-unneccessary-includes.patch
-ApplyPatch linux-2.6-xen-0021-xen-mtrr-No-need-to-explicitly-set-use_intel_if-0.patch
-ApplyPatch linux-2.6-xen-0022-xen-mtrr-Use-generic_validate_add_page.patch
-ApplyPatch linux-2.6-xen-0023-xen-mtrr-Implement-xen_get_free_region.patch
-ApplyPatch linux-2.6-xen-0024-xen-mtrr-Add-xen_-get-set-_mtrr-implementations.patch
-ApplyPatch linux-2.6-xen-0025-irq2.diff-from-Juan-Quintela.patch
-ApplyPatch linux-2.6-xen-0026-xen-dom0-Obvious-cpuid-fix-to-domU-handling.patch
-ApplyPatch linux-2.6-xen-0027-xen-debug-Diagnose-bind_virq_to_irq-errors.patch
-ApplyPatch linux-2.6-xen-0028-xen-traps-Revert-Juan-s-traps_32.c-changes-to-debug.patch
-ApplyPatch linux-2.6-xen-0029-xen-debug-Move-init_apic_mappings-after-trap-init.patch
-ApplyPatch linux-2.6-xen-0030-xen-debug-Trace-progress-in-trap_init-around-init.patch
-ApplyPatch linux-2.6-xen-0031-xen-apic-Disable-init_apic_mappings-when-under-CO.patch
-ApplyPatch linux-2.6-xen-0032-xen-debug-Log-entry-into-virtual-console-s-xen_init.patch
-ApplyPatch linux-2.6-xen-0033-xen-debug-Log-bind_virq_to_irq-events.patch
-ApplyPatch linux-2.6-xen-0034-xen-debug-Work-around-USB-issue-triggered-by-Xen-de.patch
-ApplyPatch linux-2.6-xen-0035-Remove-duplicated-dma_alloc-free_noncoherent-define.patch
-ApplyPatch linux-2.6-xen-0036-xem-dom0-Add-hypervisor-memory_exchange-descriptor.patch
-ApplyPatch linux-2.6-xen-0037-xen-dom0-add-virt_to_pfn-macro.patch
-ApplyPatch linux-2.6-xen-0038-xen-dom0-use-virt_to_pfn-where-appropriate.patch
-ApplyPatch linux-2.6-xen-0039-xen-dom0-Add-contiguous-region-support.patch
-ApplyPatch linux-2.6-xen-0040-xen-dom0-Don-t-mask-off-PCD-bits-from-pte-entries.patch
-ApplyPatch linux-2.6-xen-0041-xen-dom0-Remove-duplicate-xen_store_interface-assig.patch
-ApplyPatch linux-2.6-xen-0042-xen-dom0-Slightly-re-arrange-xenbus_probe_init-er.patch
-ApplyPatch linux-2.6-xen-0043-xen-dom0-Use-max_low_pfn-declaration-from-linux-boo.patch
-ApplyPatch linux-2.6-xen-0044-xen-dma-Add-dma_mapping_ops-indirection-for-32-bit.patch
-ApplyPatch linux-2.6-xen-0045-xen-dma-Remove-unused-32-bit-dma_ops-map_simple-me.patch
-ApplyPatch linux-2.6-xen-0046-xen-dma-Initial-commit-of-pci-xen.c-dma-mapping-fun.patch
-ApplyPatch linux-2.6-xen-0047-xen-dma-Add-calls-to-dma_ops-alloc-free_coherent-ho.patch
-ApplyPatch linux-2.6-xen-0048-xen-dma-Add-xen_alloc-free_coherent.patch
-ApplyPatch linux-2.6-xen-0049-xen-dma-Don-t-merge-bios-on-xen-pvops.patch
-ApplyPatch linux-2.6-xen-0050-xen-dom0-Minor-coding-style-issue-in-ISA-mapping-co.patch
-ApplyPatch linux-2.6-xen-0051-xen-dom0-Use-i-PAGE_SHIFT-instead-of-PAGE_DOWN-i.patch
-ApplyPatch linux-2.6-xen-0052-xen-dom0-Match-up-set_pte_mfn-prototype-with-the.patch
-ApplyPatch linux-2.6-xen-0053-xen-dom0-Reserve-ISA-address-space-earlier.patch
-ApplyPatch linux-2.6-xen-0054-xen-Add-empty-xenctrl-module.patch
-ApplyPatch linux-2.6-xen-0055-xen-dom0-Add-proc-xen-capabilities.patch
-ApplyPatch linux-2.6-xen-0056-xen-Add-proc-xen-privcmd.patch
-ApplyPatch linux-2.6-xen-0057-xen-dom0-Add-proc-xen-xsd_-port-kva.patch
-ApplyPatch linux-2.6-xen-0058-xen-Add-proc-xen-xenbus.patch
-ApplyPatch linux-2.6-xen-0059-xen-Add-dev-xen-evtchn.patch
-ApplyPatch linux-2.6-xen-0060-xen-Add-__init-__exit-notations-to-xenctrl-function.patch
-ApplyPatch linux-2.6-xen-0061-xen-Add-Xen-s-sys-hypervisor-interface.patch
-ApplyPatch linux-2.6-xen-0062-xen-dom0-Add-basic-proc-xen-balloon.patch
-ApplyPatch linux-2.6-xen-0063-xen-dom0-Re-work-privcmd_ioctl-a-little.patch
-ApplyPatch linux-2.6-xen-0064-xen-dom0-Add-IOCTL_PRIVCMD_MMAP.patch
-ApplyPatch linux-2.6-xen-0065-xen-dom0-Add-a-vmlinuz-target.patch
-ApplyPatch linux-2.6-xen-0066-xen-dom0-Don-t-use-fixmaps-for-ACPI-mappings-in-ISA.patch
-ApplyPatch linux-2.6-xen-0067-x86-Do-not-scan-for-DMI-if-the-DMI-region-is-marked.patch
-ApplyPatch linux-2.6-xen-0068-xen-dom0-Fix-DMI-scanning.patch
-ApplyPatch linux-2.6-xen-0069-ata-scsi-Use-dma_alloc_coherent-for-ATAPI-drain-b.patch
-ApplyPatch linux-2.6-xen-0070-xen-Make-hvc0-the-preferred-console-in-domU.patch
-
-
+ApplyPatch linux-2.6-xen-0002-x86-xen-Construct-e820-map-with-a-hole-between-640K.patch
+ApplyPatch linux-2.6-xen-0003-squashfs-Fix-build-without-CONFIG_SMP.patch
+ApplyPatch linux-2.6-xen-0004-xen-Make-hvc0-the-preferred-console-in-domU.patch
+ApplyPatch linux-2.6-xen-0005-xen-Make-xen-blkfront-write-its-protocol-ABI-to-xen.patch
+ApplyPatch linux-2.6-xen-0006-fbdev-Make-deferred-I-O-work-as-advertized.patch
+ApplyPatch linux-2.6-xen-0007-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch
+ApplyPatch linux-2.6-xen-0008-xen-Module-autoprobing-support-for-frontend-drivers.patch
+ApplyPatch linux-2.6-xen-0009-xen-Add-compatibility-aliases-for-frontend-drivers.patch
+ApplyPatch linux-2.6-xen-0010-xen-dom0-Add-a-vmlinuz-target.patch
+ApplyPatch linux-2.6-xen-0011-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch
+%ifarch x86_64
+ApplyPatch linux-2.6-xen-0012-xen-x86_64-Initial-x86_64-support-for-Xen-paravirt_.patch
+%endif
 # kernel-xen apply end
 
 # END OF PATCH APPLICATIONS
@@ -1942,23 +1824,13 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
-* Fri Feb 29 2008 Mark McLoughlin <markmc at redhat.com>
+* Wed Mar 05 2008 Mark McLoughlin <markmc at redhat.com>
 - Re-base to kernel-2_6_25-0_78_rc3_git1_fc9
-
-* Fri Feb 22 2008 Mark McLoughlin <markmc at redhat.com>
-- Add support for auto-probing frontend drivers
-
-* Thu Feb 21 2008 Mark McLoughlin <markmc at redhat.com>
+- Revert the execshield patch for now
 - Include xen pv fb and kbd drivers
+- Add support for auto-probing frontend drivers
 - Add module aliases for xennet and xenblk
-
-* Wed Feb 20 2008 Mark McLoughlin <markmc at redhat.com>
-- Revert the execshield patch for now
-- Add a couple of contiguous region fixes
-
-* Mon Feb 18 2008 Mark McLoughlin <markmc at redhat.com>
-- Re-base to kernel-2_6_24-23_fc9
-- Add first round of dom0 pv_ops patches
+- Add first round of x86_64 xen pv_ops patches
 
 * Fri Feb 15 2008 Mark McLoughlin <markmc at redhat.com>
 - Add e1000e driver (bug #360691)


--- linux-2.6-xen-0002-xen-debug-Add-xprintk-to-log-directly-via-hypercall.patch DELETED ---


--- linux-2.6-xen-0003-fbdev-Make-deferred-I-O-work-as-advertized.patch DELETED ---


--- linux-2.6-xen-0004-xen-pvfb-Para-virtual-framebuffer-keyboard-and-poi.patch DELETED ---


--- linux-2.6-xen-0005-xen-Module-autoprobing-support-for-frontend-drivers.patch DELETED ---


--- linux-2.6-xen-0006-xen-Add-compatibility-aliases-for-frontend-drivers.patch DELETED ---


--- linux-2.6-xen-0007-xen-dom0-Make-hvc_xen-console-work-for-dom0.patch DELETED ---


--- linux-2.6-xen-0008-xen-dom0-Initialize-xenbus-for-dom0.patch DELETED ---


--- linux-2.6-xen-0009-xen-dom0-Set-up-basic-IO-permissions-for-dom0.patch DELETED ---


--- linux-2.6-xen-0010-xen-dom0-Add-set_fixmap-pv_mmu_ops.patch DELETED ---


--- linux-2.6-xen-0011-xen-dom0-Add-support-for-the-platform_ops-hypercall.patch DELETED ---


--- linux-2.6-xen-0012-xen-acpi-Enable-early-access-to-ACPI-tables.patch DELETED ---


--- linux-2.6-xen-0013-xen-dom0-Add-paravirt_ops-ioremap_page_range-for.patch DELETED ---


--- linux-2.6-xen-0014-MTRR-use-cpu_callout_map-instead-of-cpu_online_map.patch DELETED ---


--- linux-2.6-xen-0015-xen-mtrr-Add-mtrr_ops-support-for-Xen-mtrr.patch DELETED ---


--- linux-2.6-xen-0016-xen-mtrr-Don-t-enable-xen-mtrr-on-bare-metal.patch DELETED ---


--- linux-2.6-xen-0017-xen-mtrr-set-cpu-in-cpu_callout_map.patch DELETED ---


--- linux-2.6-xen-0018-xen-mtrr-Clean-up-the-num_var_ranges-CPU_UNKOWN-hac.patch DELETED ---


--- linux-2.6-xen-0019-xen-mtrr-Use-specific-cpu_has_foo-macros-instead-of.patch DELETED ---


--- linux-2.6-xen-0020-xen-mtrr-Kill-some-unneccessary-includes.patch DELETED ---


--- linux-2.6-xen-0021-xen-mtrr-No-need-to-explicitly-set-use_intel_if-0.patch DELETED ---


--- linux-2.6-xen-0022-xen-mtrr-Use-generic_validate_add_page.patch DELETED ---


--- linux-2.6-xen-0023-xen-mtrr-Implement-xen_get_free_region.patch DELETED ---


--- linux-2.6-xen-0024-xen-mtrr-Add-xen_-get-set-_mtrr-implementations.patch DELETED ---


--- linux-2.6-xen-0025-irq2.diff-from-Juan-Quintela.patch DELETED ---


--- linux-2.6-xen-0026-xen-dom0-Obvious-cpuid-fix-to-domU-handling.patch DELETED ---


--- linux-2.6-xen-0027-xen-debug-Diagnose-bind_virq_to_irq-errors.patch DELETED ---


--- linux-2.6-xen-0028-xen-traps-Revert-Juan-s-traps_32.c-changes-to-debug.patch DELETED ---


--- linux-2.6-xen-0029-xen-debug-Move-init_apic_mappings-after-trap-init.patch DELETED ---


--- linux-2.6-xen-0030-xen-debug-Trace-progress-in-trap_init-around-init.patch DELETED ---


--- linux-2.6-xen-0031-xen-apic-Disable-init_apic_mappings-when-under-CO.patch DELETED ---


--- linux-2.6-xen-0032-xen-debug-Log-entry-into-virtual-console-s-xen_init.patch DELETED ---


--- linux-2.6-xen-0033-xen-debug-Log-bind_virq_to_irq-events.patch DELETED ---


--- linux-2.6-xen-0034-xen-debug-Work-around-USB-issue-triggered-by-Xen-de.patch DELETED ---


--- linux-2.6-xen-0035-Remove-duplicated-dma_alloc-free_noncoherent-define.patch DELETED ---


--- linux-2.6-xen-0036-xem-dom0-Add-hypervisor-memory_exchange-descriptor.patch DELETED ---


--- linux-2.6-xen-0037-xen-dom0-add-virt_to_pfn-macro.patch DELETED ---


--- linux-2.6-xen-0038-xen-dom0-use-virt_to_pfn-where-appropriate.patch DELETED ---


--- linux-2.6-xen-0039-xen-dom0-Add-contiguous-region-support.patch DELETED ---


--- linux-2.6-xen-0040-xen-dom0-Don-t-mask-off-PCD-bits-from-pte-entries.patch DELETED ---


--- linux-2.6-xen-0041-xen-dom0-Remove-duplicate-xen_store_interface-assig.patch DELETED ---


--- linux-2.6-xen-0042-xen-dom0-Slightly-re-arrange-xenbus_probe_init-er.patch DELETED ---


--- linux-2.6-xen-0043-xen-dom0-Use-max_low_pfn-declaration-from-linux-boo.patch DELETED ---


--- linux-2.6-xen-0044-xen-dma-Add-dma_mapping_ops-indirection-for-32-bit.patch DELETED ---


--- linux-2.6-xen-0045-xen-dma-Remove-unused-32-bit-dma_ops-map_simple-me.patch DELETED ---


--- linux-2.6-xen-0046-xen-dma-Initial-commit-of-pci-xen.c-dma-mapping-fun.patch DELETED ---


--- linux-2.6-xen-0047-xen-dma-Add-calls-to-dma_ops-alloc-free_coherent-ho.patch DELETED ---


--- linux-2.6-xen-0048-xen-dma-Add-xen_alloc-free_coherent.patch DELETED ---


--- linux-2.6-xen-0049-xen-dma-Don-t-merge-bios-on-xen-pvops.patch DELETED ---


--- linux-2.6-xen-0050-xen-dom0-Minor-coding-style-issue-in-ISA-mapping-co.patch DELETED ---


--- linux-2.6-xen-0051-xen-dom0-Use-i-PAGE_SHIFT-instead-of-PAGE_DOWN-i.patch DELETED ---


--- linux-2.6-xen-0052-xen-dom0-Match-up-set_pte_mfn-prototype-with-the.patch DELETED ---


--- linux-2.6-xen-0053-xen-dom0-Reserve-ISA-address-space-earlier.patch DELETED ---


--- linux-2.6-xen-0054-xen-Add-empty-xenctrl-module.patch DELETED ---


--- linux-2.6-xen-0055-xen-dom0-Add-proc-xen-capabilities.patch DELETED ---


--- linux-2.6-xen-0056-xen-Add-proc-xen-privcmd.patch DELETED ---


--- linux-2.6-xen-0057-xen-dom0-Add-proc-xen-xsd_-port-kva.patch DELETED ---


--- linux-2.6-xen-0058-xen-Add-proc-xen-xenbus.patch DELETED ---


--- linux-2.6-xen-0059-xen-Add-dev-xen-evtchn.patch DELETED ---


--- linux-2.6-xen-0060-xen-Add-__init-__exit-notations-to-xenctrl-function.patch DELETED ---


--- linux-2.6-xen-0061-xen-Add-Xen-s-sys-hypervisor-interface.patch DELETED ---


--- linux-2.6-xen-0062-xen-dom0-Add-basic-proc-xen-balloon.patch DELETED ---


--- linux-2.6-xen-0063-xen-dom0-Re-work-privcmd_ioctl-a-little.patch DELETED ---


--- linux-2.6-xen-0064-xen-dom0-Add-IOCTL_PRIVCMD_MMAP.patch DELETED ---


--- linux-2.6-xen-0065-xen-dom0-Add-a-vmlinuz-target.patch DELETED ---


--- linux-2.6-xen-0066-xen-dom0-Don-t-use-fixmaps-for-ACPI-mappings-in-ISA.patch DELETED ---


--- linux-2.6-xen-0067-x86-Do-not-scan-for-DMI-if-the-DMI-region-is-marked.patch DELETED ---


--- linux-2.6-xen-0068-xen-dom0-Fix-DMI-scanning.patch DELETED ---


--- linux-2.6-xen-0069-ata-scsi-Use-dma_alloc_coherent-for-ATAPI-drain-b.patch DELETED ---


--- linux-2.6-xen-0070-xen-Make-hvc0-the-preferred-console-in-domU.patch DELETED ---




More information about the fedora-extras-commits mailing list