head	1.14;
access;
symbols
	RELENG_8_4:1.14.0.2
	RELENG_9_1_0_RELEASE:1.12.2.1.4.3
	RELENG_9_1:1.12.2.1.0.4
	RELENG_9_1_BP:1.12.2.1
	RELENG_8_3_0_RELEASE:1.3.2.6.2.1
	RELENG_8_3:1.3.2.6.0.2
	RELENG_8_3_BP:1.3.2.6
	RELENG_9_0_0_RELEASE:1.12.2.1.2.1
	RELENG_9_0:1.12.2.1.0.2
	RELENG_9_0_BP:1.12.2.1
	RELENG_9:1.12.0.2
	RELENG_9_BP:1.12
	RELENG_8_2_0_RELEASE:1.3.2.5.2.1
	RELENG_8_2:1.3.2.5.0.2
	RELENG_8_2_BP:1.3.2.5
	RELENG_8_1_0_RELEASE:1.3.2.4.2.1
	RELENG_8_1:1.3.2.4.0.2
	RELENG_8_1_BP:1.3.2.4
	RELENG_8_0_0_RELEASE:1.3.2.2.2.1
	RELENG_8_0:1.3.2.2.0.2
	RELENG_8_0_BP:1.3.2.2
	RELENG_8:1.3.0.2
	RELENG_8_BP:1.3;
locks; strict;
comment	@# @;


1.14
date	2012.11.17.01.51.05;	author svnexp;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2012.08.13.07.36.57;	author cperciva;	state Exp;
branches;
next	1.12;

1.12
date	2010.12.13.12.15.46;	author rwatson;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2010.12.10.22.22.01;	author rwatson;	state Exp;
branches;
next	1.10;

1.10
date	2010.03.13.09.21.00;	author ed;	state Exp;
branches;
next	1.9;

1.9
date	2010.03.11.14.49.06;	author nwhitehorn;	state Exp;
branches;
next	1.8;

1.8
date	2010.02.15.23.44.48;	author attilio;	state Exp;
branches;
next	1.7;

1.7
date	2010.02.10.16.30.04;	author attilio;	state Exp;
branches;
next	1.6;

1.6
date	2010.01.19.17.20.34;	author jhb;	state Exp;
branches;
next	1.5;

1.5
date	2010.01.14.15.07.18;	author jhb;	state Exp;
branches;
next	1.4;

1.4
date	2009.08.13.17.09.45;	author attilio;	state Exp;
branches;
next	1.3;

1.3
date	2009.05.10.00.00.25;	author kuriyama;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2009.05.06.17.52.38;	author dfr;	state Exp;
branches;
next	1.1;

1.1
date	2009.03.11.15.30.12;	author dfr;	state Exp;
branches;
next	;

1.14.2.1
date	2012.11.17.01.51.05;	author svnexp;	state dead;
branches;
next	1.14.2.2;

1.14.2.2
date	2013.03.28.13.03.56;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.12.2.1.2.1
	1.12.2.1.4.1;
next	1.12.2.2;

1.12.2.2
date	2012.08.20.11.34.49;	author cperciva;	state Exp;
branches;
next	1.12.2.3;

1.12.2.3
date	2012.11.17.11.36.44;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.12.2.1.2.2;

1.12.2.1.2.2
date	2012.11.17.08.36.43;	author svnexp;	state Exp;
branches;
next	;

1.12.2.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.12.2.1.4.2;

1.12.2.1.4.2
date	2012.08.24.05.36.37;	author cperciva;	state Exp;
branches;
next	1.12.2.1.4.3;

1.12.2.1.4.3
date	2012.11.17.08.47.33;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2009.08.13.17.54.11;	author attilio;	state Exp;
branches
	1.3.2.2.2.1;
next	1.3.2.3;

1.3.2.3
date	2010.01.21.15.10.20;	author jhb;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2010.04.07.02.24.41;	author nwhitehorn;	state Exp;
branches
	1.3.2.4.2.1;
next	1.3.2.5;

1.3.2.5
date	2010.12.13.12.34.35;	author rwatson;	state Exp;
branches
	1.3.2.5.2.1;
next	1.3.2.6;

1.3.2.6
date	2012.02.15.14.23.01;	author ken;	state Exp;
branches
	1.3.2.6.2.1;
next	1.3.2.7;

1.3.2.7
date	2012.11.17.10.36.24;	author svnexp;	state Exp;
branches;
next	;

1.3.2.2.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.3.2.4.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.3.2.5.2.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.3.2.6.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.3.2.6.2.2;

1.3.2.6.2.2
date	2012.11.17.08.25.05;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Switching exporter and resync
@
text
@#
# XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64
#
# $FreeBSD: head/sys/amd64/conf/XENHVM 239228 2012-08-13 07:36:57Z cperciva $
#
include		GENERIC
ident		XENHVM

#
# Adaptive locks rely on a lock-free pointer read to determine the run state
# of the thread holding a lock when under contention; under a virtualisation
# system, the thread run state may not accurately reflect whether the thread
# (or rather its host VCPU) is actually executing.  As such, disable this
# optimisation.
#
options 	NO_ADAPTIVE_MUTEXES
options 	NO_ADAPTIVE_RWLOCKS
options 	NO_ADAPTIVE_SX

# Xen HVM support
options 	XENHVM
device		xenpci
@


1.14.2.1
log
@file XENHVM was added on branch RELENG_8_4 on 2013-03-28 13:03:56 +0000
@
text
@d1 22
@


1.14.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 24
#
# XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64
#
# $FreeBSD: releng/8.4/sys/amd64/conf/XENHVM 231759 2012-02-15 14:23:01Z ken $
#
include		GENERIC
ident		XENHVM

makeoptions	MODULES_OVERRIDE=""

#
# Adaptive locks rely on a lock-free pointer read to determine the run state
# of the thread holding a lock when under contention; under a virtualisation
# system, the thread run state may not accurately reflect whether the thread
# (or rather its host VCPU) is actually executing.  As such, disable this
# optimisation.
#
options 	NO_ADAPTIVE_MUTEXES
options 	NO_ADAPTIVE_RWLOCKS
options 	NO_ADAPTIVE_SX

# Xen HVM support
options 	XENHVM
device		xenpci
@


1.13
log
@SVN rev 239228 on 2012-08-13 07:36:57Z by cperciva

Build modules along with the XENHVM kernels.

No objections from:	freebsd-xen mailing list
MFC after:	1 week
@
text
@d4 1
a4 1
# $FreeBSD$
@


1.12
log
@SVN rev 216405 on 2010-12-13 12:15:46Z by rwatson

Add options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matching
its similar disabling of adaptive mutexes and rwlocks.  The existing
comment on why this is the case also applies to sx locks.

MFC after:	3 days
Discussed with:	attilio
@
text
@a8 2
makeoptions	MODULES_OVERRIDE=""

@


1.12.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.4.2
log
@SVN rev 239639 on 2012-08-24 05:36:37Z by cperciva

MFC r239228: Build modules along with the XENHVM kernels.

Approved by:	re (kib)
@
text
@d9 2
@


1.12.2.1.4.3
log
@Switch importer
@
text
@d4 1
a4 1
# $FreeBSD: releng/9.1/sys/amd64/conf/XENHVM 239639 2012-08-24 05:36:37Z cperciva $
@


1.12.2.2
log
@SVN rev 239412 on 2012-08-20 11:34:49Z by cperciva

MFC r239228: Build modules along with the XENHVM kernels.
@
text
@d9 2
@


1.12.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d4 1
a4 1
# $FreeBSD: stable/9/sys/amd64/conf/XENHVM 239412 2012-08-20 11:34:49Z cperciva $
@


1.12.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.12.2.1.2.2
log
@Switch importer
@
text
@d4 1
a4 1
# $FreeBSD: releng/9.0/sys/amd64/conf/XENHVM 216405 2010-12-13 12:15:46Z rwatson $
@


1.11
log
@SVN rev 216365 on 2010-12-10 22:22:01Z by rwatson

Derive the XENHVM kernel from GENERIC, adding only the options required
to support PV drivers (such as xenpci), and non-adptive locking (along
with a comment about why).

This change eliminates the synchronisation problem between GENERIC and
XENHVM, which had become severely rotted in HEAD, and in 8-STABLE
included non-production kernel debugging features such as WITNESS.

However, it comes at the cost of enabling devices and options that may
not be present under Xen (such as random ethernet cards).  For now, opt
for a simpler kernel configuration file rather than using nooptions/
nodevice to enumerate and eliminate them.  This leads to a somewhat
larger XENHVM kernel.

This is an MFC candidate for 8-STABLE before 8.2, in order to provide
a production-worthy XENHVM kernel configuration for amd64.

Discussed with:	gibbs, cperciva
Reported by:	Piete Brooks <Piete.Brooks at cl.cam.ac.uk>
Sponsored by:	DARPA, AFRL
MFC after:	3 days
@
text
@d20 1
@


1.10
log
@SVN rev 205116 on 2010-03-13 09:21:00Z by ed

Remove COMPAT_43TTY from stock kernel configuration files.

COMPAT_43TTY enables the sgtty interface. Even though its exposure has
only been removed in FreeBSD 8.0, it wasn't used by anything in the base
system in FreeBSD 5.x (possibly even 4.x?). On those releases, if your
ports/packages are less than two years old, they will prefer termios
over sgtty.
@
text
@d4 1
a4 14
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
d6 1
a6 3
# $FreeBSD$

cpu		HAMMER
a8 1
makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
d11 7
a17 38
options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
options 	MD_ROOT			# MD is a potential root device
options 	NFSCLIENT		# Network Filesystem Client
options 	NFSSERVER		# Network Filesystem Server
options 	NFSLOCKD		# Network Lock Manager
options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
options 	AUDIT			# Security event auditing
#options 	KDTRACE_FRAME		# Ensure frames are compiled in
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
a20 23
# Debugging for use in -current
options 	KDB			# Enable kernel debugger support.
options 	DDB			# Support DDB.
options 	GDB			# Support remote GDB.
options 	DEADLKRES		# Enable the deadlock resolver
options 	INVARIANTS		# Enable calls of extra sanity checking
options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
options 	WITNESS			# Enable checks to detect deadlocks and cycles
options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed

# Make an SMP-capable kernel by default
options 	SMP			# Symmetric MultiProcessor Kernel

# CPU frequency control
device		cpufreq

# Bus support.
device		acpi
device		pci

# Floppy drives
device		fdc

a23 59

# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
device		ataraid		# ATA RAID drives
device		atapicd		# ATAPI CDROM drives
device		atapifd		# ATAPI floppy drives
device		atapist		# ATAPI tape drives
options 	ATA_STATIC_ID	# Static device numbering

# SCSI peripherals
device		scbus		# SCSI bus (required for SCSI)
device		ch		# SCSI media changers
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)


# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		kbdmux		# keyboard multiplexer

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc

device		agp		# support several AGP chipsets

# Serial (COM) ports
device		uart		# Generic UART driver

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
device		re		# RealTek 8139C+/8169/8169S/8110S

# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		tun		# Packet tunnel.
device		pty		# BSD-style compatibility pseudo ttys
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)
device		firmware	# firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device		bpf		# Berkeley packet filter
@


1.9
log
@SVN rev 205014 on 2010-03-11 14:49:06Z by nwhitehorn

Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

Reviewed by:	kib, jhb
@
text
@a47 1
options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
@


1.8
log
@SVN rev 203938 on 2010-02-15 23:44:48Z by attilio

Adjust style (following the already existing rules) for the newly
introduced option DEADLKRES.

Reported by:	danfe, julian, avg
@
text
@d49 1
a49 1
options 	COMPAT_IA32		# Compatible with i386 binaries
@


1.7
log
@SVN rev 203758 on 2010-02-10 16:30:04Z by attilio

Add the options DEADLKRES (introducing the deadlock resolver thread) in
the 'debugging' section of any HEAD kernel and enable for the mainstream
ones, excluding the embedded architectures.
It may, of course, enabled on a case-by-case basis.

Sponsored by:	Sandvine Incorporated
Requested by:	emaste
Discussed with:	kib
@
text
@d73 1
a73 1
options		DEADLKRES		# Enable the deadlock resolver
@


1.6
log
@SVN rev 202634 on 2010-01-19 17:20:34Z by jhb

Move the examples for the 'hints' and 'env' keywords from various GENERIC
kernel configs into NOTES.

Reviewed by:	imp
@
text
@d73 1
@


1.5
log
@SVN rev 202286 on 2010-01-14 15:07:18Z by jhb

Update the ident for the XENHVM kernel config to match the filename.

MFC after:	1 week
@
text
@a23 9
# To statically compile in device wiring instead of /boot/device.hints
#hints		"GENERIC.hints"		# Default places to look for devices.

# Use the following to compile in values accessible to the kernel
# through getenv() (or kenv(1) in userland). The format of the file
# is 'variable=value', see kenv(1)
#
# env		"GENERIC.env"

@


1.4
log
@SVN rev 196196 on 2009-08-13 17:09:45Z by attilio

* Completely Remove the option STOP_NMI from the kernel.  This option
has proven to have a good effect when entering KDB by using a NMI,
but it completely violates all the good rules about interrupts
disabled while holding a spinlock in other occasions.  This can be the
cause of deadlocks on events where a normal IPI_STOP is expected.
* Adds an new IPI called IPI_STOP_HARD on all the supported architectures.
This IPI is responsible for sending a stop message among CPUs using a
privileged channel when disponible. In other cases it just does match a
normal IPI_STOP.
Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64
architectures, while on the other has a normal IPI_STOP effect. It is
responsibility of maintainers to eventually implement an hard stop
when necessary and possible.
* Use the new IPI facility in order to implement a new userend SMP kernel
function called stop_cpus_hard(). That is specular to stop_cpu() but
it does use the privileged channel for the stopping facility.
* Let KDB use the newly introduced function stop_cpus_hard() and leave
stop_cpus() for all the other cases
* Disable interrupts on CPU0 when starting the process of APs suspension.
* Style cleanup and comments adding

This patch should fix the reboot/shutdown deadlocks many users are
constantly reporting on mailing lists.

Please don't forget to update your config file with the STOP_NMI
option removal

Reviewed by:	jhb
Tested by:	pho, bz, rink
Approved by:	re (kib)
@
text
@d22 1
a22 1
ident		GENERIC
@


1.3
log
@SVN rev 191954 on 2009-05-10 00:00:25Z by kuriyama

- Use "device\t" and "options \t" for consistency.
@
text
@a70 1
options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
@


1.3.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.3.2.2
log
@SVN rev 196198 on 2009-08-13 17:54:11Z by attilio

MFC r196196:

* Completely remove the option STOP_NMI from the kernel.  This option
  has proven to have a good effect when entering KDB by using a NMI,
  but it completely violates all the good rules about interrupts
  disabled while holding a spinlock in other occasions.  This can be the
  cause of deadlocks on events where a normal IPI_STOP is expected.
* Add an new IPI called IPI_STOP_HARD on all the supported architectures.
  This IPI is responsible for sending a stop message among CPUs using a
  privileged channel when disponible. In other cases it just does match a
  normal IPI_STOP.
  Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64
  architectures, while on the other has a normal IPI_STOP effect. It is
  responsibility of maintainers to eventually implement an hard stop
  when necessary and possible.
* Use the new IPI facility in order to implement a new userend SMP kernel
  function called stop_cpus_hard(). That is specular to stop_cpu() but
  it does use the privileged channel for the stopping facility.
* Let KDB use the newly introduced function stop_cpus_hard() and leave
  stop_cpus() for all the other cases
* Disable interrupts on CPU0 when starting the process of APs suspension.
* Style cleanup and comments adding

This patch should fix the reboot/shutdown deadlocks many users are
constantly reporting on mailing lists.

Please don't forget to update your config file with the STOP_NMI
option removal

Reviewed by:  jhb
Tested by:    pho, bz, rink
Approved by:  re (kib)
@
text
@d71 1
@


1.3.2.3
log
@SVN rev 202752 on 2010-01-21 15:10:20Z by jhb

MFC 202286:
Update the ident for the XENHVM kernel config to match the filename.
@
text
@d22 1
a22 1
ident		XENHVM
@


1.3.2.4
log
@SVN rev 206336 on 2010-04-07 02:24:41Z by nwhitehorn

MFC r205014,205015:

Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.

This MFC is required for MFCs of later changes to the freebsd32
compatibility from HEAD.

Requested by:	kib
@
text
@d58 1
a58 1
options 	COMPAT_FREEBSD32	# Compatible with i386 binaries
@


1.3.2.5
log
@SVN rev 216406 on 2010-12-13 12:34:35Z by rwatson

Merge r216365 from head to stable/8:

  Derive the XENHVM kernel from GENERIC, adding only the options required
  to support PV drivers (such as xenpci), and non-adptive locking (along
  with a comment about why).

  This change eliminates the synchronisation problem between GENERIC and
  XENHVM, which had become severely rotted in HEAD, and in 8-STABLE
  included non-production kernel debugging features such as WITNESS.

  However, it comes at the cost of enabling devices and options that may
  not be present under Xen (such as random ethernet cards).  For now, opt
  for a simpler kernel configuration file rather than using nooptions/
  nodevice to enumerate and eliminate them.  This leads to a somewhat
  larger XENHVM kernel.

  This is an MFC candidate for 8-STABLE before 8.2, in order to provide
  a production-worthy XENHVM kernel configuration for amd64.

  Discussed with:       gibbs, cperciva
  Reported by:          Piete Brooks <Piete.Brooks at cl.cam.ac.uk>
  Sponsored by:         DARPA, AFRL

Approved by:	re (kib)
@
text
@d4 15
d20 10
d31 1
a31 2
include		GENERIC
ident		XENHVM
d33 1
d36 39
a74 7
#
# Adaptive locks rely on a lock-free pointer read to determine the run state
# of the thread holding a lock when under contention; under a virtualisation
# system, the thread run state may not accurately reflect whether the thread
# (or rather its host VCPU) is actually executing.  As such, disable this
# optimisation.
#
d78 22
d103 59
@


1.3.2.6
log
@SVN rev 231759 on 2012-02-15 14:23:01Z by ken

MFC r215818, r216405, r216437, r216448, r216956, r221827, r222975, r223059,
r225343, r225704, r225705, r225706, r225707, r225709, r226029, r220647,
r230183, r230587, r230916, r228526, r230879:

Bring Xen support in stable/8 up to parity with head.  Almost all
outstanding Xen support differences between head and stable/8 are included,
except for the just added r231743.

  r215818 | cperciva | 2010-11-25 08:05:21 -0700 (Thu, 25 Nov 2010) | 5 lines

  Rename HYPERVISOR_multicall (which performs the multicall hypercall) to
  _HYPERVISOR_multicall, and create a new HYPERVISOR_multicall function which
  invokes _HYPERVISOR_multicall and checks that the individual hypercalls all
  succeeded.

  r216405 | rwatson | 2010-12-13 05:15:46 -0700 (Mon, 13 Dec 2010) | 7 lines

  Add options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matching
  its similar disabling of adaptive mutexes and rwlocks.  The existing
  comment on why this is the case also applies to sx locks.

  MFC after:	3 days
  Discussed with:	attilio

  r216437 | gibbs | 2010-12-14 10:23:49 -0700 (Tue, 14 Dec 2010) | 2 lines

  Remove spurious printf left over from debugging our XenStore support.

  r216448 | gibbs | 2010-12-14 13:57:40 -0700 (Tue, 14 Dec 2010) | 4 lines

  Fix a typo in a comment.

  Noticed by:	Attila Nagy <bra@@fsn.hu>

  r216956 | rwatson | 2011-01-04 07:49:54 -0700 (Tue, 04 Jan 2011) | 8 lines

  Make "options XENHVM" compile for i386, not just amd64 -- a largely
  mechanical change.  This opens the door for using PV device drivers
  under Xen HVM on i386, as well as more general harmonisation of i386
  and amd64 Xen support in FreeBSD.

  Reviewed by:	cperciva
  MFC after:	3 weeks

  r221827 | mav | 2011-05-12 21:40:16 -0600 (Thu, 12 May 2011) | 2 lines

  Fix msleep() usage in Xen balloon driver to not wake up on every HZ tick.

  r222975 | gibbs | 2011-06-10 22:59:01 -0600 (Fri, 10 Jun 2011) | 63 lines

  Monitor and emit events for XenStore changes to XenBus trees
  of the devices we manage.  These changes can be due to writes
  we make ourselves or due to changes made by the control domain.
  The goal of these changes is to insure that all state transitions
  can be detected regardless of their source and to allow common
  device policies (e.g. "onlined" backend devices) to be centralized
  in the XenBus bus code.

  sys/xen/xenbus/xenbusvar.h:
  sys/xen/xenbus/xenbus.c:
  sys/xen/xenbus/xenbus_if.m:
  	Add a new method for XenBus drivers "localend_changed".
  	This method is invoked whenever a write is detected to
  	a device's XenBus tree.  The default implementation of
  	this method is a no-op.

  sys/xen/xenbus/xenbus_if.m:
  sys/dev/xen/netfront/netfront.c:
  sys/dev/xen/blkfront/blkfront.c:
  sys/dev/xen/blkback/blkback.c:
  	Change the signature of the "otherend_changed" method.
  	This notification cannot fail, so it should return void.

  sys/xen/xenbus/xenbusb_back.c:
  	Add "online" device handling to the XenBus Back Bus
  	support code.  An online backend device remains active
  	after a front-end detaches as a reconnect is expected
  	to occur in the near future.

  sys/xen/interface/io/xenbus.h:
  	Add comment block further explaining the meaning and
  	driver responsibilities associated with the XenBus
  	Closed state.

  sys/xen/xenbus/xenbusb.c:
  sys/xen/xenbus/xenbusb.h:
  sys/xen/xenbus/xenbusb_back.c:
  sys/xen/xenbus/xenbusb_front.c:
  sys/xen/xenbus/xenbusb_if.m:
  	o Register a XenStore watch against the local XenBus tree
  	  for all devices.
  	o Cache the string length of the path to our local tree.
  	o Allow the xenbus front and back drivers to hook/filter both
  	  local and otherend watch processing.
  	o Update the device ivar version of "state" when we detect
  	  a XenStore update of that node.

  sys/dev/xen/control/control.c:
  sys/xen/xenbus/xenbus.c:
  sys/xen/xenbus/xenbusb.c:
  sys/xen/xenbus/xenbusb.h:
  sys/xen/xenbus/xenbusvar.h:
  sys/xen/xenstore/xenstorevar.h:
  	Allow clients of the XenStore watch mechanism to attach
  	a single uintptr_t worth of client data to the watch.
  	This removes the need to carefully place client watch
  	data within enclosing objects so that a cast or offsetof
  	calculation can be used to convert from watch to enclosing
  	object.

  Sponsored by:	Spectra Logic Corporation
  MFC after:	1 week

  r223059 | gibbs | 2011-06-13 14:36:29 -0600 (Mon, 13 Jun 2011) | 36 lines

  Several enhancements to the Xen block back driver.

  sys/dev/xen/blkback/blkback.c:
  	o Implement front-end request coalescing.  This greatly improves the
  	  performance of front-end clients that are unaware of the dynamic
  	  request-size/number of requests negotiation available in the
  	  FreeBSD backend driver.  This required a large restructuring
  	  in how this driver records in-flight transactions and how those
  	  transactions are mapped into kernel KVA.  For example, the driver
  	  now includes a mini "KVA manager" that allocates ranges of
  	  contiguous KVA to patches of requests that are physically
  	  contiguous in the backing store so that a single bio or UIO
  	  segment can be used to represent the I/O.

  	o Refuse to open any backend files or devices if the system
  	  has yet to mount root.  This avoids a panic.

  	o Properly handle "onlined" devices.  An "onlined" backend
  	  device stays attached to its backing store across front-end
  	  disconnections.  This feature is intended to reduce latency
  	  when a front-end does a hand-off to another driver (e.g.
  	  PV aware bootloader to OS kernel) or during a VM reboot.

  	o Harden the driver against a pathological/buggy front-end
  	  by carefully vetting front-end XenStore data such as the
  	  front-end state.

  	o Add sysctls that report the negotiated number of
  	  segments per-request and the number of requests that
  	  can be concurrently in flight.

  Submitted by:	kdm
  Reviewed by:	gibbs
  Sponsored by:	Spectra Logic Corporation
  MFC after:	1 week

  r225343 | rwatson | 2011-09-02 11:36:01 -0600 (Fri, 02 Sep 2011) | 7 lines

  Add support for alternative break-to-debugger support on the Xen console.
  This should help debug boot-time hangs experienced in 9.0-BETA.

  MFC after:	3 weeks
  Tested by:	sbruno
  Approved by:	re (kib)

  r225704 | gibbs | 2011-09-20 17:44:34 -0600 (Tue, 20 Sep 2011) | 29 lines

  Properly handle suspend/resume events in the Xen device framework.

  Sponsored by:	BQ Internet

  sys/xen/xenbus/xenbusb.c:
  	o In xenbusb_resume(), publish the state transition of the
  	  resuming device into XenbusStateIntiailising so that the
  	  remote peer can see it.  Recording the state locally is
  	  not sufficient to trigger a re-connect sequence.
  	o In xenbusb_resume(), defer new-bus resume processing until
  	  after the remote peer's XenStore address has been updated.
  	  The drivers may need to refer to this information during
  	  resume processing.

  sys/xen/xenbus/xenbusb_back.c:
  sys/xen/xenbus/xenbusb_front.c:
  	Register xenbusb_resume() rather than bus_generic_resume()
  	as the handler for device_resume events.

  sys/xen/xenstore/xenstore.c:
  	o Fix grammer in a comment.
  	o In xs_suspend(), pass suspend events on to the child
  	  devices (e.g. xenbusb_front/back, that are attached
  	  to the XenStore.

  Approved by:	re
  MFC after:	1 week

  r225705 | gibbs | 2011-09-20 18:02:44 -0600 (Tue, 20 Sep 2011) | 35 lines

  Add suspend/resume support to the Xen blkfront driver.

  Sponsored by:	BQ Internet

  sys/dev/xen/blkfront/block.h:
  sys/dev/xen/blkfront/blkfront.c:
  	Remove now unused blkif_vdev_t from the blkfront soft.

  sys/dev/xen/blkfront/blkfront.c:
  	o In blkfront_suspend(), indicate the desire to suspend
  	  by changing the softc connected state to SUSPENDED, and
  	  then wait for any I/O pending on the remote peer to
  	  drain.  Cancel suspend processing if I/O does not
  	  drain within 30 seconds.
  	o Enable and update blkfront_resume().  Since I/O is
  	  drained prior to the suspension of the VM, the complicated
  	  recovery process performed by other Xen blkfront
  	  implementations is avoided.  We simply tear down the
  	  connection to our old peer, and then re-connect.
  	o In blkif_initialize(), fix a resource leak and botched
  	  return if we cannot allocate shadow memory for our
  	  requests.
  	o In blkfront_backend_changed(), correct our response to
  	  the XenbusStateInitialised state.  This state indicates
  	  that our backend peer has published sufficient data for
  	  blkfront to publish ring information and other XenStore
  	  data, not that a connection can occur.  Blkfront now
  	  will only perform connection processing in response to
  	  the XenbusStateConnected state.  This corrects an issue
  	  where blkfront connected before the backend was ready
  	  during resume processing.

  Approved by:	re
  MFC after:	1 week

  r225706 | gibbs | 2011-09-20 18:06:02 -0600 (Tue, 20 Sep 2011) | 11 lines

  [ Forced commit.  Actual changes accidentally included in r225704 ]

  sys/dev/xen/control/control.c:
  	Fix locking violations in Xen HVM suspend processing
  	and have it perform similar actions to those performed
  	during an ACPI triggered suspend.

  Sponsored by:	BQ Internet
  Approved by:	re
  MFC after:	1 week

  r225707 | gibbs | 2011-09-20 18:08:25 -0600 (Tue, 20 Sep 2011) | 21 lines

  Correct suspend/resume support in the Netfront driver.

  Sponsored by:	BQ Internet

  sys/dev/xen/netfront/netfront.c:
  	o Implement netfront_suspend(), a specialized suspend
  	  handler for the netfront driver.  This routine simply
  	  disables the carrier so the driver is idle during
  	  system suspend processing.
  	o Fix a leak when re-initializing LRO during a link reset.
  	o In netif_release_tx_bufs(), when cleaning up the grant
  	  references for our TX ring, use gnttab_end_foreign_access_ref
  	  instead of attempting to grant the page again.
  	o In netif_release_tx_bufs(), we do not track mbufs associated
  	  with mbuf chains, but instead just free each mbuf directly.
  	  Use m_free(), not m_freem(), to avoid double frees of mbufs.
  	o Refactor some code to enhance clarity.

  Approved by:	re
  MFC after:	1 week

  r225709 | gibbs | 2011-09-20 18:15:29 -0600 (Tue, 20 Sep 2011) | 19 lines

  Update netfront so that it queries and honors published
  back-end features.

  sys/dev/xen/netfront/netfront.c:
  	o Add xn_query_features() which reads the XenStore and
  	  records the TSO, LRO, and chained ring-request support
  	  of the backend.
  	o Rename xn_configure_lro() to xn_configure_features() and
  	  use this routine to manage the setup of TSO, LRO, and
  	  checksum offload.
  	o In create_netdev(), initialize if_capabilities and
  	  if_hwassist to the capabilities found on all backends.
  	  Delegate configuration of if_capenable and the TSO flag
  	  if if_hwassist to xn_configure_features().

  Reported by:	Hugo Silva (fix inspired by patch provided)
  Approved by:	re
  MFC after:	1 week

  r226029 | jkim | 2011-10-04 17:53:47 -0600 (Tue, 04 Oct 2011) | 2 lines

  Add strnlen() to libkern.

  r220647 | jkim | 2011-04-14 16:17:39 -0600 (Thu, 14 Apr 2011) | 4 lines

  Add event handlers for (ACPI) suspend/resume events.  Suspend event handlers
  are invoked right before device drivers go into sleep state and resume event
  handlers are invoked right after all device drivers are waken up.

  r230183 | cperciva | 2012-01-15 19:38:45 -0700 (Sun, 15 Jan 2012) | 3 lines

  Make XENHVM work on i386.  The __ffs() function counts bits starting from
  zero, unlike ffs(3), which starts counting from 1.

  r230587 | ken | 2012-01-26 09:35:09 -0700 (Thu, 26 Jan 2012) | 38 lines

  Xen netback driver rewrite.

  share/man/man4/Makefile,
  share/man/man4/xnb.4,
  sys/dev/xen/netback/netback.c,
  sys/dev/xen/netback/netback_unit_tests.c:

  	Rewrote the netback driver for xen to attach properly via newbus
  	and work properly in both HVM and PVM mode (only HVM is tested).
  	Works with the in-tree FreeBSD netfront driver or the Windows
  	netfront driver from SuSE.  Has not been extensively tested with
  	a Linux netfront driver.  Does not implement LRO, TSO, or
  	polling.  Includes unit tests that may be run through sysctl
  	after compiling with XNB_DEBUG defined.

  sys/dev/xen/blkback/blkback.c,
  sys/xen/interface/io/netif.h:

  	Comment elaboration.

  sys/kern/uipc_mbuf.c:

  	Fix page fault in kernel mode when calling m_print() on a
  	null mbuf.  Since m_print() is only used for debugging, there
  	are no performance concerns for extra error checking code.

  sys/kern/subr_scanf.c:

  	Add the "hh" and "ll" width specifiers from C99 to scanf().
  	A few callers were already using "ll" even though scanf()
  	was handling it as "l".

  Submitted by:	Alan Somers <alans@@spectralogic.com>
  Submitted by:	John Suykerbuyk <johns@@spectralogic.com>
  Sponsored by:	Spectra Logic
  MFC after:	1 week
  Reviewed by:	ken

  r230916 | ken | 2012-02-02 10:54:35 -0700 (Thu, 02 Feb 2012) | 13 lines

  Fix the netback driver build for i386.

  netback.c:	Add missing VM includes.

  xen/xenvar.h,
  xen/xenpmap.h:	Move some XENHVM macros from <machine/xen/xenpmap.h> to
  		<machine/xen/xenvar.h> on i386 to match the amd64 headers.

  conf/files:	Add netback to the build.

  Submitted by:	jhb
  MFC after:	3 days

  r228526 | kevlo | 2011-12-14 23:29:13 -0700 (Wed, 14 Dec 2011) | 2 lines

  s/timout/timeout

  r230879 | ken | 2012-02-01 13:19:33 -0700 (Wed, 01 Feb 2012) | 4 lines

  Add the GSO prefix descriptor define.

  MFC after:	3 days
@
text
@a19 1
options 	NO_ADAPTIVE_SX
@


1.3.2.7
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d4 1
a4 1
# $FreeBSD: stable/8/sys/amd64/conf/XENHVM 231759 2012-02-15 14:23:01Z ken $
@


1.3.2.6.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.2.6.2.2
log
@Switch importer
@
text
@d4 1
a4 1
# $FreeBSD: releng/8.3/sys/amd64/conf/XENHVM 231759 2012-02-15 14:23:01Z ken $
@


1.3.2.5.2.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.3.2.4.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.3.2.2.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.2
log
@SVN rev 191848 on 2009-05-06 17:52:38Z by dfr

Disable adaptive mutexes and rwlocks for XENHVM.
@
text
@d72 1
a72 1
options  	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
d76 2
a77 2
options		NO_ADAPTIVE_MUTEXES
options		NO_ADAPTIVE_RWLOCKS
d102 1
a102 1
options		XENHVM
@


1.1
log
@SVN rev 189699 on 2009-03-11 15:30:12Z by dfr

Merge in support for Xen HVM on amd64 architecture.
@
text
@d76 2
@

