This patch makes frontend drivers being shutdown when devices_shutdown()
is called and walks down the device tree. Most of it is handled by the
xenbus core, which got a new function for the bus->shutdown callback.
[XENBUS] Introduce new "online" node for backend drivers.
Driver changes: Make backend drivers check it when entering Closed
state, only unregister devices when the "online" node is either "0" or
not present. The later maintains backward compatibility.
Tools changes: Update "online" node when creating and hot-unplugging
devices.
Background: When kexec'ing a new kernel, the old kernel's frontend
driver will shutdown, but the backend device should *NOT* disappear
due to that, so the new kernel instance can reconnect.
[XEN] Clean up BASE_DISALLOW_MASK and fix for x86/64.
Original patch from Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] interfaces: Remove explicit alignment/padding from domctl/sysctl hypercalls.
Generation of 32-on-64 compat shims is being semi-automated for all
other hypercalls. It seems sensible to teat all hypercalls uniformly
and do the same for the control-stack management interfaces too.
[LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.
This is because it should only contain real I/O memory address ranges,
otherwise we can get false conflicts between a real I/O range and a
'pseudophysical' RAM range, causing drivers to fail to work in a domU.
Also prevent kernel code/data being requested as iomem resources --
they are not contiguous in 'io memory' space so this would not make
sense.
[NET] front: move register_netdev() + sysfs attribute registering from create_netdev() into the new open_netdev() function.
open_netdev is called as very last thing in netdev_probe.
This closes at least one initialization race: uninitialized
mac address is visible for a short time in
/sys/class/net/${if}/address
[XEN] Add a start_pfn field in xen_domctl_getmemlist.
This is used by ia64 because it directly reads the P2M table. Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
[LINUX][X86_64] P2M map must be allocated on page aligned boundary.
Otherwise save/restore can break. Signed-off-by: Kazuo Moriwaka <moriwaka@valinux.co.jp>
Ewan Mellor [Tue, 29 Aug 2006 21:51:06 +0000 (22:51 +0100)]
This patch fixed 'xm reboot' to work as you expected with the wait
option. This patch adds a restart sequence counter to xenstore.
The completion of a VM reboot is detected by observing that
its restart sequence counter changes.
[IA64] init the hlt timer on a valid cpu and migrate
Based on a patch from Anthony Xu, v->processor is not initialized
in alloc_vcpu_struct() when we initialize the hlt_timer. Init the
timer on the first cpu and migrate it in schedule_tail().
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Jimi Xenidis [Tue, 29 Aug 2006 10:53:58 +0000 (06:53 -0400)]
[XEN][POWERPC] cleanup for (;;);
When the port first started, we didn't even have panic() working
properly so we used "for(;;);" loops to stop execution. Now that output
is buffered these look like hangs, since you usually do not see the
printk() before.
[qemu] Fix PCI config header space writes and set Subsystem-Vendor ID fields.
Fix failure in Windows HCT's PCI-Compliance-Test by invalidating the
writing to read-only/reserved fields in PCI configuration space header
and giving Subsystem-Vendor-ID field a valid value via copying Vendor-ID
field into it.
Jimi Xenidis [Mon, 28 Aug 2006 21:28:55 +0000 (17:28 -0400)]
[XEN][POWERPC] do not set d->tot_pages, but check it. Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
[modified to use existing cpu_halt() function in linux-xen files] Signed-off-by: Alex Williamson <alex.williamson@hp.com>
[XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly. This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.
[HVM] [SMBIOS] Duplicate UUID into serial number in SMBIOS tables.
Windows zeroes out the UUID in the SMBIOS tables, but the identifier
is often needed by systems management code. Duplicating the UUID
as the virtual system's serial number should help.
The following patch fixes a bug where xenconsoled will can SEGV
because it uses FD_ISSET(-1,xxx). Since the code is written that any
ring/tty handler can set d->tty_fd to -1 it has to be checked
_every_time_.
[TOOLS] Remove Gentoo-specific workaround in networking
scripts -- apparently it is not needed (reported by
Tuan Van <lang.thang@gmail.com>). See bugzilla issue #741
for more details.
[TOOLS] Clean up routed vifs quietly on domain destruction.
I have experienced that the vif-route script does not work as expected
when deleting a virtual interface (Redhat FC5). Both of the commands
"ifdown" and "ip route" cause an early vif-route script exit and
therefore will cause skipping of the later script commands (such as
cleaning up iptables entries for the default 'antispoof'). The
vif-route
script creates the following syslog error entry:
"/etc/xen/scripts/vif-route failed; error detected."
It appears that both of the problematic commands are actually
redundant
when destroying domains:
1. the interface is already gone (I assume because the domain frontend
is gone already) --> ifdown does not do anything
2. the route is gone as well since the interface has disappeared -->
ip
route del does not do anything
Executing those redundant commands with "do_without_error" ensures
that
the script completes and cleans up iptables rules. The attached
RFC-patch only masks those commands when bringing down an interface,
so
that domain creation continues to fail in case of vif setup problems
(intended behavior).
Having the iptables cleanup called correctly by vif-route is important
to keep the iptables rule-set clean, otherwise antispoof rules
accumulate with every vif creation.
Jimi Xenidis [Mon, 28 Aug 2006 00:48:06 +0000 (20:48 -0400)]
[XEN][POWERPC] allocate HTAB using shadow calls
This patch will use the shadow_ops call to allocate the domains Hashed
Page-table. This allows for the management tools to customize its size
for the domain.
Warning! The management tools have yet to be updated to use this
properly and update the devtree accordingly so code will assume 64M
RAM and 1M HTAB while the shadow up continues to receive a 0 request.
Jimi Xenidis [Sun, 27 Aug 2006 20:12:00 +0000 (16:12 -0400)]
[XEN][POWERPC] Allocate more memory than RMA for Dom0
The following patch will only effect Dom0 at the moment and allow it
to be created with memory larger than RMA. It works by allocating
extents (AKA chunks) of memory of an order specified by the processor.
The extent size should be a value that is capabable of mapping a
"large page" so we use the 970s large page size. These extents are
tracked by an extents list that simply tracks these page allocations
and what there mapping is. Other sub-systems effected by this:
- Dom0 OFD devtree /memory cleanup
- log_large_page_sizes is now an array
- Config for minumum Dom0 size
Caveats:
- There is a hack around HTAB allocation because we currently
allocate one at domain creation time, this will be correct by a
patch to follow.
- Dom0, or domains capable of mapping mfns byt have their extents be
PFN=MFN
Alex Williamson [Sun, 27 Aug 2006 05:56:01 +0000 (06:56 +0100)]
[PATCH] fix null pointer dereference in xen_guest_lookup()
The latest ELF changes have a null pointer dereference bug when you
have neither an elf notes section nor a __xen_guest_string. This patch
checks for the existence of the __xen_guest_string prior to using it.
Please apply. Thanks,
Alex
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
Only use one page for stubs and tables instead of 2MB.
Create struct fw_tables to make code more understandable.
Many comments added.
Correctly compute sal systab checksum.
Introduce HVMOP_setup_shared_info_page
- A page allocated on HVM-guest OS is swapped original shared_info
page with this hypercall.
- In x86 code, original shared_info page is used after pv-on-hvm
setup with remapping feature in arch depend HYPERVISOR_memory_op.
But, we can't implement same feature for IPF, thus we select to
implement with this method.
Introduce HVMOP_setup_gnttab_table
- Pages allocated on HVM-guest OS is swapped original grant_table
page frames with this hypercall.
- Same above.
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com> Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
hardware platform (e.g., MTRR access, microcode update, platform
quirks, ...)
2. domctl -- used by management tools to control a specified domain
3. sysctl -- used by management tools for system-wide actions
Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].