summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup unused-but-set-variable spotted by gcc-4.9.araujo2016-01-262-7/+2
| | | | | | Reviewed by: neel Approved by: rodrigc (mentor) Differential Revision: https://reviews.freebsd.org/D5042
* Fix bhyve(1) operation on vmnet devices, broken in r293459.glebius2016-01-101-1/+2
|
* Add netmap support for bhyvegnn2016-01-091-32/+273
| | | | | | Submitted by: btw MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4826
* Remove unused variable after r292981 to unbreak the build.bz2015-12-311-1/+1
|
* Clean up unused-but-set-variable spotted by gcc-4.9.araujo2015-12-311-5/+2
| | | | | | Reviewed by: grehan Approved by: rodrigc (mentor) Differential Revision: https://reviews.freebsd.org/D4734
* Clean up unused-but-set-variable spotted by gcc-4.9.araujo2015-12-311-2/+1
| | | | | | Reviewed by: grehan Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D4735
* Exit with a user-friendly message instead of tripping an assertngie2015-10-221-1/+2
| | | | | | | | | if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) MFC after: 1 week PR: 203884 Reviewed by: grehan Submitted by: William Orr <will@worrbase.com>
* Fix a ton of speelling errorseadler2015-10-211-1/+1
| | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337
* Clean up some harmless unimplemented-command warning messages.grehan2015-10-051-1/+3
| | | | | | | | | | - Don't advertize trusted-computing capability in the Identify page. This prevents Windows from issuing a TRUSTED_RECEIVE_DMA command. - Windows will send down SMART and SECURITY_FREEZE_LOCK even though smart and security capabilities were not advertized. Send back a silent abort. Reviewed by: mav
* Fix post-test typo that snuck in.grehan2015-10-021-1/+1
|
* Simple sysctl-like firmware query interface. Similar in operationgrehan2015-10-024-0/+608
| | | | | | | | | | | | | | | | to the qemu one, and uses the same i/o ports but with different messaging. Requires the 'bootrom' option to be enabled. This is used by UEFI (and potentially other BIOSs/firmware) to request information from bhyve. Currently, only the number of vCPUs is made available, with more to follow. A very large thankyou to Ben Perrault who helped out testing an earlier version of this, and bhyve/Windows in general. Reviewed by: tychon Discussed with: neel Sponsored by: Nahanni Systems
* - Increase the max number of indirect descriptors to matchgrehan2015-10-021-2/+2
| | | | | | | | | the largest that the Windows virtio driver can send down - Always advertize indirect descriptors. The Illumos virtio driver won't attach unless this capability is seen. Reviewed by: neel
* Use strlcpy() instead of strncpy() because subsequent mkstemps expectsdelphij2015-09-171-2/+2
| | | | | | | | the string be nul-terminated. Reviewed by: neel MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3685
* Add simple (no-op) emulations for the CHECK_POWER_MODE,grehan2015-08-171-0/+6
| | | | | | READ_VERIFY and READ_VERIFY_EXT commands. Reviewed by: mav
* Another small typo.mav2015-08-111-1/+1
| | | | MFC after: 3 days
* Fix minor typo.mav2015-08-111-1/+1
| | | | MFC after: 3 days
* Manpage cleanup.brueffer2015-08-071-12/+23
| | | | | | | | | - new sentence -> new line - fix manpage references - fix macro usage - fix a typo MFC after: 1 week
* Always assert DCD and DSR in bhyve's uart emulation.neel2015-07-061-17/+34
| | | | | | | | | | | | | | | | | The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows: ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure The initial terminal type passed to getty(8) is "3wire" which sets the CLOCAL flag. However reset(1) clears this flag and any programs that try to open the terminal will hang waiting for DCD to be asserted. Fix this by always asserting DCD and DSR in the emulated uart. The following discussion on virtualization@ has more details: https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html Reported by: jmg Discussed with: grehan
* Updated dependssjg2015-07-031-0/+22
|
* add SO_REUSEADDR when starting debug port, lets you still bind whenjmg2015-06-201-0/+9
| | | | | | | a TIME_WAIT socket is still around... Reviewed by: grehan Review: https://reviews.freebsd.org/D2875
* Restructure memory allocation in bhyve to support "devmem".neel2015-06-188-24/+283
| | | | | | | | | | | | | | | | | | | | | devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer where doing a trap-and-emulate for every access is impractical. devmem is a hybrid of system memory (sysmem) and emulated device models. devmem is mapped in the guest address space via nested page tables similar to sysmem. However the address range where devmem is mapped may be changed by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is usually mapped RO or RW as compared to RWX mappings for sysmem. Each devmem segment is named (e.g. "bootrom") and this name is used to create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom). The device node supports mmap(2) and this decouples the host mapping of devmem from its mapping in the guest address space (which can change). Reviewed by: tychon Discussed with: grehan Differential Revision: https://reviews.freebsd.org/D2762 MFC after: 4 weeks
* Fix non-deterministic delays when accessing a vcpu that was in "running" orneel2015-05-281-1/+13
| | | | | | | "sleeping" state. This is done by forcing the vcpu to transition to "idle" by returning to userspace with an exit code of VM_EXITCODE_REQIDLE. MFC after: 2 weeks
* The 'hostbridge' device exists to allow guests to infer msi/msixtychon2015-05-211-1/+1
| | | | | | | | | | capablity by advertising pcie capability. Since the 'hostbridge' device isn't a true pci-to-pci bridge, and doesn't actaully use the bridge configuration space layout, change the header-type from type 1 to type 0 to avoid confusion. Reviewed by: neel
* Temporarily revert r282922 which bumped the max descriptors.grehan2015-05-211-1/+1
| | | | | | | | | | | | | | | While there is no issued with the number of descriptors in a virtio indirect descriptor, it's a guest's choice as to whether indirect descriptors are used. For the case where they aren't, the virtio block ring size is still 64 which is less than the now reported max_segs of 67. This results in an assertion in recent Linux guests even though it was benign since they were using indirect descs. The intertwined relationship between virtio ring size, max seg size and blockif queue size will be addressed in an upcoming commit, at which point the max descriptors will again be bumped up to 67.
* Bump the size of the blockif scatter-gather list to 67.grehan2015-05-141-1/+1
| | | | | | | | | | | | The Windows virtio driver ignores the advertized seg_max field and assumes the host can accept up to 67 segments in indirect descriptors, triggering an assert in the bhyve process. No objection from: mav Reviewed by: neel Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
* Set the subvendor field in config space to the vendor ID.grehan2015-05-133-0/+3
| | | | | | | | This is required by the Windows virtio drivers to correctly match a device. Submitted by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
* Allow configuration of the sector size advertised to the guest.neel2015-05-122-26/+69
| | | | | | | | | | | | | | | The default behavior is to infer the logical and physical sector sizes from the block device backend. However older versions of Windows only work with specific logical/physical combinations: - Vista and Windows 7: 512/512 - Windows 7 SP1: 512/512 or 512/4096 For this reason allow the sector size to be specified using the following block device option: sectorsize=logical[/physical] Reported by: Leon Dang (ldang@nahannisys.com) Reviewed by: grehan MFC after: 2 weeks
* Handling indirect descriptors is a capability of the host andgrehan2015-05-111-1/+1
| | | | | | | | | | | | | not one that needs to be negotiated. Use the host capabilities field and not the negotiated field when verifying that indirect descriptors are supported. Found with the Redhat Windows viostor driver, which clears the indirect capability in the negotiated caps and then starts using them. Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
* Allow byte reads of AHCI registers.neel2015-05-071-4/+9
| | | | | | | | | | This is needed to support Windows guests that use byte reads to access certain AHCI registers (e.g. PxTFD.Status and PxTFD.Error). Reviewed by: grehan, mav Reported by: Leon Dang (ldang@nahannisys.com) Differential Revision: https://reviews.freebsd.org/D2469 MFC after: 2 weeks
* Add memory barrier to r281764.mav2015-05-061-14/+11
| | | | | | | While race at this point may cause only a single packet delay and so was not really reproduced, it is better to not have it at all. MFC after: 1 week
* Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().neel2015-05-062-78/+81
| | | | | | | | | | | | | | | | | | Prior to this change both functions returned 0 for success, -1 for failure and +1 to indicate that an exception was injected into the guest. The numerical value of ERESTART also happens to be -1 so when these functions returned -1 it had to be translated to a positive errno value to prevent the VM_RUN ioctl from being inadvertently restarted. This made it easy to introduce bugs when writing emulation code. Fix this by adding an 'int *guest_fault' parameter and setting it to '1' if an exception was delivered to the guest. The return value is 0 or EFAULT so no additional translation is needed. Reviewed by: tychon MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D2428
* Reimplement queue freeze on error, added in r282429:mav2015-05-061-3/+9
| | | | | | | It is not required to use CLO to recover from task file error, it should be enough to do only stop/start, that does not clear the PxTFD.STS.ERR. MFC after: 13 days
* Implement in-order execution of non-NCQ commands.mav2015-05-041-6/+15
| | | | | | | | Using status updates in r282364, block queue on BSY, DRQ or ERR bits set. This can be a performance penalization for non-NCQ commands, but it is required for proper error recovery and standard compliance. MFC after: 2 weeks
* Implement basic PxTFD.STS.BSY reporting.mav2015-05-031-13/+38
| | | | MFC after: 2 weeks
* Initialize PxCMD on reset and make its read-only bits such.mav2015-05-021-2/+16
| | | | MFC after: 2 weeks
* Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop().mav2015-05-021-1/+2
| | | | MFC after: 1 week
* Advertise an additional memory BAR in the "dummy" device emulation.neel2015-05-021-15/+23
| | | | | | | This is useful for testing the MOVS emulation when both the source and destination addresses are in the MMIO space. MFC after: 1 week
* Implement the century byte in the RTC. Some guests require this field to beneel2015-04-281-1/+1
| | | | | | | properly set. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
* Don't allow guest to modify readonly bits in the PCI config 'status' register.neel2015-04-241-38/+49
| | | | | Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks
* Reassign copyright statements on several files from Advancedjhb2015-04-235-5/+5
| | | | | | | Computing Technologies LLC to Hudson River Trading LLC. Approved by: Hudson River Trading LLC (who owns ACT LLC) MFC after: 1 week
* Don't set bits that should be zero for SATA devices.mav2015-04-201-1/+0
| | | | | | Old value made Linux think that it is PATA device with SATA bridge. MFC after: 2 weeks
* Report link as up if tap device is not specified (black hole).mav2015-04-201-1/+1
| | | | MFC after: 2 weeks
* Report link as up only if we managed to open tap device.mav2015-04-201-2/+2
| | | | | | It would be cool to report tap device status, but it has no such API. MFC after: 2 weeks
* Disable RX/TX queues notifications when not needed.mav2015-04-201-0/+4
| | | | | | | This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* Workaround bhyve virtual disks operation on top of GEOM providers.mav2015-04-184-18/+100
| | | | | | | | | GEOM does not support scatter/gather lists in its I/Os. Such requests are cut in pieces by physio(), that may be problematic, if those pieces are not multiple of provider's sector size. If such case is detected, move the data through temporary sequential buffer. MFC after: 2 weeks
* Make virtual AHCI more careful with I/O lengths.mav2015-04-171-92/+84
| | | | MFC after: 2 weeks
* If the number of guest vcpus is less than '1' then flag it as an error.neel2015-04-161-0/+5
| | | | MFC after: 1 week
* Prior to aborting due to an ioport error, it is always interesting totychon2015-04-151-2/+4
| | | | | | see what the guest's %rip is. Reviewed by: grehan
* Fix overlinking in bhyve:bapt2015-04-091-1/+1
| | | | libvmmapi is actually needed to be linked to libutil, not bhyve nor bhyveload
* Prior to aborting due to an instruction emulation error, it is alwaystychon2015-04-011-7/+12
| | | | | | interesting to see what the guest's %rip and instruction bytes are. Reviewed by: grehan
OpenPOWER on IntegriCloud