Commit Graph
134 Commits
Author SHA1 Message Date
Mike Meyer a0f793d82d unmodified_drivers: enable use of register_oldmem_pfn_is_ram() API
During the investigation of very slow dump times of guest images in
Amazon EC2 instance, it was discovered that the
register_oldmem_pfn_is_ram() API implemented by the upstream kernel
commit 997c136f518c5debd63847e78e2a8694f56dcf90:

        fs/proc/vmcore.c: add hook to read_from_oldmem() to check
                           for non-ram pages

was not being called.  This was due to the PV driver with the call
to register_oldmem_pfn_is_ram() API was not including the
kernel header file that is used to communicate support of the API in the
kernel.  Fix the issue by including the required header file.

Signed-off-by: Mike Meyer <mike.meyer@teradata.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Olaf Hering <olaf@aepfle.de>
2016-04-04 15:02:59 +02:00
Ian Campbell 443701ef0c Replace FSF street address with canonical URL
As recommended in http://www.gnu.org/licenses/gpl-howto.en.html.

This is the result of:
$ git grep -El Mass\|Temple\|Franklin | xargs ./fsf.pl

Where fsf.pl is:
    #!/usr/bin/perl -w -pi.bak -0777
    my $repl = 'If not, see <http://www.gnu.org/licenses/>.';
    my $br = qr/(?:\s*\n\s*(?:[\*\#]|\/\/|\.\\" )?\s*|\s+)/;

    my $inwt = qr/[Ii]f${br}not,${br}write${br}(?:to${br})?the${br}Free${br}Software${br}Foundation,(?:${br}Inc\.,)?/;

    my $mass = qr/675${br}Mass${br}Ave,?${br}Cambridge,?${br}MA${br}02139,?${br}USA,?\.?/;
    my $franklin = qr/51${br}Franklin${br}St(?:reet)?(?:,${br}| - )Fifth${br}Floor,?${br}Boston,?${br}MA,?${br}02110-1301,?${br}USA,?\.?/;
    my $temple = qr/59${br}Temple${br}Place(?:,${br}| - )Suite${br}330,?${br}Boston,?${br}MA,?${br}021110?-1307,?${br}USA,?\.?/;

    s|$inwt$br$mass|$repl|m;
    s|$inwt$br$franklin|$repl|m;
    s|$inwt$br$temple|$repl|m;

The only remaining mentions of these addresses are in COPYING files which I
haven't touched.

Some of the changed files are imports from elsewhere, however
filtering them out is tricky, I think it is tolerable to have these
files be modified here and then perhaps reverted on the next sync,
since it's only 1-2 lines and obvious what is going on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2015-07-29 11:14:07 +01:00
Jan Beulich fed56ba0e6 unmodified-drivers: tolerate IRQF_DISABLED being undefined
It's being removed in Linux 4.1.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-06-02 13:45:03 +02:00
Jan Beulich b2625bef58 unmodified_drivers: make usbfront build conditional
Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
driver") results in the PV drivers to no longer build against older
(pre-2.6.35) Linux versions. That's because usbfront.h includes
headers from drivers/usb/core/, which is generally unavailable when
building out-of-tree modules.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
2014-01-23 10:29:12 +01:00
Olaf Hering 0dcfb88fb8 unmodified_drivers: enable build of usbfront driver
Signed-off-by: Olaf Hering <olaf@aepfle.de>
2013-09-27 10:18:03 +02:00
Olaf Hering df17e9c889 unmodified_drivers: enable unplug per default
Since xen-3.3 an official unplug protocol for emulated hardware is
available in the toolstack. The pvops kernel does the unplug per
default, so it is safe to do it also in the drivers for forward ported
xenlinux.
Currently its required to load xen-platform-pci with the module
parameter dev_unplug=all, which is cumbersome.
Also recognize the dev_unplug=never parameter, which provides the
default before this patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2013-09-20 11:41:08 +02:00
Olaf Hering 3607f64fc6 unmodified_drivers: __devinit was removed in linux-3.8
Signed-off-by: Olaf Hering <olaf@aepfle.de>

Merge with __init handling.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2013-02-12 11:29:51 +01:00
Olaf Hering aca51da7ba unmodified_drivers: handle IRQF_SAMPLE_RANDOM
The flag IRQF_SAMPLE_RANDOM was removed in 3.6-rc1. Add it only if it is
defined. An additional call to add_interrupt_randomness is appearently
not needed because its now called unconditionally in
handle_irq_event_percpu().

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-09-10 10:54:13 +02:00
Olaf Hering 5982b476f8 unmodified_drivers: remove inclusion of asm/system.h
Allow compilation of PVonHVM drivers with forward-ported xenlinux
sources in openSuSE 12.2. Since Linux 3.4 asm/system.h is not present
anymore. Remove inclusion of this header, its not needed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-05-14 12:04:27 +02:00
Jan Beulich 256eea1f72 unmodified drivers: use upstream sync_bitops if available
The forward ported xenlinux sources in openSuSE 12.2 were switched from
the old synch_bitops to the sync_bitops since kernel version 3.3. Add
compat macros to use either old or new helpers depending on used kernel
source version.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
2012-03-16 11:35:06 +01:00
Olaf Hering 6fabc84127 unmodified drivers: add pfn_is_ram helper for kdump
Register pfn_is_ram helper speed up reading /proc/vmcore in the kdump
kernel. It is compiled only if the kernel source is recent enough to
have the pfn_is_ram helper (v3.0-rc1, commit
997c136f518c5debd63847e78e2a8694f56dcf90).

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-03-16 11:34:41 +01:00
Olaf Hering 3b2b46d747 unmodified drivers: hide xen_cpuid_base() in version 2.6.38+
Allow compilation of PVonHVM drivers with forward-ported xenlinux
sources in openSuSE 12.1.  xen_cpuid_base() is now in mainline, the copy
in the xen tree leads to a compilation error.  The current state leads
to a compile error:

/usr/src/packages/BUILD/xen-4.2.24547/non-dbg/obj/default/platform-pci/platform-pci.c:121: error: redefinition of 'xen_cpuid_base'
/usr/src/linux-3.0.13-0.11/arch/x86/include/asm/xen/hypervisor.h:43: error: previous definition of 'xen_cpuid_base' was here

The reason is that the kernel sources are searched before the xen
sources for asm/hypervisor.h:

/usr/src/linux-3.0.13-0.11/arch/x86/include/asm/hypervisor.h
/usr/src/packages/BUILD/xen-4.2.24547/non-dbg/obj/default/include/asm/hypervisor.h

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
2012-03-16 11:34:14 +01:00
Ian Campbell bc6ffdf6b4 unmodified_drivers: update README from http://wiki.xen.org/xenwiki/UnmodifiedDrivers
Add reference to the fact that these drivers are for "classic-Xen" kernels only
and do not work with PVops but point towards the PVHVM functionality in
mainstream.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-10-26 17:44:03 +01:00
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 2faa4bfdea linux pvdrv: generalize location of autoconf.h
The location of the file in the build tree changed in recent Linux;
since there can be only one such file, using a wild card instead of
an explicit directory name seems the easiest solution.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-05-04 12:42:56 +01: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 49d46b98d6 pv-on-hvm: Adjust mkbuildtree to handle pv_ops header placement
Due to the movement of the arch include directories, we need to adjust
where mkbuildtree looks for headers when building the pv drivers.
Also add a check for the location of features.c

Signed-off-by: Charles Arnold <carnold@novell.com>
2009-10-14 08:29:56 +01: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 c7c69094e5 PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-05-26 09:52:59 +01:00
Keir Fraser b41dfb227d PV-on-HVM: Add a compatibility linux/scatterlist.h for kernels before 2.6.12
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-03-12 11:25:40 +00:00
Keir Fraser 68974ff128 pv-on-hvm: add pvSCSI frontend
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
2008-12-09 13:06:19 +00:00
Keir Fraser 530cff8bab pv-on-hvm: fix for Centos 5.2
From: Yoshisato YANAGISAWA <yanagisawa.yoshisato@lab.ntt.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-09 13:00:52 +00: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 7f2d2a9b5b unmodified drivers: update README
update unmodified_drivers/linux-2.6/README.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-08-07 09:05:54 +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 286b11f71d ia64 pv-on-hvm: __XEN_INTERFACE_VERSION__ is needed to assemble
platform-pci/xcom_asm.S, otherwise incompatible kernel module is
built.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-05-12 10:14:01 +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 4ab490b823 [IA64] Add EXTRA_AFLAGS for platform-pci/xcom_asm.S
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Acked-by: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
2008-02-05 09:30:25 -07: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 8c1a6f6d9d pv-on-hvm: fix/adjust pv driver's mkbuildtree
Allow invoking the script from other than the current directory (the
script now infers the tree is where the script lives). Print which
trees are actually being used.

Fix the linking of sources from Linux tree's drivers/xen/ - this was
needlessly invoking lndir on various sub-directories, in some cases
even twice.

Adjust the script to be able to deal with Linux 2.6.24's unified x86
include directory.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-01-18 15:28:59 +00:00
Keir Fraser 2b795c6e37 PV-on-HVM: Fix build for RHEL/SLES.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-12-05 10:42:45 +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 1f0123a08f PV-on-HVM: Define BLOCKING_NOTIFIER_HEAD macro for old Linux kernels.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2007-11-01 09:33:56 +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
kfraser@localhost.localdomain abfd726ed8 PV-on-HVM: Define DEFINE_RWLOCK() macro for older Linux kernels.
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
2007-08-30 16:17:07 +01:00
kfraser@localhost.localdomain f4f4412534 PV-on-HVML: Remove extra parentheses in netif_tx_lock_bh and netif_tx_unlock_bh
macros, as it caused problems when compiling against a SLES9 tree.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-08-30 16:13:42 +01:00