OpenBSD CVS

CVS log for src/usr.sbin/vmd/pci.c


[BACK] Up to [local] / src / usr.sbin / vmd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Mon Feb 6 20:33:34 2023 UTC (16 months ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.30: +19 -1 lines
Diff to previous 1.30 (colored)

vmd(8): scan pci bus to determine bootorder strings.

vmd's SeaBIOS bootorder strings had hardcoded pci device ids, so
if a user added a network interface the bootorder strings didn't
line up with reality. Using vmctl(8) to boot from a cdrom (-B cdrom)
would fail, for instance, if attaching both a nic and a disk as
well.

This change scans the pci devices and finds the first of each type
to construct viable bootorder strings.

ok jan@

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jan 28 14:40:53 2023 UTC (16 months, 1 week ago) by dv
Branch: MAIN
Changes since 1.29: +8 -8 lines
Diff to previous 1.29 (colored)

Move some header definitions from vmm(4) to vmd(8).

Part of an ongoing effort to move userland-specific information out
of a kernel header and directly into vmd(8). No functional change.

ok mlarkin@

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 16 16:55:02 2021 UTC (2 years, 11 months ago) by dv
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

cleanup vmd(8) includes and header files

Lots of organic growth other the years lead to unnecessary includes
(proc.h everywhere) and odd dependencies between header files. This
cleans things up a bit to help with upcoming cleanup around dhcp
code.

No functional change.

"go for it" mlarkin@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Oct 16 02:47:34 2019 UTC (4 years, 7 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.27: +4 -3 lines
Diff to previous 1.27 (colored)

vmd(8): provide some additional info in a debug msg

Print the guest %rip when it tries to do I/O to a nonexistent port.
Also convert the message to a DPRINTF so that it doesn't leak
guest address information into any logging the host might be doing
under normal non-debug conditions.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 12 10:15:44 2018 UTC (5 years, 10 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

vmm(8)/vmm(4): send a copy of the guest register state to vmd on exit,
avoiding multiple readregs ioctls back to vmm in case register content
is needed subsequently.

ok phessler

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 10 20:43:15 2018 UTC (5 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

vmd already had DEBUG/DPRINTF, there is no need for VMD_DEBUG/dprintf

Replace all occurences of dprintf with DPRINTF (defined in proc.h).

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 19 17:12:34 2018 UTC (5 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.24: +9 -8 lines
Diff to previous 1.24 (colored)

knf

Revision 1.24 / (download) - annotate - [select for diffs], Fri Apr 27 12:15:10 2018 UTC (6 years, 1 month ago) by mlarkin
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

vmd(8): implement vmd side of ELCR registers

ok guenther

Revision 1.23 / (download) - annotate - [select for diffs], Thu Feb 15 05:35:36 2018 UTC (6 years, 3 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

vmd(8): Properly return the correct byte when doing byte-aligned PCI
config space reads.

ok kettenis@, ccardenas@

Revision 1.22 / (download) - annotate - [select for diffs], Sun Sep 17 23:07:56 2017 UTC (6 years, 8 months ago) by pd
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.21: +41 -1 lines
Diff to previous 1.21 (colored)

vmd: send/recv pci config space instead of recreating pci devices on receive

ok mlarkin@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Aug 20 05:15:39 2017 UTC (6 years, 9 months ago) by mlarkin
Branch: MAIN
Changes since 1.20: +21 -15 lines
Diff to previous 1.20 (colored)

vmd: reorganize some pci config space handling code, no functional change.

originally suggested by kettenis@, I took that diff and modified it for
-current

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 10 17:11:47 2017 UTC (6 years, 9 months ago) by mlarkin
Branch: MAIN
Changes since 1.19: +1 -11 lines
Diff to previous 1.19 (colored)

vmd: partially back out a change committed yesterday regarding guest
changing IRQs. After discussing with kettenis, that wasn't the right way
to do things, and this diff fixes that.

ok kettenis

Revision 1.19 / (download) - annotate - [select for diffs], Wed Aug 9 21:42:44 2017 UTC (6 years, 10 months ago) by mlarkin
Branch: MAIN
Changes since 1.18: +18 -4 lines
Diff to previous 1.18 (colored)

vmd: allow guest PCI interrupt line reassignment.

I also added a couple config space register names to pcireg.h to try and
reduce the use of magic numbers in vmd/pci.c

ok pd@

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 6 06:19:15 2017 UTC (6 years, 11 months ago) by mlarkin
Branch: MAIN
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored)

vmd: increase the max number of disks from 2 to 4. Requires kernel rebuild
as a struct passed to vmm has changed size.

ok deraadt, pd

Revision 1.17 / (download) - annotate - [select for diffs], Fri Apr 21 04:18:47 2017 UTC (7 years, 1 month ago) by mlarkin
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

vmd(8) pci emulation fix required for upcoming option rom support.
This will be used in the future to support an sgabios option rom, to
do VGA text mode console redirection.

ok reyk

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 27 00:28:04 2017 UTC (7 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored)

die whitespace die die die

Revision 1.15 / (download) - annotate - [select for diffs], Sat Mar 25 22:36:53 2017 UTC (7 years, 2 months ago) by mlarkin
Branch: MAIN
Changes since 1.14: +24 -5 lines
Diff to previous 1.14 (colored)

Last bits needed to get seabios + alpine linux working. This is enough
to get started and let more people help finding and fixing bugs.

ok kettenis, deraadt

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 25 15:47:37 2017 UTC (7 years, 2 months ago) by mlarkin
Branch: MAIN
Changes since 1.13: +26 -9 lines
Diff to previous 1.13 (colored)

Implement some missing functionality and clean up some code in vmd
pci emulation.

ok kettenis

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jan 21 12:45:41 2017 UTC (7 years, 4 months ago) by mlarkin
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

updated include paths for recently moved virtio stuff

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jan 17 21:51:01 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Nuke some whitespace that keeps poking me in the eye as I try to
steal code.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 13 14:50:56 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Add host side of vmmci(4) to vmd(8).

It currently uses the device to request graceful shutdown of a VM on
"vmctl stop myvm" but will be extended for reboot and a other edge cases.

OK mlarkin@

Revision 1.10 / (download) - annotate - [select for diffs], Wed Oct 12 06:56:54 2016 UTC (7 years, 7 months ago) by mlarkin
Branch: MAIN
Changes since 1.9: +22 -2 lines
Diff to previous 1.9 (colored)


Allow 4 vio(4) interfaces in each VM. Also fix a bad interrupt assignment that
caused IRQ9 to be shared between the second disk device and the vio(4)s,
which caused poor network performance.

ok reyk, stefan

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 1 16:40:06 2016 UTC (7 years, 9 months ago) by mlarkin
Branch: MAIN
Changes since 1.8: +8 -8 lines
Diff to previous 1.8 (colored)


change some log_warn to log_warnx and convert some integer literals to
enumerand values

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 1 13:08:47 2016 UTC (7 years, 9 months ago) by mlarkin
Branch: MAIN
Changes since 1.7: +22 -5 lines
Diff to previous 1.7 (colored)


Fix 2 minor issues and a typo in a comment in the pci emulation subsystem.

The first issue caused trash to be returned from an i/o port read where
that port was unclaimed by any emulated device. The second issue caused
improper BAR sizes to be reported for unassigned device BARs.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Aug 17 05:07:13 2016 UTC (7 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (colored)

small bits of header cleanup; ok mlarkin

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jan 14 02:46:40 2016 UTC (8 years, 4 months ago) by mlarkin
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.5: +1 -2 lines
Diff to previous 1.5 (colored)


stdio.h is not needed here anymore.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 4 02:07:28 2016 UTC (8 years, 5 months ago) by mlarkin
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)


bzero -> memset for consistency

Revision 1.4 / (download) - annotate - [select for diffs], Thu Dec 3 08:42:11 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

spacing

Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 23 13:04:49 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.2: +10 -11 lines
Diff to previous 1.2 (colored)

Add support for logging to stderr or syslog, and to run vmd in
foreground with -d.

OK mlarkin@ jung@

Revision 1.2 / (download) - annotate - [select for diffs], Sun Nov 22 21:51:32 2015 UTC (8 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.1: +2 -0 lines
Diff to previous 1.1 (colored)

Add $ Ids

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 22 20:20:32 2015 UTC (8 years, 6 months ago) by mlarkin
Branch: MAIN


vmd(8) - virtual machine daemon.

There is still a lot to be done, and fixed, in these userland components
but I have received enough "it works, commit it" emails that it's time
to finish those things in tree.

discussed with many, tested by many.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.