Commit Graph

190585 Commits

Author SHA1 Message Date
Peter Grehan
a438cd7efb Convert the potential console port over to using 3wire, for i386/amd64.
(This change was already in place for other arches via r262957)

Reviewed by:	nwhitehorn
MFC after:	1 week
2014-06-17 18:51:03 +00:00
John Baldwin
a2677ff239 Don't bother clearing maps for static DMA allocations to NULL. Instead,
leave them as purely opaque values that are only set by bus_dmamem_alloc().
2014-06-17 18:10:06 +00:00
Ed Maste
37bde59832 Update src.conf.5 after r267582 2014-06-17 16:25:50 +00:00
Ed Maste
3eb53cf6cb share/vt now also includes keymaps 2014-06-17 16:21:50 +00:00
John Baldwin
86843ea8de Fix various bugs with freeing static DMA allocations in sound drivers:
- Don't compare the DMA map to NULL to determine if bus_dmamap_unload()
  should be called when releasing a static allocation.  Instead, compare
  the bus address against 0.
- Don't assume that the DMA map for static allocations is NULL.  Instead,
  save the value set by bus_dmamem_alloc() so it can later be passed to
  bus_dmamem_free().  Also, add missing calls to bus_dmamap_unload() in
  these cases before freeing the buffer.
- Use the bus address from the bus_dma callback instead of calling
  vtophys() on the address allocated by bus_dmamem_alloc().

Reviewed by:	kan
2014-06-17 16:07:57 +00:00
John Baldwin
c34f1a08c6 Fix teardown of static DMA allocations in various NIC drivers:
- Add missing calls to bus_dmamap_unload() in et(4).
- Check the bus address against 0 to decide when to call
  bus_dmamap_unload() instead of comparing the bus_dma map against NULL.
- Check the virtual address against NULL to decide when to call
  bus_dmamem_free() instead of comparing the bus_dma map against NULL.
- Don't clear bus_dma map pointers to NULL for static allocations.
  Instead, treat the value as completely opaque.
- Pass the correct virtual address to bus_dmamem_free() in wpi(4) instead
  of trying to free a pointer to the virtual address.

Reviewed by:	yongari
2014-06-17 14:47:49 +00:00
Ed Maste
31bcfda84e Add glyphs from converted syscons iso* fonts
This consists of the unique glyphs from the following font files in
/usr/share/syscons/fonts:

iso*.fnt     ISO-8859-1 West European
iso02*.fnt   ISO-8859-2 Central European
iso04*.fnt   ISO-8859-4 Baltic
iso05*.fnt   ISO-8859-5 Cyrillic
iso07*.fnt   ISO-8859-7 Greek
iso08*.fnt   ISO-8859-8 Hebrew
iso09*.fnt   ISO-8859-9 Turkish
iso15*.fnt   ISO-8859-15 West European

Sponsored by:	The FreeBSD Foundation
2014-06-17 13:12:30 +00:00
Gavin Atkinson
47200bbd05 Add a stub send-pr that simply points people towards the online support
pages, to give people used to send-pr a bit of guidance.

MFC after:	3 days
2014-06-17 12:59:03 +00:00
Konstantin Belousov
d09b3c60d0 Do not reference native_lapic_ipi_*() functions in the UP build.
The functions' definitions are protected by #ifdef SMP.
Keeping apic_ops.ipi_*() methods NULL would allow to catch the use
on UP machines.

Reviewed by:	royger
Sponsored by:	The FreeBSD Foundation
2014-06-17 09:33:22 +00:00
Edward Tomasz Napierala
2af142cafe Make cs_terminating a bool; no functional changes.
Sponsored by:	The FreeBSD Foundation
2014-06-17 09:02:10 +00:00
Xin LI
51040796d0 MFV r249332 (illumos-gate 14005:55fc53126003)
Illumos ZFS issues:
  3654 zdb should print number of ganged blocks

MFC after:	2 weeks
2014-06-17 08:11:45 +00:00
Konstantin Belousov
7b81a399a4 In msdosfs_setattr(), add a check for result of the utimes(2)
permissions test, forgotten in r164033.

Refactor the permission checks for utimes(2) into vnode helper
function vn_utimes_perm(9), and simplify its code comparing with the
UFS origin, by writing the call to VOP_ACCESSX only once.  Use the
helper for UFS(5), tmpfs(5), devfs(5) and msdosfs(5).

Reported by:	bde
Reviewed by:	bde, trasz
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-06-17 07:11:00 +00:00
Dmitry Chagin
2dedc1281a Revert r266925 as it can lead to instant panic at fexecve():
To allow to run the interpreter itself add a new ELF branding type.

Pointed out by:	kib, mjg
2014-06-17 05:29:18 +00:00
Kevin Lo
c459e5281f Add MLINKS for macros decribed in queue.3 manpage. 2014-06-17 02:10:40 +00:00
Alfred Perlstein
3ab512ae80 Support for multiple disks and tap devices.
This allows you to give a bhyve instance multiple network devices
and disk devices easily by specifying additional "-d " and "-t "
options.

Reviewed by: neel
Sponsored by: Norse
2014-06-17 00:53:00 +00:00
Tycho Nightingale
a026dc3fcb Bring an overly enthusiastic KASSERT inline with the Intel SDM.
Reviewed by:	neel
2014-06-16 22:59:18 +00:00
Glen Barber
4099be8dca Add &citrix; and &citrix.rd; macros.
Sponsored by:	The FreeBSD Foundation
2014-06-16 20:21:15 +00:00
Glen Barber
eb0c646c5f Document r267536, Xen PVH DomU support for amd64.
Submitted by:	royger
Sponsored by:	The FreeBSD Foundation
2014-06-16 20:20:54 +00:00
Edward Tomasz Napierala
57072b5118 Add comment explaining a potential problem with just added LUN ID.
Reminded by:	mav@
Sponsored by:	The FreeBSD Foundation
2014-06-16 19:05:51 +00:00
Attilio Rao
3ae10f7477 - Modify vm_page_unwire() and vm_page_enqueue() to directly accept
the queue where to enqueue pages that are going to be unwired.
- Add stronger checks to the enqueue/dequeue for the pagequeues when
  adding and removing pages to them.

Of course, for unmanaged pages the queue parameter of vm_page_unwire() will
be ignored, just as the active parameter today.
This makes adding new pagequeues quicker.

This change effectively modifies the KPI.  __FreeBSD_version will be,
however, bumped just when the full cache of free pages will be
evicted.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	alc
Tested by:	pho
2014-06-16 18:15:27 +00:00
Edward Tomasz Napierala
a39adbef47 Add LUN-associated name to VPD, to make Hyper-V Failover Cluster happy.
Sponsored by:	The FreeBSD Foundation
2014-06-16 18:14:05 +00:00
Alan Cox
33314db034 Tidy up the early parts of vm_map_insert(), in particular, simplify one
of the assertions and eliminate a comment that has grown stale.

Reviewed by:	kib
MFC after:	1 week
2014-06-16 16:37:41 +00:00
Pedro F. Giffuni
0413bfcac9 Update license to strptime(3) implementation.
Our strptime(3) implementation was the base for the illumos
implementation and after contacting the author, Kevin Rudy
stated the code is under a 2-Clause BSD License [1]

After reviewing our local changes to the file in question,
the FreeBSD Foundation has agreed that their contributions
to this file are not required to carry clause 3 or 4 so
the file can be relicensed as in Illumos [2].

References:

[1] https://www.illumos.org/issues/357
[2] Illumos Revision:		13222:02526851ba75

Approved:	core (jhb)
Approved:	FreeBSD Foundation (emaste)
MFC after:	4 days
2014-06-16 14:55:09 +00:00
Hans Petter Selasky
8958a2f085 Fix destruction of character devices by passing correct pointer to
kernel in IOCTL request.

Submitted by:	Andrey Zholos <aaz@q-fu.com>
2014-06-16 14:02:14 +00:00
Alexander Motin
11b569f7cb Add support for VERIFY(10/12/16) and COMPARE AND WRITE SCSI commands.
Make data_submit backends method support not only read and write requests,
but also two new ones: verify and compare.  Verify just checks readability
of the data in specified location without transferring them outside.
Compare reads the specified data and compares them to received data,
returning error if they are different.

VERIFY(10/12/16) commands request either verify or compare from backend,
depending on BYTCHK CDB field.  COMPARE AND WRITE command executed in two
stages: first it requests compare, and then, if succeesed, requests write.
Atomicity of operation is guarantied by CTL request ordering code.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-06-16 11:00:14 +00:00
Roger Pau Monné
24f7e474cc xen: add missing files
Commit missing files that actually belong to previous commits.

Sponsored by: Citrix Systems R&D
Approved by: gibbs
2014-06-16 08:54:04 +00:00
Roger Pau Monné
79cd455edb isa: allow ISA bus to attach to xenpv bus
This is needed because syscons depends on ISA.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/isa/isa.c:
 - Allow the ISA bus to attach to xenpv.
2014-06-16 08:49:16 +00:00
Roger Pau Monné
a8f2f559f3 xen: unify gnttab initialization for PVHVM and PVH
Switch the initialization of gnttab to use an unused physical memory
range for both PVHVM and PVH.

In the past PVHVM was using the xenpci BAR, but there's no reason to
do that, and in fact FreeBSD was probably doing it because it was the
way it was done in Windows, were drivers cannot probably request for
unused physical memory ranges, but it was never enforced in the
hypervisor.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

xen/gnttab.c:
 - Allocate contiguous physical memory for grant table frames for both
   PVHVM and PVH.
 - Since gnttab is not a device, use the xenpv device in order to
   request for this allocation.

dev/xen/xenpci/xenpcivar.h:
dev/xen/xenpci/xenpci.c:
 - Remove the now unused xenpci_alloc_space and xenpci_alloc_space_int
   functions.

xen/gnttab.h:
 - Change the prototype of gnttab_init and gnttab_resume, that now
   takes a device_t parameter.

dev/xen/control/control.c:
x86/xen/xenpv.c:
 - Changes to accomodate the new prototype of gnttab_init and
   gnttab_resume.
2014-06-16 08:48:42 +00:00
Roger Pau Monné
3593fa95ef xen: init gnttab from xenpv
Currently the grant table is initialized from xenstore, but a better
place to do this would be xenpv, so move grant table initialization
there.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/xenpv.c:
 - Add gnttab initialization.

xen/xenstore/xenstore.c:
 - Remove gnttab initialization.
2014-06-16 08:48:06 +00:00
Roger Pau Monné
9a522f8203 xen: xenstore changes to support PVH
For PVH guests the xenstore parameters are fetched from the start_info
struct, just like on PV.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

xen/xenstore/xenstore.c:
 - Fetch xenstore event channel port from start_info.
2014-06-16 08:47:15 +00:00
Roger Pau Monné
bd851e636f xen: add shutdown hook for PVH
Add the PV shutdown hook to PVH.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

dev/xen/control/control.c:
 - Make xen_pv_shutdown_final available on XENHVM builds.
 - Register the Xen PV shutdown hook for PVH guests.
2014-06-16 08:46:31 +00:00
Roger Pau Monné
e048c70674 xen: create a Xen nexus to use in PV/PVH
Introduce a Xen specific nexus that is going to be used by Xen PV/PVH
guests.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/xen_nexus.c:
 - Introduce a Nexus to use on Xen PV(H) guests, this prevents PV(H)
   guests from using the legacy Nexus.

conf/files.amd64:
conf/files.i386:
 - Add the xen nexus to the build.
2014-06-16 08:45:51 +00:00
Roger Pau Monné
34ec15da90 xen: create a PV CPU device for PVH guests
Since there's no ACPI on PVH guests, we need to create a dummy CPU
device in order to fill the pcpu->pc_device field.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

dev/xen/pvcpu/pvcpu.c:
 - Create a dummy CPU device for PVH guests in order to fill the
   per-cpu pc_device field.

conf/files:
 - Add the pvcpu device to kernels using XEN or XENHVM options.
2014-06-16 08:45:12 +00:00
Roger Pau Monné
aa64d12bcd xen: introduce xenpv bus
Create a dummy bus so top level Xen devices can attach to it (instead
of attaching directly to the nexus). This allows to have all the Xen
related devices grouped under a single bus.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/xenpv.c:
 - Attach the xenpv bus when running as a Xen guest.
 - Attach the ISA bus if needed, in order to attach syscons.

conf/files.amd6:
conf/files.i386:
 - Include the xenpv.c file in the build of i386/amd64 kernels using
   XENHVM.

dev/xen/console/console.c:
dev/xen/timer/timer.c:
xen/xenstore/xenstore.c:
 - Attach to the xenpv bus instead of the Nexus.

dev/xen/xenpci/xenpci.c:
 - Xen specific devices on PVHVM guests are no longer attached to the
   xenpci device, they are instead attached to the xenpv bus, remove
   the now unused methods.
2014-06-16 08:44:33 +00:00
Roger Pau Monné
842471b331 xen: add hooks for Xen PV APIC
Create the necessary hooks in order to provide a Xen PV APIC
implementation that can be used on PVH. Most of the lapic ops
shouldn't be called on Xen, since we trap those operations at a higher
layer.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/hvm.c:
x86/xen/xen_apic.c:
 - Move IPI related code to xen_apic.c

x86/xen/xen_apic.c:
 - Introduce Xen PV APIC implementation, most of the functions of the
   lapic interface should never be called when running as PV(H) guest,
   so make sure FreeBSD panics when trying to use one of those.
 - Define the Xen APIC implementation in xen_apic_ops.

xen/xen_pv.h:
 - Extern declaration of the xen_apic struct.

x86/xen/pv.c:
 - Use xen_apic_ops as apic_ops when running as PVH guest.

conf/files.amd64:
conf/files.i386:
 - Include the xen_apic.c file in the build of i386/amd64 kernels
   using XENHVM.
2014-06-16 08:43:45 +00:00
Roger Pau Monné
ef409ede7b amd64/i386: introduce APIC hooks for different APIC implementations.
This is needed for Xen PV(H) guests, since there's no hardware lapic
available on this kind of domains. This commit should not change
functionality.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Approved by: gibbs

amd64/include/cpu.h:
amd64/amd64/mp_machdep.c:
i386/include/cpu.h:
i386/i386/mp_machdep.c:
 - Remove lapic_ipi_vectored hook from cpu_ops, since it's now
   implemented in the lapic hooks.

amd64/amd64/mp_machdep.c:
i386/i386/mp_machdep.c:
 - Use lapic_ipi_vectored directly, since it's now an inline function
   that will call the appropiate hook.

x86/x86/local_apic.c:
 - Prefix bare metal public lapic functions with native_ and mark them
   as static.
 - Define default implementation of apic_ops.

x86/include/apicvar.h:
 - Declare the apic_ops structure and create inline functions to
   access the hooks, so the change is transparent to existing users of
   the lapic_ functions.

x86/xen/hvm.c:
 - Switch to use the new apic_ops.
2014-06-16 08:43:03 +00:00
Roger Pau Monné
5f35f84fa0 xen: fix style in pv.c
Fix the lenght of some comments, and also add proper indentation to
xen_init_ops

Sponsored by: Citrix Systems R&D
Approved by: gibbs
2014-06-16 08:41:57 +00:00
Bryan Venteicher
bae486f5d7 Force two byte alignment for all control message headers
The header structure consists of two 1-byte elements, but it must always
be describable by a single SG entry. Note for consistency, specify the
alignment everywhere, even if the structure has the appropriate natural
alignment since it contains a uint16_t.

Obtained from:	DragonFlyBSD
MFC after:	1 week
2014-06-16 04:32:27 +00:00
Bryan Venteicher
fd5b395117 Make the feature negotiation code easier to follow
MFC after:	1 week
2014-06-16 04:29:28 +00:00
Bryan Venteicher
45543f0751 Move the VIRTIO_RING_F_* defines out of virtqueue.h into virtio_config.h
These defines are applicable to userland too, but virtqueue.h contains
the kernel virtqueue interface, and is therefore not usable in userland.

Note that Linux places these defines in virtio_ring.h, but I don't want
the drivers including this header file to keep the VirtIO ring opaque to
everything but the virtqueue.

MFC after:	1 week
2014-06-16 04:25:04 +00:00
Bryan Venteicher
e026de111e Remove kernel specific macro out of the VirtIO PCI header file
The eventual goal is to share this file with userland, so
remove the macro that is only specific for virtio_pci(4).
Instead, add the VIRTIO_PCI_CONFIG_OFF macro from Linux to
get the config size whether MSIX is enabled or not.

MFC after:	1 week
2014-06-16 04:16:31 +00:00
Bryan Venteicher
add526c613 - Remove two write-only local variables
- Remove unused element in the vtnet_rxq structure

MFC after:	1 week
2014-06-16 04:12:33 +00:00
Alexander Motin
e86a414238 Make backends track completion by processed number of sectors instead of
total transfer size.

Commands such as VERIFY or COMPARE AND WRITE may have transfer size not
matching directly to number of sectors.
2014-06-15 20:14:11 +00:00
Joel Dahl
dd01de5ca8 Minor mdoc improvements. 2014-06-15 18:39:10 +00:00
Joel Dahl
a7f17b076d mdoc: add missing width to Bl -tag. 2014-06-15 18:30:26 +00:00
Alexander Motin
66df9136e3 Remove memcpy() from ctl_private[] accesses.
That union is aligned enough to access data directly.
2014-06-15 18:16:51 +00:00
Alexander Motin
9c71cd5aae Move kern_total_len setting from backend to core code. 2014-06-15 17:14:52 +00:00
Pedro F. Giffuni
1bf222cc83 MFV r266988:
Merge from r258379 missed the tests.

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision:	54a20ab41aadcb81c53e72fc65886e964e9add59

MFC after:	5 days
2014-06-15 16:54:26 +00:00
Pedro F. Giffuni
5e64d66ca4 patch: add dry-run alias for compatibility with other implementations.
Other implementations of patch(1), including GNU patch and "svn patch"
have a --dry-run option which does the same as our -C or --check
option.

Add a new alias to make our implementation more compatible.

MFC after:	1 week
2014-06-15 16:38:17 +00:00
Ian Lepore
a1c70d6943 Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds.  This augments the coarse .WAIT mechanism,
which is still useful if you've got a situation such as "almost everything
depends on A and B".

Because the parallel subdir mechanism uses non-obvious mangling of
target names, which should probably remain a private detail of the
implementation, it's not easy to do things like "libfoo: libbar", so
instead the new mechanism lets you set a variable that lists dependencies:

  SUBDIR_DEPEND_libfoo= libgroodah libpouet

Note that while I'm using libraries as an example here, it really has
nothing to do with the generated library files.  This is really saying
"build in directory libfoo after building in the libgroodah and libpouet
directories."

This updates lib/Makefile with dependency information based on the old
almost-accurate comment block and by combing through lib/* makefiles
looking for LDADD dependencies to other libraries within lib/*.

Reviewed by:	Jia-Shiun Li <jiashiun@gmail.com>
2014-06-15 13:45:37 +00:00