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

Commit 90160371 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (37 commits)
  xen/pciback: Expand the warning message to include domain id.
  xen/pciback: Fix "device has been assigned to X domain!" warning
  xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind"
  xen/xenbus: don't reimplement kvasprintf via a fixed size buffer
  xenbus: maximum buffer size is XENSTORE_PAYLOAD_MAX
  xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
  Xen: consolidate and simplify struct xenbus_driver instantiation
  xen-gntalloc: introduce missing kfree
  xen/xenbus: Fix compile error - missing header for xen_initial_domain()
  xen/netback: Enable netback on HVM guests
  xen/grant-table: Support mappings required by blkback
  xenbus: Use grant-table wrapper functions
  xenbus: Support HVM backends
  xen/xenbus-frontend: Fix compile error with randconfig
  xen/xenbus-frontend: Make error message more clear
  xen/privcmd: Remove unused support for arch specific privcmp mmap
  xen: Add xenbus_backend device
  xen: Add xenbus device driver
  xen: Add privcmd device driver
  xen/gntalloc: fix reference counts on multi-page mappings
  ...
parents ae5cfc05 6c254de1
Loading
Loading
Loading
Loading
+75 −0
Original line number Diff line number Diff line
What:		/sys/bus/xen-backend/devices/*/devtype
Date:		Feb 2009
KernelVersion:	2.6.38
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                The type of the device.  e.g., one of: 'vbd' (block),
                'vif' (network), or 'vfb' (framebuffer).

What:		/sys/bus/xen-backend/devices/*/nodename
Date:		Feb 2009
KernelVersion:	2.6.38
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                XenStore node (under /local/domain/NNN/) for this
                backend device.

What:		/sys/bus/xen-backend/devices/vbd-*/physical_device
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                The major:minor number (in hexidecimal) of the
                physical device providing the storage for this backend
                block device.

What:		/sys/bus/xen-backend/devices/vbd-*/mode
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Whether the block device is read-only ('r') or
                read-write ('w').

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/f_req
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of flush requests from the frontend.

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/oo_req
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of requests delayed because the backend was too
                busy processing previous requests.

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/rd_req
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of read requests from the frontend.

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/rd_sect
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of sectors read by the frontend.

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/wr_req
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of write requests from the frontend.

What:		/sys/bus/xen-backend/devices/vbd-*/statistics/wr_sect
Date:		April 2011
KernelVersion:	3.0
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
                Number of sectors written by the frontend.
+77 −0
Original line number Diff line number Diff line
What:		/sys/devices/system/xen_memory/xen_memory0/max_retry_count
Date:		May 2011
KernelVersion:	2.6.39
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		The maximum number of times the balloon driver will
		attempt to increase the balloon before giving up.  See
		also 'retry_count' below.
		A value of zero means retry forever and is the default one.

What:		/sys/devices/system/xen_memory/xen_memory0/max_schedule_delay
Date:		May 2011
KernelVersion:	2.6.39
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		The limit that 'schedule_delay' (see below) will be
		increased to. The default value is 32 seconds.

What:		/sys/devices/system/xen_memory/xen_memory0/retry_count
Date:		May 2011
KernelVersion:	2.6.39
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		The current number of times that the balloon driver
		has attempted to increase the size of the balloon.
		The default value is one. With max_retry_count being
		zero (unlimited), this means that the driver will attempt
		to retry with a 'schedule_delay' delay.

What:		/sys/devices/system/xen_memory/xen_memory0/schedule_delay
Date:		May 2011
KernelVersion:	2.6.39
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		The time (in seconds) to wait between attempts to
		increase the balloon.  Each time the balloon cannot be
		increased, 'schedule_delay' is increased (until
		'max_schedule_delay' is reached at which point it
		will use the max value).

What:		/sys/devices/system/xen_memory/xen_memory0/target
Date:		April 2008
KernelVersion:	2.6.26
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		The target number of pages to adjust this domain's
		memory reservation to.

What:		/sys/devices/system/xen_memory/xen_memory0/target_kb
Date:		April 2008
KernelVersion:	2.6.26
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		As target above, except the value is in KiB.

What:		/sys/devices/system/xen_memory/xen_memory0/info/current_kb
Date:		April 2008
KernelVersion:	2.6.26
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		Current size (in KiB) of this domain's memory
		reservation.

What:		/sys/devices/system/xen_memory/xen_memory0/info/high_kb
Date:		April 2008
KernelVersion:	2.6.26
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		Amount (in KiB) of high memory in the balloon.

What:		/sys/devices/system/xen_memory/xen_memory0/info/low_kb
Date:		April 2008
KernelVersion:	2.6.26
Contact:	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		Amount (in KiB) of low (or normal) memory in the
		balloon.
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@
__DEFINE_GUEST_HANDLE(uchar, unsigned char);
__DEFINE_GUEST_HANDLE(uint, unsigned int);
__DEFINE_GUEST_HANDLE(ulong, unsigned long);
__DEFINE_GUEST_HANDLE(u64, unsigned long);

DEFINE_GUEST_HANDLE(char);
DEFINE_GUEST_HANDLE(int);
DEFINE_GUEST_HANDLE(long);
+3 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ config XEN_PVHVM

config XEN_MAX_DOMAIN_MEMORY
       int
       default 128
       default 500 if X86_64
       default 64 if X86_32
       depends on XEN
       help
         This only affects the sizing of some bss arrays, the unused
@@ -48,3 +49,4 @@ config XEN_DEBUG_FS
	help
	  Enable statistics output and various tuning options in debugfs.
	  Enabling this option may incur a significant performance overhead.
+40 −4
Original line number Diff line number Diff line
@@ -54,6 +54,20 @@ static int map_pte_fn(pte_t *pte, struct page *pmd_page,
	return 0;
}

/*
 * This function is used to map shared frames to store grant status. It is
 * different from map_pte_fn above, the frames type here is uint64_t.
 */
static int map_pte_fn_status(pte_t *pte, struct page *pmd_page,
			     unsigned long addr, void *data)
{
	uint64_t **frames = (uint64_t **)data;

	set_pte_at(&init_mm, addr, pte, mfn_pte((*frames)[0], PAGE_KERNEL));
	(*frames)++;
	return 0;
}

static int unmap_pte_fn(pte_t *pte, struct page *pmd_page,
			unsigned long addr, void *data)
{
@@ -64,10 +78,10 @@ static int unmap_pte_fn(pte_t *pte, struct page *pmd_page,

int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes,
			   unsigned long max_nr_gframes,
			   struct grant_entry **__shared)
			   void **__shared)
{
	int rc;
	struct grant_entry *shared = *__shared;
	void *shared = *__shared;

	if (shared == NULL) {
		struct vm_struct *area =
@@ -83,8 +97,30 @@ int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes,
	return rc;
}

void arch_gnttab_unmap_shared(struct grant_entry *shared,
			      unsigned long nr_gframes)
int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes,
			   unsigned long max_nr_gframes,
			   grant_status_t **__shared)
{
	int rc;
	grant_status_t *shared = *__shared;

	if (shared == NULL) {
		/* No need to pass in PTE as we are going to do it
		 * in apply_to_page_range anyhow. */
		struct vm_struct *area =
			alloc_vm_area(PAGE_SIZE * max_nr_gframes, NULL);
		BUG_ON(area == NULL);
		shared = area->addr;
		*__shared = shared;
	}

	rc = apply_to_page_range(&init_mm, (unsigned long)shared,
				 PAGE_SIZE * nr_gframes,
				 map_pte_fn_status, &frames);
	return rc;
}

void arch_gnttab_unmap(void *shared, unsigned long nr_gframes)
{
	apply_to_page_range(&init_mm, (unsigned long)shared,
			    PAGE_SIZE * nr_gframes, unmap_pte_fn, NULL);
Loading