svn commit: r316990 - head

2017-04-15 Thread Neel Natu
Author: neel Date: Sat Apr 15 22:42:23 2017 New Revision: 316990 URL: https://svnweb.freebsd.org/changeset/base/316990 Log: Due to time constraints remove myself as a vmm(4) maintainer. Modified: head/MAINTAINERS Modified: head/MAINTAINERS

svn commit: r285619 - head/sys/dev/uart

2015-07-15 Thread Neel Natu
Author: neel Date: Thu Jul 16 04:15:22 2015 New Revision: 285619 URL: https://svnweb.freebsd.org/changeset/base/285619 Log: If uart interrupts are not functioning then schedule the callout to do the polling at device attach time [1]. Add tunables 'debug.uart_force_poll' and

svn commit: r285218 - in head: lib/libvmmapi sys/amd64/vmm

2015-07-06 Thread Neel Natu
Author: neel Date: Mon Jul 6 19:41:43 2015 New Revision: 285218 URL: https://svnweb.freebsd.org/changeset/base/285218 Log: Move the 'devmem' device nodes from /dev/vmm to /dev/vmm.io Some external tools just do a 'ls /dev/vmm' to figure out the bhyve virtual machines on the host. These

svn commit: r285217 - head/usr.sbin/bhyve

2015-07-06 Thread Neel Natu
Author: neel Date: Mon Jul 6 19:33:29 2015 New Revision: 285217 URL: https://svnweb.freebsd.org/changeset/base/285217 Log: Always assert DCD and DSR in bhyve's uart emulation. The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: ttyu0 /usr/libexec/getty 3wire

svn commit: r284892 - head/usr.sbin/bhyveload

2015-06-27 Thread Neel Natu
Author: neel Date: Sat Jun 27 18:24:23 2015 New Revision: 284892 URL: https://svnweb.freebsd.org/changeset/base/284892 Log: Fix issues detected by 'mandoc -Tlint bhyveload.8' Pointed out by: wblock Differential Revision:https://reviews.freebsd.org/D2762 Modified:

svn commit: r284712 - head/sys/amd64/vmm/amd

2015-06-22 Thread Neel Natu
Author: neel Date: Tue Jun 23 02:17:23 2015 New Revision: 284712 URL: https://svnweb.freebsd.org/changeset/base/284712 Log: Restore the host's GS.base before returning from 'svm_launch()'. Previously this was done by the caller of 'svm_launch()' after it returned. This works fine as long

svn commit: r284688 - head/lib/libvmmapi

2015-06-21 Thread Neel Natu
Author: neel Date: Mon Jun 22 00:30:34 2015 New Revision: 284688 URL: https://svnweb.freebsd.org/changeset/base/284688 Log: Fix a regression in movs emulation after r284539. The regression was caused due to a change in behavior of the 'vm_map_gpa()'. Prior to r284539 if 'vm_map_gpa()'

svn commit: r284539 - in head: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bh...

2015-06-18 Thread Neel Natu
Author: neel Date: Thu Jun 18 06:00:17 2015 New Revision: 284539 URL: https://svnweb.freebsd.org/changeset/base/284539 Log: Restructure memory allocation in bhyve to support devmem. devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer where doing a

svn commit: r283973 - head/sys/amd64/vmm/amd

2015-06-03 Thread Neel Natu
Author: neel Date: Thu Jun 4 02:12:23 2015 New Revision: 283973 URL: https://svnweb.freebsd.org/changeset/base/283973 Log: 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

svn commit: r283657 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel usr.sbin/bhyve

2015-05-28 Thread Neel Natu
Author: neel Date: Thu May 28 17:37:01 2015 New Revision: 283657 URL: https://svnweb.freebsd.org/changeset/base/283657 Log: Fix non-deterministic delays when accessing a vcpu that was in running or sleeping state. This is done by forcing the vcpu to transition to idle by returning to

svn commit: r283299 - head/sys/amd64/vmm

2015-05-22 Thread Neel Natu
Author: neel Date: Fri May 22 21:09:11 2015 New Revision: 283299 URL: https://svnweb.freebsd.org/changeset/base/283299 Log: Remove the verification of instruction length after instruction decode. The check has been bogus since r273375. MFC after:1 week Modified:

svn commit: r283308 - head/sys/amd64/vmm

2015-05-22 Thread Neel Natu
Author: neel Date: Sat May 23 01:17:50 2015 New Revision: 283308 URL: https://svnweb.freebsd.org/changeset/base/283308 Log: Exceptions don't deliver an error code in real mode. MFC after:1 week Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c

svn commit: r283293 - in head/sys/amd64/vmm: . intel

2015-05-22 Thread Neel Natu
Author: neel Date: Fri May 22 17:34:22 2015 New Revision: 283293 URL: https://svnweb.freebsd.org/changeset/base/283293 Log: Don't rely on the 'VM-exit instruction length' field in the VMCS to always have an accurate length on an EPT violation. This is not needed by the instruction decoding

svn commit: r283255 - head/sys/amd64/vmm

2015-05-21 Thread Neel Natu
Author: neel Date: Thu May 21 18:23:37 2015 New Revision: 283255 URL: https://svnweb.freebsd.org/changeset/base/283255 Log: Emulate the CMP r/m, reg instruction (opcode 39H). Reported and tested by: Leon Dang (ld...@nahannisys.com) MFC after:1 week Modified:

svn commit: r283256 - head/usr.sbin/bhyvectl

2015-05-21 Thread Neel Natu
Author: neel Date: Thu May 21 18:29:11 2015 New Revision: 283256 URL: https://svnweb.freebsd.org/changeset/base/283256 Log: Add an option --get-vmcs-exit-inst-length to display the instruction length of the instruction that caused the VM-exit. MFC after:1 week Modified:

svn commit: r282788 - head/usr.sbin/bhyve

2015-05-11 Thread Neel Natu
Author: neel Date: Tue May 12 00:30:39 2015 New Revision: 282788 URL: https://svnweb.freebsd.org/changeset/base/282788 Log: Allow configuration of the sector size advertised to the guest. The default behavior is to infer the logical and physical sector sizes from the block device

svn commit: r282595 - head/usr.sbin/bhyve

2015-05-07 Thread Neel Natu
Author: neel Date: Thu May 7 18:35:15 2015 New Revision: 282595 URL: https://svnweb.freebsd.org/changeset/base/282595 Log: Allow byte reads of AHCI registers. This is needed to support Windows guests that use byte reads to access certain AHCI registers (e.g. PxTFD.Status and

svn commit: r282571 - head/sys/amd64/include

2015-05-06 Thread Neel Natu
Author: neel Date: Wed May 6 23:40:24 2015 New Revision: 282571 URL: https://svnweb.freebsd.org/changeset/base/282571 Log: Check 'td_owepreempt' and yield the vcpu thread if it is set. This is done explicitly because a vcpu thread can be in a critical section for the entire time slice

svn commit: r282558 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm usr.sbin/bhyve

2015-05-06 Thread Neel Natu
Author: neel Date: Wed May 6 16:25:20 2015 New Revision: 282558 URL: https://svnweb.freebsd.org/changeset/base/282558 Log: Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). Prior to this change both functions returned 0 for success, -1 for failure and +1 to

Re: svn commit: r282429 - head/usr.sbin/bhyve

2015-05-06 Thread Neel Natu
Hi Alexander, On Wed, May 6, 2015 at 3:00 AM, Alexander Motin m...@freebsd.org wrote: On 06.05.2015 08:04, Neel Natu wrote: Hi Alexander, I am getting the following error(?) messages with an ahci-cd device on Centos 6.4 x86_64: Thanks for the report, r282524 should fix the issue. Thanks

Re: svn commit: r282429 - head/usr.sbin/bhyve

2015-05-05 Thread Neel Natu
Hi Alexander, I am getting the following error(?) messages with an ahci-cd device on Centos 6.4 x86_64: ata1.00: qc timeout (cmd 0xa0) ata1: limiting SATA link speed to 1.5 Gbps ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: irq_stat 0x4001 sr 0:0:0:0: [sr0] CDB:

svn commit: r282520 - in head/sys/amd64/vmm: . amd

2015-05-05 Thread Neel Natu
Author: neel Date: Wed May 6 05:40:20 2015 New Revision: 282520 URL: https://svnweb.freebsd.org/changeset/base/282520 Log: Do a proper emulation of guest writes to MSR_EFER. - Must-Be-Zero bits cannot be set. - EFER_LME and EFER_LMA should respect the long mode consistency checks. -

svn commit: r282519 - head/sys/x86/include

2015-05-05 Thread Neel Natu
Author: neel Date: Wed May 6 05:12:29 2015 New Revision: 282519 URL: https://svnweb.freebsd.org/changeset/base/282519 Log: Add macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE. AMDID_FFXSR is at bit 25 so correct its value to 0x0200. MFC after:1 week Modified:

svn commit: r282407 - head/sys/amd64/vmm

2015-05-03 Thread Neel Natu
Author: neel Date: Mon May 4 04:27:23 2015 New Revision: 282407 URL: https://svnweb.freebsd.org/changeset/base/282407 Log: Emulate the 'CMP r/m8, imm8' instruction encountered when booting a Windows Vista guest. Reported by: Leon Dang (ld...@nahannisys.com) MFC after:1 week

svn commit: r282351 - head/sys/amd64/vmm

2015-05-02 Thread Neel Natu
Author: neel Date: Sat May 2 19:07:49 2015 New Revision: 282351 URL: https://svnweb.freebsd.org/changeset/base/282351 Log: Don't advertise the Intel SMX capability to the guest. Reported by: Leon Dang (ld...@nahannisys.com) MFC after:1 week Modified: head/sys/amd64/vmm/x86.c

svn commit: r282335 - head/usr.sbin/bhyve

2015-05-01 Thread Neel Natu
Author: neel Date: Sat May 2 03:25:24 2015 New Revision: 282335 URL: https://svnweb.freebsd.org/changeset/base/282335 Log: Advertise an additional memory BAR in the dummy device emulation. This is useful for testing the MOVS emulation when both the source and destination addresses are

svn commit: r282336 - in head/sys/amd64/vmm: . amd intel

2015-05-01 Thread Neel Natu
Author: neel Date: Sat May 2 04:19:11 2015 New Revision: 282336 URL: https://svnweb.freebsd.org/changeset/base/282336 Log: Emulate machine check related MSRs to allow guest OSes like Windows to boot. Reported by: Leon Dang (ld...@nahannisys.com) MFC after:2 weeks Modified:

svn commit: r282301 - head/sys/amd64/vmm/io

2015-05-01 Thread Neel Natu
Author: neel Date: Fri May 1 16:00:29 2015 New Revision: 282301 URL: https://svnweb.freebsd.org/changeset/base/282301 Log: r281630 relaxed the limits on the vectors that can be asserted in the IRRs. Do the same when transitioning a vector from the IRR to the ISR and also when

svn commit: r282296 - head/sys/amd64/vmm/amd

2015-05-01 Thread Neel Natu
Author: neel Date: Fri May 1 05:11:14 2015 New Revision: 282296 URL: https://svnweb.freebsd.org/changeset/base/282296 Log: Emulate MSR_SYSCFG which is accessed by Linux on AMD cpus when MTRRs are enabled. MFC after:2 weeks Modified: head/sys/amd64/vmm/amd/svm_msr.c Modified:

svn commit: r282284 - head/sys/amd64/vmm

2015-04-30 Thread Neel Natu
Author: neel Date: Thu Apr 30 21:00:47 2015 New Revision: 282284 URL: https://svnweb.freebsd.org/changeset/base/282284 Log: When an instruction cannot be decoded just return to userspace so bhyve(8) can dump the instruction bytes. Requested by: grehan MFC after:1 week Modified:

svn commit: r282281 - in head/sys/amd64/vmm: . amd intel

2015-04-30 Thread Neel Natu
Author: neel Date: Thu Apr 30 19:23:50 2015 New Revision: 282281 URL: https://svnweb.freebsd.org/changeset/base/282281 Log: Advertise the MTRR feature via CPUID and emulate the minimal set of MTRR MSRs. This is required for booting Windows guests. Reported by: Leon Dang

svn commit: r282287 - in head/sys/amd64: include vmm vmm/amd vmm/intel vmm/io

2015-04-30 Thread Neel Natu
Author: neel Date: Thu Apr 30 22:23:22 2015 New Revision: 282287 URL: https://svnweb.freebsd.org/changeset/base/282287 Log: Don't require sys/cpuset.h to be always included before machine/vmm.h. Only a subset of source files that include machine/vmm.h need to use the APIs that require

svn commit: r282259 - head/sys/amd64/vmm/io

2015-04-29 Thread Neel Natu
Author: neel Date: Wed Apr 29 23:44:28 2015 New Revision: 282259 URL: https://svnweb.freebsd.org/changeset/base/282259 Log: Re-implement RTC current time calculation to eliminate the possibility of losing time. The problem with the earlier implementation was that the uptime value used

svn commit: r282206 - in head: sys/amd64/vmm/io usr.sbin/bhyve

2015-04-28 Thread Neel Natu
Author: neel Date: Tue Apr 28 23:44:47 2015 New Revision: 282206 URL: https://svnweb.freebsd.org/changeset/base/282206 Log: Implement the century byte in the RTC. Some guests require this field to be properly set. Reported by: Leon Dang (ld...@nahannisys.com) MFC after:2 weeks

svn commit: r282209 - head/sys/amd64/vmm

2015-04-28 Thread Neel Natu
Author: neel Date: Wed Apr 29 02:01:46 2015 New Revision: 282209 URL: https://svnweb.freebsd.org/changeset/base/282209 Log: Emulate the 'bit test' instruction. Windows 7 uses 'bit test' to check the 'Delivery Status' bit in APIC ICR register. Reported by: Leon Dang

svn commit: r281946 - head/usr.sbin/bhyve

2015-04-24 Thread Neel Natu
Author: neel Date: Fri Apr 24 19:15:38 2015 New Revision: 281946 URL: https://svnweb.freebsd.org/changeset/base/281946 Log: Don't allow guest to modify readonly bits in the PCI config 'status' register. Reported by: Leon Dang (ld...@nahannisys.com) MFC after:2 weeks Modified:

svn commit: r281612 - head/sys/amd64/vmm/amd

2015-04-16 Thread Neel Natu
Author: neel Date: Thu Apr 16 20:15:47 2015 New Revision: 281612 URL: https://svnweb.freebsd.org/changeset/base/281612 Log: Prefer 'vcpu_should_yield()' over checking 'curthread-td_flags' directly. MFC after:1 week Modified: head/sys/amd64/vmm/amd/svm.c Modified:

svn commit: r281611 - head/usr.sbin/bhyve

2015-04-16 Thread Neel Natu
Author: neel Date: Thu Apr 16 20:11:49 2015 New Revision: 281611 URL: https://svnweb.freebsd.org/changeset/base/281611 Log: If the number of guest vcpus is less than '1' then flag it as an error. MFC after:1 week Modified: head/usr.sbin/bhyve/bhyverun.c Modified:

svn commit: r281630 - head/sys/amd64/vmm

2015-04-16 Thread Neel Natu
Author: neel Date: Thu Apr 16 22:44:51 2015 New Revision: 281630 URL: https://svnweb.freebsd.org/changeset/base/281630 Log: 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.

svn commit: r281559 - head/sys/kern

2015-04-15 Thread Neel Natu
Author: neel Date: Wed Apr 15 16:22:05 2015 New Revision: 281559 URL: https://svnweb.freebsd.org/changeset/base/281559 Log: Fix handling of BUS_PROBE_NOWILDCARD in 'device_probe_child()'. Device probe value of BUS_PROBE_NOWILDCARD should be treated specially only if the device has a

svn commit: r281542 - head/usr.sbin/bhyvectl

2015-04-14 Thread Neel Natu
Author: neel Date: Wed Apr 15 05:04:42 2015 New Revision: 281542 URL: https://svnweb.freebsd.org/changeset/base/281542 Log: Initialize 'error' before use. Reported by: Coverity Scan CID: 1249748, 1249747, 1249751, 1249749 MFC after:1 week Modified:

svn commit: r281499 - head/sys/dev/usb/controller

2015-04-13 Thread Neel Natu
Author: neel Date: Mon Apr 13 19:13:51 2015 New Revision: 281499 URL: https://svnweb.freebsd.org/changeset/base/281499 Log: Modify the return value of the uhci/ehci/xhci PCI probe routines to 'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership of the device and pass it

Re: svn commit: r272481 - head/usr.sbin/bhyve

2015-04-05 Thread Neel Natu
Hi Christian, On Sun, Apr 5, 2015 at 12:06 PM, Christian Laursen x...@borderworlds.dk wrote: On 10/03/14 19:27, Peter Grehan wrote: Author: grehan Date: Fri Oct 3 17:27:30 2014 New Revision: 272481 URL: https://svnweb.freebsd.org/changeset/base/272481 Log: Add new fields in the FADT,

svn commit: r280775 - head/sys/amd64/vmm/io

2015-03-27 Thread Neel Natu
Author: neel Date: Sat Mar 28 02:55:16 2015 New Revision: 280775 URL: https://svnweb.freebsd.org/changeset/base/280775 Log: Fix the RTC device model to operate correctly in 12-hour mode. The following table documents the values in the RTC 'hour' field in the two modes: Hour-of-the-day

svn commit: r279971 - in head/sys: amd64/amd64 amd64/include amd64/vmm amd64/vmm/intel amd64/vmm/io modules/vmm

2015-03-13 Thread Neel Natu
Author: neel Date: Sat Mar 14 02:32:08 2015 New Revision: 279971 URL: https://svnweb.freebsd.org/changeset/base/279971 Log: Use lapic_ipi_alloc() to dynamically allocate IPI slots needed by bhyve when vmm.ko is loaded. Also relocate the 'justreturn' IPI handler to be alongside all other

svn commit: r279970 - in head/sys/x86: include x86 xen

2015-03-13 Thread Neel Natu
Author: neel Date: Sat Mar 14 00:30:41 2015 New Revision: 279970 URL: https://svnweb.freebsd.org/changeset/base/279970 Log: Add x86 specific APIs 'lapic_ipi_alloc()' and 'lapic_ipi_free()' to allow IPI vectors to be dynamically allocated. This allows kernel modules like vmm.ko to allocate

Re: svn commit: r279539 - head/sys/sys

2015-03-02 Thread Neel Natu
Hi Davide, On Mon, Mar 2, 2015 at 12:26 PM, Davide Italiano dav...@freebsd.org wrote: On Mon, Mar 2, 2015 at 12:05 PM, John-Mark Gurney j...@freebsd.org wrote: Author: jmg Date: Mon Mar 2 20:05:16 2015 New Revision: 279539 URL: https://svnweb.freebsd.org/changeset/base/279539 Log: give

svn commit: r279540 - head/sys/amd64/vmm/amd

2015-03-02 Thread Neel Natu
Author: neel Date: Mon Mar 2 20:13:49 2015 New Revision: 279540 URL: https://svnweb.freebsd.org/changeset/base/279540 Log: Fix warnings/errors when building vmm.ko with gcc: - fix warning about comparison of 'uint8_t v_tpr = 0' always being true. - fix error triggered by an empty

svn commit: r279227 - head/usr.sbin/bhyve

2015-02-23 Thread Neel Natu
Author: neel Date: Tue Feb 24 05:15:40 2015 New Revision: 279227 URL: https://svnweb.freebsd.org/changeset/base/279227 Log: Emulate MSR 0xC0011024 when running on AMD processors. OpenBSD guests test bit 0 of this MSR to detect whether the workaround for erratum 721 has been applied.

svn commit: r279225 - head/usr.sbin/bhyve

2015-02-23 Thread Neel Natu
Author: neel Date: Tue Feb 24 02:04:16 2015 New Revision: 279225 URL: https://svnweb.freebsd.org/changeset/base/279225 Log: Add -u option to bhyve(8) to indicate that the RTC should maintain UTC time. The default remains localtime for compatibility with the original device model in

svn commit: r279228 - head/sys/amd64/vmm/intel

2015-02-23 Thread Neel Natu
Author: neel Date: Tue Feb 24 05:35:15 2015 New Revision: 279228 URL: https://svnweb.freebsd.org/changeset/base/279228 Log: 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

svn commit: r277406 - in head/sys: kern sys x86/x86

2015-01-19 Thread Neel Natu
Author: neel Date: Tue Jan 20 03:54:30 2015 New Revision: 277406 URL: https://svnweb.freebsd.org/changeset/base/277406 Log: Update the vdso timehands only via tc_windup(). Prior to this change CLOCK_MONOTONIC could go backwards when the timecounter hardware was changed via 'sysctl

svn commit: r277360 - in head/sys/amd64: include vmm

2015-01-18 Thread Neel Natu
Author: neel Date: Mon Jan 19 06:53:31 2015 New Revision: 277360 URL: https://svnweb.freebsd.org/changeset/base/277360 Log: MOVS instruction emulation. These instructions are emitted by 'bus_space_read_region()' when accessing MMIO regions. Since MOVS can be used with a repeat

svn commit: r277359 - head/lib/libvmmapi

2015-01-18 Thread Neel Natu
Author: neel Date: Mon Jan 19 06:51:04 2015 New Revision: 277359 URL: https://svnweb.freebsd.org/changeset/base/277359 Log: Fix a bug in libvmmapi 'vm_copy_setup()' where it would return success even if the 'gpa' was in the guest MMIO region. This would manifest as a segmentation fault in

svn commit: r277309 - head/share/examples/bhyve

2015-01-17 Thread Neel Natu
Author: neel Date: Sun Jan 18 01:50:10 2015 New Revision: 277309 URL: https://svnweb.freebsd.org/changeset/base/277309 Log: Make the error message explicit instead of just printing the usage if the virtual machine name is not specified. Requested by: grehan MFC after:1 week

svn commit: r277310 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyvectl

2015-01-17 Thread Neel Natu
Author: neel Date: Sun Jan 18 03:08:30 2015 New Revision: 277310 URL: https://svnweb.freebsd.org/changeset/base/277310 Log: Simplify instruction restart logic in bhyve. Keep track of the next instruction to be executed by the vcpu as 'nextrip'. As a result the VM_RUN ioctl no longer

svn commit: r277168 - head/sys/amd64/vmm

2015-01-13 Thread Neel Natu
Author: neel Date: Wed Jan 14 07:18:51 2015 New Revision: 277168 URL: https://svnweb.freebsd.org/changeset/base/277168 Log: Fix typo (missing comma). MFC after:3 days Modified: head/sys/amd64/vmm/vmm_ioport.c Modified: head/sys/amd64/vmm/vmm_ioport.c

svn commit: r277149 - in head/sys/amd64: include vmm vmm/amd vmm/intel

2015-01-13 Thread Neel Natu
Author: neel Date: Tue Jan 13 22:00:47 2015 New Revision: 277149 URL: https://svnweb.freebsd.org/changeset/base/277149 Log: 'struct vm_exception' was intended to be used only as the collateral for the VM_INJECT_EXCEPTION ioctl. However it morphed into other uses like keeping track pending

svn commit: r276763 - in head/sys/amd64/vmm: . amd intel

2015-01-06 Thread Neel Natu
Author: neel Date: Tue Jan 6 19:04:02 2015 New Revision: 276763 URL: https://svnweb.freebsd.org/changeset/base/276763 Log: Clear blocking due to STI or MOV SS in the hypervisor when an instruction is emulated or when the vcpu incurs an exception. This matches the CPU behavior. Remove

svn commit: r276428 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve usr.sbin/bhyvectl

2014-12-30 Thread Neel Natu
/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/vmm/io/vrtc.cTue Dec 30 22:19:34 2014 (r276428) @@ -0,0 +1,952 @@ +/*- + * Copyright (c) 2014, Neel Natu (n...@freebsd.org) + * All rights reserved. + * + * Redistribution and use in source and binary

svn commit: r276432 - head/sys/amd64/vmm/amd

2014-12-30 Thread Neel Natu
Author: neel Date: Tue Dec 30 23:38:31 2014 New Revision: 276432 URL: https://svnweb.freebsd.org/changeset/base/276432 Log: Initialize all fields of 'struct vm_exception exception' before passing it to vm_inject_exception(). This fixes the issue that 'exception.cpuid' is uninitialized when

svn commit: r276392 - head/sys/amd64/vmm/amd

2014-12-29 Thread Neel Natu
Author: neel Date: Tue Dec 30 02:44:33 2014 New Revision: 276392 URL: https://svnweb.freebsd.org/changeset/base/276392 Log: Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT' on an AMD/SVM host. MFC after:1 week Modified: head/sys/amd64/vmm/amd/svm.c

svn commit: r276402 - head/sys/amd64/vmm/amd

2014-12-29 Thread Neel Natu
Author: neel Date: Tue Dec 30 07:08:30 2014 New Revision: 276402 URL: https://svnweb.freebsd.org/changeset/base/276402 Log: Remove svn:mergeinfo property that was dragged along when these files were svn copied in r273375. Suggested by: ngie, gjb Modified: Directory Properties:

svn commit: r276323 - head/sys/amd64/vmm/io

2014-12-27 Thread Neel Natu
Author: neel Date: Sun Dec 28 00:53:52 2014 New Revision: 276323 URL: https://svnweb.freebsd.org/changeset/base/276323 Log: Implement special mask mode in vatpic. OpenBSD guests always enable special mask mode during boot. As a result of r275952 this is flagged as an error and the guest

svn commit: r276098 - in head/sys/amd64: include vmm vmm/amd vmm/intel

2014-12-22 Thread Neel Natu
Author: neel Date: Tue Dec 23 02:14:49 2014 New Revision: 276098 URL: https://svnweb.freebsd.org/changeset/base/276098 Log: Allow ktr(4) tracing of all guest exceptions via the tunable hw.vmm.trace_guest_exceptions. To enable this feature set the tunable to 1 before loading vmm.ko.

svn commit: r275965 - head/sys/amd64/vmm/intel

2014-12-20 Thread Neel Natu
Author: neel Date: Sat Dec 20 19:47:51 2014 New Revision: 275965 URL: https://svnweb.freebsd.org/changeset/base/275965 Log: Emulate writes to the IA32_MISC_ENABLE MSR. PR: 196093 Reported by: db Tested by:db Discussed with: grehan MFC after:1 week

svn commit: r275952 - head/sys/amd64/vmm/io

2014-12-19 Thread Neel Natu
Author: neel Date: Sat Dec 20 04:57:45 2014 New Revision: 275952 URL: https://svnweb.freebsd.org/changeset/base/275952 Log: Various 8259 device model improvements: - implement 8259 polled mode. - set 'atpic-sfn' if bit 4 in ICW4 is set during master initialization. - report error if

svn commit: r275850 - head/sys/amd64/vmm/io

2014-12-16 Thread Neel Natu
Author: neel Date: Wed Dec 17 03:04:43 2014 New Revision: 275850 URL: https://svnweb.freebsd.org/changeset/base/275850 Log: Fix 8259 IRQ priority resolver. Initialize the 8259 such that IRQ7 is the lowest priority. Reviewed by: tychon Differential Revision:

svn commit: r275817 - head/sys/amd64/vmm/io

2014-12-15 Thread Neel Natu
Author: neel Date: Tue Dec 16 06:33:57 2014 New Revision: 275817 URL: https://svnweb.freebsd.org/changeset/base/275817 Log: For level triggered interrupts clear the PIC IRR bit when the interrupt pin is deasserted. Prior to this change each assertion on a level triggered irq pin resulted in

svn commit: r273706 - in head/sys/amd64/vmm: . io

2014-10-26 Thread Neel Natu
Author: neel Date: Sun Oct 26 19:03:06 2014 New Revision: 273706 URL: https://svnweb.freebsd.org/changeset/base/273706 Log: Change the type of the first argument to the I/O emulation handlers to 'struct vm *'. Previously it used to be a 'void *' but there is no reason to hide the actual

svn commit: r273710 - head/usr.sbin/bhyve

2014-10-26 Thread Neel Natu
Author: neel Date: Sun Oct 26 21:17:44 2014 New Revision: 273710 URL: https://svnweb.freebsd.org/changeset/base/273710 Log: Add a comment explaining the intent behind the I/O reservation [0x72-0x77]. Modified: head/usr.sbin/bhyve/rtc.c Modified: head/usr.sbin/bhyve/rtc.c

svn commit: r273666 - head/sys/amd64/vmm

2014-10-25 Thread Neel Natu
Author: neel Date: Sun Oct 26 03:03:41 2014 New Revision: 273666 URL: https://svnweb.freebsd.org/changeset/base/273666 Log: Don't pass the 'error' return from an I/O port handler directly to vm_run(). Most I/O port handlers return -1 to signal an error. If this value is returned without

svn commit: r273683 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve

2014-10-25 Thread Neel Natu
== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/vmm/io/vpmtmr.c Sun Oct 26 04:44:28 2014 (r273683) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2014, Neel Natu (n...@freebsd.org) + * All rights

svn commit: r273375 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/modules/vmm usr.sbin/bhyve usr.sbin/bhyvectl

2014-10-21 Thread Neel Natu
Author: neel Date: Tue Oct 21 07:10:43 2014 New Revision: 273375 URL: https://svnweb.freebsd.org/changeset/base/273375 Log: Merge projects/bhyve_svm into HEAD. After this change bhyve supports AMD processors with the SVM/AMD-V hardware extensions. More details available here:

svn commit: r273338 - in head/sys: amd64/amd64 sys x86/include

2014-10-20 Thread Neel Natu
Author: neel Date: Mon Oct 20 18:09:33 2014 New Revision: 273338 URL: https://svnweb.freebsd.org/changeset/base/273338 Log: Merge from projects/bhyve_svm all the changes outside vmm.ko or bhyve utilities: Add support for AMD's nested page tables in pmap.c: - Provide the correct bit mask

svn commit: r273356 - head/sys/amd64/amd64

2014-10-20 Thread Neel Natu
Author: neel Date: Tue Oct 21 01:06:58 2014 New Revision: 273356 URL: https://svnweb.freebsd.org/changeset/base/273356 Log: Fix a race in pmap_emulate_accessed_dirty() that could trigger a EPT misconfiguration VM-exit. An EPT misconfiguration is triggered when the processor encounters a

svn commit: r273102 - head/share/examples/bhyve

2014-10-14 Thread Neel Natu
Author: neel Date: Tue Oct 14 18:34:15 2014 New Revision: 273102 URL: https://svnweb.freebsd.org/changeset/base/273102 Log: Use '-e' to check if the virtio backing file has already been created. The '-f' check works fine on a regular file but not if the backing file is a device (e.g.,

svn commit: r273108 - head/sys/amd64/vmm

2014-10-14 Thread Neel Natu
Author: neel Date: Tue Oct 14 21:02:33 2014 New Revision: 273108 URL: https://svnweb.freebsd.org/changeset/base/273108 Log: Emulate POP r/m. This is needed to boot OpenBSD/i386 MP kernel in bhyve. Reported by: grehan MFC after:1 week Modified:

svn commit: r272838 - head/usr.sbin/bhyve

2014-10-09 Thread Neel Natu
Author: neel Date: Thu Oct 9 19:02:32 2014 New Revision: 272838 URL: https://svnweb.freebsd.org/changeset/base/272838 Log: 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

svn commit: r272839 - in head: sys/amd64/vmm/intel sys/x86/include usr.sbin/bhyve

2014-10-09 Thread Neel Natu
Author: neel Date: Thu Oct 9 19:13:33 2014 New Revision: 272839 URL: https://svnweb.freebsd.org/changeset/base/272839 Log: 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 Reviewed by:

svn commit: r272710 - head/usr.sbin/bhyve

2014-10-07 Thread Neel Natu
Author: neel Date: Tue Oct 7 17:08:53 2014 New Revision: 272710 URL: https://svnweb.freebsd.org/changeset/base/272710 Log: Implement the FLUSH operation in the virtio-block emulation. This gets rid of the following error message during FreeBSD guest bootup: vtbd0: hard error cmd=flush

svn commit: r272670 - in head/sys/amd64: include vmm vmm/intel

2014-10-06 Thread Neel Natu
Author: neel Date: Mon Oct 6 20:48:01 2014 New Revision: 272670 URL: https://svnweb.freebsd.org/changeset/base/272670 Log: Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'. The hypervisor hides the MONITOR/MWAIT capability by unconditionally setting

svn commit: r272395 - head/sys/amd64/vmm/intel

2014-10-01 Thread Neel Natu
Author: neel Date: Thu Oct 2 05:32:29 2014 New Revision: 272395 URL: https://svnweb.freebsd.org/changeset/base/272395 Log: 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

svn commit: r272270 - head/sys/kern

2014-09-28 Thread Neel Natu
Author: neel Date: Sun Sep 28 21:12:23 2014 New Revision: 272270 URL: http://svnweb.freebsd.org/changeset/base/272270 Log: tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. The panic below was seen when

Re: svn commit: r272270 - head/sys/kern

2014-09-28 Thread Neel Natu
Hi, On Sun, Sep 28, 2014 at 2:25 PM, Garrett Cooper yaneurab...@gmail.com wrote: Hi Neel! Thank you for fixing this. I think we've run into similar issues with customizations to the tty code at Isilon. I have one comment... Thanks! Happy to help. On Sep 28, 2014, at 14:12, Neel Natu

svn commit: r272197 - head/usr.sbin/bhyvectl

2014-09-26 Thread Neel Natu
Author: neel Date: Sat Sep 27 03:43:49 2014 New Revision: 272197 URL: http://svnweb.freebsd.org/changeset/base/272197 Log: After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings. This gets 'bhyvectl --get-all' working again. Reported by: Anish

svn commit: r271888 - in head: sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel sys/modules/vmm sys/x86/include usr.sbin/bhyve

2014-09-19 Thread Neel Natu
Author: neel Date: Sat Sep 20 02:35:21 2014 New Revision: 271888 URL: http://svnweb.freebsd.org/changeset/base/271888 Log: Restructure the MSR handling so it is entirely handled by processor-specific code. There are only a handful of MSRs common between the two so there isn't too much

svn commit: r271890 - head/sys/amd64/vmm/intel

2014-09-19 Thread Neel Natu
Author: neel Date: Sat Sep 20 05:12:34 2014 New Revision: 271890 URL: http://svnweb.freebsd.org/changeset/base/271890 Log: 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.

svn commit: r271891 - in head/sys/amd64/vmm: . io

2014-09-19 Thread Neel Natu
Author: neel Date: Sat Sep 20 05:13:03 2014 New Revision: 271891 URL: http://svnweb.freebsd.org/changeset/base/271891 Log: Add some more KTR events to help debugging. Modified: head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/io/vlapic.c

svn commit: r271451 - in head/sys/amd64: include vmm vmm/intel

2014-09-12 Thread Neel Natu
Author: neel Date: Fri Sep 12 06:15:20 2014 New Revision: 271451 URL: http://svnweb.freebsd.org/changeset/base/271451 Log: Optimize the common case of injecting an interrupt into a vcpu after a HLT by explicitly moving it out of the interrupt shadow. The hypervisor is done executing the HLT

svn commit: r271439 - head/usr.sbin/bhyve

2014-09-11 Thread Neel Natu
Author: neel Date: Thu Sep 11 21:15:20 2014 New Revision: 271439 URL: http://svnweb.freebsd.org/changeset/base/271439 Log: Initialize 'bc_rdonly' to the right value. Note that independent of this change a readonly disk file would still be opened O_RDONLY and protected from writes by the

svn commit: r270855 - head/usr.sbin/bhyve

2014-08-30 Thread Neel Natu
Author: neel Date: Sat Aug 30 18:35:16 2014 New Revision: 270855 URL: http://svnweb.freebsd.org/changeset/base/270855 Log: 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

svn commit: r270857 - head/sys/amd64/vmm

2014-08-30 Thread Neel Natu
Author: neel Date: Sat Aug 30 19:59:42 2014 New Revision: 270857 URL: http://svnweb.freebsd.org/changeset/base/270857 Log: 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

svn commit: r270434 - head/sys/amd64/vmm/io

2014-08-23 Thread Neel Natu
Author: neel Date: Sat Aug 23 21:16:26 2014 New Revision: 270434 URL: http://svnweb.freebsd.org/changeset/base/270434 Log: Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot find any unmasked pin with an interrupt asserted. Reviewed by: tychon CR:

svn commit: r270436 - head/sys/amd64/vmm

2014-08-23 Thread Neel Natu
Author: neel Date: Sat Aug 23 22:44:31 2014 New Revision: 270436 URL: http://svnweb.freebsd.org/changeset/base/270436 Log: Fix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that the vcpu had no caches at all. This causes problems when executing applications in the guest

svn commit: r270437 - head/sys/amd64/vmm

2014-08-23 Thread Neel Natu
Author: neel Date: Sun Aug 24 01:10:06 2014 New Revision: 270437 URL: http://svnweb.freebsd.org/changeset/base/270437 Log: Add hw.vmm.topology.threads_per_core and hw.vmm.topology.cores_per_package tunables to modify the default cpu topology advertised by bhyve. Also add a tunable

Re: svn commit: r270249 - head/sys/cam/ata

2014-08-22 Thread Neel Natu
Hi Warner, On Fri, Aug 22, 2014 at 6:13 AM, Warner Losh i...@bsdimp.com wrote: On Aug 21, 2014, at 11:58 PM, Neel Natu neeln...@gmail.com wrote: Hi Warner, On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh i...@bsdimp.com wrote: On Aug 21, 2014, at 10:31 PM, Neel Natu neeln...@gmail.com wrote

svn commit: r270289 - in head: sbin/mksnap_ffs sbin/shutdown usr.sbin/ppp

2014-08-21 Thread Neel Natu
Author: neel Date: Thu Aug 21 19:04:15 2014 New Revision: 270289 URL: http://svnweb.freebsd.org/changeset/base/270289 Log: Change file permissions for some setuid executables so they are o+r. The executable itself doesn't contain any privileged information. An example of where this is

Re: svn commit: r270249 - head/sys/cam/ata

2014-08-21 Thread Neel Natu
Hi Warner, On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh i...@freebsd.org wrote: Author: imp Date: Wed Aug 20 22:58:12 2014 New Revision: 270249 URL: http://svnweb.freebsd.org/changeset/base/270249 Log: Turns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data that's only

Re: svn commit: r270249 - head/sys/cam/ata

2014-08-21 Thread Neel Natu
Hi Warner, On Thu, Aug 21, 2014 at 10:34 PM, Warner Losh i...@bsdimp.com wrote: On Aug 21, 2014, at 10:31 PM, Neel Natu neeln...@gmail.com wrote: Hi Warner, On Wed, Aug 20, 2014 at 3:58 PM, Warner Losh i...@freebsd.org wrote: Author: imp Date: Wed Aug 20 22:58:12 2014 New Revision

  1   2   3   4   >