Commit Graph

197935 Commits

Author SHA1 Message Date
neel
3b591af2d9 MFC 261321
Rename the AMD MSR_PERFCTR[0-3] so the Pentium Pro MSR_PERFCTR[0-1] aren't
redefined.

MFC r273214
Fix build to not bogusly always rebuild vmm.ko.

MFC r273338
Add support for AMD's nested page tables in pmap.c:
- Provide the correct bit mask for various bit fields in a PTE (e.g. valid bit)
  for a pmap of type PT_RVI.
- Add a function 'pmap_type_guest(pmap)' that returns TRUE if the pmap is of
  type PT_EPT or PT_RVI.

Add CPU_SET_ATOMIC_ACQ(num, cpuset):
This is used when activating a vcpu in the nested pmap. Using the 'acquire'
variant guarantees that the load of the 'pm_eptgen' will happen only after
the vcpu is activated in 'pm_active'.

Add defines for various AMD-specific MSRs.

Discussed with:	kib (r261321)
2014-12-30 00:00:42 +00:00
pfg
80b8a49df4 MFC r276228:
gas: use memmove instead of bogus memcpy.

partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Fixes Sourceware-PR 11456.

Obtained from:	OpenBSD (CVS rev. 1.2)
2014-12-29 22:54:28 +00:00
jilles
52bfb3cdd3 MFC r276037: sh: Remove EXP_REDIR.
EXP_REDIR was supposed to generate pathnames in redirection if exactly one
file matches, as permitted but not required by POSIX in interactive mode. It
is unlikely this will be implemented.

No functional change is intended.
2014-12-29 15:33:20 +00:00
jilles
eae2f34920 MFC r274854: sh: Use DQSYNTAX only while expanding, not SQSYNTAX.
Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.
2014-12-29 15:15:27 +00:00
jilles
ca31dd6023 MFC r273920: sh: Fix corruption of CTL* bytes in positional parameters in
redirection.

EXP_REDIR was not being checked for while expanding positional parameters in
redirection, so CTL* bytes were not being prefixed where they should be.
2014-12-29 15:11:07 +00:00
kib
517ef2d351 MFC r275260:
Remove lock recursion for the pipe pair mutex, and disable the
recursion on mutex initialization.
2014-12-29 00:30:38 +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
marcel
585f5c8dda MFC r272789:
Fix draining in ttydev_leave().
2014-12-28 19:03:29 +00:00
marcel
5fceeec31e MFC r269126 & 272786:
Don't return ERESTART when the device is gone.
2014-12-28 18:53:16 +00:00
marcel
3ba73f92a6 MFC r275721:
The size of the first level reference count table is given in terms of the
number of clusters it occupies.

Bump the version number of mkimg.
2014-12-28 18:43:39 +00:00
peterj
f7c5de75b0 MFH r275941:
Adjust the test of a KASSERT to better match the intent.

This assertion was added in r246213 as a guard against corrupted mbufs
arriving from drivers, the key distinguishing factor of said mbufs being
that they had a negative length. Given we're in a while loop specifically
designed to skip over zero-length mbufs, panicking on a zero-length mbuf
seems incorrect.

Suggested by:	rmacklem
MFH go-ahead:	benno
Approved by:	grog (co-mentor)
2014-12-28 07:14:38 +00:00
ian
85cae5d907 MFC r276165, r276166:
Define the old-school arm arch constants we still use internally based on
  the somewhat newer constants predefined by the compiler.  This will allow
  userland apps to use various machine/foo.h headers without CPUTYPE defined.
2014-12-27 17:36:49 +00:00
ngie
c090fc5172 MFC r275867:
Fix sporadic build failures due to race when running make installworld
  when strip gets replaced at install time by adding it to ITOOLS for the
  default usr.bin/xinstall STRIP_CMD

  This will fix the failure noted in this Jenkins build step:
  https://jenkins.freebsd.org/job/Build-UFS-image/688/

  This will also fix the issue reported by alfred@ dealing with installing on
  targets that differ from build hosts (e.g. installing on i386/i386 when built
  on amd64/amd64)

  Sponsored by: EMC / Isilon Storage Division
2014-12-27 17:20:24 +00:00
ngie
21a79436a4 MFC r275908,r276309:
r275908:

  Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS

  Phabric: D1335
  Reviewed by: brueffer
  Sponsored by: EMC / Isilon Storage Division

r276309:

  Bump .Dd for change done in r275908
2014-12-27 17:14:53 +00:00
ngie
7a63e2f688 MFC r275866:
Parallelize building gnu/usr.bin/groff

  This speeds up building the directory from the bootstrap-tools stage in
  buildworld as well as building from the subdirectory

  Based on a patch submitted via -arch:
  https://lists.freebsd.org/pipermail/freebsd-arch/2014-December/016493.html

  Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
  Sponsored by: EMC / Isilon Storage Division
2014-12-27 17:10:14 +00:00
ngie
8add61763b MFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437)
Discussed with: sjg

r255285:

  If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
  into the job queue.
  This avoids closing down an entire build on failure of one branch.
  Probably has no use outside the context of universe/tinderbox.

  Reviewed by:	obrien

r255916:

  Fix Fx syntax.

  PR: 182269
  Approved by: re@

r258113:

  Avoid SEGV when passed NULL for list

r258114:

  Don't SEGV when Hash_Table is uninitialized

r261212:

  Merge bmake-20140101 from vendor

r266760:

  Portmgr no longer need the UL hack.

  Reviewed by: obrien

r268437:

  Update to bmake-20140620
  Main change is detection of malformed variable references.

  Reviewed by:	obrien
2014-12-27 16:43:22 +00:00
ian
47ae056841 MFC r276045:
Allow -march=armv7a on the gcc command line, for compatibility with clang.
2014-12-27 05:24:18 +00:00
ian
f59ca8096d MFC r276029:
Remove a volatile qualifier on return type that is ignored and results in
  a -Wreturn-type warning when compiled with gcc.
2014-12-27 05:11:34 +00:00
ian
cea961188c r276026:
Allow whitspace to appear between device name and unit number in loaderdev.
2014-12-27 05:10:07 +00:00
ian
def901a53c MFC r275951: Log mmc and sd command failures. 2014-12-27 04:55:45 +00:00
ian
3714a75ff6 MFC r275944, r275946, r275949, r275950:
Add code to set and reset open-drain mode on the bus when requested.

  When command and data interrupts have been aggregated together, don't do
  the data-completed processing if a command-error interrupt is also asserted.

  Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around
  TI OMAP controllers which will return the reset-in-progress bit as zero if
  you read the status register too fast after setting the reset bit.
2014-12-27 04:54:36 +00:00
ian
02a7e72b74 MFC r275660: Fix the watchdog timeout calculation to prevent wrap. 2014-12-27 04:51:21 +00:00
ian
2226c9830e MFC r274967:
Add busdma sync ops before reading and after modifying the descriptor rings
2014-12-27 04:35:18 +00:00
ian
aa8c824e74 MFC r274941: The arm PJ4B cpu is armv7 architecture, not v6. 2014-12-27 04:33:35 +00:00
ian
ff2ddbadb6 MFC r274937:
Add ARMV6 as an arm option.  This will cause obscure magic in config(8)
  to automatically set the armv6 option when MACHINE_ARCH is armv6.  That
  allows replacing ever-growing lists of cpu names as options to compile
  a given file with the using either "optional armv6" or "optional !armv6".
2014-12-27 04:30:42 +00:00
ian
03177641a0 MFC r265840: Eliminate spurious warnings when grep doesn't find NO_UNIVERSE 2014-12-27 03:20:34 +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
ian
d082e488cb MFC r274641, r274644, r274822, r276049:
Allow i2c bus speed to be configured via hints, FDT data, and sysctl.

  Implement bus speed setting for OMAP4, AM335x, and imx5/6.

  Fix the i2c bus speed divisors for TI OMAP4 and AM335x to give the
  advertised 100, 400, and 1000 KHz speeds.

PR:		195009
2014-12-27 02:37:52 +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
ian
dda8b6a9a4 MFC r274412, r274413, r274414: Bugfixes for imx5/6 pinctrl driver. 2014-12-27 01:35:03 +00:00
ian
832ee5dfbd MFC r274538, r274545, r274596, r274602, r274603, r274604, r274605, r274839:
When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
  for cache maintenance operations, but ensure that all prior writes have
  reached memory when doing a PREWRITE sync.

  Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync.

  Do the cache invalidate sequence from the outermost to innermost, required
  for correct operation.

  Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs.

  When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
  the first cacheline if the buffer start address is not on a cacheline
  boundary.
2014-12-27 01:28:52 +00:00
kib
38f7dd4bb8 MFC r275745:
Add facility to stop all userspace processes.

MFC r275753:
Fix gcc build.

MFC r275820:
Add missed break.
2014-12-27 00:55:14 +00:00
kib
e8e2e634b5 MFC r275960:
Increase allowed size of the microcode blob to 32KB.
2014-12-27 00:44:33 +00:00
ian
b2f7ab039b MFC r274926: Squelch a (bogus) gcc used before init warning 2014-12-27 00:01:28 +00:00
scottl
8e470958f3 MFC 276174:
Fix tunable and sysctl handling of the fail_on_task_timeout knob.

Reviewed by:    emax
Obtained from:  Netflix, Inc.
2014-12-26 23:18:09 +00:00
ian
be077139af MFC r274188, r274189:
DMA tag alignment should be 1 (not 0) when a device can dma at any address.
2014-12-26 22:56:02 +00:00
markj
f296437898 MFC r272671:
Treat D keywords as identifiers in certain postfix expressions. This allows
one to, for example, access the "provider" field of a struct g_consumer,
even though "provider" is a D keyword.

PR:	169657
2014-12-26 22:52:44 +00:00
markj
73aece4781 MFC r275011:
The module load address always needs to be included when setting the dm_*_va
fields of dt_module_t. Previously, this was only done on architectures where
kernel modules have type ET_REL; this change fixes that. As a result, symbol
name resolution in the stack() action now works properly for kernel modules
on i386.
2014-12-26 22:50:34 +00:00
ian
fe75b90da9 MFC r270190: Don't kill parallel jobs on (expected) failure of make_check. 2014-12-26 21:40:45 +00:00
hselasky
e0931ed2a0 MFC r275790 and r275791:
Resolve USB driver identification conflict.
Regenerate etc/devd/usb.conf.
2014-12-26 11:32:34 +00:00
hselasky
d93f2ea3b7 MFC r259675, r262128, r262129, r275605, r276239 and r276240:
Add more USB quirks.

PR:	178771
PR:	180617
PR:	195372
2014-12-26 11:16:59 +00:00
mav
8b298a2978 MFC r275920, r276127: Pass real optimal transfer size supported by backend.
For files and ZVOLs that is 1MB now, not 128K.
2014-12-26 09:44:32 +00:00
mav
270e05ae8c MFC r275925: Slightly polish iSCSI parameters negotiation. 2014-12-26 09:12:19 +00:00
mav
529f85a6e8 MFC r275118: Some microoptimizations. 2014-12-26 09:11:26 +00:00
mav
28baac29e7 MFC r275112:
Make isp_find_pdb_by_*() search for targets in portdb in reverse order.

Records with target_mode == 1 are allocated from the end of portdb, so it
seems logical to start search from the end not traverse whole array.
2014-12-26 09:09:50 +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
ae
7a82e24551 MFC r273087 (with modifications):
Overhaul if_gif(4):
   o convert to if_transmit;
   o use rmlock to protect access to gif_softc;
   o use sx lock to protect from concurrent ioctls;
   o remove a lot of unneeded and duplicated code;
   o remove cached route support (it won't work with concurrent io);
   o style fixes.

MFC r273090:
  Move memset under ifdef INET6.

MFC r273091:
  Add more ifdefs. SIOC*_IN6 are defined only with INET6.

MFC r273121:
  Add inet/inet6 to the dependency list. Without them if_gif is useless.

MFC r273209 by bz:
  After r273087,r273090,r273091,r273121 changes to gif(4) try to fix
  NOIP builds for real.

MFC r273587:
  Remove redundant check and m_pullup() call.
2014-12-23 16:33:44 +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
mav
69ac340493 MFC r275842: Do not count RCTD bit set as an error.
We can not really implement it, but specification tells that it "shall"
work, so it can be safely ignored.
2014-12-23 12:41:28 +00:00