Commit Graph
10328 Commits
Author SHA1 Message Date
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
kaf24@firebug.cl.cam.ac.uk 3f63cf9724 [LINUX] Only trigger unhandled irq path if irq is not shared across
multiple guests (another guest may have handled the interrupt).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 10:11:04 +01:00
kaf24@firebug.cl.cam.ac.uk 7babda9241 [TOOLS] Fix domain builder to carefully check that mapped memory area
does not overflow and wrap to zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 09:52:04 +01:00
kaf24@firebug.cl.cam.ac.uk c107269497 Fix cut-n-paste comment error in public header file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-07 15:51:56 +01:00
kaf24@firebug.cl.cam.ac.uk d2f23500b0 Extended PHYSDEVOP_irq_status_query to obtain sharing status
(bound to multiple guests?).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-07 15:46:05 +01:00
kaf24@firebug.cl.cam.ac.uk 3729abf36e [LINUX] Rename hw_resend_irq to allow it to be defined seperately per arch.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-06-07 14:38:36 +01:00
kaf24@firebug.cl.cam.ac.uk 93254fc385 [HVM][MMIO] Support decode of 0x83 opcode (or imm8,m32/64').
This instruction is used by both WinXP during an SMP installation and by
Sun Solaris.  With this patch Sun Solaris UP is able to boot.  Windows
SMP gets a bit further but still has issues.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Travis Betak <tbetak.woller@amd.com>
2006-06-07 14:21:49 +01:00
kaf24@firebug.cl.cam.ac.uk a47f6548d9 [HVM][MMIO] Emulate more instructions: or/and/xor with byte width,
and load string (LODS) instructions.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Yunfeng zhao <yunfeng.zhao@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-06-07 14:20:29 +01:00
kaf24@firebug.cl.cam.ac.uk 104f354554 [HVM][DM] Cleaner way of clearing VGA memory on mode changes (thanks to
Fabrice Bellard on the QEMU project). This patch clears the
memory in the BIOS call rather than when the Cirrus Logic register changes,
which more closely matches what happens on the real hardware.

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
2006-06-07 14:13:22 +01:00
kaf24@firebug.cl.cam.ac.uk 2928514138 [LIBXC] Convert all printf/fprintf uses to use a macro instead.
Thus all can be disabled at compile time. It would be easy to
make enabling/disabling a run-time option too.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-07 14:07:36 +01:00
kaf24@firebug.cl.cam.ac.uk e56ed2dc52 [HVM][PIT] Fix missed_ticks() logic.
Signed-off-by Xiaowei Yang <xiaowei.yang@intel.com>
2006-06-07 13:42:21 +01:00
kaf24@firebug.cl.cam.ac.uk fe777d0a4c [LINUX][X86/64] Support IO-port permissions bitmaps (ioperm() syscall).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-07 13:38:08 +01:00
kaf24@firebug.cl.cam.ac.uk 2ad3e284b4 x86/64 Linux: destroy entire init memory mapping beyond kernel image.
Avoids overlap with modules mapping area.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-07 11:24:44 +01:00
emellor@leeni.uk.xensource.com 26229f1699 Merged. 2006-06-07 11:03:51 +01:00
emellor@leeni.uk.xensource.com e41ca46ee7 Fix typo.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-06-07 11:03:15 +01:00
emellor@leeni.uk.xensource.com 752382e00a Added.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-06-07 10:58:09 +01:00
emellor@leeni.uk.xensource.com 5e7cd95038 Move forward to new version of buildroot -- the old one has gone from the
website.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-06-07 10:57:25 +01:00
kaf24@firebug.cl.cam.ac.uk fa50dd1a8e [HVMLOADER] Revert to uniprocessor MPS table in rombios.
Advertising more CPUs than the guest is allocated hangs boot
of Windows XP (selects wrong HAL). The correct fix here is
to dynamically generate the MPS table (at least the CPU
entries) from hvmloader binary.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-07 09:59:56 +01:00
kaf24@firebug.cl.cam.ac.uk d404680bc3 Use explicitly-sized types in the dom0_ops and privcmd structures.
As discussed previously, the these operations are not performance-sensitive, so
the additional cache footprint shouldn't be an issue.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-06 10:25:59 +01:00
kaf24@firebug.cl.cam.ac.uk ab8096f27d Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-06 09:48:17 +01:00
kfraser@dhcp93.uk.xensource.com 542ad2f200 [NET] front: Turn grant-ref error into a fatal bug. That's the best we
can do until we have a backend driver recovery method.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-06 08:21:31 +01:00
kfraser@dhcp93.uk.xensource.com d82a7836f6 [X86EMUL] Mark MOV instruction as not needing writeback.
Fix the test harness for x86/64 -- map emulated addresses
to low 4GB of address space.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-06 08:05:13 +01:00