Commit Graph
79 Commits
Author SHA1 Message Date
Keir Fraser 0023f32c80 pv-drivers: use PCI interfaces to request IO and MEM resources on platform device
This is the correct interface to use and something has broken the use
of the previous incorrect interface (which fails because the request
conflicts with the resources assigned for the PCI device itself
instead of nesting like the PCI interfaces do).

pci_request_region() has been available since at least Linux 2.6.5.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-01-14 08:02:26 +00:00
Keir Fraser 414391cea6 pv-on-hvm: Fix unplug logic
Add the missing part for the dev_unplug parameter in r20847

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-02-22 10:05:40 +00:00
Keir Fraser 6b8e764c0f pv-on-hvm: Correct the order of the argument of out*()
The order of the argument of outl() is wrong.
The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2010-01-29 07:10:28 +00:00
Keir Fraser 97e5bc9649 pv-on-hvm: Only unplug emulated devices if requested via module parameter.
dev_unplug=[all,][ide-disks,][aux-ide-disks,][nics]

ide-disks: Unplug all emulated IDE disks (but not CD-ROMs)
aux-ide-disks: As above, but doesn't touch primary IDE master
nics: Unplug all emulated NICs
all: ide-disks and nics

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-01-23 08:26:23 +00:00
Keir Fraser 91cb4623df x86 hvm: Guests should scan CPUID range 40000000-4000ff00 for Xen leaves.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-09-16 08:55:23 +01:00
Keir Fraser 1ed13664e3 Remove support for out-of-date SLES9 and RHEL4 kernel
ports  from build integration

Both distros now include Xen support from their respective upstreams
and these kernels are very out of date wrt both the upstream distro
kernel and the upstream Xen kernel.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-20 15:51:14 +01:00
Keir Fraser c65b3f8832 pv-on-hvm drivers: build fixes for Linux 2.6.27+
Make the drivers build properly in a 2.6.27 environment as well as
against a kernel with pv-ops Xen configured on (in the latter case
more work would be needed to also make the drivers work, as there's a
large number of duplicate exports).

Portions from Charles Arnold <carnold@novell.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-11-24 11:11:20 +00:00
Keir Fraser d24bdba9b9 pv-on-hvm: Avoid rwlock livelock on save/restore.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-21 10:04:40 +01:00
Keir Fraser 39f97ffa29 x86, hvm: Hyper-V guest interface support with small set of enlightenments
A minimal implementation of the Viridian (Hyper-V) guest
interface. The only enlightenments advertised and supported are vAPIC
MSRs and long-spin-wait notifications. The set of enlightenments can
easily be extended in future, as they are found to provide a
performance win, and configured via an extended HVM_PARAM_VIRIDIAN hvm
parameter.

Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-10-14 10:45:29 +01:00
Keir Fraser a0685dba64 PV-on-HVM: unmask_evtchn() must always use hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-08-21 09:51:46 +01:00
Keir Fraser 12e36600a0 pv-on-hvm: Update for linux-2.6.18-xen.hg:623:2866e6af50
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-31 15:34:58 +01:00
Keir Fraser 665d7a5c3d pv-on-hvm: Fix panic-handler code to work on wider range of kernels.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 15:31:35 +01:00
Keir Fraser a37a9008c8 pv-on-hvm: Change barrier from rmb to wmb.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-05-29 09:40:07 +01:00
Keir Fraser 0c7eb26812 PV-on-HVM: Fix __xen_suspend() for changed XenLinux interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-29 10:30:28 +00:00
Alex Williamson e38c4f55fe merge with xen-unstable.hg 2008-02-14 09:34:27 -07:00
Keir Fraser 5ffec49444 pv-on-hvm: Signal crash to Xen tools when HVM guest panics.
Attached patch adds a function to automatically dump core file when
guest linux on HVM domain panics, in the same way as PV domain.

I tested this patch with kernel 2.6.9 and 2.6.18 on both of x86 and
ia64 (to buid for ia64, some patches in the ia64 tree are needed) by
the following steps, and confirmed it works well:

1. Build xen-platform-pci.ko.
2. In /etc/xen/xend-config.sxp, set (enable-dump yes).
3. On guest linux, execute insmod:
   # insmod xen-platform-pci.ko
4. When guest linux panics, a core file is dumped.

Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>
2008-02-13 10:42:09 +00:00
Alex Williamson a37c72d0fc [IA64] Add xencomm_arch_hypercall_suspend to fix module load
Make use of split out xencomm_arch_hypercall_suspend to fix the following
module load error:

  Loading xen-platform-pci.ko module
  xen_platform_pci: Unknown symbol xencomm_hypercall_suspend
  insmod: error inserting '/lib/xen-platform-pci.ko':
   -1 Unknown symbol in module
  ERROR: /bin/insmod exited abnormally! (pid 210)

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-02-04 08:38:35 -07:00
Keir Fraser 0283c62431 [PV-on-HVM] Process event channels notifications in round-robin order
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-01-25 13:23:39 +00:00
Keir Fraser 44a4d53015 pv-on-hvm: Fix up linux code after hypercall-type-checking changes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-01-23 15:42:52 +00:00
Keir Fraser 2dd224822c [PV-ON-HVM] Fix evtchn of unbind_from_irqhandler()
When xm block-detach command was done on PV-ON-HVM, the response of
other disks was lost. It is because a wrong event channel was
invalidated when detaching it. Not the evtchn number but the irq
number is invalidated specifying it.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
2007-11-06 11:49:15 +00:00
Keir Fraser bb59a254af pv-on-hvm: fixes for unmodified drivers build and modern Linux
- The adjustments to README and overrides.mk are generic.
- The removal of explicit linux/config.h inclusion should also not
  cause any issues.
- The introduction of irq_handler_t should eliminiate warnings on
  2.6.19+ kernels (I didn't check they're there, but since the
  request_irq prototype changed, I'm sure there's at least
  one. However, as a result changes to the Linux tree are expected to
  be required.
- The change setup_xen_features -> xen_setup_features follows the
  naming in mainline 2.6.23 but would apparently also require changes
  to the Linux tree.
- The changes SA_* -> IRQF_ and  pci_module_init ->
  pci_register_driver should also not cause issues.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-10-25 15:54:19 +01:00
Alex Williamson 90bf2f04a8 [IA64] Fix unmodified drivers.
xcom_mini.c is integrated into xcom_hcall.c so that platform-pci needs it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-12 09:36:36 -06:00
kfraser@localhost.localdomain 05bc962b37 PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.
smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.

Based on an original patch by:
 Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
 Signed-off-by: Robert Phillips <rphillips@virtualiron.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-07 10:18:54 +01:00
Alex Williamson f87e8be01d [IA64] xencomm - compilation fix of unmodified driver
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-08-16 13:46:50 -06:00
kfraser@localhost.localdomain 74a665b5ee [PV-on-HVM]: Add missing includes
This patch adds missing includes that currently work through indirect
inclusions.  This cannot be relied on and indeed does break on older
kernels (2.4 for PV-on-HVM).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-08-13 16:41:04 +01:00
kfraser@localhost.localdomain 647f41c70d hvm: Fix PV-on-HVM drivers to not execuite hypercall page while it is
being re-initialised.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
2007-08-06 11:16:14 +01:00
kfraser@localhost.localdomain 0062fcfa82 pv-on-hvm: Re-init hypercall stubs page after HVM save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-25 17:26:26 +01:00
kfraser@localhost.localdomain e03858f635 PV-on-HVM: More carefully synchronise with APs when putting them to
sleep in a spin loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-12 12:09:58 +01:00
kfraser@localhost.localdomain 30fbfa471f PV-on-HVM: Fixes for module loading.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-11 09:29:00 +01:00
kfraser@localhost.localdomain fc91db2baf PV-on-HVM: More save/restore fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-11 09:16:04 +01:00
kfraser@localhost.localdomain 20f2780026 PV-on-HVM: Fixes for save/restore. Also gets rid of separate modules
reboot.ko and xenbus.ko. These are now part of xen-platform-pci.ko.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-10 15:31:53 +01:00
Alex Williamson b43b64a63d merge with xen-unstable.hg 2007-04-09 13:40:25 -06:00
Alex Williamson 6da4613336 [IA64] Fix PV-on-HVM VNIF to work without using balloon on IPF
Temporary patch until we support the the balloon driver on HVM domains.

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
2007-04-09 13:39:35 -06:00
Keir Fraser e4daaaabe1 PV-on-HVM: A bit more re-jigging so the build gets further against
native Linux 2.6.5. It's not quite there still, but closer.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-06 11:17:08 +01:00
kfraser@localhost.localdomain aeb2e1298b PV-on-HVM: Add new ioreq 'invalidate' for zapping ioemu-dm mapccahe
after balloon operations in an HVM guest.

This removes the I/O port hack from the guest OS, and from ioemu.

Also we flush on reservation *increases* as well as decreases. This is
necessary until qemu-dm can demand-fault page mappings into existing
valid buckets.

Signed-off-by: Steven Hand <steven@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-05 14:29:18 +01:00
Steven Hand 1d3e27e802 Initial check-in to support PV balloon driver within HVM guests.
Still todo:

 - fix mapcache invalidation (should happen in Xen)
 - support 32-on-64 mode correctly

Signed-off-by: Steven Hand <steven@xensource.com>
2007-04-04 19:59:10 +01:00
Tim Deegan 9dd742c907 [HVM] Save/restore: PV-on-HVM driver save/restore support
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2007-03-29 16:27:52 +00:00
awilliam@xenbuild2.aw ebdb5845be merge with xen-unstable.hg 2007-03-20 15:19:38 -06:00
kaf24@firebug.cl.cam.ac.uk ca039d0244 hvm: Fix platform-irq handling in presence of irqbalance daemon.
The HVM guest did not respond when PV-on-HVM driver was tested on
the following conditions.

1. RHEL4u4
2. vcpu 4
3. irqbalance on
4. pv-on-hvm driver used.

Eventhandler did not work because IRQ was delivered to another vcpu by
irqbalance.

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
2007-03-19 09:31:04 +00:00
awilliam@xenbuild2.aw bbe39297b5 [IA64] Fix for compiling PV-on-HVM driver on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
2007-03-12 08:40:57 -06:00
Ian Campbell f380fac05a [LINUX] Purge include <linux/config.h>. It has been obsolete for some time now.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-23 16:56:45 +00:00
Ian Campbell 193ca2e8bb [LINUX] Call ctrl_alt_del() to trigger a reboot so we benefit from the
generic infrastructure for cad_pid etc.

Add a ctrl_alt_del() implemenation to the PV on HVM compatibility
layer since ctrl_alt_del() is not exported on native kernels.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-13 15:32:25 +00:00
Keir Fraser 17c65a4118 Small cleanups to PV-on-HVM support code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-08 17:38:30 +00:00
awilliam@xenbuild2.aw a356cbd5f6 [IA64] Follow to allow PV-on-HVM callback irq to be identified by PCI device.
Also delete IA64 specific spec concerned with IA64_CALLBACK_IRQ_RID.

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
2007-02-06 09:26:25 -07:00
awilliam@xenbuild2.aw d7e51f76c8 [IA64] Fix for compiling PV-on-HVM driver on IPF
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-02-05 15:41:58 -07:00
kaf24@localhost.localdomain 249c2a8ce6 [HVM] Allow HVM guest to request invalidation of foreign mappings via
an I/O port write.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2007-01-27 13:32:27 +00:00
Ian Campbell e22738def9 [PV-on-HVM] Make PV drivers on HVM kernels work on older kernels after
update to 2.6.18.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-01-22 17:10:27 +00:00
awilliam@xenbuild2.aw b5a65552a9 merge with xen-unstable.hg 2007-01-15 15:15:26 -07:00
kfraser@localhost.localdomain a84893ee09 [PV-on-HVM] Allow platform interrupt to be used for entropy.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 14:40:13 +00:00
awilliam@xenbuild2.aw a77c31c882 merge with xen-unstable.hg 2007-01-10 08:40:47 -07:00