Commit Graph

14656 Commits

Author SHA1 Message Date
jilles
ea0e2f1d19 MFC r272963: pstat(8): Correct description of the SESS column in pstat -t. 2015-01-03 15:37:34 +00:00
mav
2952feb3ad MFC r275864: Make sequence numbers checks more strict.
While we don't support MCS, hole in received sequence numbers may mean
only PDU loss.  While we don't support lost PDU recovery, terminate the
connection to avoid stuck commands.

While there, improve handling of sequence numbers wrap after 2^32 PDUs.
2015-01-03 13:08:08 +00:00
trasz
8a977bdac7 MFC r274954:
Remove the pidfile clause from the ctl.conf example.  Why do everyone
just copy/paste this line into their configs, it's beyond me.

Sponsored by:	The FreeBSD Foundation
2015-01-01 15:45:22 +00:00
ngie
0971283da1 MFC r272777,r272779,r272780,r272781,r272782,r272783,r272784,r272787,r272788:
r272777:

  Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272779:

  Integrate usr.sbin/basename/tests from NetBSD into atf/kyua

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272780:

  Integrate usr.bin/cmp/tests from NetBSD into atf/kyua

  In collaboration with: sjg
  Sponsored by: EMC / Isilon Storage Division

r272781:

  Integrate usr.bin/dirname/tests from NetBSD into atf/kyua

  In collaboration with: pho, sjg
  Sponsored by: EMC / Isilon Storage Division

r272782:

  Integrate bin/sleep/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272783:

  Integrate usr.bin/cut/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272784:

  Integrate usr.bin/grep/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272787:

  Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests

  Sponsored by: EMC / Isilon Storage Division

r272788:

  Integrate usr.bin/gzip/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division
2015-01-01 02:04:44 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
neel
10c6be06b4 MFC r273683
Move the ACPI PM timer emulation into vmm.ko.

MFC r273706
Change the type of the first argument to the I/O emulation handlers to
'struct vm *'.

MFC r273710
Add a comment explaining the intent behind the I/O reservation [0x72-0x77].

MFC r273744
Add foo_genassym.c files to DPSRCS so dependencies for them are generated.
This ensures these objects are rebuilt to generate an updated header of
assembly constants if needed.

MFC r274045
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

MFC r274076
Improve the ability to cancel an in-flight request by using an interrupt,
via SIGCONT, to force the read or write system call to return prematurely.

MFC r274330
To allow a request to be submitted from within the callback routine of
a completing one increase the total by 1 but don't advertise it.

MFC r274931
Change the lower bound for guest vmspace allocation to 0 instead of using
the VM_MIN_ADDRESS constant.

MFC r275817
For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted.

MFC r275850
Fix 8259 IRQ priority resolver.

MFC r275952
Various 8259 device model improvements.

MFC r275965
Emulate writes to the IA32_MISC_ENABLE MSR.
2014-12-30 22:22:46 +00:00
neel
9a7db864f7 MFC r273375
Add support AMD processors with the SVM/AMD-V hardware extensions.

MFC r273749
Remove bhyve SVM feature printf's now that they are available in the general
CPU feature detection code.

MFC r273766
Add missing 'break' pointed out by Coverity CID 1249760.

MFC r276098
Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions"

MFC r276392
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT' on an
AMD/SVM host.

MFC r276402
Remove "svn:mergeinfo" property that was dragged along when these files were
svn copied in r273375.
2014-12-30 08:24:14 +00:00
neel
88c1adb417 MFC r270326
Fix a recursive lock acquisition in vi_reset_dev().

MFC r270434
Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot find
any unmasked pin with an interrupt asserted.

MFC r270436
Fix a bug in the emulation of CPUID leaf 0x4.

MFC r270437
Add "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
tunables to modify the default cpu topology advertised by bhyve.

MFC r270855
Set the 'inst_length' to '0' early on before any error conditions are detected
in the emulation of the task switch. If any exceptions are triggered then the
guest %rip should point to instruction that caused the task switch as opposed
to the one after it.

MFC r270857
The "SUB" instruction used in getcc() actually does 'x -= y' so use the
proper constraint for 'x'. The "+r" constraint indicates that 'x' is an
input and output register operand.

While here generate code for different variants of getcc() using a macro
GETCC(sz) where 'sz' indicates the operand size.

Update the status bits in %rflags when emulating AND and OR opcodes.

MFC r271439
Initialize 'bc_rdonly' to the right value.

MFC r271451
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow.

MFC r271888
Restructure the MSR handling so it is entirely handled by processor-specific
code.

MFC r271890
MSR_KGSBASE is no longer saved and restored from the guest MSR save area. This
behavior was changed in r271888 so update the comment block to reflect this.

MFC r271891
Add some more KTR events to help debugging.

MFC r272197
mmap(2) requires either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings.

MFC r272395
Get rid of code that dealt with the hardware not being able to save/restore
the PAT MSR on guest exit/entry. This workaround was done for a beta release
of VMware Fusion 5 but is no longer needed in later versions.

All Intel CPUs since Nehalem have supported saving and restoring MSR_PAT
in the VM exit and entry controls.

MFC r272670
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.

MFC r272710
Implement the FLUSH operation in the virtio-block emulation.

MFC r272838
iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

MFC r272839
Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
 - MSR_PLATFORM_INFO
 - MSR_TURBO_RATIO_LIMITx
 - MSR_RAPL_POWER_UNIT

MFC r273108
Emulate "POP r/m". This is needed to boot OpenBSD/i386 MP kernel in bhyve.

MFC r273212
Support stopping and restarting the AHCI command list via toggling PxCMD.ST
from '1' to '0' and back.  This allows the driver a chance to recover if
for instance a timeout occurred due to activity on the host.
2014-12-28 21:27:13 +00:00
ian
6c9b54c869 MFC r274924, r274936:
Consider the negation operator (!) to be a word even if it is not followed
  by whitespace.  This allows "optional !foo" which is what most programmers
  are naturally going to tend to do as opposed to "optional ! foo".

  Fix the negation (!) operator so that it binds only to the word that
  immediately follows it.
2014-12-27 03:19:04 +00:00
jamie
799361e237 MFC r275906:
Setgid before running a command as a specified user.  Previously only
  initgroups(3) was called, what isn't quite enough.  This brings jail(8)
  in line with jexec(8), which was already doing the right thing.

PR:		195984
2014-12-27 02:17:35 +00:00
mav
270e05ae8c MFC r275925: Slightly polish iSCSI parameters negotiation. 2014-12-26 09:12:19 +00:00
mav
5d78bffe2b MFC r275865:
Add configuration options to override physical and UNMAP blocks geometry.

While in most cases CTL should correctly fetch those values from backing
storages, there are some initiators (like MS SQL), that may not like large
physical block sizes, even if they are true.  For such cases allow override
fetched values with supported ones (like 4K).
2014-12-24 13:49:40 +00:00
mav
9cec814411 MFC r275959: Report initiator id in portlist XML in more formalized way. 2014-12-23 12:45:29 +00:00
mav
be31195072 MFC r275958: Report XML parsing errors. 2014-12-23 12:44:16 +00:00
des
347db77978 Strip trailing / characters from paths in "not present" index entries.
Errata:		FreeBSD-EN-14:13.freebsd-update
Approved by:	so@
2014-12-22 22:11:39 +00:00
trasz
0ba11869de MFC r274796:
Document use of wildcards (*) and ampersands (&) in autofs map files.

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:15:35 +00:00
trasz
88d4dfb90e MFC r274723:
Make the auto_master(5) man page clearer on how auto_master
and map files work together, and add example for smbfs.

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:03:59 +00:00
trasz
a740f64591 MFC r274621:
The "intr" option is NFS-specific; fix examples in auto_master(5).

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:00:48 +00:00
ae
98ddab22ac MFC r275729:
Increase the buffer size to keep the list of programm names when
  parsing programm specification. It is safe to not check out of bounds
  access, because !isprint(p[i]) check will stop reading, when '\0'
  character will be read from the input string.

Sponsored by:	Yandex LLC
2014-12-19 13:22:02 +00:00
mav
66c7f00f29 MFC r275482: Document r275481 changes. 2014-12-18 08:49:50 +00:00
mav
a0e66849d7 MFC r275568:
Count consecutive read requests as blocking in CTL for files and ZVOLs.

Technically read requests can be executed in any order or simultaneously
since they are not changing any data.  But ZFS prefetcher goes crasy when
it receives consecutive requests from different threads.  Since prefetcher
works on level of separate blocks, instead of two consecutive 128K requests
it may receive 32 8K requests in mixed order.

This patch is more workaround then a real fix, and it does not fix all of
prefetcher problems, but it improves sequential read speed by 3-4x times
in some configurations.  On the other side it may hurt performance if
some backing store has no prefetch, that is why it is disabled by default
for raw devices.
2014-12-18 08:46:53 +00:00
mav
43c3b12592 MFC r275452: Do not corrupt the listen string when parsing it.
This fixes problem with ctld reload when it is configured to listen on two
portals with same IP, but different ports.
2014-12-10 08:53:41 +00:00
trasz
c131c42ed7 MFC r274310:
Add HISTORY section to ctld(8).

Sponsored by:	The FreeBSD Foundation
2014-12-09 11:52:36 +00:00
trasz
35a0788239 MFC r274308:
Add support for sending redirections to iSCSI target.

MFC r274309:

Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.

Sponsored by:	The FreeBSD Foundation
2014-12-09 11:50:50 +00:00
trasz
379a1af59c MFC r274277:
ctld(8) doesn't require -lcam or -lssl; remove those from DPADD and LDADD.

Sponsored by:	The FreeBSD Foundation
2014-12-08 11:28:08 +00:00
rpaulo
2add70e7a9 MFC r275420:
gpioctl: don't print the command line arguments.

PR:	  	195330
Submitted by:	Scott Ellis jumpnowtek at gmail.com
2014-12-05 07:51:50 +00:00
mav
19732a0540 MFC r274248: Remove unused assignments, noticed by Clang analyzer. 2014-12-05 07:29:31 +00:00
markj
b431d8bfcf MFC r273488:
Fix some bugs in the error handling of getdevice().

PR:	194506
2014-12-03 19:44:22 +00:00
trasz
93b5034aa6 MFC r271366 (by mav@):
Fix memory leak, reported by Coverity.
2014-11-29 16:07:15 +00:00
trasz
1fc4976104 MFC r274278:
Improve wording in ctl.conf(5).

Sponsored by:	The FreeBSD Foundation
2014-11-29 16:01:44 +00:00
trasz
59965706b2 MFC r273822:
Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines
(CRLF) in iscsi.conf and ctl.conf.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:39:31 +00:00
trasz
00cfd4605b MFC r273821:
Keep the token list sorted.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:37:51 +00:00
trasz
704c9e7b81 MFC r273820:
Make it possible to optionally use semicolon to separate statements.
This makes it possible to format stuff like this:

target xxx {
	lun 0 { path /foo/bar; size 4G; }
}

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:36:10 +00:00
trasz
077d08af55 MFC r273816:
Simplify code; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:34:17 +00:00
trasz
aa126c68f3 MFC r273813:
Add discovery-filter.  This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.
2014-11-29 15:32:15 +00:00
trasz
43998423fb MFC r273770:
Fix build after previous commit.  While here, improve error messages.

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:48:06 +00:00
trasz
863c0f84a8 MFC r273768:
Remove the distinction between strings and numbers from ctld(8) yacc parser.
This fixes problems with passing strings that look like numbers to clauses
that expect strings; previously it caused syntax errors and had to be worked
by user, using quotes.  The workaround introduced in r267833 is no longer
neccessary.

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:45:55 +00:00
dim
b0242e0d02 MFC r274900:
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.
2014-11-25 13:29:13 +00:00
dim
10bfcc72ff MFC r274898:
Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	hrs
Differential Revision: https://reviews.freebsd.org/D1197
2014-11-25 13:12:45 +00:00
trasz
0f5dfd9d3d MFC r273585:
Improve ctld.conf example.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:09:50 +00:00
trasz
99d5e34563 MFC r273470:
Fix ctl.conf example to use proper paths to ZVOLs.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:06:29 +00:00
trasz
46ba63ac4f MFC r273467:
Comment out parts about iSER; it's not implemented.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:04:40 +00:00
trasz
6d3549321e MFC r273584:
Make the initiator-name and initiator-portal checks a little nicer.

Sponsored by:	The FreeBSD Foundation
2014-11-24 07:59:44 +00:00
trasz
3ffc9ed98b MFC 273583:
Tidy up the login code; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-24 07:57:18 +00:00
mav
a3fd5530e7 MFC r273635, r273793, r274797: Add basic iSNS client to the iSCSI target.
This makes ctld(8) register its iSCSI targets and portals on configured
iSNS servers to allow initiators find them without active discovery.

Fetching of allowed initiators from iSNS is not implemented now, so target
ACLs still should be configured manually.

Relnotes:	Yes
Sponsored by:	iXsystems, Inc.
2014-11-24 00:47:04 +00:00
mav
8ef35bbcf8 MFC r274328:
Make both iSCSI initiator and target support base64 encoded CHAP data.

While all tested initiators and targets use hex-encoded CHAP data, RFC also
allows base64 encoding there, and Microsoft certificaition tool uses it.
2014-11-23 04:17:39 +00:00
trasz
19b6e68597 MFC r273543:
Clean up (refactor) discovery a little; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:58:39 +00:00
trasz
340f150ff8 MFC r273468:
Remove misleading statement.  Bump date.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:56:03 +00:00
trasz
c6421981a9 MFC r273466:
Remove spurious empty line.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:54:11 +00:00
trasz
4844d3d80c MFC r273465:
Fix ctld(8) to not show the "auth-group <name> not assigned to any target"
warning for auth-groups assigned to a portal-group.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:52:33 +00:00