199491 Commits

Author SHA1 Message Date
mav
43d71d4cfd 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
mav
66c5039388 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
mav
3da4ce5b58 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
79b96fdbcb 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
c85aee0195 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
115742fae3 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
kib
02efaba1d1 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
hselasky
45502dd8d1 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
delphij
5a956cd60a 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
erj
36ff8dde86 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
kib
575dc6a9d5 MFC r284594:
Restore the td_cookie value upon detach.
2015-06-26 06:25:14 +00:00
arybchik
ebdd57af7d 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
gjb
4eed41e4d6 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
gjb
682e1dfdfc Update the svn revision marker.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:37 +00:00
gjb
c6c9b86a6c Document r284778, file(1) updated to 5.23.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:35 +00:00
gjb
a06c25f8b0 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
gjb
cd7c5c1ee7 Document rr284522, EM_MULTIQUEUE kernel configuration option.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:31 +00:00
gjb
4b1d6ec315 Document r284460, ACPICA updated to 20150515.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:29 +00:00
gjb
85831b8bd0 Document r284330, OpenSSL updated to 1.0.1o.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:27 +00:00
gjb
e5ddad6ea8 Document r283875, chmod, chflags, chown and chgrp recursive
symlink processing.
Add Multiplay to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:24 +00:00
gjb
63b279b059 Document r283280, several improvements/updates to the HyperV drivers.
Add Microsoft Open Source Technology Center to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:22 +00:00
gjb
985f5f4195 Document r283262, boot-time memory test on amd64 platforms is now
disabled by default.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:20 +00:00
gjb
fda52ecedf Document r283242, autofs(5) '-noauto' map addition.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:17 +00:00
gjb
ca744679ab Add ScaleEngine, Inc. to sponsors.ent.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:15 +00:00
gjb
da23aa1387 Document r283223, autofs(5) '-media' map.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:13 +00:00
gjb
97de087c05 Document r282974, uefisign(8) added.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:11 +00:00
gjb
b883841f67 Document r282870, freebsd-update(8) prevents upgrading a system
with pending (incomplete) updates.

Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:09 +00:00
gjb
7da29ed418 Document r282746, openresolv updated to 3.7.0.
Sponsored by:	The FreeBSD Foundation
2015-06-25 18:45:07 +00:00
gjb
b1c7823af3 MFC r284780, r284811, r284812:
r284780:
  Ensure ASSUME_ALWAYS_YES is set when deleting pkg(8) from the
  DESTDIR, otherwise it can get stuck in ttyin.

 r284811:
  Consider PRERELEASE builds snapshots, in addition to CURRENT
  and STABLE.

 r284812:
  Change the hour:minute delimiter from ':' to '-', since
  the former is an invalid character in EC2 images.

Approved by:	re (glebius, insta-MFC)
Sponsored by:	The FreeBSD Foundation
2015-06-25 14:58:50 +00:00
tijl
95fcbd85e8 MFC r271651, r271719, r272138, r272457, r272845, r275476, r275518, r275614,
r275819, r276176, r278154, r278160, r278339, r279127, r279240, r279491,
    r279493, r279856, r283032, r284423, r284426, r284427, r284428

Merge changes to libm from the past 9 months.  This includes improvements
to the Bessel functions and adds the C99 function lgammal.
2015-06-25 13:01:10 +00:00
avg
91e9d26e11 MFC r284308: MFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE 2015-06-25 08:11:39 +00:00
mav
d99396f96d MFC r284698: Dump additional config bytes for INIT_FIRMWARE_MULTI_ID. 2015-06-25 07:25:40 +00:00
mav
5c47554b55 MFC r284697: Add logging of executed mailbox command names.
Previously those commands were logged only as part of register dump,
that is not very readable.
2015-06-25 07:24:47 +00:00
mav
77eb863bb6 MFC r284540:
In case of target mode disable at least ISP2532 return invalid zero
ct_rxid value on CTIO completion.  Try to workaround that using tag_id
from the CCB, pointed by still valid ct_syshandle.

I don't know whether this is valid fix or dirty hack, but considering that
alternative is indefinitely stuck command -- it worth trying.
2015-06-25 07:23:35 +00:00
mav
9451fd94b7 MFC r274675 (by jhb), r274708:
Convert the refire_notify_ack timer from timeout(9) to callout(9).
2015-06-25 07:22:37 +00:00
mav
6646999316 MFC r284640: Bring per-port LUN enable/disable code up to date:
- remove last remnants of never implemented multiple targets support;
 - implement missing support for LUN mapping in this area.

Due to existing locking constraints LUN mapping code is practically
unlocked at this point.  Hopefully it is not racy enough to live until
somebody get idea how to call sleeping fronend methods under lock also
taken by the same frontend in non-sleepable context. :(
2015-06-25 07:11:48 +00:00
mav
0aff133da5 MFC r284627: Remove some dead and duplicate LUN enabling code. 2015-06-25 07:10:51 +00:00
mav
701d4d43cb MFC r284639: Introduce separate lock for tokens to reduce ctl_lock scope. 2015-06-25 07:09:39 +00:00
mav
3bd447f679 MFC r284641:
Fix REPORT LUNS command output for the case when same LUN mapped to same
port several times.  While it is unusual configuration, it is not illegal.
2015-06-25 07:08:46 +00:00
mav
912011aeb8 MFC r284622: Remove device queue freeze handling and replace it with dummy.
At this point CTL has no known use case for device queue freezes.
Same time existing (considered to be broken) code was found to cause
modify-after-free issues.
2015-06-25 07:07:32 +00:00
mav
fc8d3d0aa2 MFC r284541:
Change ATIO/INOT counting to prevent periph destruction while requests
are still running inside CTL.
2015-06-25 07:06:24 +00:00
gshapiro
bcd8147bab Add a note on the second sendmail fix for WeakDH interoperability. 2015-06-25 01:51:14 +00:00
gshapiro
2978a93517 MFC: An additional fix for the openssl Weak DH remediation:
The import of openssl to address the FreeBSD-SA-15:10.openssl security
     advisory includes a change which rejects handshakes with DH parameters
     below 768 bits.  sendmail releases prior to 8.15.2 (not yet released),
     defaulted to a 512 bit DH parameter setting for client connections.

     The first fix committed last week changed the default to 1024 bits.

     This commit fixes the case where the DHParameters option is set to a
     file which doesn't exist, which is the case on newer versions of
     FreeBSD which enable STARTTLS by default by auto-creating TLS
     certificates.
2015-06-25 01:49:44 +00:00
delphij
80cac6ebcb MFC r284237,284277:
file 5.23.

Relnotes:	yes
2015-06-24 19:58:14 +00:00
eri
5d11dcc720 MFC r284512: Properly handle locking on the ARP protocol request sending. 2015-06-24 19:06:54 +00:00
gjb
bad6606621 MFC r284683:
Enable ttyu1, ttyu2, ttyu3 for arm installations.

 This should make all consoles available, whether it
 is VGA, HDMI, serial, or JTAG, but more importantly
 enables all consoles when ttyu0 is not predictable.
 For example, the Pandaboard ES apparently has three
 consoles available, but the DB9/RS232 serial port is
 ttyu2, so not available by default after the system
 boots.

Sponsored by:	The FreeBSD Foundation
2015-06-24 18:58:42 +00:00
gjb
7af02b3d4c MFC r284660, r284676:
r284660:
  Remove the Azure-local vm_extra_create_disk(), since we no longer
  need qemu-img to convert the final VHD image to an Azure-compatible
  format.

  Although the waagent utility is installed from ports, create the
  symlink to /usr/sbin, pending investigation on where this is
  hard-coded, so it can be reported upstream.

 r284676:
  Append the hour and minute to the snapshot suffix for EC2
  AMIs and Azure VM images.  This is particularly helpful for
  testing to avoid name collisions, but also useful for cases
  where a necessary rebuild is done before the date changes.

Sponsored by:	The FreeBSD Foundation
2015-06-24 18:56:28 +00:00
marcel
c8b4a5d462 MFC r284269, r284270, r284655, r284656, r284658:
VHD fixes for Microsoft Azure:
1.  Round the image size to the VHD geometry and then round to a
    multiple of 1MB.
2.  Change the creator OS from "FBSD" to "Wi2k". It matters...
3.  Bump the VHD tool version and the mkimg version.

Approved by:	re (gjb)
2015-06-24 18:40:34 +00:00
avg
f8c30d3e15 MFC r284306: MFV r284036: 5961 Fix stack overflow in zfs_create_fs 2015-06-24 14:41:54 +00:00
avg
d3f01929a8 MFC r284303: MFV r283534: 5515 dataset user hold doesn't reject empty tags 2015-06-24 14:39:26 +00:00