Commit Graph
10349 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 2fd80b3aac [NET] front: Discard packets in tx ring rather than attempting retransmit
when reconnecting to backend driver (e.g., after save/restore or migrate).

Two main reasons for this: 
 1. The retransmit code is broken for fragmented packets. It would need
    a rewrite to cope with the new scatter-gather format.
 2. We will drop packets anyway, in both directions (e.g., takes some
    time for received packets to be redirected to new virtual interface;
    also further transmitted packets from the network stack are dropped
    after we call netif_carrier_off(), so even if we retransmite what's
    already in the ring it is likely that some subsequent packets will
    already be lost).

If this causes downtimes that are too long (particularly for live
relocation) then the whole strategy for buffering packets while the
frontend-backend connection is severed needs to be considered.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 13:11:44 +01:00
kaf24@firebug.cl.cam.ac.uk e2f381e315 [LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
Moving the re-allocation to low memory into pgd_alloc() has several
advantages:
 1. Avoids race with save/restore where pgdir may end up above 4GB after
    save/restore.
 2. If pgdir cannot be re-allocated we can return failure to the caller
    rather than BUG().
 3. Slightly reduces diff against native Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 12:36:06 +01:00
kaf24@firebug.cl.cam.ac.uk be252f5f66 [LINUX][BLK] front: More care over device teardown.
1. We must ensure gnttab callbacks are disabled and all work
    flushed before tearing down device state. A new gnttab interface
    call is added for this purpose.
 2. blkif_free() must check for a request_queue before deref'ing it.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 11:19:53 +01:00
kfraser@dhcp93.uk.xensource.com 00dc8b3bf1 [TOOLS] Fix PAE save/restore/migrate: we must flush
all pending 'mmu updates' before moving page directories
below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 17:30:30 +01:00
kaf24@firebug.cl.cam.ac.uk 0708c1f9a0 [MINI-OS] Applications that provide their own app_main need not run the xenbus test.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
2006-06-13 16:07:16 +01:00
kaf24@firebug.cl.cam.ac.uk 1d0986e6b4 [LINUX] Eliminates a deadlock and reduce (sometimes significantly) the time
interrupts are off during context switch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-13 15:56:28 +01:00
kaf24@firebug.cl.cam.ac.uk 9d43a190b1 [XM-TEST] Fix 02_block_device_write_verify.py test to parse md5sum output correctly.
The 02_block_device_write_verify.py test that I wrote is failing because
the regular expression to extract the md5sum is only looking at the
first line of output and the sum is in a subsequent line (after the
output from dd).

This patch fixes the test by adding the multiline flag to the search
parameters so that the search looks in all lines of the output for the
md5sum.  I added the multiline flag in all searches to make the tests
more robust against changes in the output format of the commands used.

I'm not exactly sure how this slipped through my testing.  I suspect
that I forgot to install the new python file after updating the test to
use dd and then tested the old version a second time by accident.
Either that or it really did work when I tested it and the output format
has changed for some reason.

I tested this patch against xen-unstable 10326 and the 02 test fails
without the patch and succeeds with it.

Thanks to James Dykman for some help with this.

Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>
2006-06-13 15:41:27 +01:00
kaf24@firebug.cl.cam.ac.uk df70dfb525 [ACM] Provide the framework needed for resource labeling.
Subsequent patches will follow in the coming weeks that will enable 
Xen ACM to control assignment of resources (e.g., block devices and 
networking) to virtual machines based on resource labels and the 
active security policy.

Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com>
Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
2006-06-13 15:38:58 +01:00
kaf24@firebug.cl.cam.ac.uk 423ce9cf9e [LINUX] A better way to stop blkdev request handling in blkfront
driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 15:33:10 +01:00
sos22@douglas.cl.cam.ac.uk 99aff24b6f Merge. 2006-06-13 15:19:50 +01:00
sos22@douglas.cl.cam.ac.uk 9b6a936257 Expand test_xenbus a little.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-06-13 15:19:09 +01:00
sos22@douglas.cl.cam.ac.uk 70d8ee3676 This patch exposes XenBus functions to Mini-OS applications.
Signed-of-by: John D. Ramsdell <ramsdell@mitre.org>
2006-06-13 15:17:01 +01:00
kfraser@dhcp93.uk.xensource.com ade82aac45 [LINUX] Fix blkfront driver to check connection status to backend in
all critical circumstances.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 15:13:29 +01:00
kfraser@dhcp93.uk.xensource.com 7758dfc719 [TOOLS][BUILDER] Extend Elf header checks for multiple architectures.
Based on a patch from Hollis Blanchard.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 14:36:04 +01:00
kfraser@dhcp93.uk.xensource.com 063f4cc497 [LINUX] Export some tlb-flush functions to modules, which are
directly accessible via macros in tlbflush.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 14:08:37 +01:00
kaf24@firebug.cl.cam.ac.uk 6a551e7f23 [HVM] Fix ioemu build with new Linux headers. We must define __user
attribute to nothing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 11:41:15 +01:00
kaf24@firebug.cl.cam.ac.uk 4f69360976 [XEN] Fix compatibility with future guests which may try to
use hypercalls >= NR_hypercalls. These must fail with ENOSYS,
but the current strategy of masking off the high-order bits of
the hypercall number means we instead map those hypercalls onto
lower-numbered hypercalls with unpredictable results. This patch
replaces masking with an explicit compare-and-jump.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 11:28:20 +01:00
Ian.Campbell@xensource.com c9c67d5a02 [LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-06-13 10:14:20 +01:00
kfraser@dhcp93.uk.xensource.com ea266bc5e8 [LINUX] Fix code indentation in Linux drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-12 18:32:47 +01:00
Ian.Campbell@xensource.com 94850192ba Initialize the entire hypercall page when running a ring0 kernel
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-06-12 18:23:42 +01:00
shand@chelmsford.uk.xensource.com 9f640de2b0 Fix race in device resume path - need to ensure we add the watch only
after the device-specific resume code has run. Also removed some unused / 
usless code from netfront.c. 

Signed-off-by: Steven Hand <steven@xensource.com>
2006-06-12 17:56:20 +01:00
kaf24@firebug.cl.cam.ac.uk b4bd6fd400 [LINUX] Fix interaction between idle loop and RCU subsystem.
There is a problem with the current implementation of stop_hz_timer in
arch/i386/kernel/time-xen.c where the hz timer can be stopped on a CPU
which has RCU callbacks pending.

This patch backports a new RCU API created to fix this problem for the
s390 implementation of stop_hz_timer and also updates the time-xen.c
implementation of stop_hz_timer to call the new API.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
2006-06-12 14:17:05 +01:00
kaf24@firebug.cl.cam.ac.uk 2965c646ee [HVM][VMX] Fix error-detection inline asm code. Zero word-sized
register before executing SETNA instruction which updates bottom
byte.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-12 12:01:32 +01:00
kaf24@firebug.cl.cam.ac.uk 16ee61ce2a [HVM][VMX] Fix the build with certain versions of gcc.
Restrict register choices to this which are byte addressable.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-12 10:09:44 +01:00
kaf24@firebug.cl.cam.ac.uk d25cfced92 [XEN] Fix read_console_ring() when passed a small buffer.
From: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-12 10:05:55 +01:00
kaf24@firebug.cl.cam.ac.uk 7cc16fdd1b [LINUX] Clean up unused variable in mm/memory.c.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-06-12 09:57:23 +01:00
kaf24@firebug.cl.cam.ac.uk efeb20bcb5 [HVM][VMX] Provide right view of cpuid to the HVM guests.
Some of the CPU features such as APIC, PAE, MTRR, HT are virtualized;
while others are not virtualized yet such as TM1, TM2, MCA and there are
some features which do not need virtualization such as MMX. With the
patch Guest sees only those processor features in the cpuid which are
virtualized in the hyper visor, or do not need any virtualization in
hypervisor.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
2006-06-12 09:45:03 +01:00
kaf24@firebug.cl.cam.ac.uk cd9d70925c [HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xen
device model. To support USB there are two new optional config lines
that can be added to the guest config file:

    usb=1
        This will enable USB without defining a specific USB device.
        This option is assumed and not needed if the `usbdevice' option
        is given.

    usbdevice='device'
        This will enable USB and also enable support for the given device.
        Currently, the only two devices are `mouse' (a PS/2 mouse) and
        `tablet' (an absolute pointing device).  The advantage of `tablet'
        is that Windows guests will automatically recognize and support this
        device so specifying the config line:

                usbdevice='tablet'

        will create a mouse that works transparently with Windows guests
        under VNC.  (Linux doesn't recognize the USB tablet yet so Linux
        guests under VNC will still need the Summagraphics emulation.)

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
2006-06-12 09:06:55 +01:00
kaf24@firebug.cl.cam.ac.uk fb674fd949 [IA64] Fix a typo in local_event_delivery_enable().
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2006-06-12 08:53:38 +01:00
kaf24@firebug.cl.cam.ac.uk 6553807e77 [XEN] Fix SCHEDOP_poll to work even when event channels are
not bound to the polling VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-11 19:23:31 +01:00
kaf24@firebug.cl.cam.ac.uk 81f8f63e5e [HVM][VMX] Cleanups and fixes to VMCS lifecycle.
1. Maintain a 'launched' software flag to select between
    VMLAUNCH and VMRESUME.
 2. Take more care with VMPTRLD/VMCLEAR.
Also various other fixes (e.g., safe testing of
condition codes after executing a VMX instruction).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-11 14:33:16 +01:00
kaf24@firebug.cl.cam.ac.uk 0f71d8d704 [LINUX] Fix IRQ SMP affinity logic for event channels.
The logic now mimics native x86 behaviour: a request to change
affinity via /proc is held until the next interrupt on that
event channel. So /proc/irq/n/smp_affinity may not change
immediately!
Other notes:
 1. CPU-specific interrupts silently ignore requests to change
    affinity. For example, resched0, timer0, callfunc0, ...
 2. Reading smp_affinity always returns a cpumask containing
    a single cpu. An event channel can only be bound to a single
    cpu at a time. Neither Xen nor XenLinux implement IRQ
    balancing: requires a user-space balancing daemon.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-11 09:54:35 +01:00
kaf24@firebug.cl.cam.ac.uk e5617c303f [XEN] Replace direct common-code access of evtchn_upcall_mask
with local_event_delivery_* accessors.
Notes:
 1. Still some (read-only, debug) use in keyhandler.c
 2. Still accesses through current->vcpu_info.
Both above may need to be compiled only for architectures
that use event channels.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-10 11:07:11 +01:00
kaf24@firebug.cl.cam.ac.uk 6e9ae8d1e8 [LINUX] Remove the only use of evtchn_upcall_mask in common code.
Replace with an assertion of irq_disabled().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-10 11:05:11 +01:00
kaf24@firebug.cl.cam.ac.uk 10d0541c1d [XEN] VCPU operation register_runstate should work even when
called from non-local VCPU. Necessary as Linux always calls
this operation from VCPU0 during secondary-VCPU bringup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 17:05:09 +01:00
kaf24@firebug.cl.cam.ac.uk 8d7ca20f1e [ACM] Replace enumerations with macros with qualified names.
Old unqualified enumeration names polluted the global namespace.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 16:49:49 +01:00
kaf24@firebug.cl.cam.ac.uk abb88790d2 [XEN][ACM] Clean up ACM interface to use explicitly-sized types
and guest handles.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-09 16:26:05 +01:00
kaf24@firebug.cl.cam.ac.uk a51b3e5765 [LINUX] Simplify /proc/iomem initialisation -- no need to fake a
domU memory map. The main e820 map already terminates at max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 16:19:42 +01:00
kaf24@firebug.cl.cam.ac.uk 876b216779 [LINUX][X86/64] Initialise pages outside initial allocation so that
they are picked up by the balloon driver.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 16:18:40 +01:00
kaf24@firebug.cl.cam.ac.uk d6a9b3738c [XEN] IOPL is ignored for VM86 mode port accesses. Fix Xen
emulation to match native behaviour.
Signed-off-by: Jan Beulich <jbeulich@novel..com>
2006-06-09 14:29:00 +01:00
kaf24@firebug.cl.cam.ac.uk 92fffc0727 [LINUX][XENBUS] replace xenbus_transaction_t with an opaque transaction ID.
xenbus_transaction_t -> struct xenbus_transaction, which just contains
a single u32.  Also renamed XBT_NULL to XBT_NIL to emphasize that it
isn't a NULL pointer, but a NIL transaction ID.  Compile and boot tested.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
[chrisw: updated for xen-unstable from patchqueue]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:25:46 +01:00
kaf24@firebug.cl.cam.ac.uk 40c3d9a1be [LINUX][XENBUS] Drop (struct xenbus_device)->data, and simply use ->dev.driver_data
instead, since that's what it is there for.  Similar to patch
in patchqueue started by Jeremy, and expanded by me to include all
relevant drivers in xen-unstable.

Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:23:50 +01:00
kaf24@firebug.cl.cam.ac.uk 893e7ced35 [LINUX][BLKTAP] This code doesn't compile, is marked as DANGEROUS, and
is said to be removed when block drivers use grant tables.
So let's remove it.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:20:09 +01:00
kaf24@firebug.cl.cam.ac.uk e2a3e4897e [LINUX] Use structs not typedefs, remove trailing whitespaces, place symbol
EXPORTs with functions, order includes, eliminate unsed macros, don't
initialize static data to NULL, etc.  Cleanups from patchqueue.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:13:18 +01:00
kaf24@firebug.cl.cam.ac.uk 720b2f61b3 [NET] front: There's a small leak on a couple error paths in setup_device().
While there rearrange the ring setup order slightly to simplify error
path since netif_free() will cleanup once ring_ref is valid.  And use
get_zeroed_page() instead of __get_free_page()/memset().  Handle error if
bind_evtchn_to_irqhandler() fails, as bad info->irq value is likely to
cause oops later.  In create_device(), gnttab_free_grant_references()
is accidentally called twice on tx_head during cleanup from failed
gnttab_alloc_grant_references() on rx_head, which could corrupt
gnttab_free_count.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:10:32 +01:00
kaf24@firebug.cl.cam.ac.uk 356da6585f [XEN] Re-increase MAX_ORDER to 20 for the time being. Reducing
breaks domain0 builder.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 08:15:58 +01:00
kaf24@firebug.cl.cam.ac.uk 48cc0bd192 [XEN] Reduce default maximum allocation order from 2^20 pages to 2^11.
On x86 this corresponds to a maximum aligned contiguous allocation of 8MB.
This can be overridden by architectures if need be.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 16:51:39 +01:00
kaf24@firebug.cl.cam.ac.uk 80c6044fb3 [LINUX] swiotlb allocates multiple smaller contiguous DMA regions,
rather than a single big one.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 16:48:23 +01:00
ack@localhost.localdomain b5e40184be Add sched-credit xm tests but don't run them by default yet...
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-06-08 11:35:27 +01:00
kaf24@firebug.cl.cam.ac.uk b4c43b75ea [LINUX] Set up /proc/iomem in a sensibel way to indicate
code & data resources, and a RAM area on domU.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 10:24:48 +01:00