CVS: cvs.openbsd.org: src

2019-05-08 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2019/05/08 08:53:54

Modified files:
sys/arch/arm64/dev: agintc.c 

Log message:
Fix kernel compile with DEBUG_AGINTC.

ok phessler, deraadt



CVS: cvs.openbsd.org: src

2018-10-04 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/10/04 10:51:38

Modified files:
usr.bin/file/magdir: msdos 

Log message:
Update qcow file definitions

Taken from netbsd

"go for it" deraadt@



CVS: cvs.openbsd.org: src

2018-10-03 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/10/03 14:35:32

Modified files:
usr.sbin/vmd   : virtio.c 

Log message:
Add check to ensure vioscsi pointer if valid

implicit ok from pd@ since he came up with the same diff



CVS: cvs.openbsd.org: www

2018-10-01 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:www
Changes by: ccarde...@cvs.openbsd.org   2018/10/01 20:14:55

Modified files:
.  : 64.html 

Log message:
Add various entries:
* enabled bnxt on arm64
* enabled trunk and vlan on arm64 RAMDISK
* initial unveil to vmctl
* added LACP admin knobs to trunk
* added a couple LACP knobs to ifconfig



CVS: cvs.openbsd.org: src

2018-09-28 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/28 07:39:57

Modified files:
sys/arch/arm64/conf: RAMDISK 

Log message:
Add vlan and trunk to arm64's RAMDISK (amd64 parity)

OK deraadt@ and kettenis@



CVS: cvs.openbsd.org: src

2018-09-18 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/18 22:29:21

Modified files:
usr.sbin/vmd   : vioqcow2.c vioraw.c virtio.c virtio.h vm.c 

Log message:
Various clean up items for disks.

- qcow2: general cleanup
- vioraw: check malloc
- virtio: add function to sync disks
- vm: call virtio_shutdown to sync disks when vm is finished executing

Thanks to Ori Bernstein.

Ok miko@



CVS: cvs.openbsd.org: src

2018-09-12 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/12 21:53:33

Modified files:
usr.sbin/vmctl : main.c 

Log message:
Add initial set of unveil's to vmctl.

Was in snaps for a while.

Ok mlarkin@ and reyk@



CVS: cvs.openbsd.org: src

2018-09-11 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/11 07:54:29

Modified files:
sys/arch/arm64/conf: GENERIC RAMDISK 

Log message:
Include bnxt in arm64.

Tested on mcbin with Broadcom BCM57404 (Dell variant).

Ok jmatthew@ and kettenis@



CVS: cvs.openbsd.org: src

2018-09-11 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/11 07:45:29

Modified files:
usr.sbin/vmd   : virtio.c 

Log message:
Be consistent in logging messages.

Change "fmt" to "format".

Ok kn@



CVS: cvs.openbsd.org: src

2018-09-10 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/10 22:06:32

Modified files:
usr.sbin/vmd   : vioqcow2.c virtio.c 

Log message:
Fail fast when we are unable to determine disk format.

While here, minor cleanup on logging.



CVS: cvs.openbsd.org: src

2018-09-10 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/10 22:03:16

Modified files:
usr.sbin/vmctl : main.c vmctl.8 vmctl.c vmctl.h 

Log message:
Add ability to create qcow2 disk.

vmctl create now takes an optional disk format parameter: raw or qcow2.
If format is omitted, raw is used.

Many thanks to Ori Bernstein.



CVS: cvs.openbsd.org: src

2018-09-08 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/08 22:25:32

Added files:
regress/usr.sbin/vmd/diskfmt: Makefile vioscribble.c 

Log message:
Add disk format tests.

Thanks to Ori Bernstein.



CVS: cvs.openbsd.org: src

2018-09-08 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/08 22:24:29

src/regress/usr.sbin/vmd/diskfmt

Update of /cvs/src/regress/usr.sbin/vmd/diskfmt
In directory cvs.openbsd.org:/tmp/cvs-serv63210/diskfmt

Log Message:
Directory /cvs/src/regress/usr.sbin/vmd/diskfmt added to the repository



CVS: cvs.openbsd.org: src

2018-09-08 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/08 22:11:55

Modified files:
regress/usr.sbin/vmd/config: Makefile 
Added files:
regress/usr.sbin/vmd/config: vmd-fail-bad-format.conf 
 vmd-fail-bad-format.ok 
 vmd-fail-missing-format.conf 
 vmd-fail-missing-format.ok 
 vmd-pass-format-keyword.conf 
 vmd-pass-format-keyword.ok 

Log message:
Add tests for disk format.

Thanks to Ori Bernstein.



CVS: cvs.openbsd.org: src

2018-09-08 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/09/08 22:09:32

Modified files:
usr.sbin/vmctl : main.c vmctl.8 vmctl.c vmctl.h 
usr.sbin/vmd   : Makefile parse.y virtio.c virtio.h vm.conf.5 
 vmd.h 
Added files:
usr.sbin/vmd   : vioqcow2.c 

Log message:
Add initial qcow2 image support.

Users are able to declare disk images as 'raw' or 'qcow2' using either
vmctl and vm.conf.  The default disk image format is 'raw' if not specified.

Examples of using disk format:

vmctl start bsd -Lc -r cd64.iso -d qcow2:current.qc2
or
vmctl start bsd -Lc -r cd64.iso -d raw:current.raw
is equivalent to
vmctl start bsd -Lc -r cd64.iso -d current.raw

in vm.conf
vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.qc2" format "qcow2"
interface { switch "external" }
}

or

vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.raw" format "raw"
interface { switch "external" }
}

is equivlanet to

vm "current" {
disable
memory 2G
disk "/home/user/vmm/current.raw"
interface { switch "external" }
}

Tested by many.

Big Thanks to Ori Bernstein.



CVS: cvs.openbsd.org: src

2018-08-24 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/08/24 22:16:09

Modified files:
usr.sbin/vmd   : Makefile vioscsi.c virtio.c virtio.h 
Added files:
usr.sbin/vmd   : vioraw.c 

Log message:
Rework disks to have pluggable backends.

This is prep work for adding qcow2 image support.

>From Ori Bernstein.  Many thanks!

Tested by many.

OK ccardenas@



CVS: cvs.openbsd.org: www

2018-08-21 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:www
Changes by: ccarde...@cvs.openbsd.org   2018/08/21 22:49:03

Modified files:
.  : want.html 

Log message:
Add networking gear for LACP development



CVS: cvs.openbsd.org: src

2018-08-12 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/08/12 17:50:31

Modified files:
sbin/ifconfig  : ifconfig.8 ifconfig.c 
share/man/man4 : trunk.4 
sys/net: if_trunk.h if_trunk.c trunklacp.h trunklacp.c 

Log message:
Add administrative options to LACP trunk implementation.

The trunk driver now has a new ioctl (SIOCxTRUNKOPTS), which for now only
has options for LACP:
* Mode - Active or Passive (default Active)
* Timeout - Fast or Slow (default Slow)
* System Priority - 1(high) to 65535(low) (default 32768/0x8000)
* Port Priority - 1(high) to 65535(low) (default 32768/0x8000)
* IFQ Priority - 0 to NUM_QUEUES (default 6)

At the moment, ifconfig only has options for lacpmode and lacptimeout
plumbed as those are the immediate need.

The approach taken for the options was to make them on a "trunk" vs a
"port" as what's typically seen on various NOSes (JunOS, NXOS, etc...)
as it's uncommon for a host to have one link "Passive" and the other
"Active" in a given trunk.

Just like on a NOS, when applying lacpmode or lacptimeout, the settings
are immediately applied to all existing ports in the trunk and to all
future ports brought into the trunk.

Tested by many on a plethora of NIC drivers and switches.

Ok remi@



CVS: cvs.openbsd.org: src

2018-07-15 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/07/15 14:25:52

Modified files:
usr.sbin/vmd   : vioscsi.c 

Log message:
vioscsi driver has been stable enough so we can move a good portion of these
log_debug messages to be DPRINTF (compile time).

Prompted by reyk@.

Ok reyk@.



CVS: cvs.openbsd.org: src

2018-05-11 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/05/11 20:02:34

Modified files:
sys/net: trunklacp.h 
sbin/ifconfig  : ifconfig.c 

Log message:
Make LACP_STATE_BITS accessible to userland

Update ifconfig to display LACP State (Actor and Partner) on
each trunk port

Ok benno@, phessler@, and tb@



CVS: cvs.openbsd.org: src

2018-04-25 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/04/25 19:10:10

Modified files:
usr.sbin/vmd   : vioscsi.c virtio.c 

Log message:
spelling error in log message



CVS: cvs.openbsd.org: src

2018-04-22 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/04/22 23:19:57

Modified files:
sys/dev/pci: pcidevs 

Log message:
Add ids for AMD 15h 3xh family along with Kaveri graphics

Ok mlarkin@ jsg@



CVS: cvs.openbsd.org: src

2018-04-22 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/04/22 23:20:42

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: www

2018-03-18 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:www
Changes by: ccarde...@cvs.openbsd.org   2018/03/18 21:48:48

Modified files:
.  : 63.html 

Log message:
Add vmd improvements.



CVS: cvs.openbsd.org: src

2018-02-25 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/02/25 23:47:06

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2018-02-25 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/02/25 23:46:10

Modified files:
sys/dev/pci: pcidevs 

Log message:
Add devices found on thinkpad e475 with an AMD A10-9600P
(Bristol Ridge, aka tweaked Carrizo) not to be confused with
Carrizo-L (16h apu).

ok jsg@, mlarkin@



CVS: cvs.openbsd.org: src

2018-02-25 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/02/25 23:36:54

Modified files:
usr.sbin/vmctl : vmctl.c 

Log message:
vmctl: clarify console error message

Clear up ambiguous error message when attaching to a console fails as
the vm id is not guaranteed to be populated.

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-25 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/25 22:34:41

Modified files:
usr.sbin/vmd   : config.c 

Log message:
Fix Failure on Start

When attempting to start a vm from vm.conf that fails due to inadequate
resources and such, do not remote vm entry from vm list.

Reported by mpi@

ok mpi@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/19 07:23:52

Modified files:
usr.sbin/vmd   : vioscsi.c 

Log message:
VMD: vioscsi - fix large ISO support in Linux

Check if n_blocks is less than UINT32_MAX and not the image size
in various places (READ_CAPACITY_* and GET_CONFIGURATION).

ok mlarkin@ and dlg@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/15 23:10:45

Modified files:
usr.sbin/vmd   : vioscsi.c vioscsi.h 

Log message:
VMD: vioscsi - add support for REPORT_LUNS opcode

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/14 21:26:58

Modified files:
usr.sbin/vmd   : vioscsi.c virtio.h 

Log message:
VMD: vioscsi refactor

Each opcode is now handled in the respective function (vioscsi_handle_xxx)
which allows more functionality to be added easier.

No functional changes confirmed by guest testing.

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-07 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/07 15:59:57

Modified files:
regress/usr.sbin/vmd/config: Makefile 
Added files:
regress/usr.sbin/vmd/config: vmd-fail-cdrom-name-too-long.conf 
 vmd-fail-cdrom-name-too-long.ok 
 vmd-pass-cdrom-keyword.conf 
 vmd-pass-cdrom-keyword.ok 

Log message:
Add regression tests for cdrom keyword

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-04 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/04 08:19:56

Modified files:
usr.sbin/vmd   : config.c 

Log message:
Address TOCTOU issue with checking to ensure disks are regular files.

Reported by jca@.

Ok mlarkin@ and deraadt@



CVS: cvs.openbsd.org: src

2018-01-02 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/02 22:39:56

Modified files:
usr.sbin/vmctl : main.c vmctl.8 vmctl.c vmctl.h 
usr.sbin/vmd   : Makefile config.c parse.y vm.c vm.conf.5 vmm.c 
 virtio.c virtio.h vmd.c vmd.h 
Added files:
usr.sbin/vmd   : vioscsi.c vioscsi.h 

Log message:
Add initial CD-ROM support to VMD via vioscsi.

* Adds 'cdrom' keyword to vm.conf(5) and '-r' to vmctl(8)
* Support various sized ISOs (Limitation of 4G ISOs on Linux guests)
* Known working guests: OpenBSD (primary), Alpine Linux (primary),
CentOS 6 (secondary), Ubuntu 17.10 (secondary).
NOTE: Secondary indicates some issue(s) preventing full/reliable
functionality outside the scope of the vioscsi work.
* If the attached disks are non-bootable (i.e. empty), SeaBIOS (vmd's
default BIOS) will boot from CD-ROM.

ok mlarkin@, jca@



CVS: cvs.openbsd.org: src

2017-11-29 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2017/11/29 18:28:27

Modified files:
usr.sbin/vmd   : vmd.c 

Log message:
When performing vmctl reload and a previously configured vm is running,
exit with an EALREADY vs EPERM.

ok mlarkin@