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

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 > ---

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

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

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,

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

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

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

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

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 > >> > >

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

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

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

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

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 >

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: 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,

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

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. > >

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 regardless of

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

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 it > to you

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

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

Re: vmm(4): unterminated vm_name after strncpy

2020-03-15 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,

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:

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

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

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

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

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 >

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: 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 suggest

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

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

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 >

Re: [PATCH] fix vmm pvclock accuracy

2019-11-25 Thread Mike Larkin
On Mon, Nov 25, 2019 at 07:06:19PM -0800, Pratik Vyas wrote: > Hi tech@, > > This patch fixes vmm pvclock accuracy issues. Shift math error > discovered by George Koehler. This diff also fixes the error in tsc > multiplier which was correct only if the host timecounter is tsc. > > -- > Pratik

Re: sdhc(4): no 0V one some Intel

2019-11-19 Thread Mike Larkin
On Tue, Nov 19, 2019 at 10:44:54AM +0100, Patrick Wildt wrote: > Hi, > > on some GPD Pocket mlarkin@ has the eMMC doesn't come up. One issue > is that we shouldn't go to 0V on some/most(?) Intel controllers. This > only adds it for his machine, but I know that the Appollo Lake versions > might

Re: iwm: support 9260 devices

2019-11-16 Thread Mike Larkin
On Sat, Nov 16, 2019 at 05:09:40PM +0100, Stefan Sperling wrote: > On Sat, Nov 16, 2019 at 04:51:44PM +0100, Stefan Sperling wrote: > > This diff adds support for iwm(4) 9260 devices and hopefully 9560 > > devices as well but I have not yet had time to test those. > > > > Joint work with

Re: [PATCH: 1/3] MMIO handler in vmm(4)

2019-11-13 Thread Mike Larkin
On Sat, Nov 02, 2019 at 06:40:52AM +0900, Iori YONEJI wrote: > On Tue, Oct 29, 2019 at 02:17:28AM -0700, Mike Larkin wrote: > > On Thu, Oct 24, 2019 at 08:54:58AM +0900, Iori YONEJI wrote: > > > Hello tech@, > > > > > > Here is the patch discussed in

Re: vmm disk unavailable after forceful vm termination

2019-11-01 Thread Mike Larkin
On Fri, Nov 01, 2019 at 09:20:58AM -0400, Johan Huldtgren wrote: > hello, > > I have vmd running on -current, in it I have an Ubuntu vm (18.04.3 LTS), > every now and then the Ubuntu vm will hang hard, console is dead, only > option is to restart it. Now at that point a graceful restart won't >

Re: [PATCH: 1/3] MMIO handler in vmm(4)

2019-10-29 Thread Mike Larkin
On Thu, Oct 24, 2019 at 08:54:58AM +0900, Iori YONEJI wrote: > Hello tech@, > > Here is the patch discussed in the previous email. This part mainly > covers changes in the declaration part and fault handlers. > Hello, I read through the three diffs and have some feedback. First, please

Re: vmctl: start: Require one interface at minimium with -i

2019-10-27 Thread Mike Larkin
On Sat, Oct 26, 2019 at 12:57:56AM +0200, Klemens Nanni wrote: > It makes no sense to allow zero interfaces; either a positive count is > given or -i is omitted entirely. vm.conf(5) does not allow interface > configuration that results in zero interfaces either. > > $ doas vmctl start

Re: [PATCH: 0/3] MMIO handler in vmm(4)

2019-10-25 Thread Mike Larkin
rth > to use bhyve instruction parser (sys/amd64/vmm/vmm_instruction_emul.c > in FreeBSD). > Discussion: I have only very poor implementation for this part now, > what will be done next? What instruction must be handled? Or is there a > good instruction parser available in our code? M

Re: vmd: static address for local interfaces, fix static tapX names

2019-10-25 Thread Mike Larkin
On Fri, Oct 25, 2019 at 07:47:35PM +, Reyk Floeter wrote: > On Fri, Oct 25, 2019 at 12:27:25PM -0700, Mike Larkin wrote: > > On Fri, Oct 25, 2019 at 06:15:59PM +, Reyk Floeter wrote: > > > Hi, > > > > > > the attached diff is rather large and implement

Re: vmd: static address for local interfaces, fix static tapX names

2019-10-25 Thread Mike Larkin
On Fri, Oct 25, 2019 at 06:15:59PM +, Reyk Floeter wrote: > Hi, > > the attached diff is rather large and implements two things for vmd: > > 1) Allow to configure static IP address/gateway pairs local interfaces. > 2) Skip statically configured interface names (eg. tap0) when > allocating

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

2019-10-22 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 suggest

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

2019-10-21 Thread Mike Larkin
On Mon, Oct 21, 2019 at 03:52:52AM +0900, Iori YONEJI wrote: > Hello tech@, > > I have a question (or maybe a suggestion) about vmm(4). > > I'm writing a small additional feature to sys/arch/amd64/amd64/vmm.c > and found a seemingly unneeded vmclear() at the end of > vcpu_readregs_vmx(). This

Re: net80211: fix discarded input control frame count

2019-10-06 Thread Mike Larkin
On Sun, Oct 06, 2019 at 12:04:49PM +0200, Stefan Sperling wrote: > The net80211 stack currently displays every received control frame > as "discarded input control packet" in netstat(1). > > We do in fact process "power saving poll" and "block ack request" frames. > Such frames should not be

Re: pretty borders for slitherins

2019-09-25 Thread Mike Larkin
On Wed, Sep 25, 2019 at 10:53:21AM -0600, Theo de Raadt wrote: > Ted Unangst wrote: > > > Scott Cheloha wrote: > > > On Mon, Sep 23, 2019 at 06:23:32PM -0400, Ted Unangst wrote: > > > > snake and worm draw boxes, but they can be prettier by using the default > > > > style, which will use line

Re: vmd(8): fix memory leak in virtio network TX path

2019-09-24 Thread Mike Larkin
On Mon, Sep 23, 2019 at 08:44:01AM +0200, Theo Buehler wrote: > On Sun, Sep 22, 2019 at 02:42:28AM -0700, Mike Larkin wrote: > > We allocate a 'pkt' for each network packet in the queue, but only were > > freeing the last one. This has always been a bug, but it looks like rec

vmd(8): fix memory leak in virtio network TX path

2019-09-22 Thread Mike Larkin
We allocate a 'pkt' for each network packet in the queue, but only were freeing the last one. This has always been a bug, but it looks like recent changes elsewhere in the network stack may have made the problem more apparent since more packets seem to be deposited in the queue for each TX

Re: EFI frame buffer > 4GB

2019-09-20 Thread Mike Larkin
On Fri, Sep 20, 2019 at 03:35:00PM +0200, Mark Kettenis wrote: > > Date: Fri, 20 Sep 2019 06:06:40 -0700 > > From: Mike Larkin > > > > On Fri, Sep 20, 2019 at 02:22:13PM +0200, Mark Kettenis wrote: > > > > Date: Fri, 20 Sep 2019 02:55:27 -0700 > > >

Re: EFI frame buffer > 4GB

2019-09-20 Thread Mike Larkin
On Fri, Sep 20, 2019 at 02:22:13PM +0200, Mark Kettenis wrote: > > Date: Fri, 20 Sep 2019 02:55:27 -0700 > > From: Mike Larkin > > > > On Fri, Sep 20, 2019 at 01:09:56AM +0900, YASUOKA Masahiko wrote: > > > Hi, > > > > > > I recently got

Re: EFI frame buffer > 4GB

2019-09-20 Thread Mike Larkin
On Fri, Sep 20, 2019 at 01:09:56AM +0900, YASUOKA Masahiko wrote: > Hi, > > I recently got a VAIO Pro PK. The diff below is required to boot. > Without the diff, it freezes during boot. > > Its EFI framebuffer is located 0x40 (9 zeros). This is > 4GB > and higher than highest available

Re: New driver for AMD CPU temperature sensor over SMN

2019-09-19 Thread Mike Larkin
On Tue, Sep 17, 2019 at 12:41:11PM -0400, Bryan Steele wrote: > Unlike with previous generations of AMD processors, the on-die > temperature sensor is only available from reading from the SMU > co-processor over an internal network (SMN), this includes all > Ryzen CPUs and some later Family 15h

Re: [patch] vmd: fix possible small memleak in vm_claimid() error path

2019-09-04 Thread Mike Larkin
On Thu, Aug 29, 2019 at 07:43:31PM +0200, Hiltjo Posthuma wrote: > Hi, > > This fixes a small possible memory leak in an error handling path in vmd.c > vm_claimid(). > > > diff --git usr.sbin/vmd/vmd.c usr.sbin/vmd/vmd.c > index 654af5974d3..81be6b356d6 100644 > --- usr.sbin/vmd/vmd.c > +++

Re: vmd(8): remove unused error code

2019-09-02 Thread Mike Larkin
On Mon, Sep 02, 2019 at 12:43:18AM +0200, Tobias Heider wrote: > The VMD_DISK_INVALID error code is no longer used since > https://marc.info/?l=openbsd-cvs=153147762830175 and > can be removed. > > Ok? > > Index: vmctl/vmctl.c > ===

Re: Another dwiic(4) fix

2019-08-17 Thread Mike Larkin
On Sat, Aug 17, 2019 at 06:42:01PM +0200, Mark Kettenis wrote: > The timeout when waiting for data to be received for polled mode is > too small for taling to the BMC on the Ampere/Lenovo arm64 server. > This bumps it to 50 ms, which is still lower than what it is for > non-polled mode. > > I

Re: drm acpi diff

2019-08-16 Thread Mike Larkin
On Fri, Aug 16, 2019 at 10:21:33PM +0200, Mark Kettenis wrote: > The diff below provides a minimal implementation of some of the Linux > ACPI iterfaces. Enough to allow us to compile the ACPI code for > radeon(4) and amdgpu(4). With this diff the brightness keys on my HP > laptop with: > >

Re: vmctl: invalid parent template error

2019-08-12 Thread Mike Larkin
On Mon, Aug 12, 2019 at 06:20:23PM +0200, Anton Lindqvist wrote: > On Mon, Aug 12, 2019 at 02:52:46PM +0200, Klemens Nanni wrote: > > On Mon, Aug 12, 2019 at 02:14:42PM +0200, Anton Lindqvist wrote: > > > Hi, > > > I recently fat fingered the vm template passed to vmctl and was greeted > > > with

Re: TSC synchronization on MP machines

2019-08-05 Thread Mike Larkin
On Tue, Aug 06, 2019 at 12:38:51AM +0200, Mark Kettenis wrote: > > Date: Mon, 5 Aug 2019 16:58:27 +0300 > > From: Paul Irofti > > > > On Fri, Aug 02, 2019 at 01:29:37PM +0300, Paul Irofti wrote: > > > On Mon, Jul 01, 2019 at 10:32:51AM +0200, Mark Kettenis wrote: > > > > > Date: Thu, 27 Jun 2019

Re: ihidev: always register interrupt, stop polling if it fires

2019-07-19 Thread Mike Larkin
On Fri, Jul 19, 2019 at 02:16:18PM -0500, joshua stein wrote: > The fast polling of ihidev may cause a problem during suspend/resume > because dwiic may be in an unknown state, so add a DVACT_QUIESCE > handler to properly shut it down. > > Even if polling is requested, register the interrupt

Re: use SMBIOS for inteldrm panel orientation quirks

2019-07-12 Thread Mike Larkin
On Fri, Jul 12, 2019 at 02:27:15PM +1000, Jonathan Gray wrote: > Use SMBIOS data for panel orientation. Uses BIOS dates when other > strings are generic. > > There are orientation quirks in drm_panel_orientation_quirks.c for: > Acer One 10 (S1003) > Asus T100HA > GPD MicroPC

Re: Pump my sched: fewer SCHED_LOCK() & kill p_priority

2019-06-21 Thread Mike Larkin
On Fri, Jun 21, 2019 at 05:11:26PM -0300, Martin Pieuchot wrote: > On 06/06/19(Thu) 15:16, Martin Pieuchot wrote: > > On 02/06/19(Sun) 16:41, Martin Pieuchot wrote: > > > On 01/06/19(Sat) 18:55, Martin Pieuchot wrote: > > > > Diff below exists mainly for documentation and test purposes. If > > >

Re: Pump my sched: fewer SCHED_LOCK() & kill p_priority

2019-06-06 Thread Mike Larkin
On Thu, Jun 06, 2019 at 02:55:35PM +0100, Stuart Henderson wrote: > I'm testing the "pump my sched" and read/write unlock diffs and ran into > the panic below. Seems more likely that it would be connected with the > sched diff rather than anything else. I'll build a WITNESS kernel and > see if I

Re: vmd(8) i8042 device implementation questions

2019-06-05 Thread Mike Larkin
On Sat, Jun 01, 2019 at 06:12:16PM -0500, Katherine Rohl wrote: > Couple questions: > > > This means no interrupt will be injected. I'm not sure if that's what you > > want. > > See vm.c: vcpu_exit_inout(..). It looks like you may have manually asserted > > the > > IRQ in this file, which is a

Re: vmd(8) i8042 device implementation questions

2019-06-05 Thread Mike Larkin
On Sun, Jun 02, 2019 at 03:21:34PM +0200, Jasper Lievisse Adriaanse wrote: > On Sat, Jun 01, 2019 at 06:12:16PM -0500, Katherine Rohl wrote: > > Couple questions: > > > > > This means no interrupt will be injected. I'm not sure if that's what you > > > want. > > > See vm.c: vcpu_exit_inout(..).

Re: Pump my sched: fewer SCHED_LOCK() & kill p_priority

2019-06-04 Thread Mike Larkin
On Mon, Jun 03, 2019 at 11:50:14AM +0200, Solene Rapenne wrote: > On Sat, Jun 01, 2019 at 06:55:20PM -0300, Martin Pieuchot wrote: > > Diff below exists mainly for documentation and test purposes. If > > you're not interested about how to break the scheduler internals in > > pieces, don't read

Re: vmd(8) i8042 device implementation questions

2019-05-31 Thread Mike Larkin
On Thu, May 30, 2019 at 11:06:57PM -0500, Katherine Rohl wrote: > Apologies. > > --- > Hi Katherine, Thanks for the diff. I think we are getting close! A few comments below. -ml > diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c > index 4ffb2ff899f..7de38facc78 100644 >

Re: MSI-X fix

2019-05-30 Thread Mike Larkin
On Thu, May 30, 2019 at 08:25:39PM +0200, Mark Kettenis wrote: > I started implementing MSI-X support for arm64 adn tried to use re(4) > for testing. This failed miserably and when I tried to use MSI-X with > re(4) on amd64 I noticed it didn't work either. > > Turns out the Realtek hardware

Re: vmd(8) i8042 device implementation questions

2019-05-29 Thread Mike Larkin
On Tue, May 28, 2019 at 09:57:02PM -0500, Katherine Rohl wrote: > I have my i8042 device for vmd(8) mostly implemented. It’s only missing a few > commands, but since there are no PS/2 input devices yet, there isn’t very > much in the way of testing I can do beyond ensuring that commands act as

Re: Attach kvm-clock to Linux guests on VMM

2019-05-27 Thread Mike Larkin
On Mon, May 27, 2019 at 03:53:11AM -0700, Renato Aguiar wrote: > Hi, > > The following patch makes Linux guests use kvm-clock by setting KVM's CPUID > signature on VMM: > By saying the hypervisor is KVM to all guests, does this cause the guests to make other assumptions we don't want? > Index:

Re: vmd(8): slight NS8250 fix

2019-05-27 Thread Mike Larkin
On Sun, May 26, 2019 at 11:38:37PM -0700, Mike Larkin wrote: > On Wed, May 22, 2019 at 08:05:50PM -0500, Katherine Rohl wrote: > > Hi, > > > > Adjusted NS8250 behavior in vmd(8) so it gets detected as an 8250 and not a > > 16450 by OpenBSD’s boot process. Also g

Re: vmd(8): slight NS8250 fix

2019-05-27 Thread Mike Larkin
On Wed, May 22, 2019 at 08:05:50PM -0500, Katherine Rohl wrote: > Hi, > > Adjusted NS8250 behavior in vmd(8) so it gets detected as an 8250 and not a > 16450 by OpenBSD’s boot process. Also generalized some of the COM1-specific > I/O address definitions to support adding COM2 (and COM3, and

Re: vmd: tweak mc146818 periodic interrupt updating

2019-05-26 Thread Mike Larkin
On Sun, May 26, 2019 at 08:14:43PM +0200, Jasper Lievisse Adriaanse wrote: > Hi, > > Whilst looking at the mc146818 code in vmd I noticed something that initially > struck > me as a pasto as the same code is present in the rtc_update_regb() function. > However > it led me to look at how other

Re: vmd(8): slight NS8250 fix

2019-05-25 Thread Mike Larkin
the best for submitting these patches anyway?) > > Katherine > > > On May 23, 2019, at 12:22 AM, Mike Larkin wrote: > > > > > I will do a quick test and try to commit this weekend. Thanks! -ml

Re: vmd(8): slight NS8250 fix

2019-05-22 Thread Mike Larkin
On Wed, May 22, 2019 at 08:05:50PM -0500, Katherine Rohl wrote: > Hi, > > Adjusted NS8250 behavior in vmd(8) so it gets detected as an 8250 and not a > 16450 by OpenBSD’s boot process. Also generalized some of the COM1-specific > I/O address definitions to support adding COM2 (and COM3, and

Re: efiboot: allow bigger ucodes

2019-05-22 Thread Mike Larkin
On Tue, May 21, 2019 at 12:33:24AM +0200, Mark Kettenis wrote: > > Date: Sat, 18 May 2019 05:58:39 +0200 (CEST) > > From: Mark Kettenis > > > > > Date: Fri, 17 May 2019 17:56:52 -0400 > > > From: Patrick Wildt > > > > > > Hi, > > > > > > claudio@ has a Kaby Lake that exceeds the 128 kB limit,

Re: amd64: i8254_delay(): simpler microsecond->ticks conversion

2019-05-18 Thread Mike Larkin
On Sun, May 19, 2019 at 12:47:11AM -0500, Scott Cheloha wrote: > This code is really fidgety and I think we can do better. > > If we use a 64-bit value here for microseconds the compiler arranges > for all the math to be done with 64-bit quantites. I'm pretty sure > this is standard C numeric

  1   2   3   4   5   6   >