Commit Graph
1490 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain bef5a7699a [PCI] back: Fix potential infinite loop in pcistub_match_one().
The for loop in pcistub_match_one will loop forever if the
dev->bus->self links to itself at the uppermost bridge.  Adding a
check to prevent linking back in on itself prevents this.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
2006-08-02 09:15:26 +01:00
kfraser@localhost.localdomain 6c8184a0a3 [LINUX] Fix save/restore (broken by my own GSO tweaks).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 18:06:44 +01:00
kfraser@localhost.localdomain 177155de98 [LINUX] Do not early-unpin pagetables that contain foreign mappings.
This fixes a bug whereby foreign pages were freed by the unpin, which
then become owned by the local domain before it destroys its ptes.
It therefore (erroneously) detects the mappings as local and so
updates reference counts, leading to crashes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 15:48:48 +01:00
kfraser@localhost.localdomain 0434f44fcd [NET] Enable TCPv4 segmentation offload in front/back drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 11:54:45 +01:00
kfraser@localhost.localdomain e40c413dc9 [NET] back: Transmit TSO packets if supported
This patch adds TSO transmission support to the backend.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Disable for now, as domU->dom0 direction.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:49:36 +01:00
kfraser@localhost.localdomain 3fa4fb49fe [NET] front: Add TSO support
This patch adds TCP Segmentation Offload (TSO) support to the
frontend.
It also advertises this fact through xenbus so that the frontend can
detect this and send through TSO requests only if it is supported.

This is done using an extra request slot which is indicated by a flag
in the first slot.  In future checksum offload can be done in the same
way.

Even though only TSO is supported for now the code actually supports
GSO so it can be applied to any other protocol.  The only missing bit
is the detection of host support for a specific GSO protocol.  Once
that is added we can advertise all supported protocols to the guest.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Disable for now, as in domU->dom0 direction.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:45:22 +01:00
kfraser@localhost.localdomain ee5e8cb59c [NET] back: Transmit SG packets if supported
This patch adds scatter-and-gather transmission support to the
backend. This allows the MTU to be raised right now and the potential
for TSO in future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-31 17:42:13 +01:00
kfraser@localhost.localdomain 0cfb94daa1 [NET] front: Add SG support
This patch adds scatter-and-gather support to the frontend.  It also
advertises this fact through xenbus so that the backend can detect
this and send through SG requests only if it is supported.

SG support is required to support skb's larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-31 17:35:43 +01:00
kfraser@localhost.localdomain 0e81c9938e [NET] back: Added tx queue
This patch adds a tx queue to the backend if the frontend supports rx
refill notification.  A queue is needed because SG/TSO greatly reduces
the number of packets that can be stored in the rx ring.  Given an rx
ring with 256 entries, a maximum TSO packet can occupy as many as 18
entries, meaning that the entire ring can only hold 14 packets.  This
is too small at high bandwidths with large TCP RX windows.

Having a tx queue does not present a new security risk as the queue is
a fixed size buffer just like the rx ring.  So each guest can only
hold a
fixed amount of memory (proportional to the tx queue length) on the
host.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cannot BUG_ON netbk_queue_full yet !netbk_can_queue, as this can be
triggered by a misbehaving client. Set req_event appropriately when
stopping the packet queue, or we will not receive a notification.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-31 17:29:00 +01:00
kfraser@localhost.localdomain cef4d5d58a [NET] front: Fix the build (broken my me a few changesets back).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 17:52:57 +01:00
kfraser@localhost.localdomain ffb974095f [TPM] Remove some stale code from the TPM backend driver. The code
used to be used for sending of vTPM control commands, but now this is
all done with the hotplug scripts.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-07-28 17:33:26 +01:00
kfraser@localhost.localdomain 160bfb4e1c [LINUX] update_va_mapping multicalls: Use MULTI_UVMxxx_INDEX where possible.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-07-28 17:25:20 +01:00
kfraser@localhost.localdomain 6faab8acaf [PCI] Pcifront for ia64.
Added in Kconfig.
On ia64, use ia64 sysdata instead of pcifront genuine one.
Fix a warning on xenbus.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-28 17:23:15 +01:00
kfraser@localhost.localdomain d5dd60406f [NET] front: Added feature-rx-notify
This patch adds support to the frontend for notifying the backend whenever
the rx ring is refilled.  This is required in order for the backend to
get a tx queue.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Modified to only send notification if req_event index is set
appropriately.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 17:13:08 +01:00
kfraser@localhost.localdomain 648ad07608 [NET] back: Replace netif->status with netif_carrier_ok
The connection status to the frontend can be represented using
netif_carrier_ok instead of netif->status.  As a result, we delay
the construction of the dev qdisc until the carrier comes on.  This
is a prerequisite for adding a tx queue.

By the same token, netif->active is now simply the conjunction of
netif_running and netif_carrier_ok so it too can be removed.

Because netif_carrier_off/netif_carrier_on and rtnl_lock all entail
memory barriers, there is no need to have extra memory barriers around
them.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:04:55 +01:00
kfraser@localhost.localdomain db9f62f570 [NET] front: Move rx req pushing to one spot
This patch moves all rx request pushing to network_alloc_rx_buffers.
This is needed to reduce churn for TSO.  More importantly, this makes
it easier to send notifications when adding rx requests which is
required for having a queue in dom0.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:03:26 +01:00
kfraser@localhost.localdomain 47a078f101 [NET] front: Clean up rx ring recovery.
Signed-off-by: Keir Fraser <keir@xensource.com>

This is an update to c/s
10855:03c8002068d9d60c7bbfc2f41af975e09b2e2211
which should have contained the following changeset message
(rather than 'Merge.').

[NET] front: Stop using rx->id

With the current protocol for transferring packets from dom0 to domU,
the
rx->id field is useless because it can be derived from the rx request
ring
ID.  In particular,

        rx->id = (ring_id & NET_RX_RING_SIZE - 1) + 1;

This formula works because the rx response to each request always
occupies
the same slot that the request arrived in.  This in turn is a
consequence
of the fact that each packet only occupies one slot.

The other important reason that this works for dom0=>domU but not
domU=>dom0
is that the resource associated with the rx->id is freed immediately
while
in the domU=>dom0 case the resource is held until the skb is liberated
by
dom0.

Using this formula we can essentially remove rx->id from the protocol,
freeing up space that could be instead be used by things like TSO.
The
only constraint is that the backend must obey the rule that each id
must
only be used in the response that occupies the same slot as the
request.

The actual field of rx->id is still maintained for compatibility with
older backends.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-28 17:00:10 +01:00
kfraser@localhost.localdomain 30ec819826 Merge. 2006-07-28 16:53:58 +01:00
kfraser@localhost.localdomain 4c975eb710 [PCI] Per-device permissive flag (replaces global permissive flag).
Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
2006-07-28 12:56:10 +01:00
kfraser@localhost.localdomain 5b0a11ef14 [PCI] Allow per-device configuration for fine-grained control over PCI
configuration space writes, with a goal that was also previously
described by Ryan:

"Permissive mode should only be used as a fall back for unknown
devices.
I think the correct solution for dealing with these device-specific
configuration space registers is to identify them and add the
device-specific fields to the overlay. This patch adds a special
configuration space handler for network cards based on the tg3 linux
network device driver. This handler should allow for reads/writes to
all of the configuration space registers that the tg3 driver requires."

This patch attempts to address concerns with Ryan's original
submission by moving policy from the dom0 kernel into dom0 user-space.
As new quirky devices emerge they can be incorporated into the user-space
policy.  An added benefit is that changes to the policy are effective
for domains created after the changes are written (no need rebuild the
hypervisor or restart xend).

Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
2006-07-28 12:54:58 +01:00
kfraser@localhost.localdomain a111f90b19 [LINUX] Clean up reboot.c suspend handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-28 11:10:08 +01:00
awilliam@xenbuild.aw 0fe57ed434 merge with xen-unstable.hg 2006-07-27 10:43:34 -06:00
awilliam@xenbuild.aw 47c4e81c74 [IA64] remove a debug message
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-27 09:16:32 -06:00
kfraser@localhost.localdomain 9314b23b01 Revert previous changeset. Needs more review.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-27 14:06:15 +01:00
kfraser@localhost.localdomain e91cb0ab6f [NET] back: Replace netif->active with netif_carrier_ok
The connection status to the frontend can be represented using
netif_carrier_ok instead of netif->active.  As a result, we delay
the construction of the dev qdisc until the carrier comes on.  This
is a prerequisite for adding a tx queue.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:52:02 +01:00
kfraser@localhost.localdomain 8fd94b35bf [NET] back: Make use of the simplicity of tasklets in net_rx_action
Tasklets have the property that each one is running on only one CPU at
any time.  This means that you don't have to worry about the tasklet
racing against itself.  Therefore any resources used by just a single
tasklet does not need to be guarded by locks.

Since net_rx_action is the only user of alloc_mfn, we can remove the
mfn_lock that guard it.

The notify_list array is huge by Linux standards so placing it on the
stack is unsafe.  Since net_rx_action is not re-entrant, we can simply
make it static.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:34:09 +01:00
kfraser@localhost.localdomain b93f5d8456 [NET] front: Zero gso features/pad
Set unused gso features/pad values to zero for forward-compatibility.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-27 13:32:29 +01:00
awilliam@xenbuild.aw d2ac905a14 merge with xen-unstable.hg 2006-07-26 10:49:32 -06:00
awilliam@xenbuild.aw 0adf62a2ae [IA64] nasty bug fix
Bug fix: restore phys_addr field, because some other Xen
functions consider it as unused.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-26 09:41:24 -06:00
awilliam@xenbuild.aw f08a891ab3 [IA64] linux without SMP
Add #ifdef CONFIG_SMP so that linux can compile without SMP.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-26 09:39:38 -06:00
kfraser@localhost.localdomain b296701bb2 [LINUX] Disable configuration of ARCH_SPARSEMEM_ENABLE on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-26 10:08:13 +01:00
awilliam@xenbuild.aw 31423d8a91 merge with xen-unstable.hg 2006-07-25 12:19:05 -06:00
kfraser@localhost.localdomain 1bcc086e02 Fix Linux so that it does not set a timeout if there are no pending
timers. Fix Xen so that it does not immediately fire a timer event if
it sees a very long timeout -- sometimes this means that there are
no pending timers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-25 17:01:49 +01:00
kfraser@localhost.localdomain 30aab42f71 [LINUX][NET] Add default ethtool get_link implementation to all
interfaces. Some management tools rely on this operation.

From: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-25 16:11:12 +01:00
kfraser@localhost.localdomain 5b4b7f6815 [LINUX] Improve single-page contiguous region creation/destruction
Batch page table updates and fold TLB flush into last one, reducing
number of hypercalls made from ((# of pages) + 1) to just 1.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-07-25 15:58:35 +01:00
awilliam@xenbuild.aw 9d20d1268d [IA64] Support domU coredump on ia64
This patch supports domU coredump on ia64.  xen_panic_event() is
registered to panic_notifier_list, and xen_panic_event() calls
HYPERVISOR_shutdown(SHUTDOWN_crash) at panic time.

If xend is notified of crash status, xend calls dumpCore()
and create domU's core in /var/xen/dump.

For sample crash module and usage, see:

http://lists.xensource.com/archives/html/xen-ia64-devel/2006-07/msg00230.html

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
[minor code re-arrangement]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-07-24 14:26:03 -06:00
awilliam@xenbuild.aw 8cf361e195 [IA64] vDSO paravirtualization: paravirtualize vDSO
paravirtualize vdso areabased on Kevin's pointout and Dan's Idea.
introduce hyperprivop HYPERPRIVOP_RSM_BE and HYPERPRIVOP_GET_PSR.
and paravirtualize vdso area using them.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-07-24 13:43:35 -06:00
awilliam@xenbuild.aw cd20de68b5 [IA64] vDSO paravirtualization: import linux files
import gate.S, gate.ld.S and patch.c which are needed to
paravirtualize vdso area.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-07-24 13:04:40 -06:00
chris@kneesaa.uk.xensource.com d30245b2bf Fix some more text inconsistencies and put devices in a more sensible order.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-07-14 14:18:39 +01:00
kaf24@firebug.cl.cam.ac.uk 815077ee40 [TPM] Discard a future response packet after a timeout has occurred instead of
removing the request right away.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-07-14 11:48:48 +01:00
kfraser@localhost.localdomain 0df65f6bf9 Fix typo in description of XEN_BLKDEV_TAP
Signed-off-by: Horms <horms@verge.net.au>
2006-07-14 11:43:57 +01:00
jchesterfield@dhcp92.uk.xensource.com 0da81aa1d4 Added blktap support. Includes kernel driver (enabled as CONFIG_XEN_BLKDEV_TAP=y) and userspace tools. The userspace deamon (blktapctrl) is enabled by default when xend is activated. For further information on using and configuring blktap see tools/blktap/README. 2006-07-13 10:13:26 +01:00
awilliam@xenbuild.aw 89b0862b3a [IA64] Save & restore.
xc_ia64_linux_save.c and xc_ia64_linux_restore.c added.
vcpu context has more registers and states (eg: tr registers).
Per cpu irqs are deallocated when cpu is switched off.
#if/#endif added in reboot.c for ia64.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-11 12:51:18 -06:00
kfraser@localhost.localdomain 3863ac76d1 [LINUX] Define dma_get_cache_alignment even on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-10 17:33:45 +01:00
kfraser@localhost.localdomain c11016e71c [XENOPROF] Some fixes for xenoprof passive domain support.
Currently, passive domain samples are being assigned to the wrong
kernel functions. This patch fixes this problem. In addition the patch changes the
encoding of domain switch ESCAPE codes (marks used to separate samples
in oprofile  buffers associated with different domains). Instead of
using 2 codes, one  for START and one for END of passive domain
samples, a single escape CODE value is used to indicate a domain switch (no
need for a STOP followed by a START). Finally there some other minor style
fixes.

Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
2006-07-10 16:05:44 +01:00
kfraser@localhost.localdomain b13a112805 [NET] net-gso.patch: Fix up GSO packets with broken checksums
Here is the original changelog:

   [NET] gso: Fix up GSO packets with broken checksums

   Certain subsystems in the stack (e.g., netfilter) can break the
   partial
   checksum on GSO packets.  Until they're fixed, this patch allows
   this to
   work by recomputing the partial checksums through the GSO
   mechanism.

   Once they've all been converted to update the partial checksum
   instead of
   clearing it, this workaround can be removed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-07-10 15:36:04 +01:00
kfraser@localhost.localdomain fb79aef8d8 [XENCONSOLE] reference of tty->count in xencons_close() is racy.
It must be protected by tty_sem semaphore like con_close() in
drivers/char/vt.c. and prevent re-opening this tty.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-10 15:23:15 +01:00
awilliam@xenbuild.aw 989c3fcf11 merge with xen-unstable.hg 2006-07-05 20:11:37 -06:00
awilliam@xenbuild.aw b3b4baa6b8 [IA64] Implement and use DOM0_DOMAIN_STEUP.
DOM0_GETMEMLIST now reads ptes and use gpfn.
Domain builder reworked: calls DOMAIN_SETUP, setup start_info page.
SAL data are now in domain memory.
is_vti field added in domain.arch.
Many cleanups (indentation, static, warnings).

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-05 09:28:32 -06:00
awilliam@xenbuild.aw db19e295c9 [IA64] A few clean ups in __xen_create/destroy_contiguous_region.
This is the IA64 counter part of the C/S
10563:a75c1bdfe76146ad591574d805be5be0a3098d2a of xen-unstable.hg

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-07-03 08:33:15 -06:00