Re: vmd writes corrupt qcow2 images

2022-04-18 Thread Mike Larkin
On Mon, Apr 18, 2022 at 12:21:39PM -0400, Dave Voutila wrote: > > "Thomas L." writes: > > > Hi, > > > > I recently tried to use qemu-img with qcow2 images of my VMs and > > qemu-img finds them corrupted. I can reproduce the issue in the > > following way (on -current, but is the same on -stable; t

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Mike Larkin
On Wed, Mar 23, 2022 at 04:27:40AM +, Alexis wrote: > Indeed I understood both octboot and vmm seabios/uefi initialazation process. > > But has its done with kexec and linuxboot coreboot payload octboot could be > ported to act in the same way. Explaining now again for the 3rd time, to > avoi

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Mike Larkin
On Wed, Mar 23, 2022 at 12:58:41AM +, Alexis wrote: > Have vmm/vmd core developers ever thought of using octboot has a way to u > se openbsd has a bootloader to avoid stack duplication, and attached atack > surface reduction. Avoiding to maintain 2 stacks, seabios/uefi and host > vm, could be a

Re: initial 11ac support for iwm(4)

2022-03-17 Thread Mike Larkin
On Wed, Mar 16, 2022 at 11:17:47PM +0100, Stefan Sperling wrote: > On Wed, Mar 16, 2022 at 04:11:41PM +0100, Stefan Sperling wrote: > > This patch adds initial 11ac support to the iwm(4) driver. > > It allows use of 80 MHz channels and VHT MCS. > > Updated patch. Fixes a fatal firmware error on dev

Re: initial iwx(4) 11ac patch for testing

2022-03-09 Thread Mike Larkin
On Wed, Mar 09, 2022 at 01:07:47PM +0100, Stefan Sperling wrote: > This patch adds initial 11ac support to the iwx(4) driver. > This means that 80MHz channels can be used. No other 11ac features > are enabled yet. > > This is not yet a patch which could be committed. Apart from debug > prints which

Re: Properly check if ACPI devices are enabled

2022-01-27 Thread Mike Larkin
On Mon, Jan 24, 2022 at 12:15:58PM -0800, Philip Guenther wrote: > On Mon, Jan 24, 2022 at 11:41 AM Mark Kettenis > wrote: > > > > Date: Mon, 24 Jan 2022 20:19:46 +0100 > > > From: Anton Lindqvist > > > > > > On Mon, Jan 24, 2022 at 05:31:49PM +0100, Mark Kettenis wrote: > > > > Currently we atta

Re: dt: make vmm tracepoints amd64 only

2022-01-17 Thread Mike Larkin
On Mon, Jan 17, 2022 at 10:10:26AM -0300, Crystal Kolipe wrote: > On Mon, Jan 17, 2022 at 01:00:44PM +, Klemens Nanni wrote: > > These don't hurt on !VMM architectures but I was still surprised to see > > them on e.g. sparc64: > > > > # arch -s ; btrace -l | grep vmm > > sparc64 > >

Re: Silence vmd rtc_update_rega non-32KHz timebase spam

2022-01-15 Thread Mike Larkin
On Wed, Dec 08, 2021 at 07:45:50PM -0600, Brian Conway wrote: > Ping with complete diff. Thanks. > > Brian Conway > Catching up on old emails. Committed. Thanks. -ml > diff --git usr.sbin/vmd/mc146818.c usr.sbin/vmd/mc146818.c > index e3599c685..001c1a055 100644 > --- usr.sbin/vmd/mc146818.c > +

Re: mpsafe dwxe(4)

2022-01-04 Thread Mike Larkin
On Mon, Jan 03, 2022 at 09:24:15PM +1000, Jonathan Matthew wrote: > This is almost identical to the changes I made to dwge(4) recently, since > these drivers are very closely related. Unfortunately the only machine I > have with dwxe(4) in it is armv7, so I can't test this properly, but it > does

Re: Remove gtp from amd64 GENERIC kernel

2022-01-03 Thread Mike Larkin
On Mon, Jan 03, 2022 at 06:43:29PM -0800, Greg Steuck wrote: > Crystal Kolipe writes: > > > The gpt driver was completely deleted from the tree in 2016, and removed > > from the i386 GENERIC config in revision 1.819. > > > > It has, however, remained in the amd64 GENERIC config commented out, > >

Re: vmm(4): restore vmcs after sleep points [vmx 2/3]

2021-12-03 Thread Mike Larkin
On Mon, Nov 29, 2021 at 08:41:22PM -0500, Dave Voutila wrote: > > Dave Voutila writes: > > > This diff removes instability from VMX-based hosts by either removing > > the possibility of the process sleeping while the VMCS is active or > > reloading it if we had no choice. > > > > A mutex is added

Re: vmm(4): bump vmclear spinout [vmx 1/3]

2021-11-28 Thread Mike Larkin
On Sun, Nov 28, 2021 at 10:32:47PM -0500, Dave Voutila wrote: > Smallest of the VMX/VMCS stability diffs. This bumps the spinout to be > the same number of ticks used by the mplock debug. This is needed on > older/slower hosts. > > ok? > > -dv > > diff e8c587551f20ba6fdaa0f483ea768aade9f66f7d > 98

Re: vmm(4): copyout guest regs, irqready on VM_EXIT_NONE

2021-11-21 Thread Mike Larkin
On Sat, Nov 20, 2021 at 09:14:31PM -0500, Dave Voutila wrote: > The below diff fixes an issue reported by kn@ on bugs@ [1]. joshe@ also > observed the issue and confirmed the below diff resolves it. > > The symptoms were quite odd: errors from fdc(4) during an OpenBSD guest > booting under vmm(4)/v

Re: vmd(8): fix broken bootorder for cdrom

2021-11-04 Thread Mike Larkin
On Thu, Nov 04, 2021 at 08:09:16PM +0100, Jan Klemkow wrote: > On Thu, Nov 04, 2021 at 10:43:46AM -0400, Dave Voutila wrote: > > Jan Klemkow writes: > > > This fix [1] in seabios breaks our "boot device cdrom" feature. > > > > > > # vmctl start -Lc -d disk.img -r cd70.iso -B cdrom vm > > > ... > >

Re: More pchgpio(4)

2021-10-21 Thread Mike Larkin
On Tue, Oct 12, 2021 at 01:19:55PM -0700, Mike Larkin wrote: > On Sun, Oct 10, 2021 at 11:42:31PM +0200, Mark Kettenis wrote: > > > Date: Sat, 9 Oct 2021 22:27:52 +0200 (CEST) > > > From: Mark Kettenis > > > > > > > Date: Sat, 9 Oct 2021 20:55:1

Re: More pchgpio(4)

2021-10-12 Thread Mike Larkin
On Sun, Oct 10, 2021 at 11:42:31PM +0200, Mark Kettenis wrote: > > Date: Sat, 9 Oct 2021 22:27:52 +0200 (CEST) > > From: Mark Kettenis > > > > > Date: Sat, 9 Oct 2021 20:55:10 +0200 (CEST) > > > From: Mark Kettenis > > > > > > This time adding support for Sunrisepoint-H and Sunrisepoint-LP. > > >

Re: vmm(4): set global vcpu limit to 512

2021-09-11 Thread Mike Larkin
On Sat, Sep 11, 2021 at 01:44:33PM -0400, Dave Voutila wrote: > Syzbot recently discovered that since we don't have any bounds in place > for number of vms or vcpus it's possible to completely exhuast kernel > memory or at least put the system in a state where malloc(9) or > km_alloc(9) fail in sys

Re: updated patch for iwx(4) Tx aggregation

2021-09-11 Thread Mike Larkin
On Sat, Sep 11, 2021 at 02:04:32PM +0200, Stefan Sperling wrote: > On Fri, Sep 10, 2021 at 06:49:49PM +0200, Stefan Sperling wrote: > > Here is another attempt at adding Tx aggregation to iwx(4). > > This patch is based on the latest state in CVS (if_iwx.c r1.107, which > > I have committed a minut

Re: let iwx(4) resume in the acpi thread

2021-09-10 Thread Mike Larkin
On Fri, Sep 10, 2021 at 11:12:45AM +0200, Stefan Sperling wrote: > On Fri, Sep 10, 2021 at 10:59:25AM +0200, Stefan Sperling wrote: > > On Fri, Sep 10, 2021 at 10:58:47AM +0200, Stefan Sperling wrote: > > > All those changes are shown below. My device is still happy with this. > > > I will reply wi

Re: iwx(4) firmware memory fixes

2021-09-09 Thread Mike Larkin
On Wed, Sep 08, 2021 at 02:08:36PM +0200, Stefan Sperling wrote: > Add a missing call to iwx_ctxt_info_free_fw_img() in an error path > of iwx_ctxt_info_init() which should always free on error. > > Also, free firmware paging DMA memory in case loading firmware has failed. > If we don't free paging

Re: let iwx(4) resume in the acpi thread

2021-09-09 Thread Mike Larkin
On Wed, Sep 08, 2021 at 03:25:20PM +0200, Stefan Sperling wrote: > On Wed, Sep 08, 2021 at 02:19:00PM +0200, Stefan Sperling wrote: > > This patch applies on top of all the other iwx(4) diffs I've sent today. > > It makes iwx(4) initialize the device completely in the acpi thread. > > > > We now pr

Re: riscv64/trap.c debug printfs

2021-09-03 Thread Mike Larkin
On Fri, Sep 03, 2021 at 04:38:55PM +0200, Jeremie Courreges-Anglas wrote: > > This one is a bit too chatty whenever you run a program under egdb. > But the other printfs in this file seem ok, thus I'm not touching them. > > ok? > > > Index: trap.c > =

Re: Incorrect IPL when pool_get(9) is called under rwlock

2021-09-01 Thread Mike Larkin
On Wed, Sep 01, 2021 at 08:53:35AM +0200, Martin Pieuchot wrote: > syzkaller reported [0] the following lock ordering issue: > > db{0}> trace > db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 > panic(82464b8f) at panic+0x177 sys/kern/subr_prf.c:202 > witness_checkorder(f

Re: Incorrect IPL when pool_get(9) is called under rwlock

2021-09-01 Thread Mike Larkin
On Wed, Sep 01, 2021 at 08:53:35AM +0200, Martin Pieuchot wrote: > syzkaller reported [0] the following lock ordering issue: > > db{0}> trace > db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 > panic(82464b8f) at panic+0x177 sys/kern/subr_prf.c:202 > witness_checkorder(f

Re: ddb: machine sysregs for amd64

2021-08-31 Thread Mike Larkin
On Tue, Aug 31, 2021 at 06:30:40PM +1000, Alex Wilson wrote: > Hi, > > This is a short diff to add "machine sysregs" to ddb on amd64 (plus it also > prints out gsbase/kgsbase). This command is available on i386 but not amd64. > I swear I remember discussing this with mlarkin at some point but I cou

Re: vmd(8): simplify vcpu logic, removing uart & net reads

2021-07-15 Thread Mike Larkin
On Sun, Jul 11, 2021 at 08:10:42AM -0400, Dave Voutila wrote: > > Ping...looking for OK. Would like to get this committed this week. > Sorry this took so long. ok mlarkin. Thanks to the numerous testers who ran with this for the past few weeks. > Dave Voutila writes: > > > Looking for an OK for

Re: vmd: spurious VM restarts

2021-06-26 Thread Mike Larkin
On Sat, Jun 26, 2021 at 03:26:55PM +0200, Thomas L. wrote: > On Wed, 7 Apr 2021 17:00:00 -0700 > Mike Larkin wrote: > > Depends on the exact content that got swapped out (as we didn't handle > > TLB flushes correctly), so a crash was certainly a possibility. > > T

Re: vmd(8): add barebones vioblk GET_ID support

2021-06-17 Thread Mike Larkin
On Thu, Jun 17, 2021 at 12:07:10PM -0400, Dave Voutila wrote: > > Dave Voutila writes: > > > The virtio spec has had a de facto command for drivers to read the > > serial number off a virtual block device. QEMU introduced this feature > > years ago. Last November, the virtio governing group voted i

Re: Document missing pledge promises

2021-06-11 Thread Mike Larkin
On Fri, Jun 11, 2021 at 09:16:46AM -0600, Theo de Raadt wrote: > Dave Voutila wrote: > > > Theo de Raadt writes: > > > > > Regarding the vmm chunk -- as I said in my other reply, these > > > explanations are too precise. They risk becoming outdated as things > > > change. Furthermore, some of th

Re: hvn(4): don't input mbufs if interface is not running

2021-06-11 Thread Mike Belopuhov
ers like > em(4) we only read packets if IFF_RUNNING is set. I think in the case > of hvn(4), we should drop packets unless IFF_RUNNING is set. > > Opinions? > Hi Patrick, You're right that hvn needs to have the receiving path setup to exchange commands with the hypervisor. This d

Re: Update vmctl(8) to use TERMINATE_VM_EVENTs

2021-06-10 Thread Mike Larkin
On Thu, Jun 10, 2021 at 09:19:45AM -0400, Dave Voutila wrote: > > Still looking for an OK or feedback on the below. This is finishing work > to fixes made previously to vmd(8)/vmctl(8) regarding vm > stopping/running state corruption when using vmctl(8) to wait for a vm > to stop. > Sorry for the

Re: limit MSR_INT_PEN_MSG use to < family 16h

2021-06-10 Thread Mike Larkin
On Wed, Jun 09, 2021 at 10:35:48PM -0700, Mike Larkin wrote: > On Thu, Jun 10, 2021 at 03:19:43PM +1000, Jonathan Gray wrote: > > Ilya Voronin sent a diff to misc to limit MSR_INT_PEN_MSG use to > > < AMD family 17h prompted by a problem with an AWS t3a instance. > >

Re: limit MSR_INT_PEN_MSG use to < family 16h

2021-06-09 Thread Mike Larkin
On Thu, Jun 10, 2021 at 03:19:43PM +1000, Jonathan Gray wrote: > Ilya Voronin sent a diff to misc to limit MSR_INT_PEN_MSG use to > < AMD family 17h prompted by a problem with an AWS t3a instance. > > https://marc.info/?l=openbsd-misc&m=162120066715633&w=2 > > Digging some more the 16h bkdgs have i

Re: vmm(4): use monotonic base for pvclock

2021-06-01 Thread Mike Larkin
On Tue, Jun 01, 2021 at 08:03:43PM -0500, Scott Cheloha wrote: > The documentation for the Linux pvclock is pretty sparse but I am > pretty sure we want to use a monotonic base for ti_system_time. We > also have a function for converting a timespec into a 64-bit count of > nanoseconds we can use.

Re: vio.4: mention support provided by vmd(8)

2021-05-24 Thread Mike Larkin
On Sun, May 23, 2021 at 09:50:46PM -0400, Dave Voutila wrote: > Seems only right that vio.4 mention it's the driver used for the virtio > networking device provided by vmd(8). > > OK? > ok mlarkin > > Index: vio.4 > === > RCS file: /

Re: vmd(8): add MTU feature support to vionet device

2021-05-24 Thread Mike Larkin
On Mon, May 24, 2021 at 08:25:04AM +0200, Claudio Jeker wrote: > On Sun, May 23, 2021 at 10:25:38PM -0400, Dave Voutila wrote: > > The following diff adds in virtio 1.1's VIRTIO_NET_F_MTU feature support > > to vmd(8)'s virtio networking device. This allows for communicating an MTU > > to the guest

Re: vmd(8): skip inspecting non-udp packets on local ifs

2021-05-23 Thread Mike Larkin
On Sat, May 22, 2021 at 10:20:37AM -0400, Dave Voutila wrote: > tech@ & krw (since your code in question was imported to vmd), > > I found strange behavior running tcpbench(1) to measure the connection > between a vmd guest and my host, as well as guest-to-guest. In short, > it's some bogus logic i

Re: vmm(4): Mask TSC_ADJUST cpu feature

2021-05-20 Thread Mike Larkin
On Thu, May 20, 2021 at 07:36:23AM -0400, Dave Voutila wrote: > We don't currently emulate all TSC related features yet. While hacking > on other issues, I've found some more obnoxious guests (*cough* debian > *cough*) constantly try to read the IA32_TSC_ADJUST msr every second, > not getting the h

Re: patch: new fix for vmctl create

2021-05-12 Thread Mike Larkin
On Mon, Mar 15, 2021 at 08:21:56AM +, James Cook wrote: > Hi tech@, > > The below patch removes calls to realpath(3) when looking up a qcow2 > base image. Previous thread: > https://marc.info/?t=16156249642&r=1&w=2 > > In short, the calls were failing inside vmctl, because of unveil. The >

Re: potentially uninitialized string printed by vmd

2021-05-11 Thread Mike Larkin
On Mon, Mar 15, 2021 at 09:29:29AM +, James Cook wrote: > > The array "base" which is passed to log_warnx might be uninitialized: > > virtio_get_base doesn't necessarily touch it if it returns -1. Maybe it > > would be better just omit base from the output, e.g. > > > > log_warnx("vm \"%s\"

Re: vmd(8): init debug logging before using logging

2021-05-03 Thread Mike Larkin
On Mon, May 03, 2021 at 08:50:36PM -0400, Dave Voutila wrote: > If debug state in the logging routines isn't set, messages from > fatal{,x} and warn{,x} don't get flushed to stderr, so running vmd > un-daemonized can result in the process exiting at startup with no > discernable message reason othe

Re: added support for precompressed static files on httpd(so sorry about my other email that was unreadable)

2021-05-01 Thread Mike Larkin
On Sat, May 01, 2021 at 09:26:39PM +, alloca wrote: > This patch adds a serve_gzip option. When enabled, If the client requests > path, then serve path.gz if it exists and the client accepts > Content-Encoding: gzip. > > man style > diff -up httpd.orig/config.c httpd/config.c > --- httpd.

Re: vmd(8): remove duplicate struct definition

2021-04-29 Thread Mike Larkin
On Thu, Apr 29, 2021 at 03:24:42PM -0400, Dave Voutila wrote: > Found this while running ctags(1)... vioqcow2.c has struct qcheader > already defined at L53 (which stylistically is where it should be). > > This diff just removes the duplicate definition inside > virtio_qcow2_create(). > > OK? > > >

Re: km_alloc(9) for i386 pmap

2021-04-23 Thread Mike Larkin
On Fri, Apr 23, 2021 at 08:07:43PM +0200, Martin Pieuchot wrote: > Diff below convert the last uses of uvm_km_alloc(9) and uvm_km_zalloc(9) > to km_alloc(9). > > One of the allocations below uses `kp_pageable' instead of `kp_zero' > because the mapping for `pm_pdir_intel' is lost when PAE is enable

Re: umm_map returns unaligned address?

2021-04-23 Thread Mike Larkin
On Fri, Apr 23, 2021 at 01:55:14PM +0200, Alessandro Pistocchi wrote: > Hi all, > > I am fairly new to openbsd so if this is something obvious that I missed > please be understanding. > > I am adding a syscall to openbsd 6.8. I am working on a raspberry pi. > > During the syscall I allocate some me

Re: vmd: spurious VM restarts

2021-04-07 Thread Mike Larkin
On Wed, Apr 07, 2021 at 07:47:28PM -0400, Dave Voutila wrote: > > Thomas L. writes: > > >> > Thomas: I looked at your host dmesg and your provided vm.conf. It > >> > looks like 11 vm's with the default 512M memory and one (minecraft) > >> > with 8G. Your host seems to have only 16GB of memory, some

Re: vmd: spurious VM restarts

2021-04-07 Thread Mike Larkin
On Wed, Apr 07, 2021 at 09:23:14AM -0400, Dave Voutila wrote: > > Dave Voutila writes: > > > Mike Larkin writes: > > > >> On Wed, Apr 07, 2021 at 12:22:23AM +0200, Thomas L. wrote: > >>> On Tue, 6 Apr 2021 14:28:09 -0700 > >>> Mike Larkin w

Re: vmd: spurious VM restarts

2021-04-07 Thread Mike Larkin
On Wed, Apr 07, 2021 at 07:26:41AM -0400, Dave Voutila wrote: > > Mike Larkin writes: > > > On Wed, Apr 07, 2021 at 12:22:23AM +0200, Thomas L. wrote: > >> On Tue, 6 Apr 2021 14:28:09 -0700 > >> Mike Larkin wrote: > >> > >> > On Tue, Apr 06,

Re: vmd: spurious VM restarts

2021-04-06 Thread Mike Larkin
On Wed, Apr 07, 2021 at 12:22:23AM +0200, Thomas L. wrote: > On Tue, 6 Apr 2021 14:28:09 -0700 > Mike Larkin wrote: > > > On Tue, Apr 06, 2021 at 09:15:10PM +0200, Thomas L. wrote: > > > On Tue, 6 Apr 2021 11:11:01 -0700 > > > Mike Larkin wrote: >

Re: vmd: spurious VM restarts

2021-04-06 Thread Mike Larkin
On Tue, Apr 06, 2021 at 09:15:10PM +0200, Thomas L. wrote: > On Tue, 6 Apr 2021 11:11:01 -0700 > Mike Larkin wrote: > > Anything in the host's dmesg? > *host* dmesg. I think you misread what I was after... > Below is the dmesg and latest syslog from one of the VMs. >

Re: vmd(8): send correct response on unpause error

2021-04-06 Thread Mike Larkin
On Fri, Apr 02, 2021 at 07:14:34PM -0400, Dave Voutila wrote: > If vmctl(8) sends an unpause request for a vm that doesn't exist, vmd(8) > should be responding with the IMSG_VMDOP_UNPAUSE_VM_RESPONSE imsg_type > with an ENOENT error code. (Similarly if the request comes from a user > without permis

Re: vmd: spurious VM restarts

2021-04-06 Thread Mike Larkin
On Tue, Apr 06, 2021 at 07:47:52PM +0200, Thomas L. wrote: > Hi, > > I'm running OpenBSD 6.8 as hypervisor with multiple OpenBSD VMs. > Regularly, it happens that all VM are restarted, not at the same time > but clustered. The indication that this happend is reduced uptime on the > VMs, some servic

Re: amd64: add MSR_TSC_ADJUST

2021-04-06 Thread Mike Larkin
On Mon, Apr 05, 2021 at 07:37:51PM -0500, Scott Cheloha wrote: > Intel calls it "IA32_TSC_ADJUST". Is "MSR_TSC_ADJUST" fine or should > it be "MSR_IA32_TSC_ADJUST"? > > We have a feature flag for this one already, SEFF0EBX_TSC_ADJUST. > > Index: specialreg.h > =

Re: monotonic time going back by wrong skews

2021-04-05 Thread Mike Larkin
On Sat, Apr 03, 2021 at 10:21:02PM -0500, Scott Cheloha wrote: > On Fri, Apr 02, 2021 at 10:37:36AM -0700, Mike Larkin wrote: > > On Thu, Apr 01, 2021 at 06:43:30PM -0500, Scott Cheloha wrote: > > > > > > [...] > > > > > > Hmmm. Being able to work a

Re: vmm.4: document supported ioctls

2021-04-02 Thread Mike Larkin
On Fri, Apr 02, 2021 at 03:24:55AM +0200, Klemens Nanni wrote: > On Thu, Apr 01, 2021 at 08:34:37PM -0400, Dave Voutila wrote: > > I've updated the diff using your feedback. See below. > Thanks, OK kn > ok mlarkin@ also

Re: monotonic time going back by wrong skews

2021-04-02 Thread Mike Larkin
On Thu, Apr 01, 2021 at 06:43:30PM -0500, Scott Cheloha wrote: > On Thu, Apr 01, 2021 at 03:41:24PM -0400, Josh Rickmar wrote: > > On Thu, Apr 01, 2021 at 03:22:00PM -0400, Josh Rickmar wrote: > > > On Thu, Apr 01, 2021 at 02:15:48PM -0500, Scott Cheloha wrote: > > > > On Sat, Mar 27, 2021 at 02:20

Re: vmctl: off-by-one error handling mixing -a with a VM id

2021-03-29 Thread Mike Larkin
On Fri, Mar 26, 2021 at 07:24:32AM -0400, Dave Voutila wrote: > > Theo Buehler writes: > > > On Thu, Mar 25, 2021 at 08:07:53PM +0100, Preben Guldberg wrote: > >> Dave Voutila wrote: > >> > Preben Guldberg writes: > >> > > The patch below addresses an off-by-one error reading argv when > >> > > gen

Re: patch: vamm(4) IA32_EPT_VPID_CAP_XO_TRANSLATIONS specified incorrectly.

2021-03-29 Thread Mike Larkin
On Sat, Mar 27, 2021 at 10:15:27AM -0400, Dave Voutila wrote: > > Adam Steen writes: > > > Hi > > > > IA32_EPT_VPID_CAP_XO_TRANSLATIONS is specified incorrectly, see the > > patch below. > > Adam's diff looks correct to me based on reading Intel SDM Vol 3D, > Appendix A.10 (VPID and EPT Capabilitie

Re: vmm(4): fix boot issue for 9front guests

2021-03-29 Thread Mike Larkin
On Sun, Mar 28, 2021 at 09:28:11AM -0400, Bryan Steele wrote: > On Sun, Mar 28, 2021 at 08:38:13AM -0400, Dave Voutila wrote: > > abieber@ found the latest 9front release ends up in a boot loop if > > hosted on an AMD system. I tracked it down to 9front (oddly) trying to > > read the PAT msr prior

Re: UVM return(val)

2021-03-23 Thread Mike Larkin
On Tue, Mar 23, 2021 at 01:52:20PM +0100, Martin Pieuchot wrote: > Diff below convert multiple "return(val)" and "return (val)" to > "return val". I only changed those that help decrease the size > of the diff with NetBSD or didn't change anything. > > ok? > I read through these and agree this sh

Re: Remove booting from kernels in raw/qcow2 images in vmd(8)

2021-03-17 Thread Mike Larkin
On Wed, Mar 17, 2021 at 10:29:32PM +0100, Klemens Nanni wrote: > On Sun, Mar 14, 2021 at 11:00:22AM -0400, Dave Voutila wrote: > > Any takers? > Yes, I plan to commit the updated diff at the end until friday > unless someone objects. > no objection, thanks everyone. ok mlarkin > > Here's an upda

Re: vmm crash on 6.9-beta

2021-03-13 Thread Mike Larkin
On Wed, Mar 10, 2021 at 08:30:32PM +0100, Mischa wrote: > On 10 Mar at 18:59, Mike Larkin wrote: > > On Wed, Mar 10, 2021 at 03:08:21PM +0100, Mischa wrote: > > > Hi All, > > > > > > Currently I am running 6.9-beta on one of my hosts to test > > &g

Re: Remove booting from kernels in raw/qcow2 images in vmd(8)

2021-03-11 Thread Mike Larkin
On Thu, Mar 11, 2021 at 06:11:03PM -0500, Dave Voutila wrote: > tl;dr: tedu vmboot.{c,h}, ufs.c from vmd(8) to remove broken ability to > exract and boot a kernel image from a raw or qcow2 disk image > > The following diff removes the ability to boot directly from a disk > image containing a FFS fi

Re: vmm crash on 6.9-beta

2021-03-10 Thread Mike Larkin
On Wed, Mar 10, 2021 at 03:08:21PM +0100, Mischa wrote: > Hi All, > > Currently I am running 6.9-beta on one of my hosts to test veb(4)/vport(4). > > root@server14:~ # sysctl kern.version > kern.version=OpenBSD 6.9-beta (GENERIC.MP) #385: Mon Mar 8 12:57:12 MST 2021 > dera...@amd64.openbsd.org

Re: veb(4) support for vmd(8)?

2021-02-26 Thread Mike Larkin
On Sat, Feb 27, 2021 at 09:44:03AM +1000, David Gwynne wrote: > > > > On 27 Feb 2021, at 7:50 am, Klemens Nanni wrote: > > > > On Sat, Feb 27, 2021 at 07:30:56AM +1000, David Gwynne wrote: > >> i think this is enough to let vmd wire guests up to veb interfaces. > > But please update vm.conf(5) to

Re: uvm_fault: Comments & style cleanup

2021-02-15 Thread Mike Larkin
On Mon, Feb 15, 2021 at 01:15:33PM +0100, Martin Pieuchot wrote: > On 15/02/21(Mon) 11:47, Martin Pieuchot wrote: > > Diff below includes non-functional changes: > > > > - Sync comments with NetBSD including locking details. > > - Remove superfluous parenthesis and spaces. > > - Add brackets, even

Re: XCP-ng, OpenBSD and network interface changes

2021-02-01 Thread Mike Belopuhov
try increasing amount of iterations to 1 (or more) for example and see if this is a timing issue. Cheers, Mike > Index: xen.c > === > RCS file: /cvs/src/sys/dev/pv/xen.c,v > retrieving revision 1.97 > diff -u -p -r

Re: Increase timeout length for VMs trying to fully shutdown

2021-01-05 Thread Mike Larkin
On Tue, Jan 05, 2021 at 12:49:29PM -0700, Tracey Emery wrote: > Hello tech@, > > Some of us have been having shutdown issues with our VMs on OpenBSDAms. > I tracked down the problem to too short of a timeout for the shutdown > event. > > If there are an additional 1 or 2 package daemons running on

Re: PATCH: Fix PCI Config Space union size on VMM

2020-09-09 Thread Mike Larkin
On Mon, Sep 07, 2020 at 06:03:00PM -0500, Jordan Hargrave wrote: > This code fixes the pci device union for accessing PCI config space >= 0x40 > > Running pcidump -xxx in a virtual machine would return garbage data due to > union overlap > Thanks, looks good from my perspective. -ml > On Mon, S

Re: amd64: add tsc_delay(), a TSC-based delay(9) implementation

2020-08-25 Thread Mike Larkin
On Tue, Aug 25, 2020 at 12:12:36PM -0700, Mike Larkin wrote: > On Mon, Aug 24, 2020 at 01:55:45AM +0200, Mark Kettenis wrote: > > > Date: Sun, 23 Aug 2020 18:11:12 -0500 > > > From: Scott Cheloha > > > > > > Hi, > > > > > > Other BSDs

Re: amd64: add tsc_delay(), a TSC-based delay(9) implementation

2020-08-25 Thread Mike Larkin
On Mon, Aug 24, 2020 at 12:29:15AM -0500, Scott Cheloha wrote: > On Sun, Aug 23, 2020 at 11:45:22PM -0500, Scott Cheloha wrote: > > > > [...] > > > > > > This patch (or something equivalent) is a prerequisite to running the > > > > lapic timer in oneshot or TSC deadline mode. Using the lapic timer

Re: amd64: add tsc_delay(), a TSC-based delay(9) implementation

2020-08-25 Thread Mike Larkin
On Mon, Aug 24, 2020 at 01:55:45AM +0200, Mark Kettenis wrote: > > Date: Sun, 23 Aug 2020 18:11:12 -0500 > > From: Scott Cheloha > > > > Hi, > > > > Other BSDs use the TSC to implement delay(9) if the TSC is constant > > and invariant. Here's a patch to add something similar to our kernel. > > If

Re: kernel crash in setrunqueue

2020-07-29 Thread Mike Larkin
On Wed, Jul 29, 2020 at 10:14:11PM +0200, Mark Kettenis wrote: > > Date: Wed, 29 Jul 2020 13:03:43 -0700 > > From: Mike Larkin > > > > Hi, > > > > I'm seeing crashes on amd64 GENERIC.MP on a few VMs recently. This happens > > on GENERIC.MP regardle

Re: kernel crash in setrunqueue

2020-07-29 Thread Mike Larkin
On Wed, Jul 29, 2020 at 01:03:43PM -0700, Mike Larkin wrote: > Hi, > > I'm seeing crashes on amd64 GENERIC.MP on a few VMs recently. This happens > on GENERIC.MP regardless of whether or not the VM has one cpu or more than > one. It does not happen on GENERIC kernels. > &

kernel crash in setrunqueue

2020-07-29 Thread Mike Larkin
Hi, I'm seeing crashes on amd64 GENERIC.MP on a few VMs recently. This happens on GENERIC.MP regardless of whether or not the VM has one cpu or more than one. It does not happen on GENERIC kernels. The crash will happen fairly quickly after the kernel starts executing processes. Sometimes it cr

Re: Edgerouter 4 available for any OpenBSD dev that needs an octeon

2020-07-29 Thread Mike Larkin
On Tue, Jul 28, 2020 at 06:16:01PM -0700, Mike Larkin wrote: > Someone (can't recall who) gave me an ER4. I found it while cleaning > out my closet. Since I'm not active anymore, if any openbsd developer > wants it, reach out to me privately and I'll see about sending

Edgerouter 4 available for any OpenBSD dev that needs an octeon

2020-07-28 Thread Mike Larkin
Someone (can't recall who) gave me an ER4. I found it while cleaning out my closet. Since I'm not active anymore, if any openbsd developer wants it, reach out to me privately and I'll see about sending it to you. Thanks. -ml

Re: amd64: lapic: refactor lapic timer programming

2020-07-06 Thread Mike Larkin
On Fri, Jul 03, 2020 at 07:41:45PM -0500, Scott Cheloha wrote: > Hi, > > I want to run the lapic timer in one-shot mode on amd64 as we do with > other interrupt clocks on other platforms. I aim to make the clock > interrupt code MD where possible. > > However, nobody is going to test my MD clock i

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Mike Larkin
On Fri, Jun 26, 2020 at 09:01:03PM -0700, Mike Larkin wrote: > On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > > This patch adds support for 11n Tx aggregation to iwm(4). > > > > Please help with testing if you can by running the patch and using wifi > &g

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Mike Larkin
On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > This patch adds support for 11n Tx aggregation to iwm(4). > > Please help with testing if you can by running the patch and using wifi > as usual. Nothing should change, except that Tx speed may potentially > improve. If you have tim

Re: vmm(4): unterminated vm_name after strncpy

2020-03-14 Thread Mike Larkin
On Thu, Mar 12, 2020 at 10:31:13PM +0100, Tobias Heider wrote: > vmm uses 'strncpy(vm->vm_name, vcp->vcp_name, VMM_MAX_NAME_LEN)' to copy > to buffers of size VMM_MAX_NAME_LEN, which can leave the resulting string > unterminated. > From strncpy(3): > strncpy() only NUL terminates the destination

Re: [PATCH] Fixing an uninitialized variable that can lead to #GP.

2020-02-09 Thread Mike Larkin
On Sun, Feb 09, 2020 at 06:17:47PM -0800, Anthony Steinhauser wrote: > In the current implementation of the TAA mitigation if the cpuid_level > is 6 and it's an Intel CPU, the sefflags_edx variable is used without > being initialized. If the SEFF0EDX_ARCH_CAP bit is accidentally flipped > in it, th

Re: Add mprotect_ept ioctl to vmm(4)

2020-02-07 Thread Mike Larkin
On Fri, Feb 07, 2020 at 01:25:38PM -0800, Mike Larkin wrote: > On Fri, Feb 07, 2020 at 04:20:16AM +, Adam Steen wrote: > > Hi > > > > Please see the attached patch to add an 'IOCTL handler to sets the access > > protections of the ept' > > >

vmm(4): wrong comment

2020-02-07 Thread Mike Larkin
Free commit for someone. Noticed last night by my student team that is working on vmm(4) virtio memory ballooning support as we were adding the viomb(4) stats queue. -ml Index: vmm.c === RCS file: /cvs/src/sys/arch/amd64/amd64/vmm.c

Re: Add mprotect_ept ioctl to vmm(4)

2020-02-07 Thread Mike Larkin
On Fri, Feb 07, 2020 at 04:20:16AM +, Adam Steen wrote: > Hi > > Please see the attached patch to add an 'IOCTL handler to sets the access > protections of the ept' > > vmd(8) does not make use of this change, but solo5, which uses vmm(4) as > a backend hypervisor. The code calling 'VMM_IOC_M

Re: vmm(4) patch - iniatialise eptp to zero for vmx like svm

2020-02-06 Thread Mike Larkin
On Thu, Feb 06, 2020 at 01:05:01AM -0800, Mike Larkin wrote: > On Thu, Feb 06, 2020 at 02:34:47AM +, Adam Steen wrote: > > Hi > > > > Again while working on a larger patch i noticed that the eptp for vmx > > was not getting initialised to zero like the svm

Re: vmm(4) patch - iniatialise eptp to zero for vmx like svm

2020-02-06 Thread Mike Larkin
On Thu, Feb 06, 2020 at 02:34:47AM +, Adam Steen wrote: > Hi > > Again while working on a larger patch i noticed that the eptp for vmx > was not getting initialised to zero like the svm code path, as part of > a VMM_IOC_RESETCPU ioctl call. > > please see the attach patch to initialise eptp t

Re: em(4) diff to test

2020-01-31 Thread Mike Larkin
On Thu, Jan 30, 2020 at 09:15:35AM +0100, Martin Pieuchot wrote: > On 21/01/20(Tue) 12:31, Martin Pieuchot wrote: > > On 20/01/20(Mon) 16:42, Martin Pieuchot wrote: > > > Diff below is a refactoring of the actual em(4) code and defines that > > > will allows me to present a shorter diff to interrup

Re: Remove unused code from vmm

2020-01-30 Thread Mike Larkin
On Fri, Jan 31, 2020 at 01:40:14AM +, Adam Steen wrote: > Hi > > While working on a patch, i noticed that vmm_get_guest_faulttype was > incorrect for amd (VMM_MODE_RVI) cpus, apon further inspection realised > it was unused. Please see the patch below to remove it. > > cheers > Adam > T

Re: xbf(4): tsleep(9) -> tsleep_nsec(9)

2020-01-21 Thread Mike Belopuhov
ot, what is a more appropriate interval? > Hi, I believe it would be fine to use the same value as in the delay, "1" was just the smallest available for the tsleep. OK mikeb for the change. Cheers, Mike > Index: pv/xbf.c > ===

Re: ldomctl: download: select new configuration

2020-01-06 Thread Mike Larkin
On Fri, Jan 03, 2020 at 08:27:21PM +0100, Mark Kettenis wrote: > > Date: Mon, 30 Dec 2019 21:07:59 +0100 > > From: Klemens Nanni > > > > The example in the manual implies that the download command also selects > > it: > > > > # ldomctl init-system ldom.conf > > # cd .. > > # ldomctl

Re: sparc64: find root device on hardware RAID

2019-12-27 Thread Mike Belopuhov
inting things out and asking such questions, this is > very very helpful guidance. I'm looking further into the controller > driver now. Looks like WWID for the RAID volume can be read from the RAID Volume Page 1 (mpii_cfg_raid_vol_pg1). Cheers, Mike

Re: vmctl: print root user in status owner field

2019-12-15 Thread Mike Larkin
On Sat, Dec 14, 2019 at 02:16:20AM +0100, Klemens Nanni wrote: > With "owner root:wheel" (any group) the `vmctl status' output > will omit the "root" part in the OWNER column: > > vm "generic" { > owner "root:vms" > ... > } > > $ vmctl status >

Re: vmm(4) question: unneeded vmclear() in vcpu_readregs_vmx()?

2019-12-12 Thread Mike Larkin
On Tue, Oct 22, 2019 at 06:57:32PM +0900, Iori YONEJI wrote: > On Tue, Oct 22, 2019 at 11:17 AM Mike Larkin wrote: > > > > On Mon, Oct 21, 2019 at 03:52:52AM +0900, Iori YONEJI wrote: > > > Hello tech@, > > > > > > I have a question (or maybe a suggestio

Re: pfctl: Do not optimize empty rulesets

2019-12-12 Thread Mike Belopuhov
Klemens Nanni writes: > On Wed, Nov 27, 2019 at 08:04:47PM +0100, Klemens Nanni wrote: >> If an anchor/ruleset contains no rules, there is no point in creating >> a temporary copy, optimizing and replacing it. >> >> Regress passes on amd64. >> >> Feedback? OK? > Anyone? > FWIW, it looks good

Re: [PATCH] staggered start of vms in vm.conf

2019-12-08 Thread Mike Larkin
On Sun, Dec 08, 2019 at 02:07:46AM -0800, Pratik Vyas wrote: > Hi! > > This is an attempt to address 'thundering herd' problem when a lot of > vms are configured in vm.conf. A lot of vms booting in parallel can > overload the host and also mess up tsc calibration in openbsd guests as > it uses PI

Re: [PATCH] attach pvclock with lower priority if tsc is unstable

2019-12-06 Thread Mike Larkin
On Fri, Dec 06, 2019 at 02:16:43PM -0800, Pratik Vyas wrote: > * Pratik Vyas [2019-11-24 23:07:26 -0800]: > > > Hello tech@, > > > > This diff attaches pvclock with lower priority (500) in case of unstable > > tsc (PVCLOCK_FLAG_TSC_STABLE) instead of not attaching at all. > > > > For reference

Re: uvm/uvm_map.h cleanup

2019-12-06 Thread Mike Larkin
On Thu, Dec 05, 2019 at 07:25:51PM +0100, Martin Pieuchot wrote: > Following cleanup diff: > > - reduces gratuitous differences with NetBSD, > - merges multiple '#ifdef _KERNEL' blocks, > - kills unused 'struct vm_map_intrsafe' > - turns 'union vm_map_object' into a anonymous union (following to N

Re: Kill uvm/uvm_stat.c

2019-12-04 Thread Mike Larkin
On Wed, Dec 04, 2019 at 03:19:41PM +0100, Martin Pieuchot wrote: > Less is more. Fewer files to look at, simpler it becomes to understand > UVM. uvm/uvm_stat.c contains just a ddb(4) function. Let's move it to > uvm/uvm_meter.c which also deals with counters. ok? > Also reads ok to me. -ml >

Re: un-boolean_t amd64's pmap

2019-12-04 Thread Mike Larkin
On Wed, Dec 04, 2019 at 03:31:07PM +0100, Martin Pieuchot wrote: > Similar to recent ddb(4) changes, replace boolean_t/TRUE/FALSE by > int/1/0. > > ok? > No objection here, unsure if anyone else has commented either way. -ml > Index: arch/amd64/amd64/pmap.c > ==

<    1   2   3   4   5   6   7   8   9   10   >