Commit Graph
10318 Commits
Author SHA1 Message Date
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
kaf24@firebug.cl.cam.ac.uk ff476d8ed1 [HVM][VMX] Interrupts must be kept disabled when entering Xen for
external interrupt processing. Remove code that immediately
reenabled interrupt delivery on VMEXIT.
Signed-off-by: Seteven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 17:17:27 +01:00
kaf24@firebug.cl.cam.ac.uk 42d838e49b [NET] back: Add a few comments to the goriest parts of the scatter-gather patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 17:03:19 +01:00
kaf24@firebug.cl.cam.ac.uk 8267025532 [NET] front: Transmit SG packets if supported
This patch adds scatter-and-gather transmission support to the frontend.
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-06-05 16:33:49 +01:00
kaf24@firebug.cl.cam.ac.uk 99812f4013 [NET] back: Add SG support
This patch adds scatter-and-gather support to the backend.  It also
advertises this fact through xenbus so that the frontend 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-06-05 16:13:47 +01:00
kaf24@firebug.cl.cam.ac.uk 3e19af6e66 [VMXASSIST] Extensions to vmxassist to handle additional mode switch cases.
Extends vmxassist to handle two cases related to mode switching found
while experimenting with different boot loaders.

The first case is use of the JMP instruction with memory location
operands to complete a switch to protected mode. This patch adds
emulation for this form of the JMP instruction to vmxassist.

The second case is where boot loader code does not save/restore a
non-zero SS register across a protected mode traversal.
Zeroing the SS register in vmxassist results in all sorts of problems
in the domU after returning back to real mode. This patch stores
segment register values before entering protected mode and correctly
restores the old values (instead of an incorrect zero value) when
reentering real mode.

Signed-off-by: Kevin Tronkowski <ktronkowski@virtualiron.com>
2006-06-05 15:18:13 +01:00
kaf24@firebug.cl.cam.ac.uk 08f2d66ff6 [NET] back: fix synchronisation of access to deallocation buffer ring.
Must ensure ring is written to before producer index is incremented.
Bug diagnosed by Ky Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 15:14:58 +01:00
kaf24@firebug.cl.cam.ac.uk d3a5ffe775 Extend callback-registration hypercall to take a flags argument.
This can currently be used to request that event delivery be
disabled during callback processing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 14:35:22 +01:00
kaf24@firebug.cl.cam.ac.uk ad2de84676 Create new vmassist type 'pae_extended_cr3'. Only advertise
pae_pgdir_above_4gb tp guests that have enabled this vmassist.
Control tools ensure all PAE page directories are below 4GB
unless the vmassist is enabled (triggered via an extended-cr3
option in guest Elf header).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 10:42:40 +01:00
kaf24@firebug.cl.cam.ac.uk 44beffcd61 [LINUX] Simply shared_info mapping code. Always use a fixmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-02 19:14:44 +01:00
kfraser@dhcp93.uk.xensource.com 585c0a4528 [LINUX][X86_64] Destroy initial page-table mappings to avoid overlap with modules.
The temporary mappings needed to set up the 1:1 mappings must be torn
down after use; otherwise they may trigger the
WARN_ON() in vmap_pte_range() (namely if the chunk allocated to hold
kernel and initial page tables gets close to or
exceeds 128Mb, or if a sufficiently high mem= argument causes the
static allocations to grow beyond 128Mb, which in
either case means these mappings extend into the modules area).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-02 18:06:50 +01:00