Commit Graph
1823 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 21bee17870 Support for vga text modes bigger than 80x25.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-15 11:16:44 +01:00
ack@localhost.localdomain 543b6e24b0 Adjust truesize in netfront to more closely reflect real data payload
plus supervisor overheads but keeping out gross hypervisor overheads.
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-08-15 11:13:04 +01:00
awilliam@xenbuild.aw ad81630fe1 [IA64] copy_from/to_guest
This patch fixes the copy_from/to_guest problem.
As Akio reported, modularised netback causes dom0's down.

The following process is happened in gnttab_transfer()@
xen/common/grant_table.c:

  gnttab_transfer()
   => steal_page()
     => assign_domain_page_cmpxchg_rel()
       => domain_page_flush()
         => domain_flush_vtlb_all()  // all TLBs are flushed
   ...
   => __copy_to_guest_offset()               // always fail to copy

The embedded netback module has no problem because it uses TR pinned
data.  But modularised one is out of TR. So copy_from/to_guest issue
must be solved in order to modularise drivers.

Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
2006-08-14 14:21:21 -06:00
kfraser@localhost.localdomain 4d6a4b8c4d [LINUX] Mark /dev/mem regions as VM_PFNMAP.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 16:35:49 +01:00
kfraser@localhost.localdomain 20e8909335 [LINUX] Oney 'nosmp' and 'max_cpus=' command line options.
Based on a patch from Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 16:12:43 +01:00
kfraser@localhost.localdomain ff843ce876 [NET] back: Fix an __init that should be an __exit in loopback driver.
This was pointed out by the newer build system used in 2.6.18-rc4.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-14 15:26:37 +01:00
kfraser@localhost.localdomain 3ef9a82056 [LINUX][ Fix x86/64 entry.S to use paravirtualized sti/cli properly.
This fixes
- one instance of using XEN_BLOCK_EVENTS where XEN_UNBLOCK_EVENTS was
  meant
- four instances of left-over cli-s that should have been replaced
  with XEN_BLOCK_EVENTS
- one instance of slightly wrong placement (without resulting in ill
  behavior, but needlessly making the diff to native more complex)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-14 15:24:59 +01:00
kfraser@localhost.localdomain 2b88d7ed5f [LINUX] Provide a handy macro for detrmining if we are domain0.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 14:44:31 +01:00
kfraser@localhost.localdomain daff910c6c [XENBUS] Avoid direct use of xen_start_info. It's unevailable when
building as a separate driver for an HVM guest.
Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 14:17:26 +01:00
kfraser@localhost.localdomain dd3a7bc404 [NET] linux: Kill the WARN_ON() calls for checksum fixups.
This changeset is from upstream Linux.  We need it so Xen users
using NAT are not unnecessarily alarmed by these WARN_ON errors
especially since they're not in a position to do anything about
it.  Original changelog:

        [NET]: Kill the WARN_ON() calls for checksum fixups.

        We have a more complete solution in the works, involving
        the seperation of CHECKSUM_HW on input vs. output, and
        having netfilter properly do incremental checksums.

        But that is a very involved patch and is thus 2.6.19
        material.

        What we have now is infinitely better than the past,
        wherein all TSO packets were dropped due to corrupt
        checksums as soon at the NAT module was loaded.  At
        least now, the checksums do get fixed up, it just
        isn't the cleanest nor most optimal solution.

        Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-08-14 13:55:17 +01:00
kfraser@localhost.localdomain 30b586b9fb [LINUX] Split useful bits of page.h into new header maddr.h.
Split the bits of page.h which are needed by PV-on-HVM drivers out
into a separate header file, so that it's a bit easier to get the xenolinux
machine address functions when compiled against a native kernel.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 13:54:10 +01:00
kfraser@localhost.localdomain c9edca86f1 [HVM][LINUX] Add a header file with wrappers for hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:35:57 +01:00
kfraser@localhost.localdomain 13fbff7760 [HVM] Add stubs to Linux for the new hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:33:50 +01:00
kfraser@localhost.localdomain 3847c96fcf [NET] back: Tidy up and remove communications via references to global structures.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:32:24 +01:00
kaf24@localhost.localdomain d086c32a4a [NET] front: Restore 16 bytes of reservation
By replacing dev_alloc_skb with alloc_skb we need to do the 16-byte
reservation ourselves.  Also, it's unnecessary to align the size
when calling alloc_skb since the alignment is an implementation
detail of alloc_skb and it already takes care of it for us.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-08-12 15:56:00 +01:00
kaf24@localhost.localdomain 5940b606ba [LINUX][XENBUS] Wait for devices to connect when frontend driver is loaded as a module.
Thsi fixes problems where a driver is loaded from a script, and the
following parts of the script depend on devices having connected
by the time the modprobe/insmod returns.

Based on a tested patch from Rik van Riel at Red Hat.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-12 15:50:25 +01:00
kfraser@localhost.localdomain bc5688b66a [NET] front: Do not allocate unnecessary page-sized main data area
for receive skbuffs. The bulk data is stored in fragments.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-11 14:22:54 +01:00
kfraser@localhost.localdomain 3f31a200de [CONSOLE] Always specify CON_ENABLED in Linux ocnsole driver.
I cannot think of any circumstance that the Xen console device would
not have CON_ENABLED.  With out this, DomUs that panic() before the
init process has started (and maybe even after) do not get output hi
priority log_levels (like panic()) from LOG_BUF().

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
2006-08-10 10:39:58 +01:00
awilliam@xenbuild.aw bc218fa824 merge with xen-unstable.hg 2006-08-09 08:34:06 -06:00
Ian.Campbell@xensource.com 5b9b44e483 Make ballon and backend drivers fail gracefully if they are unable to initialize
due to missing hypervisor support.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-09 11:27:28 +01:00
Ian.Campbell@xensource.com 0f5fbb45a0 Fix BUG_ON on switch_mm if XENFEAT_writable_page_tables is enabled.
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-09 11:26:11 +01:00
kaf24@firebug.cl.cam.ac.uk baa7c435ce [PCI] back: New virtual pci backend: slot
This backend use a slot per pci device.  Contrary to vpci two functions from
one slot appear as two slots. This is useful on ia64 because it doesn't scan
functions > 0 if function 0 does not exist.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-08 10:17:42 +01:00
awilliam@xenbuild.aw 8482b6d752 [IA64] Add EXPORT_SYMBOL to modularize netfront/netback
Add EXPORT_SYMBOLs to allow netfront and netback to
be used as modules.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-08-07 14:11:58 -06:00
kaf24@firebug.cl.cam.ac.uk 7e9fd035da [LINUX] Fix a couple of benign diffs against vanilla spinlock.h.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-07 16:07:20 +01:00
awilliam@xenbuild.aw 443287f1b8 [IA64] Remove P==M support
Remove the old P==M dom0 memory model support.  It's likely
broken by now anyway.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-08-04 09:32:00 -06:00
ack@localhost.localdomain 092b64b838 [NET] front: Check for received packets in network_open0
Because the backend brings up the interface long before the frontend
has booted up, it is possible that by the time we get here we already
have packets queued up for processing.

If we don't process them here, we may delay them more than what is
necessary.  Worse yet, it is possible to miss the notification
interrupt from the backend in such a way that we never get another
one until we bring the interface down and up.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-08-04 16:07:58 +01:00
awilliam@xenbuild.aw 111ea6ac45 [IA64] fix vDSO paravirtualization.
sometimes it fails to clear event mask. It results in domain's unstability.
And one typo.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-08-03 11:10:53 -06:00
kfraser@localhost.localdomain c255809877 [HVM] Add a concept of HVM parameters to the hypervisor.
Each HVM domain has a space of HVM parameters associated with it,
and these can be manipulated via a new hvm_op hypercall. This means
that the hypervisor no longer needs to parse the hvm_info table, so
remove that code.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-03 13:53:33 +01:00
awilliam@xenbuild.aw 6140eef964 merge with xen-unstable.hg 2006-08-02 13:39:47 -06:00
kfraser@localhost.localdomain 5ac47f7c4f [PCI] Transparent virtualization for pcifront and pciback.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-02 15:07:21 +01:00
kfraser@localhost.localdomain 8f84603260 [LINUX] Allows userspace tools on a domU to set up a watch on the xenstore.
It does this by intercepting XS_WATCH requests written
to /proc/xen/xenbus and then re-submitting the request to the
in-kernel xenstore interface, in
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c.  When a callback
occurs, an in-kernel function is invoked, which then reconstructs a
response in the format expected by userspace, and sends this response
through /proc/xen/xenbus. 

It was necessary to add some supporting infrastructure to
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c, such as an
additional mutex to protect the response queue and a list of active
watches associated with each connection.

Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
2006-08-02 15:01:59 +01:00
kfraser@localhost.localdomain 17d151cf1e [LINUX] Clarify a confusing error message in xenbus_probe.c.
Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
2006-08-02 14:59:22 +01:00
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
awilliam@xenbuild.aw d041e1ba45 [IA64] rewrite of last util.c patch
Rewrite utils.c patch to be less ugly:
do not set area->phys_addr, recompute phys_addr in free_vm_area.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-07-31 13:12:30 -06: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