16 Commits

Author SHA1 Message Date
marius
9dc1c50248 MFC: r264177
Make some unwise casts. On i386 these casts wind up being safe. Rather
than disturb the API, go with these casts to shut gcc up.
2014-05-28 09:06:36 +00:00
ian
ae2bbb5100 MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,
r257368, r257416

  Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe
  methods.
2014-05-14 01:35:43 +00:00
delphij
02202f1ec4 MFC r259180 (pjd) + r263123:
Hide a few messages under bootverbose.
2014-03-28 01:13:08 +00:00
mav
b589beb47e MFC r262789, r262847:
Remove custom bus scanner code and fix use of CAM's default scanner.

This fixes kernel panic during boot, caused by incompatibility of recent
CAM locking changes and this bus scanner code.

Submitted by:	Microsoft
2014-03-12 07:27:05 +00:00
delphij
03c171750e MFC r257369:
Don't reference pointer before testing whether it is
NULL.

Submitted by:	Clement Lecigne <clecigne google com>
Reviewed by:	grehan
Approved by:	re (kib)
2013-11-01 17:39:59 +00:00
gibbs
ecdcee0674 MFC r256425:
Centralize the detection logic for the Hyper-V hypervisor.

Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs, grehan
Approved by:	re (gjb)

sys/sys/systm.h:
 * Add a new VM_GUEST type, VM_GUEST_HV (HyperV guest).

sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c:
sys/dev/hyperv/vmbus/hv_hv.c:
sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c:
 * Set vm_guest to VM_GUEST_HV and use that on other HyperV related
   devices instead of cloning the cpuid hypervisor check.
 * Cleanup the vmbus_identify function.
------------------------------------------------------------------------
2013-10-18 23:19:27 +00:00
grehan
89a272e3b9 MFC r256362
Fix a lock-order reversal in the net driver by dropping the lock
  and holding a reference prior to calling further into the hyperv
  stack.

  Added missing FreeBSD idents.

Approved by:	re@ (gjb)
2013-10-12 00:42:41 +00:00
grehan
f6c283672e MFC r256350
Fix vmbus channel memory leak where incorrect length parameter was
  being passed to contigfree().

Approved by:	re@ (glebius)
2013-10-11 21:47:17 +00:00
grehan
e63a0d23bf MFC r256304
Allow the legacy CDROM device to be accessed in a FreeBSD guest, while
  still using enlightened drivers for other block devices.

Approved by:    re@ (gjb)
2013-10-11 18:27:12 +00:00
dim
ee09e09e18 In sys/dev/hyperv, fix a number of gcc warnings about usage of anonymous
union members in strict C99, by giving them names.  While here, add some
FreeBSD keywords where they were missing.

Approved by:	re (gjb)
Reviewed by:	grehan
2013-10-10 16:25:53 +00:00
gibbs
716c2031c7 Correct panic caused by attaching both Xen PV and HyperV virtualization
aware drivers on Xen hypervisors that advertise support for some
HyperV features.

x86/xen/hvm.c:
	When running in HVM mode on a Xen hypervisor, set vm_guest
	to VM_GUEST_XEN so other virtualization aware components in
	the FreeBSD kernel can detect this mode is active.

dev/hyperv/vmbus/hv_hv.c:
	Use vm_guest to ignore Xen's HyperV emulation when Xen is
	detected and Xen PV drivers are active.

Reported by:	Shanker Balan
Submitted by:	Roger Pau Monné
Sponsored by:	Citrix Systems R&D
Reviewed by:	gibbs
Approved by:	re (Xen blanket)
2013-10-05 19:51:09 +00:00
grehan
0804d47dcd Reorder the hypervisor presence test to avoid claiming ATA disks
on non hyperv systems.

Reviewed by:	neel, abgupta at microsoft dot com
Approved by:	re@ (hrs)
2013-09-19 02:34:52 +00:00
grehan
8294851167 Revert the kvp code - there's still some work that
needs to be done for that.

Discussed with:	Microsoft hyper-v devs
2013-09-09 19:27:44 +00:00
grehan
182a56e295 Latest update from Microsoft.
Obtained from:	Microsoft Hyper-v dev team
2013-09-09 08:07:46 +00:00
grehan
fd121a9c7b IFC @ r253862
- change the SI_SUB_RUN_SCHEDULER sysinits in hv_utilc and
hv_netvsc_drv_freebsd.c to SI_SUB_KTHREAD_IDLE, since the
former is no longer in FreeBSD.
  The use of these SYSINITs can probably be removed.
2013-08-01 22:09:57 +00:00
grehan
c8195f5331 Microsoft have changed their policy on how the hyper-v code will
be pulled into FreeBSD. From now, FreeBSD will be considered the
upstream repo.

First step: move the drivers away from the contrib area and into
the base system.

A follow-on commit will include the drivers in the amd64 GENERIC kernel.
2013-07-17 06:30:23 +00:00