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

Re: efiboot: allow bigger ucodes

2019-05-18 Thread Mike Larkin
On Sat, May 18, 2019 at 05:58:39AM +0200, Mark Kettenis wrote: > > Date: Fri, 17 May 2019 17:56:52 -0400 > > From: Patrick Wildt > > > > Hi, > > > > claudio@ has a Kaby Lake that exceeds the 128 kB limit, being as big as > > 190 kB. So, for him the ucode isn't being loaded. > > > > On EFI

Re: efiboot: allow bigger ucodes

2019-05-17 Thread Mike Larkin
On Fri, May 17, 2019 at 05:56:52PM -0400, Patrick Wildt wrote: > Hi, > > claudio@ has a Kaby Lake that exceeds the 128 kB limit, being as big as > 190 kB. So, for him the ucode isn't being loaded. > > On EFI systems we can simply ask EFI to allocate some memory for us. > I'm not sure why this

Re: Reduce the scope of SCHED_LOCK()

2019-05-15 Thread Mike Larkin
On Sun, May 12, 2019 at 06:17:04PM -0400, Martin Pieuchot wrote: > People started complaining that the SCHED_LOCK() is contended. Here's a > first round at reducing its scope. > > Diff below introduces a per-process mutex to protect time accounting > fields accessed in tuagg(). tuagg() is

Re: Unlock uvm a tiny bit more

2019-05-15 Thread Mike Larkin
On Tue, May 14, 2019 at 12:13:52AM +0200, Mark Kettenis wrote: > This changes uvm_unmap_detach() to get rid of the "easy" entries first > before grabbing the kernel lock. Probably doesn't help much with the > lock contention, but it avoids a locking problem that happens with > pools that use

Re: vm.conf: boot-device

2019-05-12 Thread Mike Larkin
On Sun, May 12, 2019 at 08:50:51PM +0200, Anton Lindqvist wrote: > On Wed, May 08, 2019 at 01:02:10PM -0700, Mike Larkin wrote: > > On Wed, May 08, 2019 at 09:41:42PM +0200, Anton Lindqvist wrote: > > > On Wed, May 08, 2019 at 07:19:45PM +0200, Reyk Floeter wrote: > >

Re: vm.conf: boot-device

2019-05-08 Thread Mike Larkin
On Wed, May 08, 2019 at 09:41:42PM +0200, Anton Lindqvist wrote: > On Wed, May 08, 2019 at 07:19:45PM +0200, Reyk Floeter wrote: > > On Wed, May 08, 2019 at 06:47:53PM +0200, Anton Lindqvist wrote: > > > Hi, > > > A first stab at adding support for option `-B device' to vm.conf(5). > > > With the

Re: trailing whitespace policy

2019-05-05 Thread Mike Larkin
On Sun, Apr 14, 2019 at 11:55:01AM +0900, Jerome Pinot wrote: > Hi, > > I saw a recent commit in armv7 which fixed some KNF but added some > trailing white spaces. > I already saw some commit that removed trailing white spaces and thought > about sending a patch (actually joined here). > I

Re: More randomness for efiboot on amd64

2019-05-05 Thread Mike Larkin
On Sat, May 04, 2019 at 03:03:50PM -0600, Theo de Raadt wrote: > Nice. > > Mike -- does this collide with your current work, or does it > not impact it? > This won't collide. Thanks for checking though. -ml > Mark Kettenis wrote: > > > The UEFI standard defines an (optional) protocol for

Re: Small puc(4) fix

2019-05-05 Thread Mike Larkin
On Sun, May 05, 2019 at 12:57:47PM +0200, Mark Kettenis wrote: > I noticed that Intel AMT Serial-over-LAN prints the following: > > puc0 at pci0 dev 22 function 3 "Intel 9 Series KT" rev 0x03: ports: 16 com > > Now there certainly is only 1 com port on the device instead of 16 and > this is

Re: ccp(4) support for AMD Ryzen 3 PRO 2200GE

2019-05-01 Thread Mike Larkin
On Wed, May 01, 2019 at 06:26:49PM +0200, Mark Kettenis wrote: > Linux doesn't have this yet, so this is pure guesswork, and I pulled > the name out of my ass. But the numbers I get look random enough. > > ok? > Sure, ok mlarkin if you didn't commit already > P.S. I think it would make sense

Re: dwxe: resetting interface on watchdog timeout

2019-04-17 Thread Mike Larkin
On Wed, Apr 17, 2019 at 09:44:43AM +0200, Sebastien Marie wrote: > Hi, > > With a pine64, I am experimenting regulary dwxe watchdog > timeout. Usually it is a sign that something doesn't work in the driver > itself. > > The problem I am facing currently is when watchdog timeout occurs, > the

Re: azalia: dolby atmos suspend/resume fix

2019-04-08 Thread Mike Larkin
On Mon, Apr 08, 2019 at 10:27:06AM +0200, Stefan Sperling wrote: > The dolby atmos hack is currently only run during boot, but it > becomes ineffective after a suspend/resume cycle. So sound plays > fine after a reboot but is only playing from the left speaker > after suspend/resume. > > This

Re: vmctl: report reliable VM state

2019-04-01 Thread Mike Larkin
On Mon, Apr 01, 2019 at 06:05:38PM +0200, Klemens Nanni wrote: > As of now, `vmctl status test' will tell you whether the VM is running > or not; except that "STATE" actually denotes whether the VCPU is > currently running or haltet, not whether the VM is started/running or > stopped. > > I

Re: hibernate_io function

2019-03-29 Thread Mike Larkin
rch 29, 2019 7:05:54 AM > To: Mike Larkin > Cc: Shivaprashanth H; tech@openbsd.org > Subject: Re: hibernate_io function > > Mike Larkin wrote: > > > On Thu, Mar 28, 2019 at 07:02:11AM +, Shivaprashanth H wrote: > > > hi Larkin, > > > > > > ye

Re: hibernate_io function

2019-03-28 Thread Mike Larkin
free I/O function. IIRC when I wrote that code, I put one struct at one end of the private page and the other struct at the other end. I am not sure if FreeBSD has a similar concept. Good luck. -ml > ____ > From: Mike Larkin > Sent: Thursday,

Re: hibernate_io function

2019-03-28 Thread Mike Larkin
On Thu, Mar 28, 2019 at 06:03:25AM +, Shivaprashanth H wrote: > the get_hibernate_io_function() in sys/arch/amd64/amd64/hibernate_machdep.c > > support for 'wd' and 'sd' (ahci, nvme, softraid, sdmmc) are present > > in my system i see /dev/ada0 > > so which of the above are compatible with

Re: Ext4 and suspend

2019-03-18 Thread Mike Larkin
On Mon, Mar 18, 2019 at 10:42:50PM +0200, Ville Valkonen wrote: > Hello, > > just a hint for those who are having ext4 partitions mounted: that > will prohibit suspend to work. > > Pardon for my unscientific claim, but If I'm not correctly mistaken > this was related to changes that made syncing

Re: Thinkpad X1 5th gen TPM chip

2019-03-11 Thread Mike Larkin
Linux and even Windows on this > model, so I'm not even certain it's a software issue. Then again, two > (different) colleagues run Arch Linux on their X1 5gs and have no problem > suspending. > > Cheers! > > Edd Barrett > I see. Good luck in your diagnosis! -ml

Re: Thinkpad X1 5th gen TPM chip

2019-03-11 Thread Mike Larkin
On Mon, Mar 11, 2019 at 11:24:42AM +, Edd Barrett wrote: > Hi, > > I was looking at the manual page for tpm(4) and noticed that it has > something to to with suspend/resume: > > > Functionality is limited to instructing the device to save its > > state before a system suspend. > >

Re: vmd/vmctl: improve VM name checks/error handling

2019-03-07 Thread Mike Larkin
On Thu, Mar 07, 2019 at 08:52:45PM +0100, Klemens Nanni wrote: > vmd(8) does not support numerical names with `start' and `receive'. > It never worked, the manuals are now clearer about this, but error > handling can still be improved: > > $ vmctl start 60 -t test -d 60.qcow2 > vmctl:

Re: vmctl: usage on extra arguments

2019-03-01 Thread Mike Larkin
On Fri, Mar 01, 2019 at 01:37:58PM +0100, Antoine Jacoutot wrote: > On Fri, Mar 01, 2019 at 01:28:58PM +0100, Klemens Nanni wrote: > > I blatantly missed the argc/argv adjustments after getopt(3), resulting > > in valid commands like `vmctl create a -s 1G' to fail. > > > > Noticed by ajacoutot

Re: vmctl: usage on extra arguments

2019-02-28 Thread Mike Larkin
On Fri, Mar 01, 2019 at 01:33:48AM +0100, Klemens Nanni wrote: > tedu's apm(8) diff reminded me that certain vmctl(8) commands are too > relaxed: > > $ vmctl start a b > vmctl: start vm command failed: Operation not permitted > $ vmctl stop a b > stopping vm a: vm not

Re: amd64: update PTDpaddr with new PA of PML4 for libkvm

2019-02-13 Thread Mike Larkin
On Wed, Feb 13, 2019 at 05:40:45PM +0900, Naoki Fukaumi wrote: > Hi Mike Larkin, > > since pmap_kernel is randomized, savecore(libkvm) cannot save core > dump from dump device. (savecore: magic number mismatch) > > updating PTDpaddr fixes this issue. > > by the way, is

vmd: change virtio network interface numbering

2019-01-22 Thread Mike Larkin
I just committed a change to move the virtio network interfaces before disks in the PCI device ordering in vmd(8). This is to fix some strangeness in how Linux assigns device numbers (based on the PCI slot number). On some Linux guests, you'll get a virtio network interface named enp0s3 (for

Re: [PATCH 6/7] Rework virtio_negotiate_features()

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:34PM +0100, Stefan Fritsch wrote: > Add a sc_driver_features field that is automatically used by > virtio_negotiate_features() and during reinit. > > Make virtio_negotiate_features() return an error code. Virtio 1.0 has a > special status bit for feature negotiation

Re: [PATCH 7/7] Support virtio 1.0 for virtio_pci

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:35PM +0100, Stefan Fritsch wrote: > virtio 1.0 for virtio_mmio it not yet implemented, but 0.9 devices > continue to work. > --- This one also should have someone who is well versed in PCI take a look. -ml > share/man/man4/virtio.4 | 11 +- >

Re: [PATCH 4/7] virtio_pci: Split bus space handles

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:32PM +0100, Stefan Fritsch wrote: > In virtio_pci 1.0, different parts of the register set may be located in > different BARs. Use subregions to make the access independent of the > virtio version. > --- This one will need someone more well versed in PCI BARs/etc to

Re: [PATCH 5/7] virtio_pci: Move msix vector config into functions

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:33PM +0100, Stefan Fritsch wrote: > --- > sys/dev/pci/virtio_pci.c | 38 -- > 1 file changed, 24 insertions(+), 14 deletions(-) > ok mlarkin > diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c > index

Re: [PATCH 3/7] virtio: Add a few feature bit defines and names

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:31PM +0100, Stefan Fritsch wrote: > --- > sys/dev/pv/if_vio.c| 84 +++--- > sys/dev/pv/vioblk.c| 3 ++ > sys/dev/pv/vioblkreg.h | 21 ++- > sys/dev/pv/virtio.c| 1 + > 4 files changed, 62 insertions(+), 47

Re: [PATCH 1/7] virtio: adjust virtio_setup_queue prototype for 1.0

2019-01-19 Thread Mike Larkin
On Sat, Jan 19, 2019 at 05:37:29PM +0100, Stefan Fritsch wrote: > Make it take an address instead of a PFN. > Pass the virtqueue pointer. In virtio 1.0, more information has to be > configured in the device. Also call virtio_setup_queue() after the > information has been filled in. > --- >

Re: bwfm(4): show media mode, TX rate, and RSSI

2019-01-16 Thread Mike Larkin
On Wed, Jan 16, 2019 at 11:52:37AM +0100, Stefan Sperling wrote: > On Wed, Jan 16, 2019 at 11:20:43AM +0100, Stefan Sperling wrote: > > On Tue, Jan 15, 2019 at 04:36:18PM -0800, Mike Larkin wrote: > > > I have th USB bwfm(4), and I don't see anything different in ifc

Re: bwfm(4): show media mode, TX rate, and RSSI

2019-01-15 Thread Mike Larkin
On Tue, Jan 15, 2019 at 10:01:42PM +0100, Stefan Sperling wrote: > This diff makes 'ifconfig bwfm0' display whether 11n is active or not, > what the current Tx rate is, and show up-to-date RSSI measurements. > I'm leaving display of 11ac Tx rates for future work because that will > require a

Re: Add virtio 1.0 pci ids

2019-01-10 Thread Mike Larkin
On Thu, Jan 10, 2019 at 06:59:15PM +0100, Stefan Fritsch wrote: > Everything above 0x1040 is 1.x only. > > Also tweak descriptoin of memory balloon device. There will be a memory, > too. > > OK? > ok > diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs > index

Re: Fwd: vmd console freeze and locked (?) qcow2 image

2019-01-05 Thread Mike Larkin
> From: Thomas L. > Date: Fri, Jan 4, 2019 at 8:53 AM > Subject: vmd console freeze and locked (?) qcow2 image > To: > > > Hi, > > I am running -current and installed Arch Linux on vmd. > Unfortunatly, after a while the vmd console freezes. > I tried stoping the vm with vmctl stop, but it

Re: Please test: HZ bump

2018-12-25 Thread Mike Larkin
On Tue, Dec 25, 2018 at 06:37:03PM -0200, Martin Pieuchot wrote: > On 24/12/18(Mon) 20:07, Scott Cheloha wrote: > > On Tue, Dec 18, 2018 at 03:39:43PM -0600, Ian Sutton wrote: > > > On Mon, Aug 14, 2017 at 3:07 PM Martin Pieuchot wrote: > > > > > > > > I'd like to improve the fairness of the

Re: vmd loadfile_elf cleanup

2018-12-12 Thread Mike Larkin
On Wed, Dec 12, 2018 at 12:25:01PM +0100, Claudio Jeker wrote: > Doing some additional cleanup in loadfile_elf.c (the code used for -b bsd) > > - switch com port to 115200 instead of 9600 (our own bootloader does the > same when booted in a VM). > - use the new write_mem(addr, NULL, size) code

Re: vmd: set dhcp hostname option during netboot

2018-12-10 Thread Mike Larkin
On Tue, Dec 11, 2018 at 08:08:38AM +0100, Anton Lindqvist wrote: > On Mon, Dec 10, 2018 at 09:40:41PM -0800, Mike Larkin wrote: > > On Mon, Dec 10, 2018 at 07:27:40PM -0800, Carlos Cardenas wrote: > > > On Sat, Dec 08, 2018 at 10:13:47AM +0100, Anton Lindqvist wrote: > > &

Re: add more bootdevices to vmctl

2018-12-10 Thread Mike Larkin
On Mon, Dec 10, 2018 at 10:35:23PM +0100, Claudio Jeker wrote: > Now that fw_cfg support is in vmd it makes sense to have -B disk > and -B cdrom. Also error out if the option is not known. > > This allows to use -B cdrom to force booting from the cdrom disk image > e.g. to update the VM image. >

Re: vmd: set dhcp hostname option during netboot

2018-12-10 Thread Mike Larkin
On Mon, Dec 10, 2018 at 07:27:40PM -0800, Carlos Cardenas wrote: > On Sat, Dec 08, 2018 at 10:13:47AM +0100, Anton Lindqvist wrote: > > Hi, > > I've been trying out the new fake netboot feature in vmd. Overall, a > > great addition that removed the need for me to run dhcpd/rebound locally > > to

Re: vmd(4) fw_cfg support

2018-12-10 Thread Mike Larkin
On Mon, Dec 10, 2018 at 05:52:43PM +0100, Claudio Jeker wrote: > This adds the fw_cfg interface that QEMU is using to pass data to the > BIOS. It implements both IO port access and DMA access. SeaBIOS will use > the latter if available. This should be useful for adding ACPI tables or > SMBIOS

Re: vmm(4) allow IO ports for fw_cfg interface

2018-12-10 Thread Mike Larkin
On Mon, Dec 10, 2018 at 05:29:39PM +0100, Claudio Jeker wrote: > qemu has the fw_cfg mechanism to pass data from the emulator to the bios. > SeaBIOS also includes fw_cfg support and so it makes sense to add this to > vmd(4) as well. To make this happen the following IO ports need to be > forwarded

Re: Add new PCI product IDs

2018-11-30 Thread Mike Larkin
On Wed, Nov 07, 2018 at 11:33:55AM -0800, Peter Ezetta wrote: > Ping > Thanks, committed. I changed the first name a bit to remain more inline with our current naming scheme. -ml > On Thu, Oct 25, 2018 at 2:46 PM Peter Ezetta wrote: > > > Hello, > > > > Diff below adds product IDs for the

Re: pvclock(4)

2018-11-22 Thread Mike Larkin
On Thu, Nov 22, 2018 at 04:37:49PM +0100, Reyk Floeter wrote: > On Mon, Nov 19, 2018 at 01:12:46PM +0100, Reyk Floeter wrote: > > the attached diff is another attempt at implementing a pvclock(4) > > guest driver. This improves the clock on KVM and replaces the need > > for using the VM-expensive

Re: add core4g thermal id to pcidevs

2018-11-20 Thread Mike Larkin
On Sat, Nov 10, 2018 at 04:02:15PM -0500, Daniel Dickman wrote: > Add core 4g thermal id from one of my systems. ok? > sure, ok mlarkin -ml > > Index: pcidevs > === > RCS file: /cvs/src/sys/dev/pci/pcidevs,v > retrieving revision

Re: pcidevs update for VIA HD Audio device

2018-11-01 Thread Mike Larkin
On Thu, Nov 01, 2018 at 11:07:21PM +0100, Frederic Cambus wrote: > Hi tech@, > > Add ID for a VIA HD Audio device found on my HP t5570 Thin Client. > > While there, update URL for the vendor ID search engine. > > Comments? OK? > ok mlarkin > Index: sys/dev/pci/pcidevs >

Re: Qcow2: Clean up logging/error handling

2018-10-31 Thread Mike Larkin
On Tue, Oct 30, 2018 at 10:41:21PM -0700, o...@eigenstate.org wrote: > > On Tue, Oct 30, 2018 at 10:32:37PM -0700, Ori Bernstein wrote: > >> On Tue, 30 Oct 2018 22:29:01 -0700, Mike Larkin > >> wrote: > >> > >> > > -

Re: Qcow2: Clean up logging/error handling

2018-10-30 Thread Mike Larkin
On Tue, Oct 30, 2018 at 10:32:37PM -0700, Ori Bernstein wrote: > On Tue, 30 Oct 2018 22:29:01 -0700, Mike Larkin wrote: > > > > - if (disk->base->clustersz != disk->clustersz) { > > > - log_warn("%s: all disks must share clustersi

Re: Qcow2: Clean up logging/error handling

2018-10-30 Thread Mike Larkin
On Tue, Oct 30, 2018 at 10:01:08PM -0700, Ori Bernstein wrote: > On Sun, 28 Oct 2018 00:58:57 +0200, Reyk Floeter wrote: > > > Most of these are fatal and log_debug. Keep the __func__ there! But we___ll > > remove it from other logging functions where it was never intended to be > > used and

Re: kernel page fault in vm_teardown

2018-10-30 Thread Mike Larkin
On Tue, Oct 30, 2018 at 09:17:19PM -0700, Greg Steuck wrote: > My syzkaller machine running a recent snapshot just crashed. The value > 0x415efd243b54d319 passed into uvm_map_deallocate looks quite fishy to me. > Known issue. And the parameters in the list aren't right (there needs to be

Re: Qcow2: Clean up logging/error handling

2018-10-27 Thread Mike Larkin
On Sun, Oct 28, 2018 at 12:58:57AM +0200, Reyk Floeter wrote: > Most of these are fatal and log_debug. Keep the __func__ there! But we’ll > remove it from other logging functions where it was never intended to be used > and potentially reword the warnings nicely. > > Reyk > Yep. If I added

Re: i386: build working kernel with lld

2018-10-26 Thread Mike Larkin
On Fri, Oct 26, 2018 at 01:55:08PM +0200, Christian Weisgerber wrote: > Move the calculation of the entry point to after the description > of the .text section. LOADADDR(.text) is not available earlier > with lld. > > With this, lld builds working kernels on i386. > > Also: Should this be

Re: Add PCI ID for VirtualBox NVMe

2018-10-25 Thread Mike Larkin
On Thu, Jul 19, 2018 at 07:19:55PM -0500, Andrew Daugherity wrote: > This is strictly a cosmetic change, as it already gets bound to > nvme(4) and works properly, but is currently identified as an unknown > product. > > > diff --git a/sys/dev/pci/pcidevs b/sys/dev/pci/pcidevs > index

Re: Allow vmd to specify which ports it can handle

2018-10-24 Thread Mike Larkin
On Tue, Oct 23, 2018 at 09:53:48PM +, Adam Steen wrote: > Hi tech > > The following diff allows vmd to specify which ports it can handle > or fix "XXX something better than a hardcoded list here, maybe configure via > vmd via the device list in vm create params?" > > There are currently two

Re: Add acpipci(4) on amd64

2018-10-23 Thread Mike Larkin
On Mon, Oct 22, 2018 at 09:45:06PM +0200, Mark Kettenis wrote: > Diff below adds an acpipci(4) driver on amd64. For now the main > purpose of this driver is to make the PCI-specific _OSC calls to > advertise the functionality we support. Most notably this advertises > support for PCIE native

Re: More km_alloc(9)

2018-10-22 Thread Mike Larkin
On Mon, Oct 22, 2018 at 08:41:44PM +0200, Mark Kettenis wrote: > Had the diff below in my tree for a very long time. Switch several > uvm_km_alloc()/uvm_km_valloc() calls over to km_alloc(). > > ok? > ok but there is a knf spacing issue (end-pa). other than that nit, ok mlarkin > > Index:

Re: [RFC PATCH] [vmm] Lightweight mechanism to kick virtio VQs

2018-10-17 Thread Mike Larkin
On Fri, Oct 05, 2018 at 12:07:13PM +0200, Sergio Lopez wrote: > Hi, > > This patch implements a mechanism to allow users register an I/O port > with a special file descriptor (kickfd) which can be monitored for > events using kevent. The kernel will note an event each time the Guest > writes to

Re: vmd: servicing virtio devices from separate processes

2018-10-17 Thread Mike Larkin
On Thu, Oct 11, 2018 at 11:55:51PM +0200, Sergio Lopez wrote: > On Thu, 2018-10-11 at 09:02 -0700, Mike Larkin wrote: > > On Wed, Oct 10, 2018 at 05:04:34PM +0200, Sergio Lopez wrote: > > > On Mon, 2018-10-08 at 09:58 -0700, Mike Larkin wrote: > > > > On Fri, Oc

Re: vmd: servicing virtio devices from separate processes

2018-10-17 Thread Mike Larkin
On Fri, Oct 05, 2018 at 01:50:10PM +0200, Sergio Lopez wrote: > Hi, > > I have an idea in mind that I'd like to share to ask you if you think > it's worth giving it a try. I had a chance to think further on this. See comments inline. > > Right now, vmd already features an excellent privsep

Re: vmd: servicing virtio devices from separate processes

2018-10-11 Thread Mike Larkin
On Wed, Oct 10, 2018 at 05:04:34PM +0200, Sergio Lopez wrote: > On Mon, 2018-10-08 at 09:58 -0700, Mike Larkin wrote: > > On Fri, Oct 05, 2018 at 01:50:10PM +0200, Sergio Lopez wrote: > > > Hi, > > > > > > I have an idea in mind that I'd like to share to a

Re: vmd: servicing virtio devices from separate processes

2018-10-08 Thread Mike Larkin
On Fri, Oct 05, 2018 at 01:50:10PM +0200, Sergio Lopez wrote: > Hi, > > I have an idea in mind that I'd like to share to ask you if you think > it's worth giving it a try. > > Right now, vmd already features an excellent privsep model to ensure > the process servicing the VM requests to the

Re: vmd: division by zero in vcpu_process_com_data

2018-10-03 Thread Mike Larkin
On Wed, Oct 03, 2018 at 12:19:09PM -0700, Mike Larkin wrote: > On Wed, Oct 03, 2018 at 12:13:05PM -0700, Mike Larkin wrote: > > On Wed, Oct 03, 2018 at 12:06:47PM -0700, Pratik Vyas wrote: > > > * Greg Steuck [2018-10-03 11:40:22 -0700]: > > > > > > > $ e

Re: vmd: division by zero in vcpu_process_com_data

2018-10-03 Thread Mike Larkin
On Wed, Oct 03, 2018 at 12:13:05PM -0700, Mike Larkin wrote: > On Wed, Oct 03, 2018 at 12:06:47PM -0700, Pratik Vyas wrote: > > * Greg Steuck [2018-10-03 11:40:22 -0700]: > > > > > $ egdb /syzkaller/src/usr.sbin/vmd/obj/vmd /var/crash/vmd/38082.core > > >

Re: vmd: division by zero in vcpu_process_com_data

2018-10-03 Thread Mike Larkin
On Wed, Oct 03, 2018 at 12:06:47PM -0700, Pratik Vyas wrote: > * Greg Steuck [2018-10-03 11:40:22 -0700]: > > > $ egdb /syzkaller/src/usr.sbin/vmd/obj/vmd /var/crash/vmd/38082.core > > Core was generated by `vmd'. > > Program terminated with signal SIGFPE,

Re: vmd: division by zero in vcpu_process_com_data

2018-10-03 Thread Mike Larkin
On Wed, Oct 03, 2018 at 12:00:07PM -0700, Mike Larkin wrote: > On Wed, Oct 03, 2018 at 11:40:22AM -0700, Greg Steuck wrote: > > $ egdb /syzkaller/src/usr.sbin/vmd/obj/vmd /var/crash/vmd/38082.core > > Core was generated by `vmd'. > > Program t

<    1   2   3   4   5   6   7   >