Commit Graph
448 Commits
Author SHA1 Message Date
Ian Campbell d8656aaa3e PV-on-HVM: Fix PV-on-HVM drivers for IA64.
Thanks to Kasai Takanori and Doi Tsunehisa for testing.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-11-02 11:56:26 +00:00
kfraser@localhost.localdomain fc229c860b Clean up recent changes to reboot code. This fixes PV save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 15:54:03 +00:00
Steven Smith 65ae4fc8cd [HVM][LINUX][TOOLS] Make xm {shutdown|reboot} do something sensible for HVM
domains with PV drivers loaded.  This patch creates a new PV-on-HVM
module, reboot.ko, which, when loaded, creates control/reboot_module
in the store.  The tools notice this, and disable the watch which would
normally destroy HVM domains which are the target of an xm shutdown
command, allowing the reboot module to shut the domain down cleanly.

Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>

(Checkin comments by Steven Smith <sos22@cam.ac.uk>)
2006-10-31 09:54:49 +00:00
kfraser@localhost.localdomain 11b39cba56 [LINUX] Fix build breakage from previous patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-30 14:28:29 +00:00
kfraser@localhost.localdomain 3d91901864 [LINUX] Use CONFIG_XEN_COMPAT_030002 where possible.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:14:46 +00:00
kfraser@localhost.localdomain fa088340b4 [LINUX] Declare structs as 'static __initdata' where possible.
Probably still not catching all possible cases, but using static
(where not already the case) makes the code size smaller, and using __initdata
has the usual advantages.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:09:13 +00:00
awilliam@xenbuild.aw 506aac287c merge with xen-unstable.hg 2006-10-25 12:12:01 -06:00
Ian Campbell 06b12ba822 PV-on-HVM: Add infrastructure for a compatibility shim in order to
support PV-on-HVM drivers for older kernel releases.

The compatability code is included in the xen-platform-pci module
since this module underpins all the others.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
2006-10-25 13:58:30 +01:00
Ian Campbell 4f3230eb63 [LINUX] PV-on-HVM: Directly include headers which are used in various
files rather than relying on them being included indirectly.

This is required because these headers are not pulled in indirectly on
older kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-10-25 13:58:30 +01:00
awilliam@xenbuild.aw 0598e72c96 [IA64] Xencomm fixes for HVM PV-drivers and driver domain.
Create xcom_mini.c from xcom_hcall.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-14 16:26:27 -06:00
awilliam@xenbuild.aw d53914d6c0 merge with xen-unstable.hg 2006-10-14 13:28:45 -06:00
kfraser@localhost.localdomain 6329cf0815 [IA64] Add support for enforcing singleshot mmap() semantics at the
privcmd interface.
From: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-12 13:55:03 +01:00
kfraser@localhost.localdomain 4314149396 [BALLOON] Replace alloc_empty_page_range with new helper alloc_empty_pages_and_pagevec.
This is a better fit with all the callers, who now allocate discontiguous empty pages.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-06 11:52:41 +01:00
kaf24@firebug.cl.cam.ac.uk 76c184f428 [BLK] back: Allocate pages for foreign mappings individually rather
than in one large contiguous region.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-05 22:11:24 +01:00
awilliam@xenbuild.aw fac272695c [IA64] p2m exposure. linux side part.
This patch introduce compile time option XEN_IA64_EXPOSE_P2M
to enable this feature and boot option xen_ia64_p2m_expose to
disable the functionality.
This patch also introduce XEN_IA64_EXPOSE_P2M_USE_DTR to map p2m table
with dtr and boot option xen_ia64_p2m_expose_use_dtr to disable it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-10-04 22:12:29 -06:00
awilliam@xenbuild.aw 250be0bb4a [IA64] Implement fast hypercall for physdevop eoi.
Eoi is a very frequent hypercall which has only one argument passed through
a structure.  To avoid the xencomm overhead, a new hypercall is created
and the argument is passed by value.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-02 14:09:49 -06:00
awilliam@xenbuild.aw 5f90eb60c6 [IA64] Use xencomm for hypercalls.
With xencomm metaphysical addresses are passed to the hypervisor instead
of virtual addresses.
This patch breaks compatibility.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-02 14:03:42 -06:00
awilliam@xenbuild.aw 48a257ace3 merge with xen-unstable.hg 2006-10-01 19:10:18 -06:00
awilliam@xenbuild.aw cc4280de0b [IA64] do not export XSI_BASE, use set_shared_info_va
Until now, the set_shared_info_va hypercall was never used.
This patch remove XSI_BASE and use this hypercall to set the xsi address.
Because xsi is now in the top 1MB (before percpu space), linux code should be 
slightly more compact (addl instead of movl).

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-10-01 11:09:54 -06:00
kfraser@localhost.localdomain ada55182d2 [LINUX] Make evtchn device use a dynamic minor number.
Also update the code in tools to create the device node if udev fails.
The tools now read the sysfs system to find the minor number needed.

Original patch from  Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-29 14:20:52 +01:00
kfraser@localhost.localdomain 977599dbcb Clean up dom0_vga_console_info structure for v3.0.3.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-18 18:17:54 +01:00
awilliam@xenbuild.aw b63e1dbb4d [IA64] swiotlb clash fix
Do not define dma_supported to platform_dma_supported when building
the Xen kernel. This happend to work for DIG builds because the
swiotlb.c version of dma_supported compiles to identical code as
arch/i386/kernel/pci-dma-xen.c so the linker didn't complain.

Signed-off-by: Jes Sorensen <jes@sgi.com>
2006-09-12 11:42:27 -06:00
awilliam@xenbuild.aw b80d869beb [IA64] machvec cleanups
Move the DIG specific platform_dma_foo defines to where they belong.

Signed-off-by: Jes Sorensen <jes@sgi.com>
2006-09-12 11:36:39 -06:00
awilliam@xenbuild.aw dff14d2746 [IA64] Cleanup for PV-on-HVM for IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2006-09-10 14:26:27 -06:00
kaf24@firebug.cl.cam.ac.uk 8b7ee4cecb [XENBUS] Make frontend drivers shutdown cleanly.
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.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-09-01 00:42:14 +01:00
kaf24@firebug.cl.cam.ac.uk 5182367c40 [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.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-09-01 00:33:19 +01:00
kaf24@firebug.cl.cam.ac.uk e957a7cb4a Add xenbus_strstate() helper function for more readable debug output.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-01 00:20:42 +01:00
awilliam@xenbuild.aw e012111cf5 [IA64] Modify sparse headers for PV-on-HVM/IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2006-08-28 16:16:07 -06:00
awilliam@xenbuild.aw 26cb12a513 [IA64] Clean up: change asm constraints and remove _hypercall_imm*
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-24 11:42:24 -06:00
awilliam@xenbuild.aw 0bbee1ed75 [IA64] PV-to-HVM prep for maddr.h
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
[merged with existing maddr.h]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-08-23 12:56:10 -06:00
awilliam@xenbuild.aw 3edc42f921 [IA64] split parts of page.h into maddr.h
ia64 support for xen-unstable.hg cset 11081:9c953e1b6fad

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-08-23 11:15:29 -06:00
awilliam@xenbuild.aw 9f557e7ff2 merge with xen-unstable.hg 2006-08-23 11:11:27 -06:00
awilliam@xenbuild.aw 417209a93e [IA64] Add stubs to Linux/IPF for the new hvm_op hypercall.
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2006-08-22 14:44:13 -06:00
kfraser@localhost.localdomain b3ea76b1e0 [HVM] Clean ups for PV-on-HVM drivers. In particular, platform-pci
driver can now handle multi-page hypercall stub areas.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 17:16:58 +01:00
kfraser@localhost.localdomain 314ded7410 [x86_64] Guests no longer set _PAGE_USER on kernel mappings.
This may allow guest kernels to be run outside ring 3 in future, and
also provides scope for optimisations today (e.g., using global bit on
user mappings).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 15:26:40 +01:00
kaf24@localhost.localdomain e7b9a93ed4 [XENBUS] Allow user of xenbus_read_driver_state() to distinguish
absence of state field in xenstore by returning XenbusStateUnknown
rather than XenbusStateClosed.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-19 14:28:10 +01:00
kaf24@localhost.localdomain 35f4fc005c [LINUX] Replace uses of CONFIG_XEN_PRIVILEGED_GUEST with is_initial_xendomain().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-19 12:08:12 +01:00
kaf24@localhost.localdomain 587411253f [NET] front: Fix rx buffer leak when tearing down an interface.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-08-19 10:58:07 +01:00
kfraser@localhost.localdomain a03d12d189 [LINUX] Allow xenbus to be built as a module.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-17 16:28:47 +01:00
kfraser@localhost.localdomain e3e351919c [LINUX] Define is_initial_xendomain() to zero for HVM drivers.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-16 16:16:32 +01:00
kfraser@localhost.localdomain 40daa87afb [LINUX] Update the hvm_op wrapper now that the return value of get_param is in
the parameter structure rather than the hypercall return value.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-16 16:15:46 +01:00
awilliam@xenbuild.aw 28efc9d73d [IA64] fix non-CONFIG_XEN sparse tree build
This patch fixes some over-zealous code removal with the P==M
cleanup.  Some of the P==M code was shared with the bare metal kernel.
Also cleaned up a couple places we should have used CONFIG_XEN.

From: Juan Quintela <quintela@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-08-16 09:15:17 -06:00
kfraser@localhost.localdomain b8f69c1f51 [NET] back: Support copying packets to the frontend on receive path.
Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-16 16:01:00 +01:00
awilliam@xenbuild.aw ad81630fe1 [IA64] copy_from/to_guest
This patch fixes the copy_from/to_guest problem.
As Akio reported, modularised netback causes dom0's down.

The following process is happened in gnttab_transfer()@
xen/common/grant_table.c:

  gnttab_transfer()
   => steal_page()
     => assign_domain_page_cmpxchg_rel()
       => domain_page_flush()
         => domain_flush_vtlb_all()  // all TLBs are flushed
   ...
   => __copy_to_guest_offset()               // always fail to copy

The embedded netback module has no problem because it uses TR pinned
data.  But modularised one is out of TR. So copy_from/to_guest issue
must be solved in order to modularise drivers.

Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
2006-08-14 14:21:21 -06:00
kfraser@localhost.localdomain 2b88d7ed5f [LINUX] Provide a handy macro for detrmining if we are domain0.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 14:44:31 +01:00
kfraser@localhost.localdomain 30b586b9fb [LINUX] Split useful bits of page.h into new header maddr.h.
Split the bits of page.h which are needed by PV-on-HVM drivers out
into a separate header file, so that it's a bit easier to get the xenolinux
machine address functions when compiled against a native kernel.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 13:54:10 +01:00
kfraser@localhost.localdomain c9edca86f1 [HVM][LINUX] Add a header file with wrappers for hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:35:57 +01:00
kfraser@localhost.localdomain 13fbff7760 [HVM] Add stubs to Linux for the new hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:33:50 +01:00
awilliam@xenbuild.aw bc218fa824 merge with xen-unstable.hg 2006-08-09 08:34:06 -06:00
Ian.Campbell@xensource.com 0f5fbb45a0 Fix BUG_ON on switch_mm if XENFEAT_writable_page_tables is enabled.
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-09 11:26:11 +01:00