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

Commit 56d92aa5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

Pull Xen update from Konrad Rzeszutek Wilk:
 "Features:
   - When hotplugging PCI devices in a PV guest we can allocate
     Xen-SWIOTLB later.
   - Cleanup Xen SWIOTLB.
   - Support pages out grants from HVM domains in the backends.
   - Support wild cards in xen-pciback.hide=(BDF) arguments.
   - Update grant status updates with upstream hypervisor.
   - Boot PV guests with more than 128GB.
   - Cleanup Xen MMU code/add comments.
   - Obtain XENVERS using a preferred method.
   - Lay out generic changes to support Xen ARM.
   - Allow privcmd ioctl for HVM (used to do only PV).
   - Do v2 of mmap_batch for privcmd ioctls.
   - If hypervisor saves the LED keyboard light - we will now instruct
     the kernel about its state.
  Fixes:
   - More fixes to Xen PCI backend for various calls/FLR/etc.
   - With more than 4GB in a 64-bit PV guest disable native SWIOTLB.
   - Fix up smatch warnings.
   - Fix up various return values in privmcmd and mm."

* tag 'stable/for-linus-3.7-x86-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (48 commits)
  xen/pciback: Restore the PCI config space after an FLR.
  xen-pciback: properly clean up after calling pcistub_device_find()
  xen/vga: add the xen EFI video mode support
  xen/x86: retrieve keyboard shift status flags from hypervisor.
  xen/gndev: Xen backend support for paged out grant targets V4.
  xen-pciback: support wild cards in slot specifications
  xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer.
  xen/swiotlb: Remove functions not needed anymore.
  xen/pcifront: Use Xen-SWIOTLB when initting if required.
  xen/swiotlb: For early initialization, return zero on success.
  xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used.
  xen/swiotlb: Move the error strings to its own function.
  xen/swiotlb: Move the nr_tbl determination in its own function.
  xen/arm: compile and run xenbus
  xen: resynchronise grant table status codes with upstream
  xen/privcmd: return -EFAULT on error
  xen/privcmd: Fix mmap batch ioctl error status copy back.
  xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl
  xen/mm: return more precise error from xen_remap_domain_range()
  xen/mmu: If the revector fails, don't attempt to revector anything else.
  ...
parents 33c2a174 c341ca45
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -67,6 +67,10 @@
#define set_xen_guest_handle(hnd, val)	do { (hnd).p = val; } while (0)
#define set_xen_guest_handle(hnd, val)	do { (hnd).p = val; } while (0)


#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
/* Explicitly size integers that represent pfns in the public interface
 * with Xen so that we could have one ABI that works for 32 and 64 bit
 * guests. */
typedef unsigned long xen_pfn_t;
/* Guest handles for primitive C types. */
/* Guest handles for primitive C types. */
__DEFINE_GUEST_HANDLE(uchar, unsigned char);
__DEFINE_GUEST_HANDLE(uchar, unsigned char);
__DEFINE_GUEST_HANDLE(uint, unsigned int);
__DEFINE_GUEST_HANDLE(uint, unsigned int);
@@ -79,7 +83,6 @@ DEFINE_GUEST_HANDLE(void);
DEFINE_GUEST_HANDLE(uint64_t);
DEFINE_GUEST_HANDLE(uint64_t);
DEFINE_GUEST_HANDLE(uint32_t);
DEFINE_GUEST_HANDLE(uint32_t);


typedef unsigned long xen_pfn_t;
DEFINE_GUEST_HANDLE(xen_pfn_t);
DEFINE_GUEST_HANDLE(xen_pfn_t);
#define PRI_xen_pfn	"lx"
#define PRI_xen_pfn	"lx"
#endif
#endif
@@ -265,6 +268,8 @@ typedef struct xen_callback xen_callback_t;


#endif /* !__ASSEMBLY__ */
#endif /* !__ASSEMBLY__ */


#include <asm/pvclock-abi.h>

/* Size of the shared_info area (this is not related to page size).  */
/* Size of the shared_info area (this is not related to page size).  */
#define XSI_SHIFT			14
#define XSI_SHIFT			14
#define XSI_SIZE			(1 << XSI_SHIFT)
#define XSI_SIZE			(1 << XSI_SHIFT)
+7 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,10 @@
#endif
#endif


#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
/* Explicitly size integers that represent pfns in the public interface
 * with Xen so that on ARM we can have one ABI that works for 32 and 64
 * bit guests. */
typedef unsigned long xen_pfn_t;
/* Guest handles for primitive C types. */
/* Guest handles for primitive C types. */
__DEFINE_GUEST_HANDLE(uchar, unsigned char);
__DEFINE_GUEST_HANDLE(uchar, unsigned char);
__DEFINE_GUEST_HANDLE(uint,  unsigned int);
__DEFINE_GUEST_HANDLE(uint,  unsigned int);
@@ -57,6 +61,7 @@ DEFINE_GUEST_HANDLE(long);
DEFINE_GUEST_HANDLE(void);
DEFINE_GUEST_HANDLE(void);
DEFINE_GUEST_HANDLE(uint64_t);
DEFINE_GUEST_HANDLE(uint64_t);
DEFINE_GUEST_HANDLE(uint32_t);
DEFINE_GUEST_HANDLE(uint32_t);
DEFINE_GUEST_HANDLE(xen_pfn_t);
#endif
#endif


#ifndef HYPERVISOR_VIRT_START
#ifndef HYPERVISOR_VIRT_START
@@ -121,6 +126,8 @@ struct arch_shared_info {
#include "interface_64.h"
#include "interface_64.h"
#endif
#endif


#include <asm/pvclock-abi.h>

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
/*
/*
 * The following is all CPU context. Note that the fpu_ctxt block is filled
 * The following is all CPU context. Note that the fpu_ctxt block is filled
+2 −0
Original line number Original line Diff line number Diff line
@@ -5,10 +5,12 @@
extern int xen_swiotlb;
extern int xen_swiotlb;
extern int __init pci_xen_swiotlb_detect(void);
extern int __init pci_xen_swiotlb_detect(void);
extern void __init pci_xen_swiotlb_init(void);
extern void __init pci_xen_swiotlb_init(void);
extern int pci_xen_swiotlb_init_late(void);
#else
#else
#define xen_swiotlb (0)
#define xen_swiotlb (0)
static inline int __init pci_xen_swiotlb_detect(void) { return 0; }
static inline int __init pci_xen_swiotlb_detect(void) { return 0; }
static inline void __init pci_xen_swiotlb_init(void) { }
static inline void __init pci_xen_swiotlb_init(void) { }
static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; }
#endif
#endif


#endif /* _ASM_X86_SWIOTLB_XEN_H */
#endif /* _ASM_X86_SWIOTLB_XEN_H */
+2 −1
Original line number Original line Diff line number Diff line
@@ -6,8 +6,9 @@


#include <xen/xen.h>
#include <xen/xen.h>
#include <xen/interface/physdev.h>
#include <xen/interface/physdev.h>
#include "xen-ops.h"


unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
static unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
{
{
	struct physdev_apic apic_op;
	struct physdev_apic apic_op;
	int ret;
	int ret;
+11 −4
Original line number Original line Diff line number Diff line
@@ -80,6 +80,8 @@
#include "smp.h"
#include "smp.h"
#include "multicalls.h"
#include "multicalls.h"


#include <xen/events.h>

EXPORT_SYMBOL_GPL(hypercall_page);
EXPORT_SYMBOL_GPL(hypercall_page);


DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
@@ -1288,7 +1290,6 @@ asmlinkage void __init xen_start_kernel(void)
{
{
	struct physdev_set_iopl set_iopl;
	struct physdev_set_iopl set_iopl;
	int rc;
	int rc;
	pgd_t *pgd;


	if (!xen_start_info)
	if (!xen_start_info)
		return;
		return;
@@ -1380,8 +1381,6 @@ asmlinkage void __init xen_start_kernel(void)
	acpi_numa = -1;
	acpi_numa = -1;
#endif
#endif


	pgd = (pgd_t *)xen_start_info->pt_base;

	/* Don't do the full vcpu_info placement stuff until we have a
	/* Don't do the full vcpu_info placement stuff until we have a
	   possible map and a non-dummy shared_info. */
	   possible map and a non-dummy shared_info. */
	per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
	per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
@@ -1390,7 +1389,7 @@ asmlinkage void __init xen_start_kernel(void)
	early_boot_irqs_disabled = true;
	early_boot_irqs_disabled = true;


	xen_raw_console_write("mapping kernel into physical memory\n");
	xen_raw_console_write("mapping kernel into physical memory\n");
	pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages);
	xen_setup_kernel_pagetable((pgd_t *)xen_start_info->pt_base, xen_start_info->nr_pages);


	/* Allocate and initialize top and mid mfn levels for p2m structure */
	/* Allocate and initialize top and mid mfn levels for p2m structure */
	xen_build_mfn_list_list();
	xen_build_mfn_list_list();
@@ -1441,11 +1440,19 @@ asmlinkage void __init xen_start_kernel(void)
		const struct dom0_vga_console_info *info =
		const struct dom0_vga_console_info *info =
			(void *)((char *)xen_start_info +
			(void *)((char *)xen_start_info +
				 xen_start_info->console.dom0.info_off);
				 xen_start_info->console.dom0.info_off);
		struct xen_platform_op op = {
			.cmd = XENPF_firmware_info,
			.interface_version = XENPF_INTERFACE_VERSION,
			.u.firmware_info.type = XEN_FW_KBD_SHIFT_FLAGS,
		};


		xen_init_vga(info, xen_start_info->console.dom0.info_size);
		xen_init_vga(info, xen_start_info->console.dom0.info_size);
		xen_start_info->console.domU.mfn = 0;
		xen_start_info->console.domU.mfn = 0;
		xen_start_info->console.domU.evtchn = 0;
		xen_start_info->console.domU.evtchn = 0;


		if (HYPERVISOR_dom0_op(&op) == 0)
			boot_params.kbd_status = op.u.firmware_info.u.kbd_shift_flags;

		xen_init_apic();
		xen_init_apic();


		/* Make sure ACS will be enabled */
		/* Make sure ACS will be enabled */
Loading