the bitrig marco_vmm branch has been updated by marco with 102 new commits:

commit 44b31d5f4048443be2bc65d95671fbda5ebc33fd
diff: https://github.com/bitrig/bitrig/commit/44b31d5
author: Marco Peereboom <[email protected]>
date: Fri Feb 26 14:00:50 2016 -0600

clang warning

M       sys/dev/pv/vmt.c

commit 7f477b4f41f93cf08675895593578386785e93ca
diff: https://github.com/bitrig/bitrig/commit/7f477b4
author: reyk <[email protected]>
date: Wed Feb 3 14:24:05 2016 +0000

Increase the RPC buffer once more to 4096 bytes.  The guestinfo.ovfEnv
mechanism is used to configure VMs in the VMware vSphere world:
instead of using individual key-value guestinfo.* properties, it uses
the guestinfo.ovfEnv value to pass an enterprise-compliant XML file
that includes key-value properties.  This file can be rather large,
especially with comments, but 4k ought to be enough for anybody.
Also change a stack buffer to malloc'ed memory in the ioctl path.

OK mikeb@

commit f194b355c155e2cbb3b751abf3fb0e207b53ed5a
diff: https://github.com/bitrig/bitrig/commit/f194b35
author: Marco Peereboom <[email protected]>
date: Fri Feb 26 13:50:11 2016 -0600

fixup

M       sys/arch/amd64/amd64/conf.c
M       sys/arch/amd64/conf/generic.amd64

commit 02ee69c3e16b5984efc16b69a33603d3449c23f9
diff: https://github.com/bitrig/bitrig/commit/02ee69c
author: reyk <[email protected]>
date: Wed Feb 3 14:24:05 2016 +0000

Increase the RPC buffer once more to 4096 bytes.  The guestinfo.ovfEnv
mechanism is used to configure VMs in the VMware vSphere world:
instead of using individual key-value guestinfo.* properties, it uses
the guestinfo.ovfEnv value to pass an enterprise-compliant XML file
that includes key-value properties.  This file can be rather large,
especially with comments, but 4k ought to be enough for anybody.
Also change a stack buffer to malloc'ed memory in the ioctl path.

OK mikeb@

M       sys/dev/pv/vmt.c

commit 7321969f1dce58d16c212356e2b1d95bf8238aed
diff: https://github.com/bitrig/bitrig/commit/7321969
author: mikeb <[email protected]>
date: Fri Feb 5 10:34:52 2016 +0000

Simple moderation of Tx completion notifications

Follow FreeBSD and schedule the next Tx completion event to fire
when about half of the packet segments scheduled for transmission
are consumed.

M       sys/dev/pv/if_xnf.c

commit 546fb4320067e9fa6a6b18ccf145cb6e72503211
diff: https://github.com/bitrig/bitrig/commit/546fb43
author: mikeb <[email protected]>
date: Fri Feb 5 10:30:37 2016 +0000

Silence warnings from static analyzers; found by jsg@

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c

commit cf8dccdd53ad7f7040754f0063eb8feec197f140
diff: https://github.com/bitrig/bitrig/commit/cf8dccd
author: mikeb <[email protected]>
date: Thu Feb 4 12:50:56 2016 +0000

Bail early if there's no token; found by jsg@

M       sys/dev/pv/xenstore.c

commit 09e6c2da5f39340b91387efffdb36a1d0bc6f71c
diff: https://github.com/bitrig/bitrig/commit/09e6c2d
author: guenther <[email protected]>
date: Wed Feb 3 03:25:07 2016 +0000

Test cpuid_level or ci->ci_pnfeatset before using a CPUID leaf; some BIOSes
can disable leaves that CPU feature flags would seem to imply.  Corrects
signal delivery on systems where the AVX leaf is disabled.

report and debugging help from Marcus MERIGHI (mcmer-openbsd (at) tor.at)
ok kettenis@

M       sys/arch/amd64/amd64/amd64_mem.c
M       sys/arch/amd64/amd64/cacheinfo.c
M       sys/arch/amd64/amd64/cpu.c
M       sys/arch/amd64/amd64/identcpu.c

commit 035d4263fafde3c55216cc7dbe81c68c8a0757fa
diff: https://github.com/bitrig/bitrig/commit/035d426
author: mikeb <[email protected]>
date: Tue Feb 2 17:52:46 2016 +0000

A few reliability improvements in the power management interface

Nathanael Rensen <nathanael at list ! polymorpheus ! com> came up with
a few improvements to the event watcher and power management interface,
namely:

 o Make sure to put our watcher on a list before issuing an XS_WATCH
   command since Xen will raise the event right after it's been set up.

 o The first time xen_control is called the "control/shutdown" node
   may not exist, so skip printing the error message in this case.

 o Acknowledge requests by writing back an empty string.

 o log(9) reboot and halt requests like vmt(4) does.

Huge thanks!

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit ee0df94cdcdac7da8c27b68e29bbebd34791489e
diff: https://github.com/bitrig/bitrig/commit/ee0df94
author: mikeb <[email protected]>
date: Fri Jan 29 19:12:26 2016 +0000

Add support for "control/shutdown" power management facility

At the moment only "poweroff" and "reboot" actions are supported.
Suspend/resume requires additional changes.

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 30cc6b4b461193c81be27a2fb2e26ba651481c87
diff: https://github.com/bitrig/bitrig/commit/30cc6b4
author: mikeb <[email protected]>
date: Fri Jan 29 19:04:30 2016 +0000

Add support for XS_WATCH: XenStore notification facility

After configuring a watch for the node, XenStore will asynchronously
notify the system when the value of the specified node changes with
an event message.

M       sys/dev/pci/xspd.c
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit c1b7faebf200a11ebb4e3c2fc26355c06d34dfd4
diff: https://github.com/bitrig/bitrig/commit/c1b7fae
author: mikeb <[email protected]>
date: Fri Jan 29 18:49:06 2016 +0000

Cleanup XenStore API

Turns out that we want to let devices choose whether they're issuing
XenStore requests to the backend or frontend.  This also unifies the
the API somewhat as providing the xen softcore structure is now
mandatory.

M       sys/dev/pv/if_xnf.c
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit a7b073f49b4b806899a6a0872a5ec938c599d86c
diff: https://github.com/bitrig/bitrig/commit/a7b073f
author: mikeb <[email protected]>
date: Thu Jan 28 11:19:49 2016 +0000

Older Xen dom0's don't implement setting version of Grant Table entries

Remove leftover code that was used to set v2 of Grant Table entries.
>From Nathanael Rensen <nathanael at list ! polymorpheus ! com>, thanks!

M       sys/dev/pv/xen.c

commit 0ac998043fcd5d7192a78ad0221280257abe485b
diff: https://github.com/bitrig/bitrig/commit/0ac9980
author: mikeb <[email protected]>
date: Wed Jan 27 18:04:42 2016 +0000

Tighten up next reference calculation, printing fixes

M       sys/dev/pv/xen.c

commit b46bb009040b877ab3649c54098ff4bc03a6fb2e
diff: https://github.com/bitrig/bitrig/commit/b46bb00
author: mikeb <[email protected]>
date: Wed Jan 27 15:34:50 2016 +0000

Reimplement Grant Table metadata linking and enable dynamic allocation

Instead of pre-allocating maximum number of Grant Table frames allotted by
the hypervisor we switch over to allocating them dynamically when the need
arises.  At the same time we no longer link metadata entries representing
individual Grant Table frames as a list and use a table instead to speed
up reference lookups when establishing and removing mappings.

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 13a5c1f9f6d46a3e14d1f313f54a7331fca63ab2
diff: https://github.com/bitrig/bitrig/commit/13a5c1f
author: mikeb <[email protected]>
date: Wed Jan 27 15:29:00 2016 +0000

xen_bus_dma_init turned out to be unnecessary

M       sys/dev/pv/xen.c

commit 5599eff59d8b24937379ff5cd64c4824a59d0ca4
diff: https://github.com/bitrig/bitrig/commit/5599eff
author: mikeb <[email protected]>
date: Wed Jan 27 15:27:53 2016 +0000

shorten a few long lines

M       sys/dev/pv/xen.c

commit 5d0ef3cda39d7865c67443a8839fa3686ba226a1
diff: https://github.com/bitrig/bitrig/commit/5d0ef3c
author: reyk <[email protected]>
date: Wed Jan 27 09:04:19 2016 +0000

Add a key-value interface to pvbus(4) that allows to get or set values
in the underlying information store of the host from the OpenBSD-VM's
userspace.  OpenBSD did not provide access to these stores before,
mostly because we did not want to add a custom tool and interface for
each hypervisor.  The pvbus(4) interface provides backends for
xen(4)'s XenStore and vmt(4)'s VMware Tools "guestinfo".  These
information stores are fairly different, XenStore is a "filesystem"
while vmt is a RPC, and the key-value abstraction limits them a bit
but provides the most wanted functionality.

Discussed with many
OK mikeb@

M       sys/arch/amd64/amd64/conf.c
M       sys/dev/pv/pvbus.c
M       sys/dev/pv/pvvar.h
M       sys/dev/pv/vmt.c
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h
M       sys/sys/conf.h

commit 14096aedbe977652b7ff3e6f1ae97eeb971a32cf
diff: https://github.com/bitrig/bitrig/commit/14096ae
author: mikeb <[email protected]>
date: Tue Jan 26 17:01:01 2016 +0000

Convert membar_* operations to bus_dmamap_sync calls

M       sys/dev/pv/if_xnf.c

commit 339d18dc752ea3aeb3f32a957969784194968550
diff: https://github.com/bitrig/bitrig/commit/339d18d
author: mikeb <[email protected]>
date: Tue Jan 26 16:31:05 2016 +0000

Rewrite tx path to use flat transmit ring without fragment chains

Xen doesn't provide transmit fragment chains so initially they were
emulated but amount of grant table entries wasted in the process was
astronomical (9 times more than after this change).  So while code
readability was sacrificed a bit, the change comes with a very nice
transmit performance improvement and taxes grant table references
much less than before.

M       sys/dev/pv/if_xnf.c

commit 759f24f6608fe1c8eaf13ce8e6251e572713313a
diff: https://github.com/bitrig/bitrig/commit/759f24f
author: mikeb <[email protected]>
date: Tue Jan 26 16:13:32 2016 +0000

Rename _{req,rsp}_evt descriptor structure members to _{prod,cons}_event

Setting rxr_ and/or txr_cons_event value allows domU to delay completion
notification for receive and/or transmit ring to specified values of
consumer index.  rxr_ and txr_prod_event values are updated by dom0 and
don't seem to hold any significance for us.

M       sys/dev/pv/if_xnf.c

commit 466bb202933f58157f341d5a26690b6f4ba30889
diff: https://github.com/bitrig/bitrig/commit/466bb20
author: mikeb <[email protected]>
date: Tue Jan 26 15:51:07 2016 +0000

No need to take a grant table entry mutex in xen_grant_table_{enter,remove}

Grant table API is constructed in a way that once allocated grant table
entries are marked as used and cannot be given away again to some other
user.  At the same time xen_grant_table_enter and _remove do not operate
on the same grant reference at the same time, so there's no need for a
lock here.  Guard flag operations with memory fences to ensure correct
store/load order.  This provides some decent performance improvement as
well.

M       sys/dev/pv/xen.c

commit 0cee8cad13f6867c84594b71221e48db21526e77
diff: https://github.com/bitrig/bitrig/commit/0cee8ca
author: mikeb <[email protected]>
date: Tue Jan 26 15:35:21 2016 +0000

Add a grant table reference invalidation spin out check

This debugging check has been helpful in identifying and fixing
a few issues already.  Subject to removal in the future however.

M       sys/dev/pv/xen.c

commit 2b00cf5676242ea1aa2e65092c0b4feea6bbc215
diff: https://github.com/bitrig/bitrig/commit/2b00cf5
author: mikeb <[email protected]>
date: Tue Jan 26 15:31:02 2016 +0000

Implement a rather conservative bus_dmamap_sync API

M       sys/dev/pv/xen.c

commit f87353cac3cf773de831e0ead7346a26ae4a9061
diff: https://github.com/bitrig/bitrig/commit/f87353c
author: mikeb <[email protected]>
date: Tue Jan 26 15:23:11 2016 +0000

Make sure to use locked atomic operations even on the SP kernel

When executed under the hypervisor we need to make sure that CAS
and other atomic operations are executed while locking the bus.

Problem reported by Imre Oolberg <imre at auul ! pri ! ee>, thanks!

M       sys/dev/pv/xen.c

commit e1b8f5b383a9559e91372ced5ff3230f43cc598e
diff: https://github.com/bitrig/bitrig/commit/e1b8f5b
author: mikeb <[email protected]>
date: Mon Jan 25 15:22:56 2016 +0000

Don't count the total number of Xen upcalls

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit d2419748efff5623227fce743c701966a33a5f9b
diff: https://github.com/bitrig/bitrig/commit/d241974
author: mikeb <[email protected]>
date: Mon Jan 25 10:46:54 2016 +0000

Revert the minimum number of Rx ring slots back to 32

Figured out the hard way by Jonathon Sisson <openbsd at j3z ! org>,
thanks!

M       sys/dev/pv/if_xnf.c

commit d77be837a9d1868762514ed31cc12f1526dd5ba1
diff: https://github.com/bitrig/bitrig/commit/d77be83
author: jsg <[email protected]>
date: Sat Jan 23 15:19:02 2016 +0000

Fix some uses of sizeof where the size of a struct was intended, not
the size of the pointer to a struct.

ok mikeb@

M       sys/dev/pv/xen.c

commit d9ae2cd875dcbf0831543763c25d6a90ca8c978b
diff: https://github.com/bitrig/bitrig/commit/d9ae2cd
author: mikeb <[email protected]>
date: Fri Jan 22 19:47:57 2016 +0000

Setup interface features based on capabilities provided by the backend

Instead of just setting bits that we think we need, do a better job of
figuring out what's supported by the backend and what's not and what do
we really need.  The following improvements were implemented:
 o  fallback for when scatter gather I/O is not supported by Dom0;
 o  tcp/udp checksum offloading;
 o  larger mtu up to 9000: an experimental feature;
 o  stop requesting multicast control feature that we don't support.

M       sys/dev/pv/if_xnf.c

commit 2e73fccb693d9e0e6a379e4d052f79d1c6b00f93
diff: https://github.com/bitrig/bitrig/commit/2e73fcc
author: mikeb <[email protected]>
date: Fri Jan 22 19:33:30 2016 +0000

Set minimum number of slots on the receive ring to 18

After some experimentation, discussions with Xen folks and pondering Linux
source code, it became clear that most versions of Xen require at least 18
slots available on the receive ring to send an event.

M       sys/dev/pv/if_xnf.c

commit 22843cfdc6d8aa8c4e0b5ac0738e1c49f5ac702e
diff: https://github.com/bitrig/bitrig/commit/22843cf
author: mikeb <[email protected]>
date: Fri Jan 22 19:28:16 2016 +0000

To facilitate reading make sure to use a GTF_invalid flag by name

M       sys/dev/pv/xen.c

commit 6d3c86bd8e81a03c0c1a1bc96a9b85507e57d654
diff: https://github.com/bitrig/bitrig/commit/6d3c86b
author: mikeb <[email protected]>
date: Fri Jan 22 19:26:40 2016 +0000

Convert membar_* calls into virtio_membar_sync where it matters

membar_* functions are defined only as compiler barriers on !MP
kernels, while we're trying to be conservative in our use of the
barriers.  Barriers are placed only where loads and stores might
get reordered and it matters at the same time.  Shared info page
operations are using atomic instructions on Linux, so they get
barriers as well.

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c

commit 8b691f0fbff7119f9b015c594a886ed72835329c
diff: https://github.com/bitrig/bitrig/commit/8b691f0
author: mikeb <[email protected]>
date: Wed Jan 20 10:04:32 2016 +0000

Don't bump output errors when when tx ring is full

Reported by Jonathon Sisson <openbsd at j3z ! org>, thanks!

M       sys/dev/pv/if_xnf.c

commit 272cb78b55ffcf346ad105dbae5ab93fb77cd802
diff: https://github.com/bitrig/bitrig/commit/272cb78
author: mikeb <[email protected]>
date: Tue Jan 19 17:16:19 2016 +0000

Mask interrupts on boot, masking/unmasking is handled by stop/init

M       sys/dev/pv/if_xnf.c

commit d506cae23a87656591019d6debda91ccbf463db3
diff: https://github.com/bitrig/bitrig/commit/d506cae
author: mikeb <[email protected]>
date: Tue Jan 19 17:13:22 2016 +0000

Fix a few issues in the xnf transmit path

A crash reported by Jonathon Sisson is caused by incorrect calculation
of available descriptors on the tx ring.  While here, split the mbuf
chain so that we won't unload the whole thing in the txeof before
removing grant table references from transmit descriptors.

M       sys/dev/pv/if_xnf.c

commit 7cda2e964bc5893c03026da6c554dea21f0b9d2e
diff: https://github.com/bitrig/bitrig/commit/7cda2e9
author: mikeb <[email protected]>
date: Tue Jan 19 13:36:00 2016 +0000

Cast evtchn_mask to a char pointer for an isset operation

When testing evtchn_mask bits we need to treat the array as a bit
matrix for an isset macro to test correct bits.  Reported by reyk@
some time ago, Wei Liu <wei ! liu2 at citrix !com> figured out how
to reproduce the problem.  Thanks!

M       sys/dev/pv/xen.c

commit af18d91b3aaa02738e1502ce211d2d2c606fa8f6
diff: https://github.com/bitrig/bitrig/commit/af18d91b
author: mikeb <[email protected]>
date: Mon Jan 18 19:09:09 2016 +0000

Log unhandled interrupts

M       sys/dev/pv/xen.c

commit f083a34cc436ac96d09ea95c8f4ccb7bd0374bae
diff: https://github.com/bitrig/bitrig/commit/f083a34
author: mikeb <[email protected]>
date: Mon Jan 18 19:06:48 2016 +0000

Provide a Xen v3 API compatible fallback for event channel hypercalls

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h
M       sys/dev/pv/xenvar.h

commit a649546c8b964e8a1d483d4609f2498c641d01c2
diff: https://github.com/bitrig/bitrig/commit/a649546
author: mikeb <[email protected]>
date: Mon Jan 18 18:54:38 2016 +0000

Fixup a hang while performing a read operation on XenStore

Reyk has reported an issue that turned out to be an incorrect calculation
of bytes available for reading.  This diff also places missed semaphore
releases in the xs_start and makes 'left' a size_t in xs_ring_{get,put}.

M       sys/dev/pv/xenstore.c

commit 7d8abb17b5584ace685f9aa6ec57dae2b4e91b6a
diff: https://github.com/bitrig/bitrig/commit/7d8abb1
author: mikeb <[email protected]>
date: Fri Jan 15 18:20:41 2016 +0000

Cleanup dmesg output, disable debugging; prodding and suggestions from reyk@

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit ea46274a4c3169f18be27cebf33b72c52a6dd8ab
diff: https://github.com/bitrig/bitrig/commit/ea46274
author: mikeb <[email protected]>
date: Fri Jan 15 14:27:08 2016 +0000

Detach emulated network devices if Netfront driver is enabled

Xen doesn't provide a way for a guest to decide which model of
the interface is selected in the VM configuration and therefore
there's no simple way for Netfront and emulated devices to co-
exist on the same system.  Emulated em(4) or re(4) drivers will
take over if xnf(4) driver is disabled or not compiled in.

Idea and OK reyk

M       sys/dev/pci/xspd.c
M       sys/dev/pv/if_xnf.c
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 8b8fec3fac62c67cd76385f453d1d2d2bfd6b940
diff: https://github.com/bitrig/bitrig/commit/8b8fec3
author: mikeb <[email protected]>
date: Thu Jan 14 12:37:17 2016 +0000

Fixup a merge error

M       sys/dev/pv/xen.c

commit e48b19d4eb7d769f5711dfd1f9a851433e7f42a4
diff: https://github.com/bitrig/bitrig/commit/e48b19d
author: mikeb <[email protected]>
date: Wed Jan 13 20:27:18 2016 +0000

Bump number of tx fragments to the stock value of 18

M       sys/dev/pv/if_xnf.c

commit b61e4ee3587db16e6e510d97b128fca37871b106
diff: https://github.com/bitrig/bitrig/commit/b61e4ee
author: mikeb <[email protected]>
date: Wed Jan 13 20:15:54 2016 +0000

Implement transmit watchdog for testing purposes

M       sys/dev/pv/if_xnf.c

commit 32732569f5205e584a1aff36c66bd467d8f42ba2
diff: https://github.com/bitrig/bitrig/commit/3273256
author: mikeb <[email protected]>
date: Wed Jan 13 19:09:50 2016 +0000

spacing typos

M       sys/dev/pv/xen.c

commit 12d4b74fc2903de33ed21ef73e9eefc7a7699f94
diff: https://github.com/bitrig/bitrig/commit/12d4b74
author: mikeb <[email protected]>
date: Wed Jan 13 18:56:26 2016 +0000

Create rx and tx fragment maps with a page size boundary restriction

We need to ensure that rx and tx fragments do not cross page boundary
since grant table reference can only point to a complete page. Add a
couple of kernel assertions in the dma map loading code to catch these
problems early in the future.

M       sys/dev/pv/if_xnf.c
M       sys/dev/pv/xen.c

commit 562bd552ef50285cfd2e345d20d86c2e5e88bbda
diff: https://github.com/bitrig/bitrig/commit/562bd55
author: mikeb <[email protected]>
date: Tue Jan 12 12:12:05 2016 +0000

A couple of unused variables have sneaked in from the debug code

M       sys/dev/pv/xenstore.c

commit b74485e900b26455628debfc48fa09b2f7f9002b
diff: https://github.com/bitrig/bitrig/commit/b74485e
author: mikeb <[email protected]>
date: Tue Jan 12 11:54:05 2016 +0000

Convert XenStore code to free running producer/consumer indices

After some hair pulling while implementing xnf(4) I've realised that
Xen uses free running producer/consumer indices wrapping with their
type (unsigned 32 bit integer).  Later I've confirmed it with free
chapters of the "The Definitive Guide to the Xen Hypervisor" by David
Chisnall available online.

M       sys/dev/pv/xenstore.c

commit a454378f376168dd2cf80ccff08a4e8ab7ce1d6f
diff: https://github.com/bitrig/bitrig/commit/a454378
author: mikeb <[email protected]>
date: Mon Jan 11 16:54:33 2016 +0000

xs_cmd should always return errno(2) codes

M       sys/dev/pv/xenstore.c

commit 0ed3e5734536c4523dd20a19aaaa2ac56274c6d9
diff: https://github.com/bitrig/bitrig/commit/0ed3e57
author: reyk <[email protected]>
date: Mon Jan 11 16:34:49 2016 +0000

Do not fail when receiving an empty reply (or directory node) in
xs_intr() but put an empty message in the queue.  This prevents
xs_reply() from being stuck in an endless loop because it expectes a
message in the queue to break out of it. Depends on mikeb@'s previous
commit because it would otherwise panic on trying to cleanup the empty
message.

OK mikeb@

M       sys/dev/pv/xenstore.c

commit 83411e1a326b7b650c88343e1b8791a3fd4152c4
diff: https://github.com/bitrig/bitrig/commit/83411e1
author: mikeb <[email protected]>
date: Mon Jan 11 16:14:16 2016 +0000

Handle zero lenght messages in the xs_parse by returning an empty string

Problem was reported and analyzed by reyk@

M       sys/dev/pv/xenstore.c

commit de557281b561b540718ef2e7483198f721b07b7b
diff: https://github.com/bitrig/bitrig/commit/de55728
author: reyk <[email protected]>
date: Fri Jan 8 14:59:37 2016 +0000

mikeb@ doesn't like RCS ids, so I add the OpenBSD one for him.

M       sys/dev/pv/if_xnf.c

commit fed5224574dca099e0c8afbd3182f496d476b0f2
diff: https://github.com/bitrig/bitrig/commit/fed5224
author: mikeb <[email protected]>
date: Thu Jan 7 11:13:19 2016 +0000

Xen virtual networking interface (Netfront) driver.

Encouragement from deraadt@, ok reyk

M       sys/dev/pv/files.pv
A       sys/dev/pv/if_xnf.c

commit 288d455259388e70e613d24c992064d85ac3b2fe
diff: https://github.com/bitrig/bitrig/commit/288d455
author: mikeb <[email protected]>
date: Tue Jan 5 18:03:59 2016 +0000

Move over to the v1 of Grant Table entries

In spite of comments in the Xen source code encouraging use of v2
entries in the new code, there's no benefit for us to do so at the
moment.  While v1 entries support only full page mappings, they're
half the size of their newer counterparts, increasing the number
of available grant table references from 8000 to 16000 within the
same allotment of grant table frames (up to 32).

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h

commit 7b6e674f994f4072e5eef969e9d79e2e5f2d3c18
diff: https://github.com/bitrig/bitrig/commit/7b6e674
author: mikeb <[email protected]>
date: Tue Jan 5 13:47:28 2016 +0000

Memorize the DMA segment's data offset within the page

Grant table references don't convey the information about an actual
offset of the data within the page, however Xen needs to know it.
We (ab)use bus_dma_segment's _ds_boundary member to store it and can
get away with not restoring it's original value atm because neither
i386 nor amd64 bus_dmamap_unload(9) code needs it.

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 51ce45c36f1e17bd8921b2c9fb80a92759cdede6
diff: https://github.com/bitrig/bitrig/commit/51ce45c
author: mikeb <[email protected]>
date: Mon Jan 4 16:07:52 2016 +0000

Skip "suspend" device node during probing

M       sys/dev/pv/xen.c

commit 7b69923f32391f17f50d8b035ca37ad81a91f0e6
diff: https://github.com/bitrig/bitrig/commit/7b69923
author: mikeb <[email protected]>
date: Mon Jan 4 16:06:50 2016 +0000

Include the node name into the error message

M       sys/dev/pv/xenstore.c

commit 43d12e5f87157b7d66fb41ee423b42e8d606f26b
diff: https://github.com/bitrig/bitrig/commit/43d12e5
author: mikeb <[email protected]>
date: Mon Jan 4 16:05:43 2016 +0000

Preallocate Grant Table frames to simplify the code for now

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 317b3f06de3967c2b6c8598bae7425aa13df1ed6
diff: https://github.com/bitrig/bitrig/commit/317b3f0
author: mikeb <[email protected]>
date: Tue Dec 22 22:19:46 2015 +0000

Make xs_setprop a bit more useful by removing property nodes
when NULL or zero length value was specified.

M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 19aaab51446cbc2f3b781959f87bf3f439d83f5f
diff: https://github.com/bitrig/bitrig/commit/19aaab5
author: mikeb <[email protected]>
date: Tue Dec 22 22:16:53 2015 +0000

Implement a bus_dma(9) abstraction on top of Grant Table API

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 025888890e8bbb131be21b8f9738da9c31b6758c
diff: https://github.com/bitrig/bitrig/commit/0258888
author: sf <[email protected]>
date: Mon Dec 21 22:15:53 2015 +0000

add virtio-console driver

This patch adds a new driver for use of virtio-console devices as
ttys.  It's still in an early state and not compiled by default, yet.
Currently it is only wired into amd64. i386 is still missing.

Discussed with uebayasi@, deraadt@

M       etc/MAKEDEV.common
M       etc/etc.amd64/MAKEDEV.md
M       share/man/man4/Makefile
A       share/man/man4/viocon.4
M       sys/arch/amd64/amd64/conf.c
M       sys/arch/amd64/conf/generic.amd64
M       sys/dev/pci/files.pci
A       sys/dev/pci/viocon.c

commit 5e0c3134f48fc696610fe45dd81bcedc15bd777d
diff: https://github.com/bitrig/bitrig/commit/5e0c313
author: mikeb <[email protected]>
date: Mon Dec 21 19:43:16 2015 +0000

Introduce xen_intr_mask and xen_intr_unmask primitives

Mask the event port during xen_intr_establish, but don't set the
masked flag in the intsrc.  By providing mask and unmask routines
we allow the device to decide when to perform these actions.  The
port will still be unmasked during xen_intr_enable.  This allows
netfront to fulfil the intr_barrier pattern requirements fairly
easily and at the same time should be sufficient for diskfront
that doesn't need to fiddle with interrupt masking.

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 6e96e88f04a479aac1eb528193f66f129d8c08d4
diff: https://github.com/bitrig/bitrig/commit/6e96e88
author: mikeb <[email protected]>
date: Mon Dec 21 18:17:36 2015 +0000

Cleanup hypercall subsystem type defines

M       sys/dev/pci/xspd.c
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit d0384ee379911a11891f1a32d63ab4062d229673
diff: https://github.com/bitrig/bitrig/commit/d0384ee
author: reyk <[email protected]>
date: Sat Dec 12 21:09:20 2015 +0000

Add OpenBSD Id.

M       sys/dev/pci/xspd.c

commit 5965aeac2f40c01a61f727a3e2ad4b9bc7a92bdc
diff: https://github.com/bitrig/bitrig/commit/5965aea
author: mikeb <[email protected]>
date: Tue Dec 8 22:04:07 2015 +0000

Driver for the XenSource Platform Device

This is a simple driver for the virtual PCI device with only one
purpose: to allocate the interrupt vector and communicate that
to the Hypervisor in case the IDT callback method was not available.

With input from and OK deraadt, mlarkin, reyk, mpi

M       sys/arch/amd64/conf/generic.amd64
M       sys/dev/pci/files.pci
A       sys/dev/pci/xspd.c

commit 03b0b264c9f6ee9fa7a6c4cadd19860e2b65dce4
diff: https://github.com/bitrig/bitrig/commit/03b0b26
author: mikeb <[email protected]>
date: Mon Dec 21 18:13:44 2015 +0000

Don't unmask the port in xen_intr_establish

M       sys/dev/pv/xen.c

commit 58dd220d7b97ac16aba25a29a1ae0d265e413bbc
diff: https://github.com/bitrig/bitrig/commit/58dd220
author: mikeb <[email protected]>
date: Sat Dec 19 09:12:29 2015 +0000

Add xs_setprop to set device properties

M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit ea8f75987f2ce0ebdecc9b95537ac17a1771bdaa
diff: https://github.com/bitrig/bitrig/commit/ea8f759
author: mikeb <[email protected]>
date: Sat Dec 19 09:11:14 2015 +0000

Fixup a few bugs in xen_intr_{establish,disestablish}

xen_intr_establish was using a variable that hasn't got its value
updated in the supplementary check for event channel port unmasking.

xen_intr_disestablish didn't save and correctly check the return value
of xen_lookup_intsrc call and was incorrectly indexing into the pending
event channel port bitmap.

M       sys/dev/pv/xen.c

commit 389443a50f626ecba33813b7398f4cd8ca1f51f5
diff: https://github.com/bitrig/bitrig/commit/389443a
author: reyk <[email protected]>
date: Sat Dec 12 21:07:45 2015 +0000

Add OpenBSD CVS/RCS Ids.

mikeb@ doesn't like the Ids, "somebody else has to add them".

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h
M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 888152fa126e9188fc61bdd2a8d76937175a6102
diff: https://github.com/bitrig/bitrig/commit/888152f
author: reyk <[email protected]>
date: Sat Dec 12 12:47:49 2015 +0000

x2APIC is currently enabled on HV guests only, not on bare metal, to
speedup interrupt handling on virtual machines.  Unfortunately it is
broken on Xen 4.2 or older, so use the early pvbus detection to drop
the advertised x2APIC CPU feature.  Xen has fixed this in late 2013,
but the problem still shows up in "the Cloud" (it doesn't seem to
affect others as they either use legacy APIC or Xen IPIs).

OK mlarkin@ mikeb@
Cvs: ----------------------------------------------------------------------

M       sys/dev/pv/pvbus.c

commit a4fa2ad6b26b6af4780c3e38e3994f8e42ea0627
diff: https://github.com/bitrig/bitrig/commit/a4fa2ad
author: reyk <[email protected]>
date: Sat Dec 12 12:33:49 2015 +0000

Identify hypervisors before configuring other children of the mainbus
(bios, CPU, interrupt handlers, pvbus).  This splits the pvbus attach
function into two parts: pvbus_identify() to scan the CPUID registers
for supported hypervisors and pvbus_attach() to attach the bus, print
information, and configure the children.

This will be needed for Xen and KVM, as discussed with mikeb@ and sf@
OK mlarkin@

M       sys/arch/amd64/amd64/identcpu.c
M       sys/arch/amd64/amd64/mainbus.c
M       sys/dev/pv/pvbus.c
M       sys/dev/pv/pvreg.h
M       sys/dev/pv/pvvar.h
M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h

commit 99f17c983c466cfda2914d9b4e2675ec625a9ae0
diff: https://github.com/bitrig/bitrig/commit/99f17c9
author: mikeb <[email protected]>
date: Fri Dec 11 12:41:57 2015 +0000

Remove xs_resume for now; pointed out by mlarkin@

M       sys/dev/pv/xenstore.c

commit 0afef4029c092eb729bc4dc8da60c5f99804239c
diff: https://github.com/bitrig/bitrig/commit/0afef40
author: mikeb <[email protected]>
date: Fri Dec 11 12:39:46 2015 +0000

Let xs_getprop decide itself whether it's OK to sleep or not

M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 035d0ed5eb4fb3b2c12007272fdd9376de60523f
diff: https://github.com/bitrig/bitrig/commit/035d0ed
author: mikeb <[email protected]>
date: Wed Dec 9 17:27:29 2015 +0000

Correct the response string length

Apparently length values returned by XenStore depend on which
operation has been requested: for instance XS_READ will always
return an strlen() result without accounting for the trailing
NUL character, however XS_LIST will return length that includes
it.  While staying within our data buffer limit (xsm_dlen) we
can readjust the length of the resulting string accordingly.

M       sys/dev/pv/xenstore.c

commit 3139f85f9be1caa8410df128876191991d4fe858
diff: https://github.com/bitrig/bitrig/commit/3139f85
author: mikeb <[email protected]>
date: Wed Dec 9 14:20:53 2015 +0000

Implement a function to fetch device properties

M       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 4b6b17aad7befa24ca281bcf3bb23180e17d2424
diff: https://github.com/bitrig/bitrig/commit/4b6b17a
author: mikeb <[email protected]>
date: Wed Dec 9 14:20:06 2015 +0000

Store the backend node in the attach argument structure

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit dc7faf147f39c22725072e80359af9ac733da659
diff: https://github.com/bitrig/bitrig/commit/dc7faf1
author: mikeb <[email protected]>
date: Wed Dec 9 12:49:21 2015 +0000

cfdriver can't be const...

M       sys/dev/pv/xen.c

commit 381920f1bc68d1dbf454b6af2e660fd181e3e2c7
diff: https://github.com/bitrig/bitrig/commit/381920f
author: mikeb <[email protected]>
date: Wed Dec 9 01:24:06 2015 +0000

Don't expose XenStore ops we don't know how to deal with

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 4d22729926021d23c5597a826377d9c548e378d3
diff: https://github.com/bitrig/bitrig/commit/4d22729
author: mikeb <[email protected]>
date: Wed Dec 9 01:23:26 2015 +0000

Don't expose XenStore ops we don't know how to deal with

M       sys/dev/pv/xenstore.c

commit 46fe6b559f5ec90b1ecf5881a429cf89bce51dad
diff: https://github.com/bitrig/bitrig/commit/46fe6b5
author: mikeb <[email protected]>
date: Tue Dec 8 22:23:30 2015 +0000

Implements simple virtual device probing routine

Discussed with deraadt@, kettenis@, mpi@, OK mlarkin, mpi

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit b47c3149868495942e9551f13d350c6ed707cdb5
diff: https://github.com/bitrig/bitrig/commit/b47c314
author: mikeb <[email protected]>
date: Tue Dec 8 22:18:21 2015 +0000

Implement a function to detach emulated devices (such as an em(4)
network interface) in order to attach a paravirtualized drivers
(such as Xen Netfront).

OK mlarkin

M       sys/dev/pv/xen.c

commit eee9a330adb501cafaba35dc201ef3a335da0faf
diff: https://github.com/bitrig/bitrig/commit/eee9a33
author: mikeb <[email protected]>
date: Tue Dec 8 22:14:40 2015 +0000

Driver for XenStore, the configuration storage

XenStore provides a hierarchical storage for Xen configuration
in a style of an OpenFirmware.  Itself it's an interrupt driven
producer/consumer interface with two 1kb rings for input and
output.

It's required in order to do virtual device discovery and device
configuration (fetch MAC address, various parameters).

With input from and OK mlarkin, reyk

M       sys/dev/pv/files.pv
M       sys/dev/pv/xen.c
A       sys/dev/pv/xenstore.c
M       sys/dev/pv/xenvar.h

commit 649fb504103dc6f396d5d7156252236d8c1a7a95
diff: https://github.com/bitrig/bitrig/commit/649fb50
author: mikeb <[email protected]>
date: Tue Dec 8 20:33:30 2015 +0000

Add ability to establish virtual interrupts via Xen event
channel ports.

During boot, Xen will use polling mode, but once the system
enables interrupts after cpu_configure(), xen_intr_enable
will be called from the mountrook hook to unmask event ports.

OK mlarkin, mpi, reyk

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h
M       sys/dev/pv/xenvar.h

commit 2884144beb49bdf068c2a3373ab45944e818a2ff
diff: https://github.com/bitrig/bitrig/commit/2884144
author: mikeb <[email protected]>
date: Tue Dec 8 20:07:04 2015 +0000

Communicate the selected IDT vector to the Hypervisor

OK mlarkin, reyk

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenvar.h

commit 62b39e73df793235b7e5e5f206cdf1afdc48d69d
diff: https://github.com/bitrig/bitrig/commit/62b39e7
author: mikeb <[email protected]>
date: Tue Dec 8 19:29:22 2015 +0000

Allocate and hook up a "shared info page"

This page provides a matrix of pending events and some other
information like hypervisor timecounter.

OK mlarkin, reyk

M       sys/dev/pv/xen.c
M       sys/dev/pv/xenreg.h

commit f42a1eedb1ff6ea6e42775f2f1ae3e2dfb154ca0
diff: https://github.com/bitrig/bitrig/commit/f42a1ee
author: mikeb <[email protected]>
date: Tue Dec 8 19:29:22 2015 +0000

Allocate and hook up a "shared info page"

This page provides a matrix of pending events and some other
information like hypervisor timecounter.

OK mlarkin, reyk

M       sys/dev/pv/xenvar.h

commit 0a059086afbf97e62cb9739121000991041c5220
diff: https://github.com/bitrig/bitrig/commit/0a05908
author: mikeb <[email protected]>
date: Tue Dec 8 19:17:00 2015 +0000

This brings in support for Xen hypercalls via an MI interface
and implements functions to fetch extended version and features.

OK mlarkin

M       sys/dev/pv/xen.c
A       sys/dev/pv/xenreg.h

commit 244d115841d10099b3fa9a2dd23e21652cdde237
diff: https://github.com/bitrig/bitrig/commit/244d115
author: mikeb <[email protected]>
date: Tue Dec 8 19:17:00 2015 +0000

This brings in support for Xen hypercalls via an MI interface
and implements functions to fetch extended version and features.

OK mlarkin

M       sys/dev/pv/xenvar.h

commit 4330674a863c2ec5576e0d4d59631ded70ac1c4b
diff: https://github.com/bitrig/bitrig/commit/4330674
author: mikeb <[email protected]>
date: Tue Dec 8 18:46:25 2015 +0000

Xen basic infrastructure files and pvbus(4) attachment.

With input from and OK mpi, mlarkin, reyk

M       sys/dev/pv/files.pv
A       sys/dev/pv/xen.c

commit ef1df27b2bb975b000e3467d90562b1cc593d892
diff: https://github.com/bitrig/bitrig/commit/ef1df27
author: mikeb <[email protected]>
date: Tue Dec 8 18:46:25 2015 +0000

Xen basic infrastructure files and pvbus(4) attachment.

With input from and OK mpi, mlarkin, reyk

A       sys/dev/pv/xenvar.h

commit 04672c650c3850077732c13c6f2f3deaaeddc023
diff: https://github.com/bitrig/bitrig/commit/04672c6
author: jsg <[email protected]>
date: Mon Dec 7 06:34:14 2015 +0000

Add cpuid bits documented in the August 2015 revision of
"Intel Architecture Instruction Set Extensions Programming Reference"

M       sys/arch/amd64/amd64/identcpu.c
M       sys/arch/amd64/include/specialreg.h

commit 14eeac153eecb87d7b2dc8c25200733d338da280
diff: https://github.com/bitrig/bitrig/commit/14eeac1
author: kettenis <[email protected]>
date: Sat Dec 5 10:27:48 2015 +0000

AMD Family 12h and later processors keep their APIC clock running in deeper
C-states.  Set the TMP_ARAT flag for these (which is Intel-specific) such
that acpicpu(4) enables the deeper C-states on these CPUs.

ok deraadt@

M       sys/arch/amd64/amd64/identcpu.c

commit 21ed24429ac8a6e818f7838bb657903a2bffbd69
diff: https://github.com/bitrig/bitrig/commit/21ed244
author: deraadt <[email protected]>
date: Mon Nov 23 22:57:12 2015 +0000

No longer need 'option VMM', declaring the vmm0 device is sufficient.
ok mlarkin

M       sys/arch/amd64/amd64/cpu.c
M       sys/arch/amd64/amd64/identcpu.c
M       sys/arch/amd64/amd64/ipifuncs.c
M       sys/arch/amd64/amd64/mainbus.c
M       sys/arch/amd64/conf/files.amd64
M       sys/arch/amd64/conf/generic.amd64
M       sys/arch/amd64/include/cpu.h

commit bb1dcb2fd2a991016d9c3a2580b3fe4322bbe4f8
diff: https://github.com/bitrig/bitrig/commit/bb1dcb2
author: dlg <[email protected]>
date: Mon Nov 16 10:16:07 2015 +0000

pvbus_types isnt full on i386 cos the openbsd vmm entry is only set
on amd64.  make sure the signature is not null before using it in
pvbus_attach.

fixes a panic on i386 under vmware.

M       sys/dev/pv/pvbus.c

commit 6c411c0a8b542c5ad9f6d289e981dd8b59efd695
diff: https://github.com/bitrig/bitrig/commit/6c411c0
author: deraadt <[email protected]>
date: Fri Nov 13 22:41:34 2015 +0000

vmm is i386 only for now

M       sys/dev/pv/pvbus.c

commit b1a907b8af658c098d0e5a67700a7b910045dbaa
diff: https://github.com/bitrig/bitrig/commit/b1a907b
author: Marco Peereboom <[email protected]>
date: Fri Feb 26 12:38:35 2016 -0600

missed bits during cherry-pick

M       sys/arch/amd64/amd64/conf.c

commit 114ff2037013270af1be101ff8e5bf8d5488995b
diff: https://github.com/bitrig/bitrig/commit/114ff20
author: naddy <[email protected]>
date: Sat Nov 7 01:37:26 2015 +0000

Allow overriding ghash_update() with an optimized MD function.  Use
this on amd64 to provide a version that uses the PCLMUL instruction
on CPUs that support it but don't have AESNI.  ok mikeb@

M       sys/arch/amd64/amd64/aesni.c
M       sys/arch/amd64/amd64/autoconf.c
M       sys/arch/amd64/amd64/identcpu.c
M       sys/crypto/gmac.c
M       sys/crypto/gmac.h

commit fb6e0be5717f3330f25ab2030c28e560783d2cf2
diff: https://github.com/bitrig/bitrig/commit/fb6e0be
author: Marco Peereboom <[email protected]>
date: Fri Feb 26 11:58:30 2016 -0600

add xen

M       sys/arch/amd64/conf/generic.amd64

commit cfb9a3cdc54e83572f5a12a881193e512cf5b923
diff: https://github.com/bitrig/bitrig/commit/cfb9a3c
author: mlarkin <[email protected]>
date: Mon Jan 4 01:03:03 2016 +0000

wrap a long line

M       sys/arch/amd64/amd64/locore.S

commit 630bd1b0be0146370da6a3e0038c545f2a1e152a
diff: https://github.com/bitrig/bitrig/commit/630bd1b
author: mikeb <[email protected]>
date: Tue Dec 8 19:45:55 2015 +0000

Set up an IDT vector for Xen callbacks

This adds support for delivering the combined Xen interrupt
that later fans out into event port specific (device specific)
interrupts via an IDT of a guest system.

The Xen IDT vector is set to be the first of the IPL_NET group
and is implemented the same way LAPIC timer and IPIs are done.
The additional machinery is there to be able to mask it via
standard mechanisms (e.g. splnet).

Discussed with kettenis@, OK mlarkin, reyk

M       sys/arch/amd64/amd64/intr.c
M       sys/arch/amd64/amd64/lapic.c
M       sys/arch/amd64/amd64/vector.S
M       sys/arch/amd64/include/i82489var.h
M       sys/arch/amd64/include/intrdefs.h

commit de21cc4015209b316bfa4af916f679f68f74c702
diff: https://github.com/bitrig/bitrig/commit/de21cc4
author: mikeb <[email protected]>
date: Tue Dec 8 18:54:10 2015 +0000

Setup a hypercall page in the kernel .text segment

Its location will be communicated with the Xen hypervisor
that will fill it in with instructions resulting in VMEXIT
events.

Discussed with kettenis@ and deraadt@, with input from and
OK mpi, mlarkin, reyk

M       sys/arch/amd64/amd64/locore.S

commit 9864866388ac8b7fed227b32c3fe08b12477fe41
diff: https://github.com/bitrig/bitrig/commit/9864866
author: mlarkin <[email protected]>
date: Mon Nov 9 01:08:56 2015 +0000


Cache the result of cpuid leaf function $0x1 from the host's boot CPU
during locore, information based on this will be returned to guest VMs
issuing cpuid instructions later, under certain circumstances.

M       sys/arch/amd64/amd64/locore.S

Reply via email to