/[base]/releng/12.2/usr.sbin/bhyve/pci_virtio_block.c
ViewVC logotype

Log of /releng/12.2/usr.sbin/bhyve/pci_virtio_block.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 365702 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 13 23:51:07 2020 UTC (4 years, 1 month ago) by allanjude
File length: 15184 byte(s)
Diff to previous 365618
MFC r360229, r363255
MFS r365614

r360229:
Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

This will advertise support for TRIM to the guest virtio-blk driver and
perform the DIOCGDELETE ioctl on the backing storage if it supports it.

Thanks to Jason King and others at Joyent and illumos for expanding on
my original patch, adding improvements including better error handling
and making sure to following the virtio spec.

r363255:
Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver

If the hypervisor advertises support for the DISCARD command then the
guest can perform TRIM commands, freeing space on the backing store.

If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE

Tested with FreeBSD guests on bhyve and KVM

Approved by:	re (gjb)
Relnotes:	yes
Sponsored by:	Klara Inc.


Revision 365618 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 10 23:56:59 2020 UTC (4 years, 1 month ago) by gjb
File length: 11774 byte(s)
Diff to previous 358184
- Copy stable/12@r365545 to releng/12.2 as part of the 12.2-RELEASE
  cycle.
- Update from PRERELEASE to BETA1.
- Set the default pkg(7) repository to 'quarterly'.
- Bump __FreeBSD_version.
- Prune svn:mergeinfo from the new branch.

Approved by:	re (implicit)

Sponsored by:	Rubicon Communications, LLC (netgate.com)


Revision 358184 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 20 21:48:36 2020 UTC (4 years, 8 months ago) by vmaffione
Original Path: stable/12/usr.sbin/bhyve/pci_virtio_block.c
File length: 11774 byte(s)
Diff to previous 348374
MFC r356523

bhyve: add wrapper for debug printf statements

Add printf() wrapper to use CR/CRLF terminators depending on whether
stdio is mapped to a tty open in raw mode.
Try to use the wrapper everywhere.
For now we leave the custom DPRINTF/WPRINTF defined by device
models, but we may remove them in the future.

Reviewed by:    grehan, jhb
Differential Revision:  https://reviews.freebsd.org/D22657


Revision 348374 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 29 23:05:26 2019 UTC (5 years, 5 months ago) by jhb
Original Path: stable/12/usr.sbin/bhyve/pci_virtio_block.c
File length: 11762 byte(s)
Diff to previous 342184
MFC 347033:
Increase the VirtIO segment count to support modern Windows guests.

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.

This brings back r282922 but with a couple of changes:
- It raises the block interface segment limit to 128 instead of 67.
- Linux's virtio driver assumes that the segment limit is no
  larger than the ring size.  To avoid breaking Linux guests,
  raise the VirtIO ring size to 128, and cap the VirtIO segment
  limit at ring size - 2 (effectively 126).


Revision 342184 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 18 03:00:12 2018 UTC (5 years, 10 months ago) by araujo
Original Path: stable/12/usr.sbin/bhyve/pci_virtio_block.c
File length: 11292 byte(s)
Diff to previous 339434
MFC r340707:

Define AHCI_PORT_IDENT and increase by 1 the VTBLK_BLK_ID_BYTES
to avoid buffer accessed out of bounds, also switch to snprintf(3).

PR:		200859
Submitted by:	Caglar <caglar@10ur.org>
Obtained from:	https://github.com/mist64/xhyve/pull/24


Revision 339434 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 19 00:09:24 2018 UTC (6 years ago) by gjb
Original Path: stable/12/usr.sbin/bhyve/pci_virtio_block.c
File length: 11262 byte(s)
Diff to previous 336162
Copy head@r339432 to stable/12 as part of the 12.0-RELEASE cycle.

Additional post-branch commits will follow.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation


Revision 336162 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 10 05:36:32 2018 UTC (6 years, 3 months ago) by araujo
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11262 byte(s)
Diff to previous 334951
Fix style(9) space and tab.


Revision 334951 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 11 15:18:31 2018 UTC (6 years, 4 months ago) by araujo
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11274 byte(s)
Diff to previous 326276
More style(9) fixes, space vs tab.


Revision 326276 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 27 15:37:16 2017 UTC (6 years, 11 months ago) by pfg
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11293 byte(s)
Diff to previous 299675
various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


Revision 299675 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 13 14:38:04 2016 UTC (8 years, 5 months ago) by pfg
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11241 byte(s)
Diff to previous 282865
bhyve: replace uninitialized variable "offset".

Use io->io_req.br_offset instead.

Suggested by:	grehan
CID:		1288937


Revision 282865 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 13 17:38:07 2015 UTC (9 years, 5 months ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11239 byte(s)
Diff to previous 281700
Set the subvendor field in config space to the vendor ID.
This is required by the Windows virtio drivers to correctly
match a device.

Submitted by:	Leon Dang (ldang@nahannisys.com)
MFC after:	2 weeks


Revision 281700 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 18 20:10:19 2015 UTC (9 years, 6 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11184 byte(s)
Diff to previous 280725
Workaround bhyve virtual disks operation on top of GEOM providers.

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


Revision 280725 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 27 01:58:44 2015 UTC (9 years, 7 months ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11149 byte(s)
Diff to previous 280154
Move legacy interrupt allocation for virtio devices to common code.
There are a number of assumptions about legacy interrupts always
being available in virtio so don't allow back-ends to make the
decision to support them.

This fixes the issue seen with virtio-rnd on OpenBSD. MSI-x vectors
were not being used, and the virtio-rnd backend wasn't allocating a
legacy interrupt resulting in a bhyve assert and guest exit.

Reported by:	Julian Hsiao, madoka at nyanisore dot net
Reviewed by:	neel
MFC after:	1 week


Revision 280154 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 16 20:13:25 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11174 byte(s)
Diff to previous 280133
Report that we may have write cache, and that we do support FLUSH.

FreeBSD guest driver does not use that legacy flag, but Linux seems does.

MFC after:	2 weeks


Revision 280133 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 16 09:15:59 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11082 byte(s)
Diff to previous 280044
Increase S/G list size of 32 to 33 entries.

32 entries are not enough for the worst case of misaligned 128KB request,
that made FreeBSD to chunk large quests in odd pieces.

MFC after:	2 weeks


Revision 280044 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 15 17:45:16 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11098 byte(s)
Diff to previous 280037
According to Linux and QEMU, s/n equal to buffer is not zero-terminated.

This makes same s/n reported for both virtio and AHCI drivers.

MFC after:	2 weeks


Revision 280037 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 15 14:57:11 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 11000 byte(s)
Diff to previous 280026
Rewrite virtio block device driver to work asynchronously and use the block
I/O interface.

Asynchronous operation, based on r280026 change, allows to not block virtual
CPU during I/O processing, that on slow/busy storage can take seconds.
Use of recently improved block I/O interface allows to process multiple
requests same time, that improves random I/O performance on wide storages.

Benchmarks of virtual disk, backed by ZVOL on RAID10 pool of 4 HDDs, show
~3.5 times random read performance improvements, while no degradation on
linear I/O.  Guest CPU usage during test dropped from 100% to almost zero.

MFC after:	2 weeks


Revision 280026 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 15 11:37:07 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10651 byte(s)
Diff to previous 279675
Modify virtqueue helpers added in r253440 to allow queuing.

Original virtqueue design allows queued and out-of-order processing, but
helpers added in r253440 suppose only direct blocking in-order one.
It could be fine for network, etc., but it is a huge limitation for storage
devices.


Revision 279675 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 5 20:29:18 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10656 byte(s)
Diff to previous 279673
Add variable initialization missed by me and clang.

Reported by:	grehan
MFC after:	2 weeks


Revision 279673 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 5 20:24:34 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10646 byte(s)
Diff to previous 279658
Fix error translation broken in r279658.

Reported by:	grehan
MFC after:	2 weeks


Revision 279658 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 5 15:29:18 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10654 byte(s)
Diff to previous 279657
Implement cache flush for ahci-hd and for virtio-blk over device.

MFC after:	2 weeks


Revision 279657 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 5 13:52:30 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10458 byte(s)
Diff to previous 279652
Add check for absent stripe size to r279652.

MFC after:	2 weeks


Revision 279652 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 5 10:40:45 2015 UTC (9 years, 7 months ago) by mav
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 10447 byte(s)
Diff to previous 272710
Add support for TOPOLOGY feature of virtio block device.

Passing through physical block size/offset from underlying storage allows
guest to manage proper data and I/O alignment to improve performance.

MFC after:	2 weeks


Revision 272710 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 7 17:08:53 2014 UTC (10 years ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9759 byte(s)
Diff to previous 271299
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 fsbn 0"

Reported by:	rodrigc
Reviewed by:	grehan


Revision 271299 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 9 04:11:54 2014 UTC (10 years, 1 month ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9627 byte(s)
Diff to previous 266935
Add a callback to be notified about negotiated features.

Submitted by:	luigi
Obtained from:	Vincenzo Maffione, Universita` di Pisa
MFC after:	3 days


Revision 266935 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 1 02:47:09 2014 UTC (10 years, 4 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9586 byte(s)
Diff to previous 264770
Use MIN(a,b) from <sys/param.h> instead of rolling our own version.

Pointed out by:	grehan


Revision 264770 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 22 18:55:21 2014 UTC (10 years, 6 months ago) by delphij
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9648 byte(s)
Diff to previous 261268
Use calloc() in favor of malloc + memset.

Reviewed by:	neel


Revision 261268 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 29 14:56:48 2014 UTC (10 years, 8 months ago) by jhb
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9693 byte(s)
Diff to previous 257005
Enhance the support for PCI legacy INTx interrupts and enable them in
the virtio backends.
- Add a new ioctl to export the count of pins on the I/O APIC from vmm
  to the hypervisor.
- Use pins on the I/O APIC >= 16 for PCI interrupts leaving 0-15 for
  ISA interrupts.
- Populate the MP Table with I/O interrupt entries for any PCI INTx
  interrupts.
- Create a _PRT table under the PCI root bridge in ACPI to route any
  PCI INTx interrupts appropriately.
- Track which INTx interrupts are in use per-slot so that functions
  that share a slot attempt to distribute their INTx interrupts across
  the four available pins.
- Implicitly mask INTx interrupts if either MSI or MSI-X is enabled
  and when the INTx DIS bit is set in a function's PCI command register.
  Either assert or deassert the associated I/O APIC pin when the
  state of one of those conditions changes.
- Add INTx support to the virtio backends.
- Always advertise the MSI capability in the virtio backends.

Submitted by:	neel (7)
Reviewed by:	neel
MFC after:	2 weeks


Revision 257005 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 23 18:54:58 2013 UTC (11 years ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9563 byte(s)
Diff to previous 256711
Export the block size capability to guests.
- Use #defines for capability bits
- Export the VTBLK_F_BLK_SIZE capability
- Fix bug in calculating capacity: it is in
  512-byte units, not the underlying sector size

This allows virtio-blk to have backing devices
with non 512-byte sector sizes e.g. /dev/cd0, and
4K-block harddrives.

Reviewed by:	neel
MFC after:	3 days


Revision 256711 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 22:01:17 2013 UTC (11 years ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9370 byte(s)
Diff to previous 256389
Changes required for OpenBSD/amd64:

- Allow a hostbridge to be created with AMD as a vendor.
  This passes the OpenBSD check to allow the use of MSI
  on a PCI bus.
- Enable the i/o interrupt section of the mptable, and
  populate it with unity ISA mappings. This allows the
  'legacy' IRQ mappings of the PCI serial port to be
  set up. Delete unused print routine that was obscuring code.
- Use the '-W' option to enable virtio single-vector MSI
  rather than an environment variable. Update the virtio
  net/block drivers to query this flag when setting up
  interrupts.: bhyverun.c
- Fix the arithmetic used to derive the century byte in
  RTC CMOS, as well as encoding it in BCD.

Reviewed by:	neel
MFC after:	3 days


Revision 256389 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 12 19:31:19 2013 UTC (11 years ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 9513 byte(s)
Diff to previous 255890
Implement the virtio block 'get-ident' operation. This eliminates the
annoying verbose boot error of the form

   g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

The ident returned by bhyve is a text string 'BHYVE-XXXX-XXXX', where
the X's are the first bytes of the md5 hash of the backing filename.

Reviewed by:	neel
Approved by:	re (gjb)


Revision 255890 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 26 16:25:06 2013 UTC (11 years, 1 month ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 8547 byte(s)
Diff to previous 254948
Fix incorrect assertion on the minimum side. ZFS would
trigger this.

Reported by:	Chris Torek, Allan Jude
Approved by:	re@ (blanket)


Revision 254948 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 27 03:49:47 2013 UTC (11 years, 2 months ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 8548 byte(s)
Diff to previous 253440
Fix off-by-1 error in assert.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)


Revision 253440 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 17 23:37:33 2013 UTC (11 years, 3 months ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 8547 byte(s)
Diff to previous 249813
Major rework of the virtio code. Split out common parts, and modify
the net/block devices accordingly.

Submitted by:	Chris Torek   torek at torek dot net
Reviewed by:	grehan


Revision 249813 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 23 16:40:39 2013 UTC (11 years, 6 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 15051 byte(s)
Diff to previous 248477
Teach the virtio block device to deal with direct as well as indirect
descriptors. Prior to this change the device would only work with guests
that chose to use indirect descriptors.

Modify the device reset callback to actually reset the device state.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)


Revision 248477 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 18 22:38:30 2013 UTC (11 years, 7 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 15309 byte(s)
Diff to previous 247871
Simplify the assignment of memory to virtual machines by requiring a single
command line option "-m <memsize in MB>" to specify the memory size.

Prior to this change the user needed to explicitly specify the amount of
memory allocated below 4G (-m <lowmem>) and the amount above 4G (-M <highmem>).

The "-M" option is no longer supported by 'bhyveload' and 'bhyve'.

The start of the PCI hole is fixed at 3GB and cannot be directly changed
using command line options. However it is still possible to change this in
special circumstances via the 'vm_set_lowmem_limit()' API provided by
libvmmapi.

Submitted by:	Dinakar Medavaram (initial version)
Reviewed by:	grehan
Obtained from:	NetApp


Revision 247871 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 6 07:28:20 2013 UTC (11 years, 7 months ago) by grehan
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 15184 byte(s)
Diff to previous 247523
Simplify virtio ring num-available calculation.

Submitted by:	Chris Torek, torek at torek dot net


Revision 247523 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 1 02:26:28 2013 UTC (11 years, 7 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 15039 byte(s)
Diff to previous 247342
Specify the length of the mapping requested from 'paddr_guest2host()'.

This seems prudent to do in its own right but it also opens up the possibility
of not having to mmap the entire guest address space in the 'bhyve' process
context.

Discussed with:	grehan
Obtained from:	NetApp


Revision 247342 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 26 20:02:17 2013 UTC (11 years, 8 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 15063 byte(s)
Diff to previous 246214
Ignore the BARRIER flag in the virtio block header.

This capability is not advertised by the host so ignore it even if the guest
insists on setting the flag.

Reviewed by:	grehan
Obtained from:	NetApp


Revision 246214 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 1 16:58:59 2013 UTC (11 years, 8 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 14842 byte(s)
Diff to previous 245678
Add support for MSI-X interrupts in the virtio block device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "yes". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp


Revision 245678 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 20 03:42:49 2013 UTC (11 years, 9 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 12842 byte(s)
Diff to previous 245652
Add svn properties to the recently merged bhyve source files.

The pre-commit hook will not allow any commits without the svn:keywords
property in head.


Revision 245652 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 19 04:18:52 2013 UTC (11 years, 9 months ago) by neel
Original Path: head/usr.sbin/bhyve/pci_virtio_block.c
File length: 12842 byte(s)
Diff to previous 244167
Merge projects/bhyve to head.

'bhyve' was developed by grehan@ and myself at NetApp (thanks!).

Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
support and encouragement.

Obtained from:	NetApp


Revision 244167 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 13 01:58:11 2012 UTC (11 years, 10 months ago) by grehan
Original Path: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
File length: 12842 byte(s)
Diff to previous 244013
Rename fbsdrun.* -> bhyverun.*

bhyve is intended to be a generic hypervisor, and not FreeBSD-specific.

(renaming internal routines will come later)

Reviewed by:	neel
Obtained from:	NetApp


Revision 244013 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 8 02:37:18 2012 UTC (11 years, 10 months ago) by grehan
Original Path: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
File length: 12841 byte(s)
Diff to previous 241744
Determine the correct length and sector size for raw devices.

Obtained from:	NetApp
Tested by:	Michael Dexter with iscsi LUNs


Revision 241744 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 19 18:11:17 2012 UTC (12 years ago) by grehan
Original Path: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
File length: 12477 byte(s)
Diff to previous 222830
Rework how guest MMIO regions are dealt with.

- New memory region interface. An RB tree holds the regions,
with a last-found per-vCPU cache to deal with the common case
of repeated guest accesses to MMIO registers in the same page.

- Support memory-mapped BARs in PCI emulation.

 mem.c/h - memory region interface

 instruction_emul.c/h - remove old region interface.
 Use gpa from EPT exit to avoid a tablewalk to
 determine operand address. Determine operand size
 and use when calling through to region handler.

 fbsdrun.c - call into region interface on paging
  exit. Distinguish between instruction emul error
  and region not found

 pci_emul.c/h - implement new BAR callback api.
 Split BAR alloc routine into routines that
 require/don't require the BAR phys address.

 ioapic.c
 pci_passthru.c
 pci_virtio_block.c
 pci_virtio_net.c
 pci_uart.c  - update to new BAR callback i/f

Reviewed by:	neel
Obtained from:	NetApp


Revision 222830 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 7 18:35:45 2011 UTC (13 years, 4 months ago) by grehan
Original Path: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
File length: 12346 byte(s)
Diff to previous 221942
Allow access to the device's config area with any size i/o access at any
offset. This is now spec-compliant.


Revision 221942 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 15 04:03:11 2011 UTC (13 years, 5 months ago) by jhb
Original Path: projects/bhyve/usr.sbin/bhyve/pci_virtio_block.c
File length: 12161 byte(s)
Diff to previous 221828
First cut to port bhyve, vmmctl, and libvmmapi to HEAD.


Revision 221828 - (view) (download) (annotate) - [select for diffs]
Added Fri May 13 04:54:01 2011 UTC (13 years, 5 months ago) by grehan
Original Path: projects/bhyve_ref/usr.sbin/bhyve/pci_virtio_block.c
File length: 12161 byte(s)
Import of bhyve hypervisor and utilities, part 1.
  vmm.ko - kernel module for VT-x, VT-d and hypervisor control
  bhyve  - user-space sequencer and i/o emulation
  vmmctl - dump of hypervisor register state
  libvmm - front-end to vmm.ko chardev interface

bhyve was designed and implemented by Neel Natu.

Thanks to the following folk from NetApp who helped to make this available:
	Joe CaraDonna
	Peter Snyder
	Jeff Heller
	Sandeep Mann
	Steve Miller
	Brian Pawlowski


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.27