Xen guest updates
Subsystems (10)
Linus, please pull the xen-next git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-xen-next.git for-linus
these patches have been in x86.git for quite some time and have been tested there. The drivers/ changes touch files outside of the x86 tree, that's why this is a separate pull request.
Thanks,
Ingo
------------------>
Christian Limpach (1):
xen blkfront: Delay wait for block devices until after the disk is added
Ingo Molnar (1):
x86: xen unify x86 add common mm pgtable c fix
Isaku Yamahata (12):
xen: definisions which ia64 needs
xen: definitions which ia64/xen needs
xen: add missing definitions for xen grant table which ia64/xen needs
xen: add missing definitions in include/xen/interface/vcpu.h which ia64/xen needs
xen: move features.c from arch/x86/xen/features.c to drivers/xen
xen: move events.c to drivers/xen for IA64/Xen support
Xen: make events.c portable for ia64/xen support
xen: add resend_irq_on_evtchn() definition into events.c
xen: make include/xen/page.h portable moving those definitions under asm dir
xen: replace callers of alloc_vm_area()/free_vm_area() with xen_ prefixed one
xen: make grant table arch portable
xen: import arch generic part of xencomm
Jeremy Fitzhardinge (34):
x86: convert pgalloc_64.h from macros to inlines
x86: add common mm/pgtable.c
x86: put paravirt stubs into common asm/pgalloc.h
x86: move pte functions into common asm/pgalloc.h
x86: move pmd functions into common asm/pgalloc.h
x86: move pgalloc pud and pgd operations into common place
x86: move all the pgd_list handling to one place
x86: rename paravirt_alloc_pt etc after the pagetable structure
x86: add pud_alloc for 4-level pagetables x86/pgtable.h: demacro ptep_set_access_flags x86/pgtable.h: demacro ptep_test_and_clear_young x86/pgtable.h: demacro ptep_clear_flush_young
x86: demacro pgalloc paravirt stubs
xen: use appropriate pte types
xen: make use of pte_t union
xen: unify pte operations
xen: use phys_addr_t when referring to physical addresses
xen: unify pte operations on machine frames
xen: make sure iret faults are trapped
x86: unify KERNEL_PGD_PTRS
x86: unify pgd ctor/dtor
xen: add support for callbackops hypercall
xen: support sysenter/sysexit if hypervisor does
xen: implement a debug-interrupt handler
xen: make sure retriggered events are set pending
xen: short-cut for recursive event handling
xen: no need for domU to worry about MCE/MCA
xen: jump to iret fixup
xen/blkfront: use bdget_disk
xen: disable preemption during tlb flush
xen: allow set_pte_at on init_mm to be lockless
xen: fold xen_sysexit into xen_iret
xen: allow compilation with non-flat memory
xen: add balloon driver
Mark McLoughlin (2):
xen: Module autoprobing support for frontend drivers
xen: Add compatibility aliases for frontend drivers
Markus Armbruster (2):
xen: Make xen-blkfront write its protocol ABI to xenstore xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
arch/x86/kernel/entry_32.S | 12 +-
arch/x86/kernel/paravirt.c | 12 +-
arch/x86/kernel/reboot.c | 4 +-
arch/x86/kernel/smpboot.c | 4 +-
arch/x86/kernel/vmi_32.c | 22 +-
arch/x86/mach-voyager/voyager_smp.c | 4 +-
arch/x86/mm/Makefile | 2 +-
arch/x86/mm/init_32.c | 8 +-
arch/x86/mm/ioremap.c | 2 +-
arch/x86/mm/pageattr.c | 4 +-
arch/x86/mm/pgtable.c | 276 +++++++++++++
arch/x86/mm/pgtable_32.c | 204 ----------
arch/x86/xen/Kconfig | 2 +-
arch/x86/xen/Makefile | 4 +-
arch/x86/xen/enlighten.c | 54 ++-
arch/x86/xen/grant-table.c | 91 +++++
arch/x86/xen/mmu.c | 143 +++----
arch/x86/xen/setup.c | 21 +
arch/x86/xen/smp.c | 20 +-
arch/x86/xen/xen-asm.S | 42 ++-
arch/x86/xen/xen-ops.h | 8 +-
drivers/Kconfig | 2 +
drivers/block/xen-blkfront.c | 23 +-
drivers/input/Kconfig | 9 +
drivers/input/Makefile | 2 +
drivers/input/xen-kbdfront.c | 340 ++++++++++++++++
drivers/net/xen-netfront.c | 2 +
drivers/video/Kconfig | 14 +
drivers/video/Makefile | 1 +
drivers/video/xen-fbfront.c | 550 ++++++++++++++++++++++++++
drivers/xen/Kconfig | 19 +
drivers/xen/Makefile | 4 +-
drivers/xen/balloon.c | 712 ++++++++++++++++++++++++++++++++++
{arch/x86 => drivers}/xen/events.c | 121 +++++-
{arch/x86 => drivers}/xen/features.c | 0
drivers/xen/grant-table.c | 37 +--
drivers/xen/xenbus/xenbus_client.c | 6 +-
drivers/xen/xenbus/xenbus_probe.c | 32 ++-
drivers/xen/xencomm.c | 232 +++++++++++
include/asm-x86/paravirt.h | 43 ++-
include/asm-x86/pgalloc.h | 111 +++++-
include/asm-x86/pgalloc_32.h | 95 -----
include/asm-x86/pgalloc_64.h | 133 -------
include/asm-x86/pgtable.h | 54 ++--
include/asm-x86/pgtable_32.h | 18 -
include/asm-x86/pgtable_64.h | 2 +-
include/asm-x86/xen/events.h | 22 +
include/asm-x86/xen/grant_table.h | 7 +
include/asm-x86/xen/hypercall.h | 6 +
include/asm-x86/xen/interface.h | 28 ++
include/asm-x86/xen/page.h | 168 ++++++++
include/xen/balloon.h | 61 +++
include/xen/events.h | 9 +-
include/xen/grant_table.h | 7 +
include/xen/interface/callback.h | 102 +++++
include/xen/interface/grant_table.h | 11 +-
include/xen/interface/io/fbif.h | 124 ++++++
include/xen/interface/io/kbdif.h | 114 ++++++
include/xen/interface/io/protocols.h | 21 +
include/xen/interface/memory.h | 12 +-
include/xen/interface/vcpu.h | 5 +
include/xen/interface/xen.h | 22 +-
include/xen/interface/xencomm.h | 41 ++
include/xen/page.h | 181 +---------
include/xen/xen-ops.h | 8 +
include/xen/xenbus.h | 1 +
include/xen/xencomm.h | 77 ++++
67 files changed, 3607 insertions(+), 921 deletions(-)
create mode 100644 arch/x86/mm/pgtable.c
create mode 100644 arch/x86/xen/grant-table.c
create mode 100644 drivers/input/xen-kbdfront.c
create mode 100644 drivers/video/xen-fbfront.c
create mode 100644 drivers/xen/Kconfig
create mode 100644 drivers/xen/balloon.c
rename {arch/x86 => drivers}/xen/events.c (82%)
rename {arch/x86 => drivers}/xen/features.c (100%)
create mode 100644 drivers/xen/xencomm.c
delete mode 100644 include/asm-x86/pgalloc_32.h
delete mode 100644 include/asm-x86/pgalloc_64.h
create mode 100644 include/asm-x86/xen/events.h
create mode 100644 include/asm-x86/xen/grant_table.h
create mode 100644 include/asm-x86/xen/page.h
create mode 100644 include/xen/balloon.h
create mode 100644 include/xen/interface/callback.h
create mode 100644 include/xen/interface/io/fbif.h
create mode 100644 include/xen/interface/io/kbdif.h
create mode 100644 include/xen/interface/io/protocols.h
create mode 100644 include/xen/interface/xencomm.h
create mode 100644 include/xen/xen-ops.h
create mode 100644 include/xen/xencomm.harch/x86/kernel/entry_32.S +10 -2
@@ -409,7 +409,7 @@ restore_nocheck_notrace: irq_return: INTERRUPT_RETURN .section .fixup,"ax" -iret_exc: +ENTRY(iret_exc) pushl $0 # no error code pushl $do_iret_error jmp error_code
@@ -1017,6 +1017,13 @@ ENTRY(kernel_thread_helper) ENDPROC(kernel_thread_helper) #ifdef CONFIG_XEN +/* Xen doesn't set %esp to be precisely what the normal sysenter + entrypoint expects, so fix it up before using the normal path. */ +ENTRY(xen_sysenter_target) + RING0_INT_FRAME + addl $5*4, %esp /* remove xen-provided frame */ + jmp sysenter_past_esp + ENTRY(xen_hypervisor_callback) CFI_STARTPROC pushl $0
@@ -1035,8 +1042,9 @@ ENTRY(xen_hypervisor_callback) cmpl $xen_iret_end_crit,%eax jae 1f - call xen_iret_crit_fixup + jmp xen_iret_crit_fixup +ENTRY(xen_do_upcall) 1: mov %esp, %eax call xen_evtchn_do_upcall jmp ret_from_intr
arch/x86/kernel/paravirt.c +7 -5
@@ -366,11 +366,13 @@ struct pv_mmu_ops pv_mmu_ops = { .flush_tlb_single = native_flush_tlb_single, .flush_tlb_others = native_flush_tlb_others, - .alloc_pt = paravirt_nop, - .alloc_pd = paravirt_nop, - .alloc_pd_clone = paravirt_nop, - .release_pt = paravirt_nop, - .release_pd = paravirt_nop, + .alloc_pte = paravirt_nop, + .alloc_pmd = paravirt_nop, + .alloc_pmd_clone = paravirt_nop, + .alloc_pud = paravirt_nop, + .release_pte = paravirt_nop, + .release_pmd = paravirt_nop, + .release_pud = paravirt_nop, .set_pte = native_set_pte, .set_pte_at = native_set_pte_at,
arch/x86/kernel/reboot.c +2 -2
@@ -8,6 +8,7 @@#include <asm/apic.h> #include <asm/desc.h> #include <asm/hpet.h> +#include <asm/pgtable.h> #include <asm/reboot_fixups.h> #include <asm/reboot.h>
@@ -15,7 +16,6 @@# include <linux/dmi.h> # include <linux/ctype.h> # include <linux/mc146818rtc.h> -# include <asm/pgtable.h> #else # include <asm/iommu.h> #endif
@@ -275,7 +275,7 @@ void machine_real_restart(unsigned char *code, int length)/* Remap the kernel at virtual address zero, as well as offset zero from the kernel segment. This assumes the kernel segment starts at virtual address PAGE_OFFSET. */ -memcpy (swapper_pg_dir, swapper_pg_dir +USER_PGD_PTRS , +memcpy (swapper_pg_dir, swapper_pg_dir +KERNEL_PGD_BOUNDARY ,sizeof (swapper_pg_dir [0 ]) *KERNEL_PGD_PTRS );/*
arch/x86/kernel/smpboot.c +2 -2
@@ -1039,8 +1039,8 @@ int __cpuinit native_cpu_up(unsigned int cpu)#ifdef CONFIG_X86_32 /* init low mem mapping */ -clone_pgd_range (swapper_pg_dir, swapper_pg_dir +USER_PGD_PTRS , - min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); +clone_pgd_range (swapper_pg_dir, swapper_pg_dir +KERNEL_PGD_BOUNDARY , + min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));flush_tlb_all ();#endif
arch/x86/kernel/vmi_32.c +11 -11
@@ -320,7 +320,7 @@ static void check_zeroed_page(u32 pfn, int type, struct page *page)* pdes need to be zeroed. */ if (type &VMI_PAGE_CLONE ) - limit =USER_PTRS_PER_PGD ; + limit =KERNEL_PGD_BOUNDARY ;for (i =0 ; i < limit; i++)BUG_ON (ptr[i]); }
@@ -392,13 +392,13 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type) }#endif -static void vmi_allocate_pt (struct mm_struct *mm,u32 pfn) +static void vmi_allocate_pte (struct mm_struct *mm,u32 pfn) {vmi_set_page_type (pfn,VMI_PAGE_L1 ); vmi_ops.allocate_page (pfn,VMI_PAGE_L1 ,0 ,0 ,0 ); } -static void vmi_allocate_pd (struct mm_struct *mm,u32 pfn) +static void vmi_allocate_pmd (struct mm_struct *mm,u32 pfn) {/* * This call comes in very early, before mem_map is setup.
@@ -409,20 +409,20 @@ static void vmi_allocate_pd(struct mm_struct *mm, u32 pfn) vmi_ops.allocate_page (pfn,VMI_PAGE_L2 ,0 ,0 ,0 ); } -static void vmi_allocate_pd_clone (u32 pfn,u32 clonepfn,u32 start,u32 count) +static void vmi_allocate_pmd_clone (u32 pfn,u32 clonepfn,u32 start,u32 count) {vmi_set_page_type (pfn,VMI_PAGE_L2 |VMI_PAGE_CLONE );vmi_check_page_type (clonepfn,VMI_PAGE_L2 ); vmi_ops.allocate_page (pfn,VMI_PAGE_L2 |VMI_PAGE_CLONE , clonepfn, start, count); } -static void vmi_release_pt (u32 pfn) +static void vmi_release_pte (u32 pfn) { vmi_ops.release_page (pfn,VMI_PAGE_L1 );vmi_set_page_type (pfn,VMI_PAGE_NORMAL ); } -static void vmi_release_pd (u32 pfn) +static void vmi_release_pmd (u32 pfn) { vmi_ops.release_page (pfn,VMI_PAGE_L2 );vmi_set_page_type (pfn,VMI_PAGE_NORMAL );
@@ -871,15 +871,15 @@ static inline int __init activate_vmi(void) vmi_ops.allocate_page =vmi_get_function (VMI_CALL_AllocatePage);if (vmi_ops.allocate_page) { - pv_mmu_ops.alloc_pt = vmi_allocate_pt; - pv_mmu_ops.alloc_pd = vmi_allocate_pd; - pv_mmu_ops.alloc_pd_clone = vmi_allocate_pd_clone; + pv_mmu_ops.alloc_pte = vmi_allocate_pte; + pv_mmu_ops.alloc_pmd = vmi_allocate_pmd; + pv_mmu_ops.alloc_pmd_clone = vmi_allocate_pmd_clone; } vmi_ops.release_page =vmi_get_function (VMI_CALL_ReleasePage);if (vmi_ops.release_page) { - pv_mmu_ops.release_pt = vmi_release_pt; - pv_mmu_ops.release_pd = vmi_release_pd; + pv_mmu_ops.release_pte = vmi_release_pte; + pv_mmu_ops.release_pmd = vmi_release_pmd; }/* Set linear is needed in all cases */
arch/x86/mach-voyager/voyager_smp.c +2 -2
@@ -560,8 +560,8 @@ static void __init do_boot_cpu(__u8 cpu) hijack_source.idt.Offset, stack_start.sp));/* init lowmem identity mapping */ -clone_pgd_range (swapper_pg_dir, swapper_pg_dir +USER_PGD_PTRS , - min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS)); +clone_pgd_range (swapper_pg_dir, swapper_pg_dir +KERNEL_PGD_BOUNDARY , + min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));flush_tlb_all ();if (quad_boot) {
arch/x86/mm/Makefile +1 -1
@@ -1,5 +1,5 @@ obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ - pat.o + pat.o pgtable.o obj-$(CONFIG_X86_32) += pgtable_32.o
arch/x86/mm/init_32.c +4 -4
@@ -71,7 +71,7 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)if (!(pgd_val (*pgd) & _PAGE_PRESENT)) { pmd_table = (pmd_t *)alloc_bootmem_low_pages (PAGE_SIZE ); -paravirt_alloc_pd (&init_mm,__pa (pmd_table) >>PAGE_SHIFT ); +paravirt_alloc_pmd (&init_mm,__pa (pmd_table) >>PAGE_SHIFT );set_pgd (pgd,__pgd (__pa (pmd_table) | _PAGE_PRESENT)); pud =pud_offset (pgd,0 );BUG_ON (pmd_table !=pmd_offset (pud,0 ));
@@ -100,7 +100,7 @@ static pte_t * __init one_page_table_init(pmd_t *pmd) (pte_t *)alloc_bootmem_low_pages (PAGE_SIZE ); } -paravirt_alloc_pt (&init_mm,__pa (page_table) >>PAGE_SHIFT ); +paravirt_alloc_pte (&init_mm,__pa (page_table) >>PAGE_SHIFT );set_pmd (pmd,__pmd (__pa (page_table) | _PAGE_TABLE));BUG_ON (page_table !=pte_offset_kernel (pmd,0 )); }
@@ -365,7 +365,7 @@ void __init native_pagetable_setup_start(pgd_t *base)pte_clear (NULL , va, pte); } -paravirt_alloc_pd (&init_mm,__pa (base) >>PAGE_SHIFT ); +paravirt_alloc_pmd (&init_mm,__pa (base) >>PAGE_SHIFT ); }void __init native_pagetable_setup_done (pgd_t *base)
@@ -457,7 +457,7 @@ void zap_low_mappings(void)* Note that "pgd_clear()" doesn't do it for * us, because pgd_clear() is a no-op on i386. */ -for (i =0 ; i <USER_PTRS_PER_PGD ; i++) { +for (i =0 ; i <KERNEL_PGD_BOUNDARY ; i++) {#ifdef CONFIG_X86_PAE set_pgd (swapper_pg_dir+i,__pgd (1 +__pa (empty_zero_page)));#else
arch/x86/mm/ioremap.c +1 -1
@@ -407,7 +407,7 @@ void __init early_ioremap_clear(void) pmd =early_ioremap_pmd (fix_to_virt (FIX_BTMAP_BEGIN ));pmd_clear (pmd); -paravirt_release_pt (__pa (bm_pte) >>PAGE_SHIFT ); +paravirt_release_pte (__pa (bm_pte) >>PAGE_SHIFT );__flush_tlb_all (); }
arch/x86/mm/pageattr.c +1 -3
@@ -483,9 +483,7 @@ static int split_large_page(pte_t *kpte, unsigned long address) goto out_unlock; pbase = (pte_t *)page_address (base); -#ifdef CONFIG_X86_32 -paravirt_alloc_pt (&init_mm,page_to_pfn (base)); -#endif +paravirt_alloc_pte (&init_mm,page_to_pfn (base)); ref_prot =pte_pgprot (pte_clrhuge (*kpte));#ifdef CONFIG_X86_64
arch/x86/mm/pgtable.c new file +276 -0
276 lines not on this page · raw message
arch/x86/mm/pgtable_32.c +0 -204
210 lines not on this page · raw message
arch/x86/xen/Kconfig +1 -1
@@ -6,7 +6,7 @@ config XEN bool "Xen guest support" select PARAVIRT depends on X86_32 - depends on X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES && !(X86_VISWS || X86_VOYAGER) + depends on X86_CMPXCHG && X86_TSC && !(X86_VISWS || X86_VOYAGER) help This is the Linux Xen port. Enabling this will allow the kernel to boot in a paravirtualized environment under the
arch/x86/xen/Makefile +2 -2
@@ -1,4 +1,4 @@ -obj-y := enlighten.o setup.o features.o multicalls.o mmu.o \ - events.o time.o manage.o xen-asm.o +obj-y := enlighten.o setup.o multicalls.o mmu.o \ + time.o manage.o xen-asm.o grant-table.o obj-$(CONFIG_SMP) += smp.o
arch/x86/xen/enlighten.c +34 -20
134 lines not on this page · raw message
arch/x86/xen/grant-table.c new file +91 -0
91 lines not on this page · raw message
arch/x86/xen/mmu.c +56 -87
176 lines not on this page · raw message
arch/x86/xen/setup.c +21 -0
@@ -16,6 +16,7 @@#include <asm/xen/hypervisor.h> #include <asm/xen/hypercall.h> +#include <xen/interface/callback.h> #include <xen/interface/physdev.h> #include <xen/features.h>
@@ -68,6 +69,24 @@ static void __init fiddle_vdso(void) *mask |=1 <<VDSO_NOTE_NONEGSEG_BIT ; } +void xen_enable_sysenter (void ) +{ +int cpu =smp_processor_id (); +extern void xen_sysenter_target (void ); +/* Mask events on entry, even though they get enabled immediately */ +static struct callback_register sysenter = { + .type = CALLBACKTYPE_sysenter, + .address = { __KERNEL_CS, (unsigned long )xen_sysenter_target }, + .flags = CALLBACKF_mask_events, + }; + +if (!boot_cpu_has (X86_FEATURE_SEP ) || +HYPERVISOR_callback_op (CALLBACKOP_register, &sysenter) !=0 ) { +clear_cpu_cap (&cpu_data (cpu),X86_FEATURE_SEP ); +clear_cpu_cap (&boot_cpu_data,X86_FEATURE_SEP ); + } +} +void __init xen_arch_setup (void ) {struct physdev_set_iopl set_iopl;
@@ -82,6 +101,8 @@ void __init xen_arch_setup(void)HYPERVISOR_set_callbacks (__KERNEL_CS, (unsigned long )xen_hypervisor_callback, __KERNEL_CS, (unsigned long )xen_failsafe_callback); +xen_enable_sysenter (); + set_iopl.iopl =1 ; rc =HYPERVISOR_physdev_op (PHYSDEVOP_set_iopl, &set_iopl);if (rc !=0 )
arch/x86/xen/smp.c +15 -5
@@ -36,8 +36,9 @@#include "mmu.h" static cpumask_t xen_cpu_initialized_map; -static DEFINE_PER_CPU(int, resched_irq); -static DEFINE_PER_CPU(int, callfunc_irq); +static DEFINE_PER_CPU(int, resched_irq) = -1; +static DEFINE_PER_CPU(int, callfunc_irq) = -1; +static DEFINE_PER_CPU(int, debug_irq) = -1;/* * Structure and data for smp_call_function(). This is designed to minimise
@@ -72,6 +73,7 @@ static __cpuinit void cpu_bringup_and_idle(void)int cpu =smp_processor_id ();cpu_init (); +xen_enable_sysenter ();preempt_disable ();per_cpu (cpu_state, cpu) =CPU_ONLINE ;
@@ -88,9 +90,7 @@ static __cpuinit void cpu_bringup_and_idle(void)static int xen_smp_intr_init (unsigned int cpu) {int rc; -const char *resched_name, *callfunc_name; - -per_cpu (resched_irq, cpu) =per_cpu (callfunc_irq, cpu) =-1 ; +const char *resched_name, *callfunc_name, *debug_name; resched_name =kasprintf (GFP_KERNEL ,"resched%d" , cpu); rc = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR,
@@ -114,6 +114,14 @@ static int xen_smp_intr_init(unsigned int cpu) goto fail;per_cpu (callfunc_irq, cpu) = rc; + debug_name =kasprintf (GFP_KERNEL ,"debug%d" , cpu); + rc =bind_virq_to_irqhandler (VIRQ_DEBUG , cpu, xen_debug_interrupt, +IRQF_DISABLED |IRQF_PERCPU |IRQF_NOBALANCING , + debug_name,NULL ); +if (rc <0 ) + goto fail; +per_cpu (debug_irq, cpu) = rc; +return 0 ; fail:
@@ -121,6 +129,8 @@ static int xen_smp_intr_init(unsigned int cpu)unbind_from_irqhandler (per_cpu (resched_irq, cpu),NULL );if (per_cpu (callfunc_irq, cpu) >=0 )unbind_from_irqhandler (per_cpu (callfunc_irq, cpu),NULL ); +if (per_cpu (debug_irq, cpu) >=0 ) +unbind_from_irqhandler (per_cpu (debug_irq, cpu),NULL );return rc; }
arch/x86/xen/xen-asm.S +28 -14
93 lines not on this page · raw message
arch/x86/xen/xen-ops.h +7 -1
@@ -2,6 +2,8 @@#define XEN_OPS_H #include <linux/init.h> +#include <linux/irqreturn.h> +#include <xen/xen-ops.h> /* These are code, but not functions. Defined in entry.S */ extern const char xen_hypervisor_callback[];
@@ -9,7 +11,6 @@ extern const char xen_failsafe_callback[];void xen_copy_trap_info (struct trap_info *traps); -DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); DECLARE_PER_CPU(unsigned long, xen_cr3); DECLARE_PER_CPU(unsigned long, xen_current_cr3);
@@ -19,6 +20,7 @@ extern struct shared_info *HYPERVISOR_shared_info;char *__init xen_memory_setup (void );void __init xen_arch_setup (void );void __init xen_init_IRQ (void ); +void xen_enable_sysenter (void );void xen_setup_timer (int cpu);void xen_setup_cpu_clockevents (void );
@@ -28,6 +30,8 @@ unsigned long xen_get_wallclock(void);int xen_set_wallclock (unsigned long time);unsigned long long xen_sched_clock (void ); +irqreturn_t xen_debug_interrupt (int irq,void *dev_id); +bool xen_vcpu_stolen (int vcpu);void xen_mark_init_mm_pinned (void );
@@ -64,4 +68,6 @@ DECL_ASM(unsigned long, xen_save_fl_direct, void); DECL_ASM(void, xen_restore_fl_direct, unsigned long);void xen_iret (void ); +void xen_sysexit (void ); +#endif /* XEN_OPS_H */
drivers/Kconfig +2 -0
@@ -97,4 +97,6 @@ source "drivers/dca/Kconfig" source "drivers/auxdisplay/Kconfig" source "drivers/uio/Kconfig" + +source "drivers/xen/Kconfig" endmenu
drivers/block/xen-blkfront.c +21 -2
@@ -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>
@@ -74,7 +75,6 @@ static struct block_device_operations xlvbd_block_fops;struct blkfront_info {struct xenbus_device *xbdev; -dev_t dev;struct gendisk *gd;int vdevice;blkif_vdev_t handle;
@@ -88,6 +88,7 @@ struct blkfront_infostruct blk_shadow shadow[BLK_RING_SIZE ];unsigned long shadow_free;int feature_barrier; +int is_ready;/** * The number of people holding this device open. We won't allow a
@@ -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) {
@@ -833,6 +840,8 @@ static void blkfront_connect(struct blkfront_info *info)spin_unlock_irq (&blkif_io_lock);add_disk (info->gd); + + info->is_ready =1 ; }/**
@@ -896,7 +905,7 @@ static void backend_changed(struct xenbus_device *dev,break ;case XenbusStateClosing: - bd =bdget (info->dev); + bd =bdget_disk (info->gd,0 );if (bd ==NULL )xenbus_dev_fatal (dev, -ENODEV ,"bdget failed" );
@@ -925,6 +934,13 @@ static int blkfront_remove(struct xenbus_device *dev)return 0 ; } +static int blkfront_is_ready (struct xenbus_device *dev) +{ +struct blkfront_info *info = dev->dev.driver_data; + +return info->is_ready; +} +static int blkif_open (struct inode *inode,struct file *filep) {struct blkfront_info *info = inode->i_bdev->bd_disk->private_data;
@@ -971,6 +987,7 @@ static struct xenbus_driver blkfront = { .remove = blkfront_remove, .resume = blkfront_resume, .otherend_changed = backend_changed, + .is_ready = blkfront_is_ready, };static int __init xlblk_init (void )
@@ -998,3 +1015,5 @@ module_exit(xlblk_exit);MODULE_DESCRIPTION ("Xen virtual block device frontend" );MODULE_LICENSE ("GPL" );MODULE_ALIAS_BLOCKDEV_MAJOR (XENVBD_MAJOR ); +MODULE_ALIAS ("xen:vbd" ); +MODULE_ALIAS ("xenblk" );
drivers/input/Kconfig +9 -0
@@ -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"
drivers/input/Makefile +2 -0
@@ -23,3 +23,5 @@ obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/ obj-$(CONFIG_INPUT_MISC) += misc/ obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o + +obj-$(CONFIG_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o
drivers/input/xen-kbdfront.c new file +340 -0
340 lines not on this page · raw message
drivers/net/xen-netfront.c +2 -0
@@ -1809,3 +1809,5 @@ module_exit(netif_exit);MODULE_DESCRIPTION ("Xen virtual network device frontend" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("xen:vif" ); +MODULE_ALIAS ("xennet" );
drivers/video/Kconfig +14 -0
@@ -1930,6 +1930,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"
drivers/video/Makefile +1 -0
@@ -114,6 +114,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
drivers/video/xen-fbfront.c new file +550 -0
550 lines not on this page · raw message
drivers/xen/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +config XEN_BALLOON + bool "Xen memory balloon driver" + depends on XEN + default y + help + The balloon driver allows the Xen domain to request more memory from + the system to expand the domain's memory allocation, or alternatively + return unneeded memory to the system. + +config XEN_SCRUB_PAGES + bool "Scrub pages before returning them to system" + depends on XEN_BALLOON + default y + help + Scrub pages before returning them to the system for reuse by + other domains. This makes sure that any confidential data + is not accidentally visible to other domains. Is it more + secure, but slightly less efficient. + If in doubt, say yes.
drivers/xen/Makefile +3 -1
@@ -1,2 +1,4 @@ -obj-y += grant-table.o +obj-y += grant-table.o features.o events.o obj-y += xenbus/ +obj-$(CONFIG_XEN_XENCOMM) += xencomm.o +obj-$(CONFIG_XEN_BALLOON) += balloon.o
drivers/xen/balloon.c new file +712 -0
622 lines not on this page · raw message
drivers/xen/events.c renamed from arch/x86/xen/events.c +102 -19
121 lines not on this page · raw message
drivers/xen/features.c renamed from arch/x86/xen/features.c +0 -0
drivers/xen/xencomm.c new file +232 -0
232 lines not on this page · raw message
include/asm-x86/paravirt.h +27 -16
43 lines not on this page · raw message
include/asm-x86/pgalloc.h +108 -3
111 lines not on this page · raw message
include/asm-x86/pgalloc_32.h deleted +0 -95
95 lines not on this page · raw message
include/asm-x86/pgalloc_64.h deleted +0 -133
133 lines not on this page · raw message
include/asm-x86/pgtable.h +26 -28
54 lines not on this page · raw message
include/asm-x86/xen/grant_table.h new file +7 -0
Lines of this file are not shown. View the raw message.
include/asm-x86/xen/page.h new file +168 -0
168 lines not on this page · raw message
include/xen/balloon.h new file +61 -0
61 lines not on this page · raw message
include/xen/interface/callback.h new file +102 -0
102 lines not on this page · raw message
include/xen/interface/io/fbif.h new file +124 -0
124 lines not on this page · raw message
include/xen/interface/io/kbdif.h new file +114 -0
114 lines not on this page · raw message
include/xen/interface/io/protocols.h new file +21 -0
Lines of this file are not shown. View the raw message.
include/xen/interface/xencomm.h new file +41 -0
41 lines not on this page · raw message
include/xen/page.h +1 -180
181 lines not on this page · raw message
include/xen/xencomm.h new file +77 -0
77 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.