]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
9 years agoxen/control: Implement suspend has panic for ARM
Julien Grall [Tue, 14 Jan 2014 01:41:15 +0000 (01:41 +0000)]
xen/control: Implement suspend has panic for ARM

9 years agoxen/intr: unmask the event channel when we have added a new handler
Julien Grall [Tue, 24 Jun 2014 16:43:57 +0000 (17:43 +0100)]
xen/intr: unmask the event channel when we have added a new handler

9 years agoxen/intr: Rework the event channels handler to make it generic
Julien Grall [Tue, 14 Jan 2014 01:41:04 +0000 (01:41 +0000)]
xen/intr: Rework the event channels handler to make it generic

The current code to handle the event channels was x86-specific. I think
we can use safely generic function to handle interrupt.

This code was not yet tested/compiled on x86.

TODO:
- There is some #if 0 in the code. Mainly for suspend/resume

9 years agoxen/intr: Don't need to export xen_intr_pcpu
Julien Grall [Sat, 19 Apr 2014 21:34:43 +0000 (22:34 +0100)]
xen/intr: Don't need to export xen_intr_pcpu

xen_intr_pcpu is only used within sys/xen/xen_intr.c

9 years agoxen/intr: Introduce xen_pic_assign_cpu
Julien Grall [Sat, 19 Apr 2014 21:32:01 +0000 (22:32 +0100)]
xen/intr: Introduce xen_pic_assign_cpu

9 years agox86/xen: Introduce atomic_readandclear_xen_ulong
Julien Grall [Sun, 20 Apr 2014 13:56:35 +0000 (14:56 +0100)]
x86/xen: Introduce atomic_readandclear_xen_ulong

9 years agox86/xen: Add cpu_to_vcpu_id macro
Julien Grall [Sat, 19 Apr 2014 15:57:40 +0000 (16:57 +0100)]
x86/xen: Add cpu_to_vcpu_id macro

9 years agoxen: move xen_intr.c to common code
Julien Grall [Tue, 14 Jan 2014 01:41:04 +0000 (01:41 +0000)]
xen: move xen_intr.c to common code

9 years agoxen/xenpv: Only add isa for x86 architecture
Julien Grall [Tue, 14 Jan 2014 01:41:11 +0000 (01:41 +0000)]
xen/xenpv: Only add isa for x86 architecture

isa device doesn't exist on ARM.

9 years agoxen: move x86/xen/xenpv.c in dev/xen/xenpv.c
Julien Grall [Tue, 14 Jan 2014 01:41:10 +0000 (01:41 +0000)]
xen: move x86/xen/xenpv.c in dev/xen/xenpv.c

9 years agoxen: Introduce xen_pmap
Julien Grall [Tue, 14 Jan 2014 14:44:08 +0000 (14:44 +0000)]
xen: Introduce xen_pmap

The function to map xen memory is not the same on every architecture.

On ARM, the mappings require to be cacheable and pmap_mapdev doesn't do that.

Replace every call of pmap_mapdev in xen code by xen_pmap

9 years agoxen/gnttab: Add a guard for xenpci functions
Julien Grall [Tue, 14 Jan 2014 01:41:12 +0000 (01:41 +0000)]
xen/gnttab: Add a guard for xenpci functions

On ARM, the xenpci doesn't exist. Add guard to call xenpci function only
if the device is enabled.

9 years agoxen/gnttab: Export resume_frames
Julien Grall [Tue, 14 Jan 2014 14:34:55 +0000 (14:34 +0000)]
xen/gnttab: Export resume_frames

Allow the platform the set resume_frames to a specific address. It will be
used on ARM because the region is give by the device tree.

9 years agoxen/netfront: Use the correct type for rx_pfn_array
Julien Grall [Tue, 14 Jan 2014 01:41:01 +0000 (01:41 +0000)]
xen/netfront: Use the correct type for rx_pfn_array

9 years agoxen/netback: Fix printf format for xen_pfn_t
Julien Grall [Tue, 14 Jan 2014 01:41:00 +0000 (01:41 +0000)]
xen/netback: Fix printf format for xen_pfn_t

9 years agoxen/ballon: Use correct type for frame list
Julien Grall [Tue, 14 Jan 2014 01:41:00 +0000 (01:41 +0000)]
xen/ballon: Use correct type for frame list

9 years agoxen/hypervisor: Be sure to set __XEN_INTERFACE_VERSION__
Julien Grall [Tue, 14 Jan 2014 01:41:06 +0000 (01:41 +0000)]
xen/hypervisor: Be sure to set __XEN_INTERFACE_VERSION__

On some headers xen-os.h is not included. Xen headers will define
__XEN_INTERFACE_VERSION__ to 0. This will result to use the wrong interface
version.

9 years agoxen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/control: xctlr_probe shoud return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xencontrol is the first driver, every new device (which driver unset)
will use xencontrol.

9 years agoxen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD
Julien Grall [Tue, 14 Jan 2014 01:41:08 +0000 (01:41 +0000)]
xen/xenstore: xs_probe should return BUS_PROBE_NOWILDCARD

Returning 0 in probe callback means: the driver can use this device. If by any
chance xenstore is the first driver, every new device (which driver unset) will
use xenstore.

9 years agoxen/blkback: Fix string format when XBB_DEBUG is enabled
Julien Grall [Sat, 7 Jun 2014 21:50:31 +0000 (22:50 +0100)]
xen/blkback: Fix string format when XBB_DEBUG is enabled

host_addr is typed uint64_t, therefore we should use PRIx64 to print correctly
the value on every architecture.

9 years agoxen/timer: Make xen timer optional
Julien Grall [Tue, 14 Jan 2014 01:41:14 +0000 (01:41 +0000)]
xen/timer: Make xen timer optional

The timer is not used on ARM.

9 years agoxen: xen_start_info don't need to be export in common code
Julien Grall [Sun, 1 Jun 2014 18:15:40 +0000 (19:15 +0100)]
xen: xen_start_info don't need to be export in common code

HYPERVISOR_start_info has been introduce to be used in code common. The
variable xen_start_info is only used within amd64 and i386 architecture and
is redundant with the former variable.

9 years agoxen: Define xen_intr_handle_upcall in common headers
Julien Grall [Tue, 14 Jan 2014 01:41:18 +0000 (01:41 +0000)]
xen: Define xen_intr_handle_upcall in common headers

The function xen_intr_handle_upcall is used on every architecture supported
by Xen. It's pointless to define on every platform...

9 years agoxen/netfront: Add 2 bytes padding in the rx mbuf
Julien Grall [Mon, 5 Oct 2015 17:35:54 +0000 (18:35 +0100)]
xen/netfront: Add 2 bytes padding in the rx mbuf

The ethernet header size is not word aligned. Therefore the IP packet and so
on won't be align. On some architecture (such as ARM) unaligned access may
be slower and/or not supported. Therefore we might reveice an alignement
fault. To avoid this case, we need to pull-up the data of ETHER_ALIGN bytes.

I'm not sure how this patch will impact x86, we need to do some benchmarking
without and with it.

Furthermore, I don't know if m_copyup is the rigth function to use here. Can
any expert to the network stack can tell me if there is a better solution?

9 years agoxen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier
Julien Grall [Mon, 5 Oct 2015 17:35:43 +0000 (18:35 +0100)]
xen/blkfront: WRITE_BARRIER and FLUSH_DISKCACHE require barrier

For WRITE_BARRIER and FLUSH_DISKCACHE operation, we don't request any cache
operation. This will result to a panic in _bus_dmamap_sync on ARM because the
operation (op = 0) is not supported.

x86 platform doesn't seem to care about this and Xen is always requiring
memory shared with the backend to be cacheable. I'm wondering if we could drop
the call to bus_dmasync_map because the cache maintainance slows down the
process for no appareant reason?

For now, WRITE_BARRIER and FLUSH_DISKCACHE are an extension of the WRITE
command so require BUS_DMASYNC_PREWRITE for the cache maintenance operation.

9 years agoHACK: allow proper poweroff when running as Dom0
Roger Pau Monne [Tue, 23 Sep 2014 17:02:33 +0000 (19:02 +0200)]
HACK: allow proper poweroff when running as Dom0

9 years agoxen: Fix coding style in hypervisor.h
Julien Grall [Sun, 4 Oct 2015 18:05:52 +0000 (19:05 +0100)]
xen: Fix coding style in hypervisor.h

9 years agoxen: Drop CONFIG_X86_PAE
Julien Grall [Sun, 4 Oct 2015 18:03:21 +0000 (19:03 +0100)]
xen: Drop CONFIG_X86_PAE

It's defined but actually never used within the kernel

9 years agoxen: Drop is_running_on_xen
Julien Grall [Sun, 4 Oct 2015 17:54:02 +0000 (18:54 +0100)]
xen: Drop is_running_on_xen

The macro is not used at all within FreeBSD

9 years agoxen: drop is_initial_xendomain
Julien Grall [Sun, 4 Oct 2015 17:42:56 +0000 (18:42 +0100)]
xen: drop is_initial_xendomain

9 years agoxen: Drop MULTI_update_va_mapping
Julien Grall [Sun, 4 Oct 2015 17:40:59 +0000 (18:40 +0100)]
xen: Drop MULTI_update_va_mapping

This helper is not used at all

9 years agoamd64,i386: Don't include intr_machdep.h in support.S
Julien Grall [Sun, 4 Oct 2015 17:05:50 +0000 (18:05 +0100)]
amd64,i386: Don't include intr_machdep.h in support.S

With the update of the Xen headers, the number of event channel are now based
on sizeof and other types which can't be used in assembly.

Simply drop the inclusion as nothing defined in intr_machinedep.h is used
within support.S

9 years agoxen: blkfront: Use struct blkif_request_segment rather than the typedef
Julien Grall [Sun, 4 Oct 2015 18:18:51 +0000 (19:18 +0100)]
xen: blkfront: Use struct blkif_request_segment rather than the typedef

The typedef blkif_request_segment doesn't exist anymore.

9 years agoamd64,i386: Include xen/interface/event_channel.h in intr_machdep.h
Julien Grall [Sun, 4 Oct 2015 18:16:49 +0000 (19:16 +0100)]
amd64,i386: Include xen/interface/event_channel.h in intr_machdep.h

The definition of NR_EVENT_CHANNELS is now depending on macro defined in
xen/interface/event_channel.h

9 years agoxen: intr: remove evtchn_port_t typedef in sys/xen/xen_intr.h
Julien Grall [Sat, 19 Apr 2014 19:26:15 +0000 (20:26 +0100)]
xen: intr: remove evtchn_port_t typedef in sys/xen/xen_intr.h

evtchn_port_t is correctly defined in Xen headers. There is no reason
to have a specific definition on FreeBSD

9 years agoxen/interface: Update interface to Xen 4.6 headers
Julien Grall [Tue, 14 Jan 2014 01:40:57 +0000 (01:40 +0000)]
xen/interface: Update interface to Xen 4.6 headers

9 years agoMake sure the interface version is always correctly set
Julien Grall [Thu, 24 Sep 2015 21:02:23 +0000 (22:02 +0100)]
Make sure the interface version is always correctly set

9 years agoxen/console: Build the new console driver and drop the old one console-v2
Julien Grall [Sun, 20 Sep 2015 11:08:27 +0000 (12:08 +0100)]
xen/console: Build the new console driver and drop the old one

9 years agoxen/console: Introduce a new console driver for Xen guest
Julien Grall [Sun, 20 Sep 2015 10:49:15 +0000 (11:49 +0100)]
xen/console: Introduce a new console driver for Xen guest

The current Xen console driver is crashing very quickly when using it on ARM
guest. This is because of the console lock is recursive which may lead to
recurse on the tty lock and/or corrupt the ring pointer.

Furthermore, the console lock is not always taken where it should be and has
to be released too early because of the way the console has been designed.

Over the year, code has been added to support various new feature but the
driver has not been reworked. This brings to have code related to the
hypervisor console in ring specific function...

This new driver has been rewritten with this idea to only
have a small set of specific function to write either via the ring or the
hypercall.

Note that HVM support has been left aside for now because it requires external
feature to be used on ARM which are not yet upstreamed. A follow-up patch will
be sent with the ARM guest support.

This new console driver will be added in the build in the following patch.. It
has been divided to help reviewing.

List of items that may be good to have but not mandatory:
- Avoid to flush for each character written when using the tty.
- Use a ops structure to distinguish hypervisor vs ring helpers
- Support multiple console

9 years agoxen/hypercall: Allow HYPERVISOR_console_write to take a const string
Julien Grall [Sun, 20 Sep 2015 10:47:06 +0000 (11:47 +0100)]
xen/hypercall: Allow HYPERVISOR_console_write to take a const string

The hypercall console write won't modify the string. It's safe to put a const
here.

9 years agoAdd IFCAP_LINKSTATE support.
hrs [Sat, 3 Oct 2015 09:15:23 +0000 (09:15 +0000)]
Add IFCAP_LINKSTATE support.

9 years agoRemove beacon offsets usage from if_rum.
adrian [Sat, 3 Oct 2015 06:35:17 +0000 (06:35 +0000)]
Remove beacon offsets usage from if_rum.

Differential Revision: https://reviews.freebsd.org/D3658

9 years agourtwn(4): fix sequence numbering for QoS frames
adrian [Sat, 3 Oct 2015 06:07:01 +0000 (06:07 +0000)]
urtwn(4): fix sequence numbering for QoS frames

Tested:

* urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3684

9 years agoural(4): reduce copy-paste in ural_newstate().
adrian [Sat, 3 Oct 2015 05:55:16 +0000 (05:55 +0000)]
ural(4): reduce copy-paste in ural_newstate().

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3656

9 years agorum(4): add command queue for running sleepable tasks in non-sleepable contexts
adrian [Sat, 3 Oct 2015 05:46:35 +0000 (05:46 +0000)]
rum(4): add command queue for running sleepable tasks in non-sleepable contexts

Tested:

* Tested on WUSB54GC, STA mode.
* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3629

9 years agorum(4): some non-functional changes / cleanup
adrian [Sat, 3 Oct 2015 05:44:05 +0000 (05:44 +0000)]
rum(4): some non-functional changes / cleanup

* Remove unused sc_txtap_len/sc_rxtap_len fields.
* Remove unused ackrate variable.
* Remove unneded warning in rum_update_mcast().
* Use nitems().
* Replace some hardcoded values for RT2573_MAC_CSR1 register.
* Remove second argument for RUM_LOCK_ASSERT() - it is always the same.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3605

9 years agoBump number of prefixes in O_IP_<SRC|DST> from 15 to 31 (max possible).
melifaro [Sat, 3 Oct 2015 05:42:25 +0000 (05:42 +0000)]
Bump number of prefixes in O_IP_<SRC|DST> from 15 to 31 (max possible).

PR: 203459
Submitted by: groos at xiplink.com
MFC after: 2 weeks

9 years agoAlways detach encap handler when reconfiguring tunnel.
ae [Sat, 3 Oct 2015 03:57:58 +0000 (03:57 +0000)]
Always detach encap handler when reconfiguring tunnel.

Reported by: hrs
MFC after: 1 week

9 years agoFix possible segmentation fault.
ae [Sat, 3 Oct 2015 03:12:57 +0000 (03:12 +0000)]
Fix possible segmentation fault.

PR: 203494
MFC after: 1 week

9 years agonet80211: add a possibility to retrieve current TX key without encapsulation.
adrian [Sat, 3 Oct 2015 00:57:33 +0000 (00:57 +0000)]
net80211: add a possibility to retrieve current TX key without encapsulation.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3639

9 years agonet80211: add new method for ieee80211_cipher (ic_setiv).
adrian [Sat, 3 Oct 2015 00:50:13 +0000 (00:50 +0000)]
net80211: add new method for ieee80211_cipher (ic_setiv).

This can be used to update IV state for the caller without adding
information to the mbuf.  Some hardware (eg rum) apparently requires
bits of this.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3638

9 years agonet80211: get rid of tx_phase1_done flag (ieee80211_crypto_tkip.c).
adrian [Sat, 3 Oct 2015 00:03:07 +0000 (00:03 +0000)]
net80211: get rid of tx_phase1_done flag (ieee80211_crypto_tkip.c).

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3596

9 years agoFix post-test typo that snuck in.
grehan [Fri, 2 Oct 2015 22:05:51 +0000 (22:05 +0000)]
Fix post-test typo that snuck in.

9 years agonet80211: separate ieee80211_crypto_get_keyid() from ieee80211_crypto_encap()
adrian [Fri, 2 Oct 2015 21:25:48 +0000 (21:25 +0000)]
net80211: separate ieee80211_crypto_get_keyid() from ieee80211_crypto_encap()

Tested:

* rum(4), STA mode
* rsu(4), STA mode
* urtwn(4), STA mode

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3637

9 years agoSimple sysctl-like firmware query interface. Similar in operation
grehan [Fri, 2 Oct 2015 21:09:49 +0000 (21:09 +0000)]
Simple sysctl-like firmware query interface. Similar in operation
to the qemu one, and uses the same i/o ports but with different
messaging. Requires the 'bootrom' option to be enabled.

This is used by UEFI (and potentially other BIOSs/firmware) to
request information from bhyve. Currently, only the number of
vCPUs is made available, with more to follow.

A very large thankyou to Ben Perrault who helped out testing
an earlier version of this, and bhyve/Windows in general.

Reviewed by: tychon
Discussed with: neel
Sponsored by: Nahanni Systems

9 years agoAll the games moved to usr.bin/ in r288485.
bdrewery [Fri, 2 Oct 2015 17:58:16 +0000 (17:58 +0000)]
All the games moved to usr.bin/ in r288485.

Sponsored by: EMC / Isilon Storage Division

9 years agoRemove defunct games removed in r279150.
bdrewery [Fri, 2 Oct 2015 17:54:05 +0000 (17:54 +0000)]
Remove defunct games removed in r279150.

Sponsored by: EMC / Isilon Storage Division

9 years ago/usr/src/games was removed in r288485.
bdrewery [Fri, 2 Oct 2015 17:51:47 +0000 (17:51 +0000)]
/usr/src/games was removed in r288485.

9 years agoFix a regression with SA-15:24 patch that prevented NIS from
delphij [Fri, 2 Oct 2015 16:35:41 +0000 (16:35 +0000)]
Fix a regression with SA-15:24 patch that prevented NIS from
working.

9 years agorum(4): sync rum_enable_tsf(_sync) with run(4).
adrian [Fri, 2 Oct 2015 15:30:37 +0000 (15:30 +0000)]
rum(4): sync rum_enable_tsf(_sync) with run(4).

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3611

9 years agorum(4): create few wrappers.
adrian [Fri, 2 Oct 2015 15:28:44 +0000 (15:28 +0000)]
rum(4): create few wrappers.

Tested:

rum0: <Belkin Belkin 54g USB Network Adapter, class 0/0, rev 2.00/0.01, addr 22> on usbus0
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3609

9 years agorum(4): move common part of rum_bbp_write() and rum_bbp_read() into rum_bbp_busy().
adrian [Fri, 2 Oct 2015 15:26:33 +0000 (15:26 +0000)]
rum(4): move common part of rum_bbp_write() and rum_bbp_read() into rum_bbp_busy().

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3608

9 years agorum(4): reduce code duplication.
adrian [Fri, 2 Oct 2015 15:22:00 +0000 (15:22 +0000)]
rum(4): reduce code duplication.

Tested:

rum0: <Belkin Belkin 54g USB Network Adapter, class 0/0, rev 2.00/0.01, addr 21> on usbus0
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3606

9 years agoAdd aarch64 support to truss(1).
kib [Fri, 2 Oct 2015 13:30:56 +0000 (13:30 +0000)]
Add aarch64 support to truss(1).

Reviewed by: jhb
Discussed with: emaste (license)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3750

9 years agoDo not set 'flush to zero' VFPSCR_FZ bit by default. The correct
kib [Fri, 2 Oct 2015 13:25:59 +0000 (13:25 +0000)]
Do not set 'flush to zero' VFPSCR_FZ bit by default.  The correct
implementation of IEEE 754 arithmetic depends on denormals operating
correctly.  Both perl test suite and paranoia tripped over the
setting.

Reported by: Stefan Parvu <sparvu@kronometrix.org>
Discussed with: andrew
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFreeBSD does not support SMP on ARMv5. Since processor is always
kib [Fri, 2 Oct 2015 13:21:08 +0000 (13:21 +0000)]
FreeBSD does not support SMP on ARMv5.  Since processor is always
self-consistent, there is no need in anything but compiler barrier in
the implementation of atomic_thread_fence_*() on ARMv5.  Split
implementation of fences for ARMv4/5 and ARMv6; the former use
compiler barriers, the later also perform hardware barriers.

An issue which is fixed by the change is the faults from the CP15
coprocessor accesses in the user mode.  This was uncovered by the
pthread_once() changes in r287556.

Reported by: Mattia Rossi <mattia.rossi.mailinglists@gmail.com>
Discussed with: alc, cognet, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd debug file extension to kldxref(8) after r288176
emaste [Fri, 2 Oct 2015 13:16:06 +0000 (13:16 +0000)]
Add debug file extension to kldxref(8) after r288176

After r288176 kernel debug files have the extension .debug.  They also
moved to /usr/lib/debug/boot/kernel by default so in the normal case
kldxref does not encounter them.  A src.conf(5) setting may be used to
continue installing them in /boot/kernel though, so have kldxref skip
.debug files in addition to .symbols files.

Reported by: fabient
Sponsored by: The FreeBSD Foundation

9 years agoDocument CD block size of 2048.
mav [Fri, 2 Oct 2015 11:27:34 +0000 (11:27 +0000)]
Document CD block size of 2048.

9 years agoMake truss print CloudABI system call names.
ed [Fri, 2 Oct 2015 11:17:15 +0000 (11:17 +0000)]
Make truss print CloudABI system call names.

This change adds the bits that are necessary to fetch system call
arguments and return values from trapframes for CloudABI. This allows us
to properly print system calls with the right name. We need to make sure
that we properly convert error numbers when system calls fail.

We still need to improve truss to pretty-print some of the system calls
that have flags.

9 years agoSet default block size for CD to expected 2048 bytes.
mav [Fri, 2 Oct 2015 11:16:46 +0000 (11:16 +0000)]
Set default block size for CD to expected 2048 bytes.

9 years agoFinal step of eliminating the "games" distribution: Merge src/games
cperciva [Fri, 2 Oct 2015 10:08:11 +0000 (10:08 +0000)]
Final step of eliminating the "games" distribution: Merge src/games
(or what's left of it, at least) into src/usr.bin.

This change will not be MFCed.

Discussed at:   EuroBSDCon 2014
Committed from: EuroBSDCon 2015

9 years agoFail the sbuf if vsnprintf(3) fails.
phk [Fri, 2 Oct 2015 09:23:14 +0000 (09:23 +0000)]
Fail the sbuf if vsnprintf(3) fails.

9 years agoThe rpc.yppasswdd has an option to not allow shell changes (-s), but is
araujo [Fri, 2 Oct 2015 08:58:50 +0000 (08:58 +0000)]
The rpc.yppasswdd has an option to not allow shell changes (-s), but is
always passed a shell by the remote yppasswd. If an NIS client overrides the
shell provided by the ypserv, then yppasswd (pam_unix, actually, afaict)
will pass this new shell to the yppasswdd. If this shell has been set on the
client to a shell which is invalid on the server, a user will never be able
to change their password on the client.

PR: 67142
Submitted by: russell@rucus.ru.ac.za
Approved by: bapt (mentor)
Sponsored by: EuroBSDCon Sweden.

9 years agoMETA_MODE: For some reason meta mode cannot generate the intermediate tab.c
bdrewery [Fri, 2 Oct 2015 07:00:43 +0000 (07:00 +0000)]
META_MODE: For some reason meta mode cannot generate the intermediate tab.c
files.  Split up all of the targets to be more clear on how they are generated
to fix the problem.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoMETA_MODE: Fix stage_links not running in the right order without -j.
bdrewery [Fri, 2 Oct 2015 06:24:09 +0000 (06:24 +0000)]
META_MODE: Fix stage_links not running in the right order without -j.

This fixes staging errors for non-parallel builds that have LINKS.

Creating hardlinks must always happen after the actual files are installed.
The staging code was protected by an .ORDER statement that only affected
parallel -j builds but not non-parallel builds.  Fix this by making the
real stage_links.SET (stage_links.links, stage_links.mlinks, etc) targets
depend on the main targets for all of the other possible staging needs.  For
example, stage_links.links will depend on stage_as and stage_files, which have
their own dependencies to stage_as.prog or stage_files.prog or stage_files.SET,
which is enough to satistfy the ordering.

Also remove the requirement that symlinks be created last, as they can
safely be made without the source being present unlike hardlinks.  This also
fixes symlinks to come before hardlinks as it is possible, in theory, to
hardlink a symlink.  This is not actually supported here though.

Sponsored by: EMC / Isilon Storage Division

9 years agoFix neeed -> neeeded.
adrian [Fri, 2 Oct 2015 02:21:36 +0000 (02:21 +0000)]
Fix neeed -> neeeded.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3595

9 years ago- Increase the max number of indirect descriptors to match
grehan [Fri, 2 Oct 2015 02:09:50 +0000 (02:09 +0000)]
- Increase the max number of indirect descriptors to match
  the largest that the Windows virtio driver can send down

- Always advertize indirect descriptors. The Illumos virtio
  driver won't attach unless this capability is seen.

Reviewed by: neel

9 years agoDon't create cookie until the command is all finished, it or the commands
bdrewery [Thu, 1 Oct 2015 21:52:25 +0000 (21:52 +0000)]
Don't create cookie until the command is all finished, it or the commands
after may fail.

Sponsored by: EMC / Isilon Storage Division

9 years agoFix the path to the correct u-boot.bin file to write to
gjb [Thu, 1 Oct 2015 19:48:10 +0000 (19:48 +0000)]
Fix the path to the correct u-boot.bin file to write to
the disk image, which fixes boot issues.

Tested on: BananaPi
Sponsored by: The FreeBSD Foundation

9 years agoMore aggressively fill WUT read pipeline.
mav [Thu, 1 Oct 2015 19:07:15 +0000 (19:07 +0000)]
More aggressively fill WUT read pipeline.

On some tests I've measured 5% copy speedup from this.

9 years agoRather than groveling around in a socket address structure for a socket
jhb [Thu, 1 Oct 2015 18:18:58 +0000 (18:18 +0000)]
Rather than groveling around in a socket address structure for a socket
address's length (and then overriding it if it "looks wrong"), use the
next argument to the system call to determine the length.  This is more
reliable since this is what the kernel depends on anyway and is also
simpler.

9 years agoThe id_t type used to pass IDs to wait6(2) and procctl(6) is a 64-bit
jhb [Thu, 1 Oct 2015 17:50:41 +0000 (17:50 +0000)]
The id_t type used to pass IDs to wait6(2) and procctl(6) is a 64-bit
integer.  Fix the argument decoding to treat this as a quad instead of an
int.  This includes using QUAD_ALIGN and QUAD_SLOTS as necessary.  To
continue printing IDs in decimal, add a new QuadHex argument type that
prints a 64-bit integer in hex, use QuadHex for the existing off_t arguments,
repurpose Quad to print a 64-bit integer in decimal, and use Quad for id_t
arguments.

This fixes the decoding of wait6(2) and procctl(2) on 32-bit platforms.

9 years ago- Remove extra integer argument from truncate() and ftruncate(). This is
jhb [Thu, 1 Oct 2015 17:28:07 +0000 (17:28 +0000)]
- Remove extra integer argument from truncate() and ftruncate().  This is
  probably fallout from the removal of the extra padding argument before
  off_t in 7.  However, that padding still exists for 32-bit powerpc, so
  use QUAD_ALIGN.
- Fix QUAD_ALIGN to be zero for powerpc64.  It should only be set to 1
  for 32-bit platforms that add padding to align 64-bit arguments.

9 years agoMost error cases in i915_gem_do_execbuffer() jump to one of two labels to
jhb [Thu, 1 Oct 2015 16:59:07 +0000 (16:59 +0000)]
Most error cases in i915_gem_do_execbuffer() jump to one of two labels to
release resources (such as unholding pages) when errors occur.  Some
recently added error checks return immediately instead of jumping to a
label resulting in leaks.  Fix these to jump to a label to do cleanup
instead.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3745

9 years agoEnsure that vop_stdadvise() does not call getblk() on vnodes that have an
markj [Thu, 1 Oct 2015 16:34:53 +0000 (16:34 +0000)]
Ensure that vop_stdadvise() does not call getblk() on vnodes that have an
empty bufobj. Otherwise, vnodes belonging to filesystems that do not use the
buffer cache may trigger assertion failures.

Reported by: Fabien Keil

9 years agoMake zero WUT use WRITE SAME with recently allowed NDOB flag.
mav [Thu, 1 Oct 2015 16:30:20 +0000 (16:30 +0000)]
Make zero WUT use WRITE SAME with recently allowed NDOB flag.

9 years agoImplement SPC-3 exceptions to SPC-2 RESERVE and RELEASE behavior.
mav [Thu, 1 Oct 2015 12:57:37 +0000 (12:57 +0000)]
Implement SPC-3 exceptions to SPC-2 RESERVE and RELEASE behavior.

9 years agoUnify PR variable names to reduce confusion.
mav [Thu, 1 Oct 2015 12:15:36 +0000 (12:15 +0000)]
Unify PR variable names to reduce confusion.

9 years agoAn IPI must be cleared before it is handled otherwise next IPI could be
andrew [Thu, 1 Oct 2015 12:09:05 +0000 (12:09 +0000)]
An IPI must be cleared before it is handled otherwise next IPI could be
missed. In other words, if a new request for an IPI is sent while the
previous request is being handled but the IPI is not cleared yet, the
clearing of the previous IPI request also clears the new one and the
handling is missed.

There are only three MP interrupt controllers in ARM now. Two of them are
fixed by this change, the third one is correct, probably only just by
accident. The fix is minimalistic as new interrupt framework is awaited.

It was debugged on RPi2 where missing IPI handling together with SCHED_ULE
led to situation in which tdq_ipipending was not cleared and so IPI_PREEMPT
was stopped to be sent. Various odditys were found related to slow system
response time like various events timed out, and slow console response.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
Reviewed by: loos, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3722

9 years agoDisable suspend when we're shutting down. This solves the "tell FreeBSD
cperciva [Thu, 1 Oct 2015 10:52:26 +0000 (10:52 +0000)]
Disable suspend when we're shutting down.  This solves the "tell FreeBSD
to shut down; close laptop lid" scenario which otherwise tended to end
with a laptop overheating or the battery dying.

The implementation uses a new sysctl, kern.suspend_blocked; init(8) sets
this while rc.suspend runs, and the ACPI sleep code ignores requests while
the sysctl is set.

Discussed on: freebsd-acpi (35 emails)
MFC after: 1 week

9 years agoUse pmap_load more consistently. While here try to only load the data once
andrew [Thu, 1 Oct 2015 10:43:40 +0000 (10:43 +0000)]
Use pmap_load more consistently. While here try to only load the data once
when we reuse the same data.

Obtained from: EuroBSDCon Devsummit
Sponsored by: ABT Systems Ltd

9 years agoPass 8 arguments to makecontext on arm64 as this is all we support.
andrew [Thu, 1 Oct 2015 09:53:12 +0000 (09:53 +0000)]
Pass 8 arguments to makecontext on arm64 as this is all we support.

Obtained from: EuroBSDCon Devsummit
Sponsored by: ABT Systems Ltd

9 years agoAdd the ENTRY/END entries around the exception handlers.
andrew [Thu, 1 Oct 2015 09:44:15 +0000 (09:44 +0000)]
Add the ENTRY/END entries around the exception handlers.

Obtained from: EuroBSDCon Devsummit
Sponsored by: ABT Systems Ltd

9 years agoAlso build ofwdump on arm64.
andrew [Thu, 1 Oct 2015 09:40:33 +0000 (09:40 +0000)]
Also build ofwdump on arm64.

Obtained from: EuroBSDCon Devsummit
Sponsored by: ABT Systems Ltd

9 years agoUpdate the arm64 ttys file to enable the correct uart based on which device
andrew [Thu, 1 Oct 2015 09:36:18 +0000 (09:36 +0000)]
Update the arm64 ttys file to enable the correct uart based on which device
the console is attached to. This makes this file identical to the 32-bit
arm version of this file.

Obtained from: EuroBSDCon devsummit
Sponsored by: ABT Systems Ltd

9 years agoFix `make depend` in sys/modules/otus
lwhsu [Thu, 1 Oct 2015 05:56:38 +0000 (05:56 +0000)]
Fix `make depend` in sys/modules/otus

Reviewed by: delphij
Approved by: delphij
Differential Revision: https://reviews.freebsd.org/D3751

9 years agoPartially revert r288433, with a minor change:
gjb [Thu, 1 Oct 2015 01:50:20 +0000 (01:50 +0000)]
Partially revert r288433, with a minor change:

Spell 'k' correctly.

Spotted by: loos (thank you!)
Sponsored by: The FreeBSD Foundation

9 years agoFix FAT_SIZE by removing '-b' argument passing, which was
gjb [Thu, 1 Oct 2015 00:34:38 +0000 (00:34 +0000)]
Fix FAT_SIZE by removing '-b' argument passing, which was
a result of my misunderstanding on what Crochet was doing
in this case for these boards.

Sponsored by: The FreeBSD Foundation

9 years agoMETA_MODE: Set HOST_CXX and HOST_CPP and chain them down into CXX/CPP for host builds.
bdrewery [Wed, 30 Sep 2015 23:14:23 +0000 (23:14 +0000)]
META_MODE: Set HOST_CXX and HOST_CPP and chain them down into CXX/CPP for host builds.

Sponsored by: EMC / Isilon Storage Division

9 years agoAs a step towards the elimination of PG_CACHED pages, rework the handling
markj [Wed, 30 Sep 2015 23:06:29 +0000 (23:06 +0000)]
As a step towards the elimination of PG_CACHED pages, rework the handling
of POSIX_FADV_DONTNEED so that it causes the backing pages to be moved to
the head of the inactive queue instead of being cached.

This affects the implementation of POSIX_FADV_NOREUSE as well, since it
works by applying POSIX_FADV_DONTNEED to file ranges after they have been
read or written.  At that point the corresponding buffers may still be
dirty, so the previous implementation would coalesce successive ranges and
apply POSIX_FADV_DONTNEED to the result, ensuring that pages backing the
dirty buffers would eventually be cached.  To preserve this behaviour in an
efficient manner, this change adds a new buf flag, B_NOREUSE, which causes
the pages backing a VMIO buf to be placed at the head of the inactive queue
when the buf is released.  POSIX_FADV_NOREUSE then works by setting this
flag in bufs that underlie the specified range.

Reviewed by: alc, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3726