Commit 4b7227ca authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-xen-next: (52 commits)
  xen: add balloon driver
  xen: allow compilation with non-flat memory
  xen: fold xen_sysexit into xen_iret
  xen: allow set_pte_at on init_mm to be lockless
  xen: disable preemption during tlb flush
  xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
  xen: Add compatibility aliases for frontend drivers
  xen: Module autoprobing support for frontend drivers
  xen blkfront: Delay wait for block devices until after the disk is added
  xen/blkfront: use bdget_disk
  xen: Make xen-blkfront write its protocol ABI to xenstore
  xen: import arch generic part of xencomm
  xen: make grant table arch portable
  xen: replace callers of alloc_vm_area()/free_vm_area() with xen_ prefixed one
  xen: make include/xen/page.h portable moving those definitions under asm dir
  xen: add resend_irq_on_evtchn() definition into events.c
  Xen: make events.c portable for ia64/xen support
  xen: move events.c to drivers/xen for IA64/Xen support
  xen: move features.c from arch/x86/xen/features.c to drivers/xen
  xen: add missing definitions in include/xen/interface/vcpu.h which ia64/xen needs
  ...
parents 5dae61b8 1775826c
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -409,7 +409,7 @@ restore_nocheck_notrace:
irq_return:
irq_return:
	INTERRUPT_RETURN
	INTERRUPT_RETURN
.section .fixup,"ax"
.section .fixup,"ax"
iret_exc:
ENTRY(iret_exc)
	pushl $0			# no error code
	pushl $0			# no error code
	pushl $do_iret_error
	pushl $do_iret_error
	jmp error_code
	jmp error_code
@@ -1017,6 +1017,13 @@ ENTRY(kernel_thread_helper)
ENDPROC(kernel_thread_helper)
ENDPROC(kernel_thread_helper)


#ifdef CONFIG_XEN
#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)
ENTRY(xen_hypervisor_callback)
	CFI_STARTPROC
	CFI_STARTPROC
	pushl $0
	pushl $0
@@ -1035,8 +1042,9 @@ ENTRY(xen_hypervisor_callback)
	cmpl $xen_iret_end_crit,%eax
	cmpl $xen_iret_end_crit,%eax
	jae  1f
	jae  1f


	call xen_iret_crit_fixup
	jmp  xen_iret_crit_fixup


ENTRY(xen_do_upcall)
1:	mov %esp, %eax
1:	mov %esp, %eax
	call xen_evtchn_do_upcall
	call xen_evtchn_do_upcall
	jmp  ret_from_intr
	jmp  ret_from_intr
+7 −5
Original line number Original line Diff line number Diff line
@@ -366,11 +366,13 @@ struct pv_mmu_ops pv_mmu_ops = {
	.flush_tlb_single = native_flush_tlb_single,
	.flush_tlb_single = native_flush_tlb_single,
	.flush_tlb_others = native_flush_tlb_others,
	.flush_tlb_others = native_flush_tlb_others,


	.alloc_pt = paravirt_nop,
	.alloc_pte = paravirt_nop,
	.alloc_pd = paravirt_nop,
	.alloc_pmd = paravirt_nop,
	.alloc_pd_clone = paravirt_nop,
	.alloc_pmd_clone = paravirt_nop,
	.release_pt = paravirt_nop,
	.alloc_pud = paravirt_nop,
	.release_pd = paravirt_nop,
	.release_pte = paravirt_nop,
	.release_pmd = paravirt_nop,
	.release_pud = paravirt_nop,


	.set_pte = native_set_pte,
	.set_pte = native_set_pte,
	.set_pte_at = native_set_pte_at,
	.set_pte_at = native_set_pte_at,
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@
#include <asm/apic.h>
#include <asm/apic.h>
#include <asm/desc.h>
#include <asm/desc.h>
#include <asm/hpet.h>
#include <asm/hpet.h>
#include <asm/pgtable.h>
#include <asm/reboot_fixups.h>
#include <asm/reboot_fixups.h>
#include <asm/reboot.h>
#include <asm/reboot.h>


@@ -15,7 +16,6 @@
# include <linux/dmi.h>
# include <linux/dmi.h>
# include <linux/ctype.h>
# include <linux/ctype.h>
# include <linux/mc146818rtc.h>
# include <linux/mc146818rtc.h>
# include <asm/pgtable.h>
#else
#else
# include <asm/iommu.h>
# include <asm/iommu.h>
#endif
#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
	/* Remap the kernel at virtual address zero, as well as offset zero
	   from the kernel segment.  This assumes the kernel segment starts at
	   from the kernel segment.  This assumes the kernel segment starts at
	   virtual address PAGE_OFFSET. */
	   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);
		sizeof(swapper_pg_dir [0]) * KERNEL_PGD_PTRS);


	/*
	/*
+2 −2
Original line number Original line Diff line number Diff line
@@ -1039,8 +1039,8 @@ int __cpuinit native_cpu_up(unsigned int cpu)


#ifdef CONFIG_X86_32
#ifdef CONFIG_X86_32
	/* init low mem mapping */
	/* init low mem mapping */
	clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
	clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
			min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS));
			min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
	flush_tlb_all();
	flush_tlb_all();
#endif
#endif


+11 −11
Original line number Original line Diff line number Diff line
@@ -320,7 +320,7 @@ static void check_zeroed_page(u32 pfn, int type, struct page *page)
	 * pdes need to be zeroed.
	 * pdes need to be zeroed.
	 */
	 */
	if (type & VMI_PAGE_CLONE)
	if (type & VMI_PAGE_CLONE)
		limit = USER_PTRS_PER_PGD;
		limit = KERNEL_PGD_BOUNDARY;
	for (i = 0; i < limit; i++)
	for (i = 0; i < limit; i++)
		BUG_ON(ptr[i]);
		BUG_ON(ptr[i]);
}
}
@@ -392,13 +392,13 @@ static void *vmi_kmap_atomic_pte(struct page *page, enum km_type type)
}
}
#endif
#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_set_page_type(pfn, VMI_PAGE_L1);
	vmi_ops.allocate_page(pfn, VMI_PAGE_L1, 0, 0, 0);
	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.
	 * 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);
	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_set_page_type(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE);
	vmi_check_page_type(clonepfn, VMI_PAGE_L2);
	vmi_check_page_type(clonepfn, VMI_PAGE_L2);
	vmi_ops.allocate_page(pfn, VMI_PAGE_L2 | VMI_PAGE_CLONE, clonepfn, start, count);
	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_ops.release_page(pfn, VMI_PAGE_L1);
	vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
	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_ops.release_page(pfn, VMI_PAGE_L2);
	vmi_set_page_type(pfn, VMI_PAGE_NORMAL);
	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);
	vmi_ops.allocate_page = vmi_get_function(VMI_CALL_AllocatePage);
	if (vmi_ops.allocate_page) {
	if (vmi_ops.allocate_page) {
		pv_mmu_ops.alloc_pt = vmi_allocate_pt;
		pv_mmu_ops.alloc_pte = vmi_allocate_pte;
		pv_mmu_ops.alloc_pd = vmi_allocate_pd;
		pv_mmu_ops.alloc_pmd = vmi_allocate_pmd;
		pv_mmu_ops.alloc_pd_clone = vmi_allocate_pd_clone;
		pv_mmu_ops.alloc_pmd_clone = vmi_allocate_pmd_clone;
	}
	}


	vmi_ops.release_page = vmi_get_function(VMI_CALL_ReleasePage);
	vmi_ops.release_page = vmi_get_function(VMI_CALL_ReleasePage);
	if (vmi_ops.release_page) {
	if (vmi_ops.release_page) {
		pv_mmu_ops.release_pt = vmi_release_pt;
		pv_mmu_ops.release_pte = vmi_release_pte;
		pv_mmu_ops.release_pd = vmi_release_pd;
		pv_mmu_ops.release_pmd = vmi_release_pmd;
	}
	}


	/* Set linear is needed in all cases */
	/* Set linear is needed in all cases */
Loading