Commit Graph
1823 Commits
Author SHA1 Message Date
Ian Campbell a7b5ded0d9 [LINUX] Move xenbus backend probing into a separate source file and
only build it when CONFIG_XEN_BACKEND is set.

This removes unused code from frontend only configurations and also
makes PV-on-HVM drivers on older kernels simpler by removing code
which would otherwise require extra code in the compatability shim.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-10-25 13:58:30 +01:00
Ian Campbell 4f3230eb63 [LINUX] PV-on-HVM: Directly include headers which are used in various
files rather than relying on them being included indirectly.

This is required because these headers are not pulled in indirectly on
older kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-10-25 13:58:30 +01:00
kfraser@localhost.localdomain 94e4fb8a1d [BLOCK] blkback: Fix potential grant entry leaks on error
As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-25 10:59:00 +01:00
awilliam@xenbuild.aw 3e081e983e merge with xen-unstable.hg 2006-10-24 11:21:48 -06:00
kfraser@localhost.localdomain 63175f1993 [BLKTAP] Do not allocate a descriptor for blktap control device
(minor 0).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-23 14:19:14 +01:00
kfraser@localhost.localdomain 7a9e5b2775 [BLKTAP] Only allocate tapfd descriptors when they are requested.
Currently all are allocated at bootup, even when they will never be used.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-23 14:18:16 +01:00
kfraser@localhost.localdomain ccf92acf14 [BALLOON] Add a sysfs interface.
Information is located under /sys/devices/system/memory.

Original patch from Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-23 14:09:01 +01:00
kfraser@localhost.localdomain 61ca72df6f [NET] back: Fix packet queuing so that packets are drained if the
interface is blocked for longer than 500ms. This avoids deadlock
situations where interfaces cannot be destroyed because some other
dormant interface is holding resources.

Signed-off-by: Christopher Clark <christopher.clark@cl.cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-23 11:20:37 +01:00
kfraser@localhost.localdomain 7a57f20be7 [BLOCK] blkback: Fix first_sect check.
The blkback code checks first_sect by computing last_sect - first_sect
+ 1. If this is not positive then the request is
rejected. Unfortunately, the calculation is stored in an unsigned
integer before the check is made so negative values will not be
rejected.

This patch fixes this by explicitly comparing first_sect with
last_sect.

The blktap code is similar but it stores the difference in a signed
integer so it's okay.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-23 10:05:32 +01:00
kfraser@localhost.localdomain 76da00df1a [BLOCK] blkback: Copy shared data before verification
As it is blkback verifies the metadata from the frontend in place.
This means we run the risk of the frontend changing the data after
we've verified it.  This patch copies the data onto the stack before
verifying and using it to ensure we see a consistent snapshot.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-23 10:00:14 +01:00
awilliam@xenbuild.aw b5f74534ce merge with xen-unstable.hg 2006-10-22 15:23:52 -06:00
Steven Hand cd6f6ef849 Omit seg fixup warning if it's just from statically linked init.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-10-20 11:49:00 +01:00
kfraser@localhost.localdomain dbcc721001 [BLKTAP]: Fix potential grant entry leaks on error
As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

There is still a potential leak if create_lookup_pte_addr fails
in fast_flush_area.  This leak is not affected by this patch.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-20 09:28:31 +01:00
kfraser@localhost.localdomain 97e34120fe [BLKTAP]: Kill bogus fast_flush_area
The function dispatch_rw_block_io may call fast_flush_area even before
a pending request has been initialised.  This patch deletes that call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-20 09:24:26 +01:00
kfraser@localhost.localdomain a935698894 [BLKTAP]: Kill duplicate fast_flush_area call
The dispatch_rw_block_io may call fast_flush_area twice if
create_lookup_pte_addr fails (there is a flush call at fail_flush
already).  The second call simply causes warnings to be printed
on the console.  This patch removes the duplicate call.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-20 09:22:58 +01:00
kfraser@localhost.localdomain 50b362a182 [BLKTAP]: Copy shared data before verification
As it is blktap verifies the metadata from the frontend in place.
This means we run the risk of the frontend changing the data after
we've verified it.  This patch copies the data onto the stack before
verifying and using it to ensure we see a consistent snapshot.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-19 14:50:47 +01:00
awilliam@xenbuild.aw 9c3c688c5b [IA64] backport toolchain fixes from linux-ia64
This backports the ia64 specific parts of this upstream linux
changeset:

http://www.kernel.org/hg/linux-2.6/?cs=dfbee33b0693

Change suggested by Akio Takebe.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-10-18 22:06:23 -06:00
awilliam@xenbuild.aw dd3d76baf0 [IA64] add arch/ia64/kernel/Makefile to sparse tree
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-10-18 22:06:18 -06:00
kfraser@localhost.localdomain 55235ec559 [NET] front: Fix "rmmod xennet" crash in dom0.
Signed-off-by: Jim Dykman <dykman@us.ibm.com>
2006-10-18 19:23:32 +01:00
kfraser@localhost.localdomain bc29b3f70e [NET] front/back: Avoid unaligned accesses to IP datagrams. These
cause noisy warnings on IA64.

Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-10-18 17:59:04 +01:00
kfraser@localhost.localdomain 761d4da84e [LINUX] Eliminate microcode driver's dependency on sys_m{,un}lock as
well as the needless use of static variables.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-18 17:41:36 +01:00
kfraser@localhost.localdomain 19c8d7a8fa [TPM] Fix the tpm frontend to properly shut down when the domain
is shutting down (call to xenbus_frontend_closed()). Also the driver
now waits longer until an outstanding response has been received (to
support a busy system). Moves the 'Unknown' state with the other
states that are not used by the TPM frontend.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-18 15:16:37 +01:00
awilliam@xenbuild.aw 8160bfb7c4 [IA64] warning fix for HVM PV driver
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
2006-10-17 14:29:33 -06:00
kfraser@localhost.localdomain 8405357df9 [NET] back: Remove unused variable declaration.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-17 19:03:47 +01:00
awilliam@xenbuild.aw 0598e72c96 [IA64] Xencomm fixes for HVM PV-drivers and driver domain.
Create xcom_mini.c from xcom_hcall.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-14 16:26:27 -06:00
awilliam@xenbuild.aw d53914d6c0 merge with xen-unstable.hg 2006-10-14 13:28:45 -06:00
kfraser@localhost.localdomain ad5b45d12e [NET] front: Do not read features from backend until it enters InitWait.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-13 18:04:33 +01:00
kfraser@localhost.localdomain f5698223fb [NET] back: Simplify probing of new interfaces. There's no need
to watch for creation of the handle node in xenstore, as it is
written by xend when creating the backend directory as part of
the same transaction.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-13 17:10:27 +01:00
kfraser@localhost.localdomain 9606cd400d [NET] front: No need to read handle field from xenstore. It's not used.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-13 17:07:39 +01:00
kfraser@localhost.localdomain e402c82996 [NET] back: Copy tx_ring data before verification
We need to make a copy of data from tx_ring before
verifying them as otherwise what we end up using may
be different from what was verified.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-12 16:09:15 +01:00
kfraser@localhost.localdomain 8b17a36d17 Fix privcmd mmap() on 64b architectures for regions larger than 2GB.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 14:25:51 +01:00
kfraser@localhost.localdomain 6329cf0815 [IA64] Add support for enforcing singleshot mmap() semantics at the
privcmd interface.
From: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 13:55:03 +01:00
kfraser@localhost.localdomain b73d95b84d [PRIVCMD] Fix ia64 domain creation by abstracting the singleshot mapping check.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 11:44:53 +01:00
kfraser@localhost.localdomain 5358257c6f [NET] back: Fix inter-domain networking when using rx-copy path.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 10:56:41 +01:00
kfraser@localhost.localdomain 503bcd598c [NET] front: Fix error handling to correctly skip bogus frags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 10:38:45 +01:00
kfraser@localhost.localdomain 2c48ac78fe [NET] back: Fix netif rate limiting.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-10 13:47:09 +01:00
kfraser@localhost.localdomain d55292850a [NET] back: Refcount fixes to vif rate-limiting code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-09 17:08:18 +01:00
kfraser@localhost.localdomain 7dae06e0f3 [PRIVCMD] Fix trivial bug introduced in IOCTL_PRIVCMD_MMAP.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-09 13:46:34 +01:00
kfraser@localhost.localdomain 507cd504b6 [LINUX] Various fixes for mmapping I/O and foreign memory pages.
First, auto-translate guests can use remap_pfn_range() rather than
direct_remap_pfn_range(). This actually works better because
remap_pfn_range() can legitimately assert VM_PFNMAP (this patch
removes this flag for direct_remap_pfn_range().

There are various cleanups and fixes to the privcmd interface:
 1. VMAs should be searched and used under the mmap semaphore
 2. Mapping should be single shot (since cirect_remap_pfn_range()
    expects the PTEs to be empty when it is called).
 3. Demand-fault population of the privcmd vma should be disallowed.
 4. Various others, including a more thorough check of input args.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-09 10:56:17 +01:00
awilliam@xenbuild.aw ae0a0e14bf [IA64] Remove test of dead CONFIG_XEN_IA64_DOM0_NON_VP
Signed-off-by: Aron Griffis <aron@hp.com>
2006-10-08 18:35:17 -06:00
kfraser@localhost.localdomain 4314149396 [BALLOON] Replace alloc_empty_page_range with new helper alloc_empty_pages_and_pagevec.
This is a better fit with all the callers, who now allocate discontiguous empty pages.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-06 11:52:41 +01:00
kfraser@localhost.localdomain db002ee4a0 [BLK] tap: Allocate pages for foreign mappings individually rather than contiguously.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-06 10:30:43 +01:00
kaf24@firebug.cl.cam.ac.uk f58fdb8d02 [TPM] back: Allocate pages for foreign mappings individually rather than contiguously.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 23:16:21 +01:00
kaf24@firebug.cl.cam.ac.uk 10ac5cd887 [NET] back: Allocate pages for foreign mappings individually rather than contiguously.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 22:49:26 +01:00
kaf24@firebug.cl.cam.ac.uk e3478ac5ef [NET] back: Remove unused rx_mmap area. Copying happens inside Xen, so
there is no need for a mapping area inside the driver for copying
receive path.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 22:14:39 +01:00
kaf24@firebug.cl.cam.ac.uk 76c184f428 [BLK] back: Allocate pages for foreign mappings individually rather
than in one large contiguous region.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 22:11:24 +01:00
awilliam@xenbuild.aw ca5eae8523 merge with xen-unstable.hg 2006-10-05 12:25:53 -06:00
kfraser@localhost.localdomain ad81332833 [NET] front: Fix size of grant_rx_ref[]. It should use the RX ring
size, rather than the TX ring size.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
2006-10-05 16:05:12 +01:00
Ian Campbell 192d7f5956 [NET] front: Include linux/moduleparam.h since we use module_param_*
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-10-05 14:07:57 +01:00
Ian Campbell 586fa33525 [NET] front: If the kernel does not include GSO then look for TSO.
This allows us to take advantage of TSO when running as PV-on-HVM on
older kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-10-05 10:09:25 +01:00