Commit Graph

190063 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
ab95a2d727 MFH (r277531): don't include newvers in freebsd-version 2015-07-02 11:46:40 +00:00
Renato Botelho
c90c0d1673 MFC r265096:
Fix "netstat -gW" behavior broken in r259638.
netstat has two options for printing multicast tables:
sysctl (the default one for live systems) and kvm-based one (for cores).
It looks like kvm-based one hasn't been working since it's been introduced
in r190012 due to absence of mfctablesize kernel symbol.
Check for all ipv4-multicast symbols being correctly resolved was introduced
in r259638 regardless of 'live' value leading to "No IPv4 MROUTING" error
message.

Reported by:	Olivier Cochard-Labbé
Approved by:	melifaro@
Sponsored by:	Netgate
2015-07-02 10:31:08 +00:00
Kristof Provost
c9c87eed0c MFC r284348: Fix panic when adding vtnet interfaces to a bridge
vtnet interfaces are always in promiscuous mode (at least if the
VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host).  if_promisc() on
a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This
confused the bridge code. Instead we now accept all enable/disable promiscuous
commands (and always keep IFF_PROMISC set).

There are also two issues with the if_bridge error handling.

If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to
disable promiscuous mode on the interface. That runs into an assert, because
promiscuous mode was never set in the first place. (That's the panic reported in
PR 200210.)
We can only unset promiscuous mode if the interface actually is promiscuous.
This goes against the reference counting done by if_promisc(), but only the
first/last if_promic() calls can actually fail, so this is safe.

A second issue is a double free of bif. It's already freed by
bridge_delete_member().

PR:         200210
2015-07-01 21:21:14 +00:00
Neel Natu
981e672558 MFC r284712:
Restore the host's GS.base before returning from 'svm_launch()' so the Dtrace
FBT provider works with vmm.ko on AMD.
2015-07-01 19:46:57 +00:00
Pedro F. Giffuni
bc79743c22 MFC 284913:
dconschat(8): Use NULL instead of 0 for the last argument in execl(3)

Found while experimenting with the gcc sentinel attribute.
2015-07-01 15:03:49 +00:00
Andriy Gapon
0eb73a9c53 MFC r278153,284416: ttm memory allocation improvements
If the vm_page_alloc_contig() failed in the ttm page allocators, do
what other callers of vm_page_alloc_contig() do, retry after
vm_pageout_grow_cache().

ttm_vm_page_alloc: use vm_page_alloc for pages without dma32 restriction
This change re-organizes code a little bit to extract common pieces
of ttm_alloc_new_pages() and ttm_get_pages() into dedicated functions.
Also, for requests without address restrictions regular vm_page_alloc()
is used.
Lastly, when vm_page_alloc_contig() fails we call VM_WAIT before calling
vm_pageout_grow_cache() to ensure that there is enough free pages at
all.

Note: no MFC to stable/9 because it lacks vm_pageout_grow_cache().
2015-07-01 11:28:42 +00:00
Andriy Gapon
167247c907 MFC r284304: MFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size
Note: no MFC to stable/9 because r268075 (vendor r267565) has not been MFC-ed.
2015-07-01 10:47:13 +00:00
Andriy Gapon
6080f6e34a MFC r284297: several lockstat improvements 2015-07-01 10:15:49 +00:00
Dag-Erling Smørgrav
b57515ec98 MFH (r275765): clean up, add special case for + line 2015-07-01 07:31:39 +00:00
Konstantin Belousov
9ea4475a6a MFC r284495:
Keep a vnode which is freed but still owing inactivation, on the active list.
This closes a race where such vnode is not msync-ed until reboot.
2015-07-01 06:54:25 +00:00
David C Somayajulu
8997e4091f MFC r284741
Updated Copyright information
Added support for the following:
     - iSCSI TLV (requires 64 Tx and 32 Rx rings
     - 9K receive buffers for jumbo frames (feature may be enabled/disabled)
     - builtin firmware, bootloader and minidump template
     - quick stats
     - async event handling for SFP insertion/removal and DCBX changes
     - Configuring DCBX and interrupt coalescing parameters
2015-06-30 20:59:07 +00:00
Warren Block
d60fdfbc50 MFC 284709:
Call /etc/crontab the "system crontab", not "root's crontab".  While
  here, fix some other wording issues
2015-06-30 19:53:26 +00:00
David C Somayajulu
969d02b5a4 MFC r284739
tx_mtx should be grabbed before calling buf_ring_dequeue_sc()

Submitted by:Attilio.Rao@isilon.com
2015-06-30 18:58:33 +00:00
David C Somayajulu
f4b57c0912 MFC r284470
In bxe_init_mcast_macs_list(): mc_mac->mac needs to point to the multicast mac address
In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING

Submitted by:	gary.zambrano@qlogic.com
2015-06-30 17:59:14 +00:00
David C Somayajulu
45615c5393 MFC r284335
PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures.

bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier.

bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context

Submitted by:	gary.zambrano@qlogic.com
2015-06-30 17:44:44 +00:00
Eric Joyner
d1b58f47cc Re-add if_hw_tso* assignments to if_ix.c that were removed in r283668.
These are used in stable/10 as well as 11.

Requested by:	rmacklem@
2015-06-30 16:26:13 +00:00
Dag-Erling Smørgrav
5930cac067 MFH (r275659): fix dependency on newvers.sh 2015-06-30 15:32:57 +00:00
Dag-Erling Smørgrav
8bda59ea25 MFH (r277695): allow tracing dlfunc() / dlsym() events 2015-06-30 14:17:02 +00:00
Dag-Erling Smørgrav
e0ee81a5ce MFH (r270391): don't set rc_debug in /etc/defaults/rc.conf 2015-06-30 13:30:10 +00:00
Dag-Erling Smørgrav
0d695fa4e2 MFH (r283578): import new moduli from upstream 2015-06-30 12:46:43 +00:00
Christian Brueffer
92e11f8f1e MFC: r262233
Spelling, grammar and mdoc cleanup.
2015-06-30 09:34:59 +00:00
Tijl Coosemans
68a4cee743 MFC r284858:
Enable the use of __builtin_va_* for ICC.

PR:		198822
Submitted by:	Sergey Melnikov <sergey.melnikov@intel.com>
2015-06-30 08:40:15 +00:00
Konstantin Belousov
3c97220fb6 MFC r284719:
Only take previous buffer queue lock (olock) when needed for REMFREE
in binsfree().
2015-06-30 05:53:15 +00:00
Glen Barber
de2d28db69 MFC r284882, r284884:
r284882:
  Add initial support for automatically uploading GCE virtual
  machine images to the Google Compute Engine platform.

  Remove gce-package.sh.

 r284884:
  Fix a vi-invoked typo.

Sponsored by:	The FreeBSD Foundation
2015-06-30 00:51:43 +00:00
Xin LI
8ac973ee5a MFC r279901 (kmoore):
- Include commas in valid file-name chars freebsd-update will support
2015-06-29 19:09:16 +00:00
Xin LI
fbde465e67 MFC r256594 (cperciva):
Speed up `freebsd-update IDS` by using IFS to split fields instead of
forking lots of processes to run echo|cut.  In one test this reduced
the CPU time from 980s to 134s and the wallclock time from 806s to
132s.

Submitted by:	Oleg Ginzburg
2015-06-29 19:02:30 +00:00
Xin LI
3b4aa7a41c MFC r274630,r274653 (feld):
Add logic for detecting non-persistent filesystems being utilized by
workdir which would break the upgrade process upon reboot.

Currently we check for tmpfs and md.
2015-06-29 18:56:53 +00:00
Xin LI
9b7e6b55ea MFC r276095 (des)
Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
expand the latter.
2015-06-29 18:51:08 +00:00
Xin LI
39a7111343 MFC r284425:
Skip src component if /usr/src is empty.

Submitted by:		kczekirda
Reviewed by:		cperciva, delphij, nwhitehorn, allanjude
2015-06-29 18:44:15 +00:00
Xin LI
e5de062bfc MFC r284792:
Merge changes from vendor driver 1.1.4:

  v1.1.4 2015-06-09
   * Fix a bug that FailLED was not initialized properly.
  v1.1.3 2015-05-19
   * Support Report Luns command.
  v1.1.2 2015-05-05
   * Fix a bug that report wrong physical sector size for 512e HDD.

Many thanks to HighPoint for continued support of FreeBSD!

This driver update is intended for 10.2-RELEASE.

Submitted by:	Steve Chang
2015-06-29 18:34:30 +00:00
Alexander Motin
7433d7b50f MFC r284765, r284875:
Teach ctld about CTL's physical_port and virtual_port fields.

This allows ctld to work with isp(4) virtual ports, specifying them as
isp0/1, isp0/2, etc.  There are still problems on isp(4) layer with
disabling those ports after enabling, but hopefully they can be fixed.
2015-06-28 09:41:10 +00:00
Alexander Motin
15270b89d5 MFC r284808: Remove limitations on setting WWNNs starting from 2.
It is odd that driver first tries to generate synthetic WWNN based on
WWPN starting from 2, but then refuses to use it.  If we don't trust
generated WWNN, we should probably not generate it.  Same time this
limitation prevents potentially valid WWNN setting by user.
2015-06-28 09:27:34 +00:00
Alexander Motin
c4bbfa08cf MFC r284748: Fix reported_gone setting, missed in some cases.
This makes driver better track reported CAM_SEL_TIMEOUTs to properly
report device reappearance later.  This fixes target 0 not reappearing
after initiator mode disabled and then reenabled.
2015-06-28 09:26:14 +00:00
Alexander Motin
aa181ecd89 MFC r284727: Add dev.isp.X.role sysctl in addition to tunable.
It (mostly) allows to enable/disable initiator mode in run time.
Target mode control is blocked here to force coordination with CTL.

While there, add separate tunables/sysctls for virtual channels.
2015-06-28 09:25:13 +00:00
Alexander Motin
aa2e5026c8 MFC r284681: Rewrite port database handling for target mode.
Previous implementation was too fragile to initiator parameters changes.
In case of port role change it could not survive different handle assigned
to the same initiator by firmware, even though initiator was logged out.
The new implementation should be more resillient to this kind of problems,
trying to work in any situation and only warn user about suspisious events.
2015-06-28 09:24:02 +00:00
Neel Natu
1f08342a1c MFC r282209:
Emulate the 'bit test' instruction.

MFC r282259:
Re-implement RTC current time calculation to eliminate the possibility of
losing time.

MFC r282281:
Advertise the MTRR feature via CPUID and emulate the minimal set of MTRR MSRs.

MFC r282284:
When an instruction cannot be decoded just return to userspace so bhyve(8)
can dump the instruction bytes.

MFC r282287:
Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>.

MFC r282296:
Emulate MSR_SYSCFG which is accessed by Linux on AMD cpus when MTRRs are
enabled.

MFC r282301:
Relax limits when transitioning a vector from the IRR to the ISR and also
when extinguishing it from the ISR in response to an EOI.

MFC r282335:
Advertise an additional memory BAR in the "dummy" device emulation.

MFC r282336:
Emulate machine check related MSRs to allow guest OSes like Windows to boot.

MFC r282351:
Don't advertise the Intel SMX capability to the guest.

MFC r282407:
Emulate the 'CMP r/m8, imm8' instruction.

MFC r282519:
Add macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE.

MFC r282520:
Emulate guest writes to EFER_MSR properly.

MFC r282558:
Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().

MFC r282571:
Check 'td_owepreempt' and yield the vcpu thread if it is set.

MFC r282595:
Allow byte reads of AHCI registers.

MFC r282784:
Handling indirect descriptors is a capability of the host and not one that
needs to be negotiated. Use the host capabilities field and not the negotiated
field when verifying that indirect descriptors are supported.

MFC r282788:
Allow configuration of the sector size advertised to the guest.

MFC r282865:
Set the subvendor field in config space to the vendor ID. This is required
by the Windows virtio drivers to correctly match a device.

MFC r282922:
Bump the size of the blockif scatter-gather list to 67.

MFC r283075:
Fix off-by-one in array index bounds check. bhyveload would allow you to
create 33 entries on an array that only has 32 slots

MFC r283168:
Temporarily revert r282922 which bumped the max descriptors.

MFC r283255:
Emulate the "CMP r/m, reg" instruction (opcode 39H).

MFC r283256:
Add an option "--get-vmcs-exit-inst-length" to display the instruction length
of the instruction that caused the VM-exit.

MFC r283264:
Change the header type of the emulated host-bridge from type 1 to type 0.

MFC r283293:
Don't rely on the 'VM-exit instruction length' field in the VMCS to always
have an accurate length on an EPT violation.

MFC r283299:
Remove bogus verification of instruction length after instruction decode.

MFC r283308:
Exceptions don't deliver an error code in real mode.

MFC r283657:
Fix non-deterministic delays when accessing a vcpu that was in "running" or
"sleeping" state.

MFC r283973:
Use tunable 'hw.vmm.svm.features' to disable specific SVM features even
though they might be available in hardware. Use tunable 'hw.vmm.svm.num_asids'
to limit the number of ASIDs used by the hypervisor.

MFC r284046:
Fix regression in 'verify_gla()' with the RIP-relative addressing mode.

MFC r284174:
Support guest writes to the TSC by enabling the "use TSC offsetting"
execution control.
2015-06-28 03:22:26 +00:00
Neel Natu
00ebaa84bc MFC r279444:
Allow passthrough devices to be hinted.

MFC r279683:
When ICW1 is issued the edge sense circuit is reset which means that
following an initialization a low-to-high transistion is necesary to
generate an interrupt.

MFC r279925:
Add -p parameter to list PCI device to pass through to the guest.

MFC r281559:
Fix handling of BUS_PROBE_NOWILDCARD in 'device_probe_child()'.

MFC r280447:
When fetching an instruction in non-64bit mode, consider the value of the
code segment base address.

MFC r280725:
Move legacy interrupt allocation for virtio devices to common code.

MFC r280775:
Fix the RTC device model to operate correctly in 12-hour mode.

MFC r280929:
Fix "MOVS" instruction memory to MMIO emulation.

MFC r280968:
Display instruction bytes and %rip prior to aborting due to an instruction
emulation error.

MFC r281145:
Enhance the support for Group 1 Extended opcodes for CMP, AND, OR instructions.

MFC r281542:
Initialize 'error' before use (Coverity IDs 1249748, 1249747, 1249751, 1249749)

MFC r281561:
Prior to aborting due to an ioport error, it is always interesting to see what
the guest's %rip is.

MFC r281611:
If the number of guest vcpus is less than '1' then flag it as an error.

MFC r281612:
Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.

MFC r281630:
Relax the check on which vectors can be delivered through the APIC. According
to the Intel SDM vectors 16 through 255 are allowed to be delivered via the
local APIC.

MFC r281879:
Missing break in switch case (Coverity ID 1292499)

MFC r281946:
Don't allow guest to modify readonly bits in the PCI config 'status' register.

MFC r281987:
STOS/STOSB/STOSW/STOSD/STOSQ instruction emulation.

MFC r282206:
Implement the century byte in the RTC.
2015-06-28 01:21:55 +00:00
Neel Natu
ba2b1f8c1d MFC r276428:
Replace bhyve's minimal RTC emulation with a fully featured one in vmm.ko.

MFC r276432:
Initialize all fields of 'struct vm_exception exception' before passing it
to vm_inject_exception().

MFC r276763:
Clear blocking due to STI or MOV SS in the hypervisor when an instruction is
emulated or when the vcpu incurs an exception.

MFC r277149:
Clean up usage of 'struct vm_exception' to only to communicate information
from userspace to vmm.ko when injecting an exception.

MFC r277168:
Fix typo (missing comma).

MFC r277309:
Make the error message explicit instead of just printing the usage if the
virtual machine name is not specified.

MFC r277310:
Simplify instruction restart logic in bhyve.

MFC r277359:
Fix a bug in libvmmapi 'vm_copy_setup()' where it would return success even
if the 'gpa' was in the guest MMIO region.

MFC r277360:
MOVS instruction emulation.

MFC r277626:
Add macro to identify AVIC capability (advanced virtual interrupt controller)
in AMD processors.

MFC r279220:
Don't close a block context if it couldn't be opened avoiding a null deref.

MFC r279225:
Add "-u" option to bhyve(8) to indicate that the RTC should maintain UTC time.

MFC r279227:
Emulate MSR 0xC0011024 when running on AMD processors.

MFC r279228:
Always emulate MSR_PAT on Intel processors and don't rely on PAT save/restore
capability of VT-x. This lets bhyve run nested in older VMware versions that
don't support the PAT save/restore capability.

MFC r279540:
Fix warnings/errors when building vmm.ko with gcc.
2015-06-27 22:48:22 +00:00
Konstantin Belousov
d960f9568f MFC r284646:
The barriers, provided by _acq and _rel atomics, are acquire and
release barriers, not read and write barriers.
2015-06-27 09:47:28 +00:00
Hans Petter Selasky
d879a2f21a MFC r284743:
Rename __weak to __weak_symbol to avoid language conflict with objective-C.

PR:		200972 (exp-run)
Suggested by:	theraven@
2015-06-26 21:35:36 +00:00
Xin LI
8e73b253c2 MFC r267386,269611,284730:
Update vendor driver to 1.2.7.  This update improves driver reliability and
adds support of 4Kn drives and report LUNs command.

Many thanks to HighPoint for providing this driver update.
2015-06-26 19:55:01 +00:00
Eric Joyner
7d4ba7545b Limit the number of autoconfigured queues to 8.
This limit was in a previous version of the driver, but it is being re-
added to match the behavior of previous versions of 10. It prevents the
driver from using too many MSI-X vectors on systems with a large number of
logical CPU cores.

Thanks to <jwd@slowblink.com> for bringing up this issue.

Approved by:	jfv (mentor)
2015-06-26 17:13:23 +00:00
Konstantin Belousov
11ad2f9b91 MFC r284594:
Restore the td_cookie value upon detach.
2015-06-26 06:25:14 +00:00
Andrew Rybchenko
559b559d65 MFC: r284747
sfxge: skip VPD info population if access is denied

The patch allows to run on unprivileged PF (PFIOV) passed to
a virtual machine.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
2015-06-26 06:08:52 +00:00
Glen Barber
b236c3b78f Document FreeBSD-EN-15:06.file, FreeBSD-EN-15:07.zfs,
FreeBSD-EN-15:08.sendmail, FreeBSD-SA-15:10.openssl.

Sponsored by:	The FreeBSD Foundation
2015-06-25 20:01:27 +00:00
Glen Barber
b6340aca98 Update the svn revision marker.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:37 +00:00
Glen Barber
4ab2dc0953 Document r284778, file(1) updated to 5.23.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:35 +00:00
Glen Barber
6c3c9a0cb0 Document r284665:
- kern.racct.enable tunable and RACCT_DISABLED kernel
  configuration option.
- RACCT/RCTL in GENERIC by default.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:33 +00:00
Glen Barber
a41629b11b Document rr284522, EM_MULTIQUEUE kernel configuration option.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:31 +00:00
Glen Barber
c08ff57eca Document r284460, ACPICA updated to 20150515.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:29 +00:00