Commit Graph
8045 Commits
Author SHA1 Message Date
emellor@leeni.uk.xensource.com 9d71c153ea Added a comment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-26 00:38:45 +00:00
emellor@leeni.uk.xensource.com d31f316358 Also, make a small tweak to the 12_block_attach test so that we don't leave
a DomU running with a block device attached.

Signed-off-by: Dan Smith <danms@us.ibm.com>
2005-11-25 23:19:23 +00:00
emellor@leeni.uk.xensource.com d966085083 Check when using physical devices that the device is not already in use. Using
a device from two guests, or from dom 0 and a guest, can destroy the filesystem,
and this check prevents that.  This should ensure that the xm tests
11_block_attach_shared_dom0 and 12_block_attach_shared_domU should pass.
Closes bug #331.

Devices may be shared only if all uses are read-only.  If anyone has read-write
access to a device, then no sharing is allowed.

The mode in the config file may now have an exclamation mark appended, to
indicate that devices may be shared (i.e. that this new check should be
bypassed).  This supports some network block devices, but is clearly dangerous
and should only be used when you know what you are doing.

The mode specified in the config file is now written explicitly to the store,
To implement this, the blkback driver has been changed to create two entries
in /sys describing each device in use.  This means that we can determine which
devices are in use without crawling through the store.

The physical-device node has been changed to give the major and minor of the
device, separated by a colon.  This means that we do not need to pack these
numbers into one, removing the restriction to 8 bit minors that we had in place
before.

The mode specified in the config file is now written explicitly to the store,
rather than using the presence or absence of a read-only node.  This supports
the write-sharing override above.

If the device is in use, a new hotplug status of "busy" is written to the
store, and a message is written to a new hotplug-error node.  Xend uses these
things for diagnosis.

The block scripts do not need to handle online or offline events, so this
support has been removed.  These scripts can be called twice, depending upon
the hotplug config, so they now identify the second run and do not attempt to
set up the device again.

The device directories in the store are cleaned out before new details are
written there.  This prevents stale information from messing up block device
hotplugging.  This will be one cause of "blkback: changing physical device
not supported" messages.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 20:58:07 +00:00
emellor@leeni.uk.xensource.com 7522af5c6a Only write a success node when coming online, not going offline. Delete the
interface from the bridge when going offline -- the comment stating that
interfaces are auto-removed does not seem to be true, at least some of the
time.  Log failure of brctl delif and ifconfig down only at debug level, as
this script may be called more than once, depending upon the hotplug
configuration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:12:12 +00:00
emellor@leeni.uk.xensource.com 4494161ec1 Only write a success node when coming online, not going offline.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:09:49 +00:00
emellor@leeni.uk.xensource.com 88eca2a60d Don't issue the iptables diagnostic when removing entries. Depending upon your
hotplug config, the offline event may come through to this script twice, and
the iptables -D will fail the second time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:08:22 +00:00
emellor@leeni.uk.xensource.com 892f3730ae Match rename of parameters to match the corresponding hotplug events. This
took place some time ago, so presumably not many people are using this scripts!

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:07:19 +00:00
emellor@leeni.uk.xensource.com b7a3863d9a Fix handling of devid_end when devid is an integer, but not present as a device.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 17:05:45 +00:00
emellor@leeni.uk.xensource.com 837853a460 Merged. 2005-11-25 11:19:09 +00:00
emellor@leeni.uk.xensource.com fefa6c7211 Move XenbusState from the Linux-specific xenbus.h into a new file with the Xen
public interfaces.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 11:19:03 +00:00
smh22@firebug.cl.cam.ac.uk 16dc686834 Use page-sized batches in GETPAGEFRAMEINFO2 (and generally tidy up).
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-25 10:51:09 +01:00
kaf24@firebug.cl.cam.ac.uk 11d666ab5e Fix the issue of on x86_64, rhel4 can not get into runlevel 5.
Xserver will scan pci and the cirrus VGA driver will register
mmio each time, cause mmio array out of space.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
2005-11-25 09:17:34 +01:00
kaf24@firebug.cl.cam.ac.uk 9ad74f9849 I cleaned up acm_ops.c and eliminated returns inside the switch
statement. When we need locks, we can place them now around the switch 
statement.

I also included the comments from Rusty and now return -EPERM for denied 
permission errors.

Signed-off: Reiner Sailer <sailer@us.ibm.com>
2005-11-25 09:15:08 +01:00
kaf24@firebug.cl.cam.ac.uk b588d4451a Update vtpm driver following the recent changes to the
xenbus driver and its semantics.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-11-25 09:14:01 +01:00
kaf24@firebug.cl.cam.ac.uk e426054787 Big reworking of SHARED_KERNEL_PMD logic. Includes several
bug fixes for PAE, and reverts my previous changeset that
broke non-pae.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 23:21:48 +01:00
emellor@leeni.uk.xensource.com c5f6d9c1ac Merged. 2005-11-24 19:57:01 +00:00
emellor@leeni.uk.xensource.com 114f16d3fb Programmatically generate the xm help strings from the snippets, rather than
splicing the strings together manually.

Replace the word "bogus" with the command in question where it appears, as this
shows up in the Usage statements.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 19:56:38 +00:00
emellor@leeni.uk.xensource.com c039c43deb Added a count of the number of users of this block device, and refuse to close
down the frontend until that number becomes 0.  There are no reasonable
semantics for hot-unplugging a block device beneath a mounted filesystem, and
this solution ensures that the guest is not crashed nor the filesystem corruptedby the actions of the administrator.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 19:53:09 +00:00
kaf24@firebug.cl.cam.ac.uk 2fd270048e Remove CONFIG_PREEMPT configuration option from Xen kernel builds.
The option reduces overall system performance and makes little sense
when running over a preemptive hypervisor. Removing the option also
fixes some hypothetical races.

The forthcoming voluntary-preemption option will make much more sense
to enable when running over Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 20:01:16 +01:00
kaf24@firebug.cl.cam.ac.uk 5601f6c62f Quieten down grant-table transfer failure when it is because
a domain is dying.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 19:49:15 +01:00
kaf24@firebug.cl.cam.ac.uk fb94b59330 Another PAE fix for pgd_ctor.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 19:40:18 +01:00
kaf24@firebug.cl.cam.ac.uk 3074eec09f More PAE PGD fixes. Ensure we do not pin PGDs with no kernel
PMD (Xen will not allow it). This is okay even across
suspend/resume -- such PGDs are completely empty and so
contain no PTEs that become garbage across suspend/resume.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 19:16:13 +01:00
kaf24@firebug.cl.cam.ac.uk d702ee35e2 Fix pgd allocation for PAE. We must handle the fact that
a PGD may get pinned under our feet by suspend/resume.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 18:19:51 +01:00
kaf24@firebug.cl.cam.ac.uk 9651847290 Fix 32b non-pae build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 17:13:46 +01:00
emellor@leeni.uk.xensource.com e5914d7e89 Merged. 2005-11-24 15:57:45 +00:00
emellor@leeni.uk.xensource.com 5840748740 Check whether a device is already configured before trying to configure it
again.  Closes bug #397.

To perform this check in the same transaction as the writing of the device
entries has required a little bit of rejigging.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:57:36 +00:00
emellor@leeni.uk.xensource.com 2bf2793e18 Support destruction of device by /dev/sda1 (for example) even when the
configuration just said sda1.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:55:49 +00:00
emellor@leeni.uk.xensource.com 2128c9ba49 Minor tidy, no semantic change.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:52:42 +00:00
kaf24@firebug.cl.cam.ac.uk c68890bfaa Shootdown TLB entries across all VCPUs for SMP shadow mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 16:47:44 +01:00
smh22@firebug.cl.cam.ac.uk 9661835101 Re-enable tools support for live migration on PAE.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-24 16:32:38 +01:00
smh22@firebug.cl.cam.ac.uk cf31cfc274 Quiet down live migrate on PAE domains.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-24 16:30:40 +01:00
kaf24@firebug.cl.cam.ac.uk be8dc15376 Clean up mark_dirty() implementation to check for log-dirty
status internally, with the shadow_lock held for consistency.

Callers no need to check log-dirty status themselves.

Also, add dirty logging to alloc_page_type/free_page_type, so
that we see page tables coming and going during live relocation.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 15:38:33 +01:00
kaf24@firebug.cl.cam.ac.uk 0b7989bf3d Remove unused 'nr_recs' field from trace-buffer header
structure. This also happens to ensure correct t_rec
alignment on ia64. A better layout for trace buffers
will be coming soon.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 15:08:27 +01:00
kaf24@firebug.cl.cam.ac.uk 0d79c5a9ec Adds ac_timer based polling to the ns16550 UART driver. This is
useful when the interrupt line is not connected in hardware or the
mechanism to enable it is not readily available in the hypervisor.
Polling is only enabled when the UART IRQ is set to zero.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 12:06:07 +01:00
kaf24@firebug.cl.cam.ac.uk efb8e0c63f This fixes a small race between when a domain is created and when xentop
tries to read it's info from the xenstore. Instead of sending a NULL
pointer for the name the name will be displayed as a ' ' until the next
refresh where xentop will then properly display the name. 

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-11-24 11:17:20 +01:00
kaf24@firebug.cl.cam.ac.uk d0d531a4c5 xen/common/acm_ops.c, check for a NULL pointer and then
cheerfully dereferences it.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2005-11-24 11:10:43 +01:00
kaf24@firebug.cl.cam.ac.uk 16a1f39d38 dom0_ops return -EACCES when the interface version in wrong. I think
that an acm failure is closer to being non-priv'ed, which returns
-EPERM.  Wouldn't want dom0 tools to report they were the wrong version
just because ACM limited some operation, surely?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
2005-11-24 11:06:26 +01:00
kaf24@firebug.cl.cam.ac.uk b9e7fc2603 Clean up some Xen files in the ioemulator.
1) fix indent
2) use fprintf(logfile, ...) instead of perror and printf
3) remove tailing spaces

Signed-off-by: Xin Li <xin.b.li@intel.com>
2005-11-24 11:05:21 +01:00
kaf24@firebug.cl.cam.ac.uk 6d116e013c Fix ia64 build. Two typos in header files.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-24 11:03:07 +01:00
rread@ubuntu.eng.hq.xensource.com 30da893333 Make the microcode driver builtin.
As a module it complains about unknown symbols sys_munlock and sys_lock.
2005-11-23 22:04:13 -07:00
rread@ubuntu.eng.hq.xensource.com 6c5dcf790f Disable crufty modules still using cli and friends. 2005-11-23 21:55:07 -07:00
rread@ubuntu.eng.hq.xensource.com f048512769 Compile IDE drivers as builtins instead of modules.
This makes the -xen config compatible with the distribution kernel configs, 
but at the cost of some bloat when being used as a guest kernel.
2005-11-23 21:12:38 -07:00
emellor@leeni.uk.xensource.com f6d80a7f57 Reverse accidental commits for changesets 8001 and 7996-7999.
The Mercurial Queues extensions suddenly looks a lot less useful than it first
seemed.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 19:37:33 +00:00
emellor@leeni.uk.xensource.com d64896a9f0 Merged. 2005-11-23 19:31:22 +00:00
emellor@leeni.uk.xensource.com 3ad90d3df7 Added comment describing usage.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 19:31:14 +00:00
emellor@leeni.uk.xensource.com a640b7c2dd imported patch quiet_linux_build.patch 2005-11-23 19:19:24 +00:00
emellor@leeni.uk.xensource.com a14862a927 imported patch trace-thread.patch 2005-11-23 19:19:24 +00:00
emellor@leeni.uk.xensource.com 8856d17150 imported patch my-config 2005-11-23 19:19:23 +00:00
emellor@leeni.uk.xensource.com 30f626794c imported patch logging-thread.patch 2005-11-23 19:19:23 +00:00
emellor@leeni.uk.xensource.com 96e138a54d Merged. 2005-11-23 19:19:04 +00:00