Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66b6a0c9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'stable/for-linus-3.7-rc4-tag' of...

Merge tag 'stable/for-linus-3.7-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull Xen bugfixes from Konrad Rzeszutek Wilk:
 - Use appropriate macros instead of hand-rolling our own (ARM).
 - Fixes if FB/KBD closed unexpectedly.
 - Fix memory leak in /dev/gntdev ioctl calls.
 - Fix overflow check in xenbus_file_write.
 - Document cleanup.
 - Performance optimization when migrating guests.

* tag 'stable/for-linus-3.7-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/mmu: Use Xen specific TLB flush instead of the generic one.
  xen/arm: use the __HVC macro
  xen/xenbus: fix overflow check in xenbus_file_write()
  xen-kbdfront: handle backend CLOSED without CLOSING
  xen-fbfront: handle backend CLOSED without CLOSING
  xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF
  x86: remove obsolete comment from asm/xen/hypervisor.h
parents d9b482c8 95a7d768
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -48,20 +48,16 @@

#include <linux/linkage.h>
#include <asm/assembler.h>
#include <asm/opcodes-virt.h>
#include <xen/interface/xen.h>


/* HVC 0xEA1 */
#ifdef CONFIG_THUMB2_KERNEL
#define xen_hvc .word 0xf7e08ea1
#else
#define xen_hvc .word 0xe140ea71
#endif
#define XEN_IMM 0xEA1

#define HYPERCALL_SIMPLE(hypercall)		\
ENTRY(HYPERVISOR_##hypercall)			\
	mov r12, #__HYPERVISOR_##hypercall;	\
	xen_hvc;							\
	__HVC(XEN_IMM);						\
	mov pc, lr;							\
ENDPROC(HYPERVISOR_##hypercall)

@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \
	stmdb sp!, {r4}						\
	ldr r4, [sp, #4]					\
	mov r12, #__HYPERVISOR_##hypercall;	\
	xen_hvc								\
	__HVC(XEN_IMM);						\
	ldm sp!, {r4}						\
	mov pc, lr							\
ENDPROC(HYPERVISOR_##hypercall)
@@ -100,7 +96,7 @@ ENTRY(privcmd_call)
	mov r2, r3
	ldr r3, [sp, #8]
	ldr r4, [sp, #4]
	xen_hvc
	__HVC(XEN_IMM)
	ldm sp!, {r4}
	mov pc, lr
ENDPROC(privcmd_call);
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#ifndef _ASM_X86_XEN_HYPERVISOR_H
#define _ASM_X86_XEN_HYPERVISOR_H

/* arch/i386/kernel/setup.c */
extern struct shared_info *HYPERVISOR_shared_info;
extern struct start_info *xen_start_info;

+20 −1
Original line number Diff line number Diff line
@@ -1288,6 +1288,25 @@ unsigned long xen_read_cr2_direct(void)
	return this_cpu_read(xen_vcpu_info.arch.cr2);
}

void xen_flush_tlb_all(void)
{
	struct mmuext_op *op;
	struct multicall_space mcs;

	trace_xen_mmu_flush_tlb_all(0);

	preempt_disable();

	mcs = xen_mc_entry(sizeof(*op));

	op = mcs.args;
	op->cmd = MMUEXT_TLB_FLUSH_ALL;
	MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF);

	xen_mc_issue(PARAVIRT_LAZY_MMU);

	preempt_enable();
}
static void xen_flush_tlb(void)
{
	struct mmuext_op *op;
@@ -2518,7 +2537,7 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
	err = 0;
out:

	flush_tlb_all();
	xen_flush_tlb_all();

	return err;
}
+4 −1
Original line number Diff line number Diff line
@@ -311,7 +311,6 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
	case XenbusStateReconfiguring:
	case XenbusStateReconfigured:
	case XenbusStateUnknown:
	case XenbusStateClosed:
		break;

	case XenbusStateInitWait:
@@ -350,6 +349,10 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,

		break;

	case XenbusStateClosed:
		if (dev->state == XenbusStateClosed)
			break;
		/* Missed the backend's CLOSING state -- fallthrough */
	case XenbusStateClosing:
		xenbus_frontend_closed(dev);
		break;
+4 −1
Original line number Diff line number Diff line
@@ -641,7 +641,6 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
	case XenbusStateReconfiguring:
	case XenbusStateReconfigured:
	case XenbusStateUnknown:
	case XenbusStateClosed:
		break;

	case XenbusStateInitWait:
@@ -670,6 +669,10 @@ static void xenfb_backend_changed(struct xenbus_device *dev,
		info->feature_resize = val;
		break;

	case XenbusStateClosed:
		if (dev->state == XenbusStateClosed)
			break;
		/* Missed the backend's CLOSING state -- fallthrough */
	case XenbusStateClosing:
		xenbus_frontend_closed(dev);
		break;
Loading