The NetBSD Project

CVS log for src/sys/arch/xen/xen/xbd_xenbus.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / xen / xen

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.129.20.3 / (download) - annotate - [select for diffs], Mon Sep 4 16:36:46 2023 UTC (7 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.129.20.2: +3 -4 lines
Diff to previous 1.129.20.2 (colored) to branchpoint 1.129 (colored) next main 1.130 (colored)

Actually apply a cherry picked version of

	sys/arch/xen/xen/xbd_xenbus.c	rev 1.130

xbd(4): Membar audit.

After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.

Part of ticket #268 (and already noted in that CHANGES-10 entry, but
somehow lost during pullup)

Revision 1.129.20.2 / (download) - annotate - [select for diffs], Mon Jul 31 15:23:02 2023 UTC (8 months, 2 weeks ago) by martin
Branch: netbsd-10
Changes since 1.129.20.1: +12 -11 lines
Diff to previous 1.129.20.1 (colored) to branchpoint 1.129 (colored)

Pull up following revision(s) (requested by riastradh in ticket #268):

	sys/arch/xen/xenbus/xenbus_comms.c: revision 1.25
	sys/arch/xen/xenbus/xenbus_comms.c: revision 1.26
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.110
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.111
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.112
	sys/arch/xen/x86/cpu.c: revision 1.144
	sys/arch/xen/x86/cpu.c: revision 1.145
	sys/arch/xen/include/hypervisor.h: revision 1.56
	sys/arch/xen/include/hypervisor.h: revision 1.57
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.102
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.103
	sys/arch/xen/include/xenring.h: revision 1.7
	sys/arch/xen/xen/xennetback_xenbus.c: revision 1.109
	sys/arch/xen/xen/xengnt.c: revision 1.40
	sys/arch/xen/xen/xengnt.c: revision 1.41
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.129
	sys/arch/xen/xen/xencons.c: revision 1.51
	sys/arch/xen/xen/xencons.c: revision 1.52
	sys/arch/xen/xen/xencons.c: revision 1.53
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.130 (patch)
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.131 (patch)

xen: Fix sense of xen_rmb/wmb to make sense.

Use membar_acquire and membar_release, not membar_consumer and
membar_producer, out of paranoia -- that better matches Linux's
rmb/wmb (at least for non-I/O loads and stores).

Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html

xen/x86/cpu.c: Membar audit.

I see no reason for store-before-load ordering here; as far as I'm
aware, evtchn_upcall_mask is only shared between a (v)CPU and its
(hypervisor) interrupts, not other (v)CPUs.

xennet(4): Membar audit.
- xennet_tx_complete: Other side owns rsp_prod, giving us responses
  to tx commands.  We own rsp_cons, recording which responess we've
  processed already.
  1. Other side initializes responses before advancing rsp_prod, so
     we must observe rsp_prod before trying to examine the responses.
     Hence load from rsp_prod must be followed by xen_rmb.
     (Can this just use atomic_load_acquire?)
  2. As soon as other side observes rsp_event, it may start to
     overwrite now-unused response slots, so we must finish using the
     response before advancing rsp_cons.  Hence we must issue xen_wmb
     before store to rsp_event.
     (Can this just use atomic_store_release?)
     (Should this use RING_FINAL_CHECK_FOR_RESPONSES?)
  3. When loop is done and we set rsp_event, we must ensure the other
     side has had a chance to see that we want more before we check
     whether there is more to consume; otherwise the other side might
     not bother to send us an interrupt.  Hence after setting
     rsp_event, we must issue xen_mb (store-before-load) before
     re-checking rsp_prod.
- xennet_handler (rx): Same deal, except the xen_mb is buried in
  RING_FINAL_CHECK_FOR_RESPONSES.  Unclear why xennet_tx_complete has
  this open-coded while xennet_handler (rx) uses the macro.

xbd(4): Membar audit.
After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.
xbdback(4): Membar audit.

After consuming request slots, must issue xen_wmb notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_REQUESTS.

xencons(4): Membar audit.
- xenconscn_getc: Once we have consumed an input slot, it is clearer
  to issue xen_wmb (release, i.e., load/store-before-store) before
  advancing in_cons so that the update becomes a store-release
  freeing the input slot for the other side to reuse.
- xenconscn_putc: After filling an output slot, must issue xen_wmb
  (release, i.e., load/store-before-store) before advancing out_prod,
  and another one before notifying the other side of the advance.

xencons(4): Reduce unnecessary membars.
- xencons_handler: After advancing in_cons, only need one xen_wmb
  before notifying the hypervisor that we're ready for more.
  (XXX Should this do xen_mb and re-check in_prod at that point, or
  does hypervisor_notify_via_evtchn obviate the need for this?)
- xenvonscn_getc: After reading in_prod, only need one xen_rmb before
  using the slots it is telling us are now ready.

xengnt(4): Membar audit.
This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.
xenbus_comms.c: Membar audit.

This had the sense of membars reversed, presumably because xen_rmb
and xen_wmb had gotten reversed at some point.

xennetback(4): Fix xennetback_evthandler loop.
- After observing the other side has produced pending tx requests by
  reading sring->req_prod, must issue xen_rmb before touching them.
  Despite all the effort to use the heavy-weight
  RING_FINAL_CHECK_FOR_REQUESTS on each request in the loop, this
  barrier was missing.
- No need to update req_cons at each iteration in the loop.  It's
  private.  Just update it once at the end.
- After consuming requests, must issue xen_wmb before releasing the
  slots with RING_FINAL_CHECK_FOR_REQUEST for the other side to
  reuse.

xennetback(4): Fix membars in xennetback_rx_copy_process.
- No need for barrier around touching req_cons and rsp_prod_pvt,
  which are private.
- RING_PUSH_RESPONSES_AND_CHECK_NOTIFY already issues xen_wmb, no
  need to add one explicitly.
- After pushing responses, must issue xen_wmb (not xen_rmb) before
  hypervisor_notify_via_evtchn.

xennetback(4): Omit needless membars in xennetback_connect.
xneti is a private data structure to which we have exclusive access
here; ordering the stores doesn't make sense.

xen/hypervisor.h: Nix trailing whitespace.
No functional change intended.

xen/x86/cpu.c: Nix trailing whitespace.
No functional change intended.

xbd(4): Nix trailing whitespace.

xbdback(4): Nix trailing whitespace.
No functional change intended.

xencons(4): Nix trailing whitespace.
No functional change intended.

xengnt(4): Nix trailing whitespace.
No functional change intended.

xenbus_comms.c: Nix trailing whitespace.
No functional change intended.

xennetback(4): Nix trailing whitespace.
No functional change intended.

Revision 1.129.20.1 / (download) - annotate - [select for diffs], Thu Jul 27 17:56:31 2023 UTC (8 months, 3 weeks ago) by martin
Branch: netbsd-10
Changes since 1.129: +38 -30 lines
Diff to previous 1.129 (colored)

Pull up following revision(s) (requested by bouyer in ticket #248):

	sys/arch/xen/xen/xbd_xenbus.c: revision 1.132 (patch)
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.133 (patch)
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.134 (patch)

The disk size reported in the xenstore is always in XEN_BSIZE units,
not sector-size. Should fix the issue reported by Christian Kujau
on netbsd-users and port-xen.

Also use XEN_BSIZE when computing the number of bytes for format_bytes().
While there note in a comment that sc_sectors is in XEN_BSIZE units

Propoerly handle 4k sector size backends:
- report the backend's sector size to upper layers, not DEV_BSIZE.
  Adjust the number of sectors accordingly.
- Use sc_secsize instead of XEN_BSIZE where appropriate. The sectors numbers
  in I/O requests are still in XEN_BSIZE units, but must be a multiple
  of sc_secsize/XEN_BSIZE.
- As a consequence of previous, the buffer has to be aligned to sc_secsize,
  aligned to XEN_BSIZE may not be enough. This means that we may have to
  xbd_map_align() more buffer, including some without B_PHYS set.
- Add some more DPRINTF lines, related to I/O requests

Tested with a linux dom0.

thanks to Christian Kujau for providing access to his hardware for testing
and debugging.

Revision 1.134 / (download) - annotate - [select for diffs], Tue Jul 25 16:15:50 2023 UTC (8 months, 3 weeks ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.133: +40 -31 lines
Diff to previous 1.133 (colored)

Propoerly handle 4k sector size backends:
- report the backend's sector size to upper layers, not DEV_BSIZE.
  Adjust the number of sectors accordingly.
- Use sc_secsize instead of XEN_BSIZE where appropriate. The sectors numbers
  in I/O requests are still in XEN_BSIZE units, but must be a multiple
  of sc_secsize/XEN_BSIZE.
- As a consequence of previous, the buffer has to be aligned to sc_secsize,
  aligned to XEN_BSIZE may not be enough. This means that we may have to
  xbd_map_align() more buffer, including some without B_PHYS set.
- Add some more DPRINTF lines, related to I/O requests

Tested with a linux dom0.
thanks to Christian Kujau for providing access to his hardware for testing
and debugging.

Revision 1.133 / (download) - annotate - [select for diffs], Fri Jul 21 11:28:50 2023 UTC (8 months, 4 weeks ago) by bouyer
Branch: MAIN
Changes since 1.132: +4 -4 lines
Diff to previous 1.132 (colored)

Also use XEN_BSIZE when computing the number of bytes for format_bytes().
While there note in a comment that sc_sectors is in XEN_BSIZE units

Revision 1.132 / (download) - annotate - [select for diffs], Fri Jul 21 11:21:55 2023 UTC (8 months, 4 weeks ago) by bouyer
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

The disk size reported in the xenstore is always in XEN_BSIZE units,
not sector-size. Should fix the issue reported by Christian Kujau
on netbsd-users and port-xen.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Feb 25 00:35:15 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.130: +11 -11 lines
Diff to previous 1.130 (colored)

xbd(4): Nix trailing whitespace.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Feb 25 00:33:03 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.129: +3 -4 lines
Diff to previous 1.129 (colored)

xbd(4): Membar audit.

After consuming slots, must issue xen_wmb before notifying the other
side that we've consumed them in RING_FINAL_CHECK_FOR_RESPONSES.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jul 13 21:21:56 2020 UTC (3 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, netbsd-10-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.128: +15 -14 lines
Diff to previous 1.128 (colored)

change xbd_unmap_align() to get the bp via argument rathen than
req_bp, to avoid using req_bp after it's been set to NULL by the
time xbd_unmap_align() is called in xbd_handler(); this fixes
regression caused by previous fix

also make sure xbd_unmap_align() works correctly even when using the
linked request pair for I/O (ie. for Dom0 not supporting indirect
segments), regardless of the order the paired requests finish

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jun 29 21:45:50 2020 UTC (3 years, 9 months ago) by jdolecek
Branch: MAIN
Changes since 1.127: +4 -3 lines
Diff to previous 1.127 (colored)

when using two linked requests for I/O (i.e. when backend doesn't support
INDIRECT segments), make sure to clear req_bp for both of them

fixes a misfired assertion in BLKIF_OP_FLUSH_DISKCACHE - PR port-xen/55431

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 13 16:17:46 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.126: +22 -14 lines
Diff to previous 1.126 (colored)

move the xen_intr_disestablish() to resume - having it in suspend
seems to cause panic in later phases of suspend

don't try to revoke grants in resume, they are all gone

add some diagnostic code in suspend to make sure the request lists are ready
for resume

part of PR port-xen/55207

Revision 1.126 / (download) - annotate - [select for diffs], Tue May 12 09:54:02 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.125: +11 -4 lines
Diff to previous 1.125 (colored)

move xen_intr_disestablish() call in xbd_xenbus_suspend() so it's executed
without holding the xbd mutex, to avoid LOCKDEBUG assertion on suspend

while here only disestablish the intr if it was established

part of PR port-xen/55207

Revision 1.125 / (download) - annotate - [select for diffs], Thu May 7 19:25:57 2020 UTC (3 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.124: +18 -18 lines
Diff to previous 1.124 (colored)

Localify.

Revision 1.124 / (download) - annotate - [select for diffs], Sun May 3 17:54:28 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.123: +4 -3 lines
Diff to previous 1.123 (colored)

reduce buffer size for format_number() so that xbd(4) would show the size
in KB/GB/TB instead of bytes again; the '9' matches what xbd(4) used before,
and also e.g. wd(4)

Revision 1.123 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:18 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.122: +3 -2 lines
Diff to previous 1.122 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.97.2.3 / (download) - annotate - [select for diffs], Sat Apr 25 11:23:58 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.97.2.2: +3 -3 lines
Diff to previous 1.97.2.2 (colored) to branchpoint 1.97 (colored) next main 1.98 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.79.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:13 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.79.2.3: +519 -211 lines
Diff to previous 1.79.2.3 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

Sync with HEAD

Revision 1.122 / (download) - annotate - [select for diffs], Tue Apr 21 13:31:08 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

adjust the condition for max indirect segments to make it clear what
is really needed (enough to map MAXPHYS + 1 page); no functional difference

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:01 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.97.2.1: +553 -225 lines
Diff to previous 1.97.2.1 (colored) to branchpoint 1.97 (colored)

Sync with HEAD

Revision 1.121 / (download) - annotate - [select for diffs], Sun Apr 19 16:45:08 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base1
Changes since 1.120: +10 -3 lines
Diff to previous 1.120 (colored)

fix calculation of remaining bytes in xbd_diskstart_submit() for second
part of exactly I/O over 32KB when the remaining size was less than 1 page,
loop just finished without filling the last segment

triggered by anita run by Manuel

Revision 1.120 / (download) - annotate - [select for diffs], Sat Apr 18 23:24:49 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.119: +14 -9 lines
Diff to previous 1.119 (colored)

read feature-persistent value on connect, e.g. the Linux Dom0 writes
the value only together with the device info; no functional difference,
since we don't allow persistent mappings

Revision 1.119 / (download) - annotate - [select for diffs], Sat Apr 18 16:58:00 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.118: +7 -13 lines
Diff to previous 1.118 (colored)

make compile with XBD_DEBUG

Revision 1.118 / (download) - annotate - [select for diffs], Fri Apr 17 10:35:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

constify xbddkdriver

Revision 1.117 / (download) - annotate - [select for diffs], Fri Apr 17 10:32:19 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.116: +2 -8 lines
Diff to previous 1.116 (colored)

remove some old #if 0 code

Revision 1.116 / (download) - annotate - [select for diffs], Thu Apr 16 16:38:43 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.115: +152 -10 lines
Diff to previous 1.115 (colored)

if backend supports it, use indirect segment for I/O requests over 32KB

there is some overhead for backend without persistent mappings
(backend needs to map the extra indirect segment page), but this
makes it possible to queue more I/O if using 64KB block size

tested on NetBSD/amd64 DomU against Linux/amd64 Dom0

Revision 1.115 / (download) - annotate - [select for diffs], Thu Apr 16 09:51:40 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.114: +7 -4 lines
Diff to previous 1.114 (colored)

when checking for physio request check for B_PHYS in b_flags rather
than an internal field, so this works when the original buf is
wrapped by another one by e.g. dk(4)

fixes misfired assert when doing newfs on a wedge, reported by Manuel Bouyer

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:36 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.97: +3 -2 lines
Diff to previous 1.97 (colored)

Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Apr 15 10:16:47 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.113: +149 -62 lines
Diff to previous 1.113 (colored)

make xbd(4) accept 64k (aka regular MAXPHYS) I/O, use two linked requests
for this, so that it does not require MAXPHYS override in kernel config
any more

this is useful even if we get indirect segment support one day,
for compatibility with Dom0's not supporting it, like currently NetBSD

Revision 1.113 / (download) - annotate - [select for diffs], Tue Apr 14 15:16:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.112: +3 -3 lines
Diff to previous 1.112 (colored)

fix KASSERT() in xbd_map_align()

Revision 1.112 / (download) - annotate - [select for diffs], Tue Apr 14 14:06:24 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.111: +20 -14 lines
Diff to previous 1.111 (colored)

rearrange slightly to do proper b_resid accounting, to prepare for partial
transfers

Revision 1.111 / (download) - annotate - [select for diffs], Tue Apr 14 13:10:43 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.110: +44 -17 lines
Diff to previous 1.110 (colored)

use single pre-allocated buffer for unaligned I/O - it's rare and not
performance critical path, it's more important to ensure it will succeed
eventually; also return EAGAIN rather than ENOMEM, so the I/O will be
retried by dk_start() when previous I/O finishes

fix yet another leak on the xengnt_grant_access() fail path in
xbd_diskstart() - this time the unalign buffer

Revision 1.110 / (download) - annotate - [select for diffs], Tue Apr 14 13:02:40 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored)

add forgotten mutex_exit() in detach, which caused panic in uvm_unmap1()
due to held spin lock

Revision 1.109 / (download) - annotate - [select for diffs], Tue Apr 14 09:27:28 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.108: +15 -2 lines
Diff to previous 1.108 (colored)

provide d_iosize hook to cap the xfer size used for dumps

Revision 1.108 / (download) - annotate - [select for diffs], Tue Apr 14 08:21:59 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.107: +8 -2 lines
Diff to previous 1.107 (colored)

if grant fails also revoke the grants for previous segments, fixes
grant leak on grant error

Revision 1.107 / (download) - annotate - [select for diffs], Mon Apr 13 20:09:13 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.106: +4 -2 lines
Diff to previous 1.106 (colored)

KASSERT() that requested I/O size is <= XBD_MAX_XFER - this can happen
e.g. with custom DomU kernel which doesn't have the value for MAXPHYS
reduced to 32k like the XEN3_DOMU config

Revision 1.106 / (download) - annotate - [select for diffs], Mon Apr 13 16:29:59 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.105: +95 -97 lines
Diff to previous 1.105 (colored)

make xbd(4) D_MPSAFE

Revision 1.79.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:12 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.79.2.2: +41 -44 lines
Diff to previous 1.79.2.2 (colored) to branchpoint 1.79 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.105 / (download) - annotate - [select for diffs], Sun Apr 12 20:17:36 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.104: +76 -57 lines
Diff to previous 1.104 (colored)

convert to bus_dma(9)

simplify and fix error handling in xbd_handler(), expect backend
to not use the grant once request is finished, and avoid leaking
bounce buffer when the request using it happens to end with error

in xbd_diskstart() only do the RING_PUSH_REQUESTS_AND_CHECK_NOTIFY()
when actually the request was pushed successfully

Revision 1.104 / (download) - annotate - [select for diffs], Sun Apr 12 18:14:09 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.103: +5 -2 lines
Diff to previous 1.103 (colored)

add KASSERT() for unaligned case to make sure it indeed happens only
for requests via physio

Revision 1.103 / (download) - annotate - [select for diffs], Sat Apr 11 17:52:01 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.102: +56 -11 lines
Diff to previous 1.102 (colored)

revert previous - physio arranges for tranfer directly to user-provided
buffers, which are generally not DEV_BSIZE-aligned

Revision 1.102 / (download) - annotate - [select for diffs], Sat Apr 11 16:15:34 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.101: +13 -58 lines
Diff to previous 1.101 (colored)

now that getebuf() et.al. always returns DEV_BSIZE-aligned buffers
and rest of kernel code doing disk I/O was also converted over to it,
it's finally safe to remove the code to handle misaligned buffers

leave just KASSERT() in place

Revision 1.101 / (download) - annotate - [select for diffs], Sat Apr 11 16:02:41 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.100: +4 -3 lines
Diff to previous 1.100 (colored)

print 'backend features' instead of just 'features' for the detected backend
features, so that it's clear it's just capability rather than something
actually used by the frontend driver

Revision 1.100 / (download) - annotate - [select for diffs], Fri Apr 10 11:41:04 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200411
Changes since 1.99: +3 -6 lines
Diff to previous 1.99 (colored)

update comment for DIOCGCACHE (no DKCACHE_READ)

Revision 1.99 / (download) - annotate - [select for diffs], Fri Apr 10 10:32:18 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.98: +2 -5 lines
Diff to previous 1.98 (colored)

allow DIOCSSTRATEGY, there is no particular reason why it should be
restricted for xbd(4)

Revision 1.98 / (download) - annotate - [select for diffs], Fri Apr 10 10:30:10 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.97: +45 -19 lines
Diff to previous 1.97 (colored)

implement DIOCGCACHE - assume if CACHE_FLUSH is supported, write cache
is enabled

convert the sc_cache_flush flag to a feature bit field, and recognize
also barrier and persistent features; print the recognized features
on boot, and remove the warning on DIOCCACHESYNC

Revision 1.79.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.79.2.1: +4 -4 lines
Diff to previous 1.79.2.1 (colored) to branchpoint 1.79 (colored)

Merge changes from current as of 20200406

Revision 1.97 / (download) - annotate - [select for diffs], Tue Apr 7 11:47:06 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.96: +2 -24 lines
Diff to previous 1.96 (colored)

change xenbus_read() interface so that caller supplies the buffer and it's
size, caller doesn't free(9) the returned value any more

Revision 1.92.4.1 / (download) - annotate - [select for diffs], Sat Mar 21 15:52:09 2020 UTC (4 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored) next main 1.93 (colored)

Pull up following revision(s) (requested by riastradh in ticket #795):

	sys/dev/dksubr.c: revision 1.112
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.95
	sys/dev/scsipi/sd.c: revision 1.328
	sys/dev/dkvar.h: revision 1.32
	sys/dev/ld.c: revision 1.109
	sys/dev/cgd.c: revision 1.120
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.380
	sys/dev/ata/wd.c: revision 1.458

Add a flag to dk_dump for virtual disk devices.

If a disk is backed by a physical medium other than itself, such as
cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion
detection for dk_dump.

If, however, a device represents a physical medium on its own, such
as wd(4), then it passes 0 instead.

With this, I can now dump to dk on cgd on dk on wd.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Mar 13 00:32:05 2020 UTC (4 years, 1 month ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200406
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

xbd backend not supporting cache flush is not an autoconfiguration error

Revision 1.95 / (download) - annotate - [select for diffs], Sun Mar 1 03:21:54 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

Add a flag to dk_dump for virtual disk devices.

If a disk is backed by a physical medium other than itself, such as
cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion
detection for dk_dump.

If, however, a device represents a physical medium on its own, such
as wd(4), then it passes 0 instead.

With this, I can now dump to dk on cgd on dk on wd.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Oct 16 19:52:08 2019 UTC (4 years, 6 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.93: +3 -3 lines
Diff to previous 1.93 (colored)

use aprint_normal_dev() for the capacity message, same as e.g. wd(4) and sd(4)

Revision 1.93 / (download) - annotate - [select for diffs], Wed Oct 16 19:38:13 2019 UTC (4 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.92: +3 -4 lines
Diff to previous 1.92 (colored)

don't try to read disklabel for attached xbd* disk from (effectively) always
xbd0a device, there is no need for it and it is just wrong

same problem as PR kern/41704 for cgd

XXX perhaps xbd should use native block size passed from dom0 rather then
XXX recomputing in DEV_BSIZE

Revision 1.79.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:56 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.79: +49 -30 lines
Diff to previous 1.79 (colored)

Sync with HEAD

Revision 1.92 / (download) - annotate - [select for diffs], Sat Feb 2 12:32:55 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.91: +4 -4 lines
Diff to previous 1.91 (colored)

Switch NetBSD/xen to use XEN api tag RELEASE-4.11.1

The headers for this api are in sys/external/mit/xen-include-public/dist/

Revision 1.78.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:46 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.78.2.3: +5 -5 lines
Diff to previous 1.78.2.3 (colored) to branchpoint 1.78 (colored) next main 1.79 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.91 / (download) - annotate - [select for diffs], Mon Dec 24 14:55:42 2018 UTC (5 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored)

Bifurcate the interrupt establish functions between XEN and non-XEN

Thus intr_establish_xname() becomes xen_intr_establish_xname() etc.

One consequence of this is that dom0 devices expect the native
function calls to be available and we thus provide weak aliasing for
dom0 builds to succeed. XEN and non-XEN devices are distinguished by
the PIC they are established on. XEN interrupts are exclusively
established on xen_pic, while dom0 interrupts are established on
natively available PICs.

This allows us an orthogonal path to xen device management (eg:
xenstore events) in XENPVHVM, without having to worry about unifying
the vector entry paths, etc., which is quite challenging.

Revision 1.78.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:28 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.78.2.2: +5 -6 lines
Diff to previous 1.78.2.2 (colored) to branchpoint 1.78 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.90 / (download) - annotate - [select for diffs], Fri Oct 26 05:33:21 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.89: +4 -5 lines
Diff to previous 1.89 (colored)

Decompose hypervisor_enable_event() into functional steps.

The hypervisor_unmask_event() step is relevant for any event.

The pirq related step is only relevant for pirq bound events.

Prune blanket usage of this, so that usage is semantically appropriate.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Oct 24 03:59:33 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

When using the intr_establish_xname() interface to register
XEN events, follow established x86/intr.c conventions - set
the 'legacy' irq value to -1, to indicate that the pic, pin
combination (&xen_pic, port) is used for registration.

Revision 1.78.2.2 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:44 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.78.2.1: +42 -22 lines
Diff to previous 1.78.2.1 (colored) to branchpoint 1.78 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.88 / (download) - annotate - [select for diffs], Sun Aug 26 21:04:16 2018 UTC (5 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.87: +10 -2 lines
Diff to previous 1.87 (colored)

add event counter for the unaligned map to get a handle on how often this
actually happens

Revision 1.87 / (download) - annotate - [select for diffs], Sun Aug 26 11:31:56 2018 UTC (5 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.86: +51 -11 lines
Diff to previous 1.86 (colored)

Add back non-512-byte aligned buffers support (reverting 1.84).
Userland users of raw devices don't have to use sector-aligned buffers,
and e.g. disklabel doesn't.
anita tests on Xen should at last complete the install phase again.

Revision 1.76.6.1 / (download) - annotate - [select for diffs], Sat Aug 25 14:28:00 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.76: +6 -2 lines
Diff to previous 1.76 (colored) next main 1.77 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #984):

	sys/arch/xen/xen/xbd_xenbus.c: revision 1.83

avoid race condition between I/O submission in xbd_diskstart() and
interrupt handling in xbd_handler() - need to protect it with splbio()

fixes PR port-xen/53506 by Emmanuel Dreyfus, and likely also port-xen/53074
by Brad Spencer

Revision 1.86 / (download) - annotate - [select for diffs], Tue Aug 21 18:55:08 2018 UTC (5 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.85: +3 -2 lines
Diff to previous 1.85 (colored)

(only commit message for rev 1.85, no actual change)

shuffle code in xbd_handler() response loop so that req_bp is never
touched for non I/O responses; unknown commands are now just skipped, also
without touching neither xbdreq, nor req_bp

add some KASSERTS() for xbdreq->req_nr_segments and xbdreq->req_bp,
and reset req_bp after it's processed to ensure the buf can never
be processed twice

intended to simplify debugging in cases like PR port-xen/53506

Revision 1.85 / (download) - annotate - [select for diffs], Tue Aug 21 18:45:16 2018 UTC (5 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.84: +19 -13 lines
Diff to previous 1.84 (colored)

*** empty log message ***

Revision 1.84 / (download) - annotate - [select for diffs], Tue Aug 21 18:31:55 2018 UTC (5 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.83: +9 -49 lines
Diff to previous 1.83 (colored)

remove code handling buffers not aligned to 512-byte boundary, simply return
EINVAL straight away

the condition doesn't seem to be actually hit for normal boots and
tools like fsck, which is good thing since it allocated memory
separately for each such I/O

Revision 1.83 / (download) - annotate - [select for diffs], Tue Aug 21 18:11:10 2018 UTC (5 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.82: +6 -2 lines
Diff to previous 1.82 (colored)

avoid race condition between I/O submission in xbd_diskstart() and
interrupt handling in xbd_handler() - need to protect it with splbio()

fixes PR port-xen/53506 by Emmanuel Dreyfus, and likely also port-xen/53074
by Brad Spencer

Revision 1.82 / (download) - annotate - [select for diffs], Wed Aug 15 15:49:15 2018 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

fix comment

Revision 1.81 / (download) - annotate - [select for diffs], Wed Aug 15 15:18:34 2018 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored)

minor KNF

Revision 1.80 / (download) - annotate - [select for diffs], Wed Aug 15 15:15:31 2018 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.79: +5 -5 lines
Diff to previous 1.79 (colored)

mark XXXSMP also wakeup() calls

Revision 1.78.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:48 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.78: +23 -12 lines
Diff to previous 1.78 (colored)

Sync with HEAD

Revision 1.79 / (download) - annotate - [select for diffs], Sun Jun 24 20:28:58 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.78: +23 -12 lines
Diff to previous 1.78 (colored)

mark with XXXSMP all remaining spl*() and tsleep() calls

Revision 1.57.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.57.2.2: +117 -181 lines
Diff to previous 1.57.2.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

update from HEAD

Revision 1.78 / (download) - annotate - [select for diffs], Sat Nov 11 21:03:01 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

Restore MP-safety annotations in intr_establish_xname.

In the old API, event_set_handler would assume MP-unsafe for IPL_VM
and MP-safe for all other levels (IPL_SCHED, IPL_HIGH).  The recent
Xen interrupt rototill started passing known_mpsafe=true for _all_
interrupt handlers.  Change it to known_mpsafe=false for the IPL_VM
(= IPL_CLOCK, IPL_NET) ones.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Nov 6 15:27:09 2017 UTC (6 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.76: +10 -6 lines
Diff to previous 1.76 (colored)

Switch XEN drivers to use intr_establish_xname()/intr_disestablish()

This completes the API transition.

Revision 1.66.4.5 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:57 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.4.4: +5 -5 lines
Diff to previous 1.66.4.4 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Sync with HEAD

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:39 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync with HEAD

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:23 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync with HEAD

Revision 1.76 / (download) - annotate - [select for diffs], Sun Mar 5 23:07:12 2017 UTC (7 years, 1 month ago) by mlelstv
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored)

Enhance disk metrics by calculating a weighted sum that is incremented
by the number of concurrent I/O requests. Also introduce a new disk_wait()
function to measure requests waiting in a bufq.
iostat -y now reports data about waiting and active requests.

So far only drivers using dksubr and dk, ccd, wd and xbd collect data about
waiting requests.

Revision 1.66.4.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:45 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.4.3: +3 -3 lines
Diff to previous 1.66.4.3 (colored) to branchpoint 1.66 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.75 / (download) - annotate - [select for diffs], Sun Oct 25 07:51:16 2015 UTC (8 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Uninitialized variable. Found by Brainy.

ok pgoyette@

Revision 1.66.4.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:05:54 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.4.2: +91 -149 lines
Diff to previous 1.66.4.2 (colored) to branchpoint 1.66 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Fri Aug 28 17:41:49 2015 UTC (8 years, 7 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.73: +2 -12 lines
Diff to previous 1.73 (colored)

move entropy gathering into dksubr.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Aug 27 05:51:50 2015 UTC (8 years, 7 months ago) by mlelstv
Branch: MAIN
Changes since 1.72: +6 -9 lines
Diff to previous 1.72 (colored)

Make dksubr use a spin-mutex again, since some drivers still call dk_done
from hardware interrupt. Instead, release mutex while calling start routine.

The buffer peek/use/get sequence which can no longer be atomic. So consume
the buffer directly and on error privately save and retry the buffer later.
The dk_drain function is used to flush such a deferred buffer together with
the buffer queue.
Adjust drivers to use dk_drain.

Fix an error path where dk_done was called while the lock was already held.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Aug 16 18:00:03 2015 UTC (8 years, 8 months ago) by mlelstv
Branch: MAIN
Changes since 1.71: +87 -132 lines
Diff to previous 1.71 (colored)

Two changes to the dksubr interface.

- d_diskstart callback now processes a single buffer only.
  The new wrapper function dk_start processes the queue,
  performs other buffer handling and also provides locking
  for the the data structures.

- add d_discard callback to handle device specific function inside
  the new dk_discard helper function.

Replace splbio with mutex to protect queue and disk structure.
Refactor common code in dk_strategy and dk_discard into dk_translate.

Adjust and simplify ld(4), cgd(4) and xbd(4) drivers accordingly.

ld(4) now becomes MP_SAFE.

Bump kernel version.

Revision 1.66.4.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:05 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.4.1: +35 -41 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Sat May 2 08:00:08 2015 UTC (8 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.70: +23 -29 lines
Diff to previous 1.70 (colored)

Merge dk_intf and dkdriver interfaces.
Merge common disk driver functionality in ld.c with dksubr.c.
Adjust the two previous users of dk_intf (cgd and xbd) to
the changes.

bump kernel version to 7.99.14

Revision 1.70 / (download) - annotate - [select for diffs], Mon Apr 13 21:18:40 2015 UTC (9 years ago) by riastradh
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

MD rnd.h cleanups.  Please let me know if I broke anything!

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:04 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.66: +3 -7 lines
Diff to previous 1.66 (colored)

Sync with HEAD

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jan 2 19:42:06 2015 UTC (9 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

We have three sets of DTYPE_ constants in the kernel:
	altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Jan 2 01:13:00 2015 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.67: +2 -6 lines
Diff to previous 1.67 (colored)

these call dk_ioctl, no need to call disk_ioctl anymore.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Dec 31 20:39:07 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

pass dev to disk_ioctl

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:30 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.57.2.1: +152 -115 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:35 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.62.2.3 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:11 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.62.2.2: +133 -108 lines
Diff to previous 1.62.2.2 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Rebase.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:35 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.64: +3 -2 lines
Diff to previous 1.64 (colored)

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jul 25 08:02:19 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.63: +3 -2 lines
Diff to previous 1.63 (colored)

Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Tue Jun 3 09:17:52 2014 UTC (9 years, 10 months ago) by sborrill
Branch: netbsd-6
Changes since 1.53: +126 -106 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1075):
	sys/arch/xen/xen/xbd_xenbus.c:	revision 1.63 via patch
	sys/dev/cgd.c:			revision 1.87 via patch
	sys/dev/dksubr.c:		revision 1.50 via patch
	sys/dev/dkvar.h:		revision 1.19 via patch

Avoid xbd(4) reordering requests, which, depending on the underlying
hardware, can badly affect write performances. This can give up to a 5x
performance gain in sequencial writes.

Revision 1.63 / (download) - annotate - [select for diffs], Sun May 25 19:23:49 2014 UTC (9 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.62: +131 -108 lines
Diff to previous 1.62 (colored)

As proposed in
https://mail-index.netbsd.org/tech-kern/2014/05/21/msg017098.html
remove dk_start() and dk_iodone() from dksubr.c and move the related code
to the underlying driver.
This increase complexity only marginally: the underlying drivers have
to do the while() loop themselves, but this can now be done properly with
bufq_peek()/bufq_get(), removing the buffer from the queue at the right time.
This handle both the recursion and reordering issues (the reordering
issue is described here:
https://mail-index.netbsd.org/tech-kern/2014/05/19/msg017089.html
the recursion isssue is PR #25240).

Difference with the patch posted to tech-kern@: KASSERT() that the
buffer we remove with bufq_get() is the same as the one we bufq_peek()'d
just before.
Hopefully this will allow more disk drivers to use dksubr.c

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.48.2.2: +34 -43 lines
Diff to previous 1.48.2.2 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.59: +22 -10 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

sync with head

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Tue Apr 8 23:54:23 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.62.2.1: +4 -4 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored)

Type fixo.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:31 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:26 2014 UTC (10 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.61: +20 -6 lines
Diff to previous 1.61 (colored)

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Nov 6 06:23:15 2013 UTC (10 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.60: +2 -4 lines
Diff to previous 1.60 (colored)

- move variables inside their #ifdef use
- remove unused and set-but-unused variables
- use __USE() in a particularly ugly case

with these, and a couple of other changes, amd64 gcc 4.8.1 world
is able to complete build.sh release.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Oct 13 06:55:34 2013 UTC (10 years, 6 months ago) by riz
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

Catch up to recent changes in config_pending_{incr,decr}().

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:14 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.57: +14 -35 lines
Diff to previous 1.57 (colored)

resync from head

Revision 1.59 / (download) - annotate - [select for diffs], Wed May 29 23:11:56 2013 UTC (10 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.58: +13 -19 lines
Diff to previous 1.58 (colored)

get dir of dk_geom.

Revision 1.58 / (download) - annotate - [select for diffs], Wed May 29 00:47:48 2013 UTC (10 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.57: +12 -27 lines
Diff to previous 1.57 (colored)

phase 1 of disk geometry cleanup:
	- centralize the geometry -> plist code so that we don't have
	  n useless copies of it.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:20:37 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.48.2.1: +32 -34 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored)

sync with head

Revision 1.49.2.3 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:12 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.49.2.2: +30 -32 lines
Diff to previous 1.49.2.2 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored)

sync to latest -current.

Revision 1.57 / (download) - annotate - [select for diffs], Fri May 25 15:03:38 2012 UTC (11 years, 10 months ago) by elric
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.56: +32 -34 lines
Diff to previous 1.56 (colored)

Update xdb_xenbus.c to new usage of routines in dksubr.c.

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:12 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.48: +33 -26 lines
Diff to previous 1.48 (colored)

sync with head

Revision 1.49.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:37 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.49.2.1: +22 -6 lines
Diff to previous 1.49.2.1 (colored) to branchpoint 1.49 (colored)

sync to -current.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Feb 22 16:53:46 2012 UTC (12 years, 1 month ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.55: +7 -3 lines
Diff to previous 1.55 (colored)

Only attempt to handle as much data as we can handle.
Per my testing, allows normal MAXPHYS on domU kernels.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Feb 22 16:50:46 2012 UTC (12 years, 1 month ago) by jakllsch
Branch: MAIN
Changes since 1.54: +5 -4 lines
Diff to previous 1.54 (colored)

Define XBD_MAX_XFER instead of using (PAGE_SIZE * BLKIF_MAX_SEGMENTS_PER_REQUEST) directly.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Feb 21 01:47:50 2012 UTC (12 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.53: +16 -5 lines
Diff to previous 1.53 (colored)

Add and use xbdminphys() to handle transfer segmentation/size limit.
Should allow us to use a normal MAXPHYS in domU kernels.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:33:47 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.49: +12 -21 lines
Diff to previous 1.49 (colored)

merge to -current.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Feb 2 20:11:26 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

call uvm_km_kmem_alloc with right arguments

fixes: kern/45913

Revision 1.52 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:01 2012 UTC (12 years, 2 months ago) by tls
Branch: MAIN
Changes since 1.51: +3 -13 lines
Diff to previous 1.51 (colored)

Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:39 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.50: +8 -7 lines
Diff to previous 1.50 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.50 / (download) - annotate - [select for diffs], Wed Dec 7 15:47:43 2011 UTC (12 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored)

switch from xen3-public to xen-public.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:21 2011 UTC (12 years, 5 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Sep 20 00:12:24 2011 UTC (12 years, 7 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.47: +116 -33 lines
Diff to previous 1.47 (colored)

Merge jym-xensuspend branch in -current. ok bouyer@.

Goal: save/restore support in NetBSD domUs, for i386, i386 PAE and amd64.

Executive summary:
- split all Xen drivers (xenbus(4), grant tables, xbd(4), xennet(4))
in two parts: suspend and resume, and hook them to pmf(9).
- modify pmap so that Xen hypervisor does not cry out loud in case
it finds "unexpected" recursive memory mappings
- provide a sysctl(7), machdep.xen.suspend, to command suspend from
userland via powerd(8). Note: a suspend can only be handled correctly
when dom0 requested it, so provide a mechanism that will prevent
kernel to blindly validate user's commands

The code is still in experimental state, use at your own risk: restore
can corrupt backend communications rings; this can completely thrash
dom0 as it will loop at a high interrupt level trying to honor
all domU requests.

XXX PAE suspend does not work in amd64 currently, due to (yet again!)
page validation issues with hypervisor. Will fix.

XXX secondary CPUs are not suspended, I will write the handlers
in sync with cherry's Xen MP work.

Tested under i386 and amd64, bear in mind ring corruption though.

No build break expected, GENERICs and XEN* kernels should be fine.
./build.sh distribution still running. In any case: sorry if it does
break for you, contact me directly for reports.

Revision 1.38.2.12 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:32 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.11: +3 -4 lines
Diff to previous 1.38.2.11 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.38.2.11 / (download) - annotate - [select for diffs], Mon Jul 25 00:18:28 2011 UTC (12 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.10: +55 -23 lines
Diff to previous 1.38.2.10 (colored) to branchpoint 1.38 (colored)

Pull-up to my branch some of the improvements I committed to HEAD, but
forgot to reflect here.

Improvements in the attachement routines: in case of error, don't forget
to free() the allocated rings. Should not happen anyway, more a matter
of staying clean.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Jul 25 00:06:49 2011 UTC (12 years, 8 months ago) by jym
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.46: +26 -2 lines
Diff to previous 1.46 (colored)

And... explain xbd(4).

Revision 1.46 / (download) - annotate - [select for diffs], Mon Jul 25 00:02:38 2011 UTC (12 years, 8 months ago) by jym
Branch: MAIN
Changes since 1.45: +11 -14 lines
Diff to previous 1.45 (colored)

KNF. No functional change.

Revision 1.44.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:07:12 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync with HEAD.

Revision 1.38.2.10 / (download) - annotate - [select for diffs], Thu May 26 22:30:31 2011 UTC (12 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.9: +10 -7 lines
Diff to previous 1.38.2.9 (colored) to branchpoint 1.38 (colored)

Split allocation and initialization of ring I/O for xbd(4) and xennet(4):
- allocation belongs to _attach()
- init to _resume(), so that it can be used by suspend/resume code too.

Revision 1.38.2.9 / (download) - annotate - [select for diffs], Mon May 2 22:49:59 2011 UTC (12 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.8: +0 -0 lines
Diff to previous 1.38.2.8 (colored) to branchpoint 1.38 (colored)

Sync with head.

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:34 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

sync with head

Revision 1.38.2.8 / (download) - annotate - [select for diffs], Wed Mar 30 23:15:06 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.7: +2 -3 lines
Diff to previous 1.38.2.7 (colored) to branchpoint 1.38 (colored)

Sync with my commits in HEAD.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Mar 30 00:13:28 2011 UTC (13 years ago) by jym
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

Remove spurious spaces.

Revision 1.38.2.7 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:23 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.6: +6 -6 lines
Diff to previous 1.38.2.6 (colored) to branchpoint 1.38 (colored)

Sync with HEAD

Revision 1.34.2.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:33:45 2010 UTC (14 years ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.34.2.1: +129 -10 lines
Diff to previous 1.34.2.1 (colored) next main 1.34.2.2 (colored)

sync to netbsd-5

Revision 1.26.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:10 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.26.4.4: +130 -28 lines
Diff to previous 1.26.4.4 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

sync with head

Revision 1.38.2.6 / (download) - annotate - [select for diffs], Sun Nov 1 21:43:28 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.5: +99 -29 lines
Diff to previous 1.38.2.5 (colored) to branchpoint 1.38 (colored)

- Upgrade suspend/resume code to comply with Xen2 removal.
- Add support for PAE domUs suspend/resume.
- Fix an issue regarding initialization of the xbd ring I/O that could end
badly during resume, with invalid block operations submitted to dom0 backend.

NetBSD supports PAE under x86_32 by considering the L2 page as being
4 pages long instead of 1.

Xen validates the page types during resume. Sadly, the hypervisor handles
alternative recursive mappings (== PG/PD entries pointing to pages other
than self) inadequately, which could lead to incorrect page pinning.

As a result, the important change with this patch is to clear these alternative
mappings during suspend, and reset them back to their former self upon
resume. For PAE, approx. all 4 PDIR_SLOT_PTEs could be considered as
alternative recursive mappings.

See comments in pmap.c for further details.

Now, let the testing and bug hunting begin.

Revision 1.38.2.5 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:47 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.4: +153 -128 lines
Diff to previous 1.38.2.4 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:11 2009 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.43: +2 -7 lines
Diff to previous 1.43 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Mon Sep 28 01:25:22 2009 UTC (14 years, 6 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.34.2.2: +98 -10 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1026):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.43 via patch
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.25
xbdback: implement and publish "feature-flush-cache".
xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC.
 If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on
 first call.
Should improve WAPBL reliability of Xen guests on a NetBSD dom0.
Unfortunably not all linux guests seems to support this feature, and using
feature-write-barrier would require a B_BARRIER flag in the buffer.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Mon Sep 28 00:42:34 2009 UTC (14 years, 6 months ago) by snj
Branch: netbsd-5
Changes since 1.34.2.1: +33 -2 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1025):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.40
Implement DIOCGDISKINFO for xbd disk driver.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Sep 23 17:48:55 2009 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.42: +98 -10 lines
Diff to previous 1.42 (colored)

xbdback: implement and publish "feature-flush-cache".
xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC.
 If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on
 first call.
Should improve WAPBL reliability of Xen guests on a NetBSD dom0.
Unfortunably not all linux guests seems to support this feature, and using
feature-write-barrier would require a B_BARRIER flag in the buffer.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Sep 21 21:59:30 2009 UTC (14 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.41: +34 -15 lines
Diff to previous 1.41 (colored)

Allow a xbd to be detached from the domU (e.g. at shutdown). Patch tested
and adjusted by David Young, discussed on port-xen@ early august.

Revision 1.26.4.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:56 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.26.4.3: +3 -3 lines
Diff to previous 1.26.4.3 (colored) to branchpoint 1.26 (colored)

sync with head.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jul 29 12:02:10 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

remove Xen2 support.
ok bouyer@

Revision 1.38.2.4 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:37 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.3: +33 -2 lines
Diff to previous 1.38.2.3 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Revision 1.26.4.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:13 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.26.4.2: +33 -2 lines
Diff to previous 1.26.4.2 (colored) to branchpoint 1.26 (colored)

sync with head

Revision 1.40 / (download) - annotate - [select for diffs], Mon Jun 15 21:11:24 2009 UTC (14 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.39: +33 -2 lines
Diff to previous 1.39 (colored)

Implement DIOCGDISKINFO for xbd disk driver.

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Sun May 31 20:15:37 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.2: +16 -12 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored)

Modifications for the Xen suspend/migrate/resume branch:

- introduce xenbus_device_{suspend,resume}() functions. These are routines
used to suspend/resume MI parts of the Xenbus device interfaces, like updating
frontend/backend devices' paths found in XenStore.

- introduce HYPERVISOR_sysctl(), an hypercall used only by Xentools to obtain
information from hypervisor (listing VMs, printing console, etc.). I use it
to query xenconsole from ddb(), as a last resort in case of a panic() in
dom0 (xm being not available). Currently unused in the branch; could be, if
requested.

- disable the rwlock(9) used to protect code that could use transient MFNs.
It could trigger nasty context switches in place it should not to.

- fix some bugs in the xennet/xbd suspend/resume pmf(9) handlers.

- following XenSource's design, talk_to_otherend() is now called
watch_otherend(), and free_otherend_details() is used by Xenbus device
suspend/resume routines.

- some slight modifications in pmap regarding APDP. Introduce an inline
function (pmap_unmap_apdp_pde()) that clears APDP entry for the current pmap.

- similarly, implement pmap_unmap_all_apdp_pdes() that iterates through all
pmaps and tears down APDP, as Xen does not handle them properly.

TODO/XXX:

- pmap_unmap_apdp_pde() does not handle APDP shadow entry of PAE. It will,
once I figure out how PAE uses it.

- revisit the pmap locking issue regarding transient MFNs. As NetBSD does not
use kernel preemption and MP for Xen, this could be skipped momentarily. See
http://mail-index.netbsd.org/port-xen/2009/04/27/msg004903.html for details.

- fix a bug regarding grant tables which could technically DoS a dom0 if
ridiculously high consumer/producer indexes are passed down in the ring during
a resume.

All in all, once the grant table index issue and APDP PAE are fixed, next step
is to torture test this branch.

Tested under i386 PAE and non-PAE, Xen3 dom0 and domU. amd64 is only compile
tested.

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Wed May 13 17:18:50 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38.2.1: +22 -2 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.26.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:14 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.26.4.1: +65 -29 lines
Diff to previous 1.26.4.1 (colored) to branchpoint 1.26 (colored)

sync with head.

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:35:01 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.33.2.2: +22 -2 lines
Diff to previous 1.33.2.2 (colored) next main 1.34 (colored)

Sync with HEAD.

Revision 1.7.2.8 / (download) - annotate - [select for diffs], Fri Mar 20 14:55:32 2009 UTC (15 years, 1 month ago) by msaitoh
Branch: netbsd-3
Changes since 1.7.2.7: +21 -2 lines
Diff to previous 1.7.2.7 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1996):
	sys/arch/xen/xen/if_xennet_xenbus.c	1.34
	src/sys/arch/xen/xen/xbd_xenbus.c	1.39

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.14.10.6 / (download) - annotate - [select for diffs], Fri Mar 20 14:28:40 2009 UTC (15 years, 1 month ago) by msaitoh
Branch: netbsd-4
Changes since 1.14.10.5: +21 -2 lines
Diff to previous 1.14.10.5 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1282):
	sys/arch/xen/xen/if_xennet_xenbus.c	1.34
	src/sys/arch/xen/xen/xbd_xenbus.c	1.39

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Sun Mar 8 03:12:50 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.34: +22 -2 lines
Diff to previous 1.34 (colored)

Pull up following revision(s) (requested by bouyer in ticket #545):
	sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.34
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.39
Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Mar 3 19:04:41 2009 UTC (15 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.38: +22 -2 lines
Diff to previous 1.38 (colored)

Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:29:49 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.33.2.1: +18 -9 lines
Diff to previous 1.33.2.1 (colored)

Sync with HEAD.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Feb 9 00:03:55 2009 UTC (15 years, 2 months ago) by jym
Branch: jym-xensuspend
Changes since 1.38: +98 -25 lines
Diff to previous 1.38 (colored)

Initial code for xen save/restore/migrate facilities.

- split the attach code of frontends in two half: one that is only needed
during autoconf(9) attach/detach phases, and one used at each save/restore
of device state (between suspend and resume).

Applies to hypervisor, xencons, xenbus, xbd, and xennet.

- add a rwlock(9) ("ptom_lock") to protect the different parts in the kernel
 that manipulate MFNs (which could change between a suspend and a resume,
without the kernel noticing it). Parts that require MFNs acquire a reader lock,
while suspend code will acquire a writer lock to ensure that no-other parts
in kernel still use MFNs.

- integrate the suspend code with sysmon.

- various things in pmap(9), and clock.

TODO:
- factorize code a bit more inside frontends drivers.
- remove all alternative recursive (APDP_PDE) mappings found in PD/PT during
suspend, as Xen does not support them.
- abstract the ptom_lock locking, it is only required when kernel preemption
is enabled, or on MP systems.

Current code works mostly. You may experience difficulties in some corner
cases (dom0 warnings about xennet interface errors, and Xen tools failing to
 validate NetBSD's alternative pmaps).

Revision 1.38 / (download) - annotate - [select for diffs], Sun Feb 8 19:05:50 2009 UTC (15 years, 2 months ago) by jym
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.37: +18 -9 lines
Diff to previous 1.37 (colored)

- add comments
- wrap long lines for easier reading
- make some debug messages a bit more relevant

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:12 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.33: +8 -8 lines
Diff to previous 1.33 (colored)

Sync with HEAD.

Revision 1.23.14.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:40 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23.14.4: +24 -15 lines
Diff to previous 1.23.14.4 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Sync with HEAD.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 16 20:16:47 2009 UTC (15 years, 3 months ago) by jym
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Replace x86 memory fences in Xen drivers by their Xen equivalents, to reduce
MD dependency:

x86_lfence() => xen_rmb()
x86_sfence() => xen_wmb()
x86_mfence() => xen_mb()

Discussed in
http://mail-index.netbsd.org/port-xen/2009/01/15/msg004655.html

Ok by bouyer@.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 13 13:35:52 2009 UTC (15 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

g/c BUFQ_FOO() macros and use bufq_foo() directly.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Dec 18 12:19:03 2008 UTC (15 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.34: +2 -3 lines
Diff to previous 1.34 (colored)

remove unused malloc.h

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:43 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.30: +23 -13 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Oct 30 10:12:59 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: netbsd-5
Changes since 1.33: +5 -4 lines
Diff to previous 1.33 (colored)

twiddle with headers: include what is really needed

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 25 17:12:29 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
Branch point for: nick-hppapmap
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

- add and fix some comments in xennet and xbd code
- add BEST_SUSPENDED macro, the xennet equivalent of BLKIF_STATE_SUSPENDED
for xbd (indicate that backend is in suspended state)
- use GNTST_okay to check the grant table setup status returned by hypercall,
 rather than 0

No functional changes.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 24 21:09:24 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
CVS Tags: matt-mips64-base2
Changes since 1.31: +10 -2 lines
Diff to previous 1.31 (colored)

- rename init_events() to events_init(), to better reflect netbsd semantics

- change unbind_[pv]irq_from_evtch() so that they now return the event
channel the [PV]IRQ was bound to. It reflects the opposite behaviour of the
bind_[pv]irq_to_evtch() functions.

- remove xenbus_suspend() and xenbus_resume() prototypes, as they are not
used anywhere else, and will conflict with the xenbus pmf(9) handlers.

- make start_info aligned on a page boundary, as Xen expects it to be so.

- mask event channel during xbd detach before removing its handler (can
avoid spurious events).

- add the "protocol" entry in xenstore during xbd initialization. Normally
created during domU's boot by xentools, it is under domU's responsibility
in all other cases (save/restore, hot plugging, etc.).

- modifications to xs_init(), so that it can properly return an error.

Reviewed by Christoph (cegger@).

Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 24 18:02:58 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
Changes since 1.30: +12 -11 lines
Diff to previous 1.30 (colored)

- printf -> aprint_*
- fix and add comments
- make some panic/error messages more relevant
- remove last '\n' in DPRINTK() macros, not required as it is already part of format string.

No functional changes.

Revision 1.23.14.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:14 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23.14.3: +1 -1 lines
Diff to previous 1.23.14.3 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.27.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:33:39 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.27.2.1: +3 -3 lines
Diff to previous 1.27.2.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.14.10.3.2.1 / (download) - annotate - [select for diffs], Thu Sep 4 08:46:44 2008 UTC (15 years, 7 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.14.10.3: +20 -17 lines
Diff to previous 1.14.10.3 (colored) next main 1.14.10.4 (colored)

Sync with netbsd-4.

Revision 1.14.10.5 / (download) - annotate - [select for diffs], Sun Aug 31 16:35:49 2008 UTC (15 years, 7 months ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.14.10.4: +3 -3 lines
Diff to previous 1.14.10.4 (colored) to branchpoint 1.14 (colored)

Pull up revision 1.30 (requested by bouyer in ticket #1163).

xbd_map_align() can be called from interrupt context (though
xbd_handler()->dk_iodone()->dk_start()->xbd_start()), so don't try
to sleep in uvm_km_alloc().

Revision 1.14.10.4 / (download) - annotate - [select for diffs], Sun Aug 31 14:47:38 2008 UTC (15 years, 7 months ago) by jdc
Branch: netbsd-4
Changes since 1.14.10.3: +19 -16 lines
Diff to previous 1.14.10.3 (colored) to branchpoint 1.14 (colored)

Pull up revisions:
  sys/arch/xen/include/xenbus.h:1.8
  sys/arch/xen/xen/xbd_xenbus.c:1.24
  sys/arch/xen/xen/xbdback_xenbus.c:1.15
  sys/arch/xen/xenbus/xenbus_xs.c:1.14
via patch (requested by bouyer in ticket #1149).

Revision 1.27.4.2 / (download) - annotate - [select for diffs], Fri Jul 18 16:37:31 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.27.4.1: +3 -3 lines
Diff to previous 1.27.4.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

Sync with head.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jul 5 19:06:01 2008 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, haad-dm-base1
Branch point for: haad-dm
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

xbd_map_align() can be called from interrupt context (though
xbd_handler()->dk_iodone()->dk_start()->xbd_start()), so don't try
to sleep in uvm_km_alloc().

Revision 1.23.14.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:02 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23.14.2: +2 -4 lines
Diff to previous 1.23.14.2 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:30:51 2008 UTC (15 years, 10 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.27: +4 -6 lines
Diff to previous 1.27 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.27.4.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:32:55 2008 UTC (15 years, 10 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.27: +4 -6 lines
Diff to previous 1.27 (colored)

Sync with head.

Revision 1.26.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:24 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.26.2.1: +4 -6 lines
Diff to previous 1.26.2.1 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored)

sync with head.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 12 04:54:40 2008 UTC (15 years, 10 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.28: +4 -5 lines
Diff to previous 1.28 (colored)

xbddump: remove duplicate check done by device_lookup_private

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jun 12 02:50:30 2008 UTC (15 years, 10 months ago) by briggs
Branch: MAIN
Changes since 1.27: +2 -3 lines
Diff to previous 1.27 (colored)

Don't try to look up the softc manually in xbddump().  We already have it
from device_lookup_private().

Revision 1.23.14.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:55 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.23.14.1: +46 -44 lines
Diff to previous 1.23.14.1 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.26.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:08 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored)

sync with head.

Revision 1.26.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:23:31 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored)

sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Sat May 3 08:23:41 2008 UTC (15 years, 11 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, simonb-wapbl
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored)

after the "struct disk" is finished with, it should be
destroyed with disk_destroy(9) to stave off LOCKDEBUG
panics.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Apr 16 18:41:48 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.25: +45 -42 lines
Diff to previous 1.25 (colored)

device_t / softc split
reviewed, tested and approved by bouyer

Revision 1.25 / (download) - annotate - [select for diffs], Sun Apr 6 07:24:20 2008 UTC (16 years ago) by cegger
Branch: MAIN
Changes since 1.24: +19 -21 lines
Diff to previous 1.24 (colored)

use aprint_*_dev and device_xname

Revision 1.23.14.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:31 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.23: +17 -14 lines
Diff to previous 1.23 (colored)

Sync with HEAD.

Revision 1.23.10.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:15:10 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.23: +19 -16 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

sync with head.

Revision 1.20.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:30 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.20.6.2: +19 -16 lines
Diff to previous 1.20.6.2 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

sync with HEAD

Revision 1.12.4.8 / (download) - annotate - [select for diffs], Mon Mar 17 09:14:36 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.7: +19 -16 lines
Diff to previous 1.12.4.7 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

sync with head.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 13 22:19:39 2008 UTC (16 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.23: +19 -16 lines
Diff to previous 1.23 (colored)

Add swedge support to xbd backed, and make the virtual block device handle
sizes larger than 4TB. Tested by Jukka Marin.
Should fix kern/37370.

Revision 1.20.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:21 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.20.6.1: +6 -6 lines
Diff to previous 1.20.6.1 (colored) to branchpoint 1.20 (colored)

sync with HEAD

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:18:28 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Sync with HEAD.

Revision 1.12.4.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:23 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.6: +6 -6 lines
Diff to previous 1.12.4.6 (colored) to branchpoint 1.12 (colored)

sync with head

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:47 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.18.2.2: +6 -6 lines
Diff to previous 1.18.2.2 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Sync with HEAD.

Revision 1.20.4.2 / (download) - annotate - [select for diffs], Tue Nov 27 19:36:30 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.20.4.1: +6 -6 lines
Diff to previous 1.20.4.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Nov 22 16:17:08 2007 UTC (16 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.

Revision 1.20.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:24:34 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

sync with HEAD

Revision 1.12.4.6 / (download) - annotate - [select for diffs], Sat Oct 27 11:29:27 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.5: +3 -3 lines
Diff to previous 1.12.4.5 (colored) to branchpoint 1.12 (colored)

sync with head.

Revision 1.20.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:43:49 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Wed Oct 17 21:08:25 2007 UTC (16 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

Prepare for xenamd64:
- kill xen/i386/identcpu.c, use i386/i386/identcpu.c instead (with a few
  #ifndef XEN)
- move some files that can be shared between i386 and amd64 from
  xen/i386 to xen/x86 (or to xen/xen for non-cpu-specific code)
- split assembly out of xen/include/hypervisor.h to xen/include/hypercalls.h
- use <xen/...> instead of <machine/...> for cpu-independant include files.

more work needed here, i386-specific files should got out of arch/xen to
arch/xeni386, and more code shared with arch/i386.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:33 2007 UTC (16 years, 6 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.18.10.2 / (download) - annotate - [select for diffs], Tue Oct 16 18:24:00 2007 UTC (16 years, 6 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.18.10.1: +3 -3 lines
Diff to previous 1.18.10.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Sync with HEAD

Revision 1.20.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:47:53 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

sync with head.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 8 16:41:09 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, vmlocking-base, ppcoea-renovation-base
Branch point for: bouyer-xenamd64
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.

Revision 1.18.10.1 / (download) - annotate - [select for diffs], Wed Oct 3 19:26:15 2007 UTC (16 years, 6 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.18: +3 -7 lines
Diff to previous 1.18 (colored)

Sync with HEAD

Revision 1.12.4.5 / (download) - annotate - [select for diffs], Mon Sep 3 14:31:38 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.4: +5 -9 lines
Diff to previous 1.12.4.4 (colored) to branchpoint 1.12 (colored)

sync with head.

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Mon Aug 20 18:16:09 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.18.2.1: +4 -3 lines
Diff to previous 1.18.2.1 (colored) to branchpoint 1.18 (colored)

- Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Sun Aug 19 19:24:19 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.18: +2 -7 lines
Diff to previous 1.18 (colored)

- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.18.14.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:01 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.18: +3 -7 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with HEAD.

Revision 1.18.12.1 / (download) - annotate - [select for diffs], Tue Aug 7 18:05:55 2007 UTC (16 years, 8 months ago) by matt
Branch: matt-mips64
Changes since 1.18: +3 -7 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with HEAD.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 29 12:15:42 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-armv6, jmcneill-pm
Changes since 1.19: +2 -7 lines
Diff to previous 1.19 (colored)

It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 22 20:39:22 2007 UTC (16 years, 9 months ago) by he
Branch: MAIN
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Explicitly include <sys/proc.h> for tsleep() prototype.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:51:50 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Sync with HEAD.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 4 06:01:11 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans
Branch point for: vmlocking, ppcoea-renovation, nick-csl-alignment, matt-mips64
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.12.4.4 / (download) - annotate - [select for diffs], Mon Feb 26 09:08:57 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.3: +16 -8 lines
Diff to previous 1.12.4.3 (colored) to branchpoint 1.12 (colored)

sync with head.

Revision 1.7.2.4.2.3 / (download) - annotate - [select for diffs], Mon Jan 22 13:45:13 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.7.2.4.2.2: +5 -4 lines
Diff to previous 1.7.2.4.2.2 (colored) to branchpoint 1.7.2.4 (colored) next main 1.7.2.5 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1653):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.15
xbd_handler: call dk_iodone after updating rsp_cons.
otherwise, xbdstart kicked via dk_iodone still sees RING_FULL condition
and just returns.  it makes xbd stall when all requests are acked by
a single xbd_handler.  PR/34005.

Revision 1.7.2.7 / (download) - annotate - [select for diffs], Mon Jan 22 13:45:12 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-3
Changes since 1.7.2.6: +5 -4 lines
Diff to previous 1.7.2.6 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1653):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.15
xbd_handler: call dk_iodone after updating rsp_cons.
otherwise, xbdstart kicked via dk_iodone still sees RING_FULL condition
and just returns.  it makes xbd stall when all requests are acked by
a single xbd_handler.  PR/34005.

Revision 1.14.10.3 / (download) - annotate - [select for diffs], Thu Jan 18 12:57:26 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa
Changes since 1.14.10.2: +3 -2 lines
Diff to previous 1.14.10.2 (colored) to branchpoint 1.14 (colored)

Pull up following revision(s) (requested by yamt in ticket #360):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.15
xbd_handler: call dk_iodone after updating rsp_cons.
otherwise, xbdstart kicked via dk_iodone still sees RING_FULL condition
and just returns.  it makes xbd stall when all requests are acked by
a single xbd_handler.  PR/34005.

Revision 1.14.10.2 / (download) - annotate - [select for diffs], Wed Jan 17 22:10:30 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-4
Changes since 1.14.10.1: +9 -4 lines
Diff to previous 1.14.10.1 (colored) to branchpoint 1.14 (colored)

Pull up following revision(s) (requested by bouyer in ticket #365):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.17
Fix still possible race condition where xbd_handler could still try to process
an event before the device is ready.
Reported, and tested by anzi at dnainternet net on port-xen.

Revision 1.7.2.4.2.2 / (download) - annotate - [select for diffs], Mon Jan 15 21:16:15 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-3-1
Changes since 1.7.2.4.2.1: +11 -6 lines
Diff to previous 1.7.2.4.2.1 (colored) to branchpoint 1.7.2.4 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1632):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.17
Fix still possible race condition where xbd_handler could still try to process
an event before the device is ready.
Reported, and tested by anzi at dnainternet net on port-xen.

Revision 1.7.2.6 / (download) - annotate - [select for diffs], Mon Jan 15 21:12:09 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-3
Changes since 1.7.2.5: +11 -6 lines
Diff to previous 1.7.2.5 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1632):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.17
Fix still possible race condition where xbd_handler could still try to process
an event before the device is ready.
Reported, and tested by anzi at dnainternet net on port-xen.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Fri Jan 12 01:01:02 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.14: +16 -8 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Sync with head.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jan 11 19:51:39 2007 UTC (17 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.16: +11 -6 lines
Diff to previous 1.16 (colored)

Fix still possible race condition where xbd_handler could still try to process
an event before the device is ready.
Reported, and tested by anzi at dnainternet net on port-xen.

Revision 1.14.10.1 / (download) - annotate - [select for diffs], Mon Jan 8 22:24:11 2007 UTC (17 years, 3 months ago) by tron
Branch: netbsd-4
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored)

Pull up following revision(s) (requested by bouyer in ticket #338):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.16
Don't try to handle xbd interrupts if the device is not yet connected.
Should fix NULL dereference at boot when more than one xbd device is
configured, reported by Juraj Hercek on port-xen@

Revision 1.7.2.4.2.1 / (download) - annotate - [select for diffs], Mon Jan 8 20:48:56 2007 UTC (17 years, 3 months ago) by ghen
Branch: netbsd-3-1
Changes since 1.7.2.4: +4 -2 lines
Diff to previous 1.7.2.4 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1624):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.16
Don't try to handle xbd interrupts if the device is not yet connected.
Should fix NULL dereference at boot when more than one xbd device is
configured, reported by Juraj Hercek on port-xen@

Revision 1.7.2.5 / (download) - annotate - [select for diffs], Mon Jan 8 17:02:50 2007 UTC (17 years, 3 months ago) by ghen
Branch: netbsd-3
Changes since 1.7.2.4: +4 -2 lines
Diff to previous 1.7.2.4 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1624):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.16
Don't try to handle xbd interrupts if the device is not yet connected.
Should fix NULL dereference at boot when more than one xbd device is
configured, reported by Juraj Hercek on port-xen@

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jan 6 22:07:11 2007 UTC (17 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.15: +4 -2 lines
Diff to previous 1.15 (colored)

Don't try to handle xbd interrupts if the device is not yet connected.
Should fix NULL dereference at boot when more than one xbd device is
configured, reported by Juraj Hercek on port-xen@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 1 22:54:14 2007 UTC (17 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.14: +5 -4 lines
Diff to previous 1.14 (colored)

xbd_handler: call dk_iodone after updating rsp_cons.
otherwise, xbdstart kicked via dk_iodone still sees RING_FULL condition
and just returns.  it makes xbd stall when all requests are acked by
a single xbd_handler.  PR/34005.

Revision 1.12.4.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:47:25 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.2: +7 -7 lines
Diff to previous 1.12.4.2 (colored) to branchpoint 1.12 (colored)

sync with head.

Revision 1.7.4.6 / (download) - annotate - [select for diffs], Fri Sep 15 15:47:58 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7.4.5: +5 -2 lines
Diff to previous 1.7.4.5 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

fix a merge botch.

Revision 1.14.6.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:45:05 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.14.6.1: +808 -0 lines
Diff to previous 1.14.6.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

sync with head

Revision 1.7.4.5 / (download) - annotate - [select for diffs], Fri Aug 11 15:43:16 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7.4.4: +3 -3 lines
Diff to previous 1.7.4.4 (colored) to branchpoint 1.7 (colored)

sync with head

Revision 1.7.2.4 / (download) - annotate - [select for diffs], Sun Jul 30 17:50:25 2006 UTC (17 years, 8 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1
Branch point for: netbsd-3-1
Changes since 1.7.2.3: +5 -3 lines
Diff to previous 1.7.2.3 (colored) to branchpoint 1.7 (colored)

Apply patch (requested by bouyer in ticket #1437):
Use uvm_km_kmemalloc1() instead of uvm_km_alloc() for xbd_align_map(), as
it seems that the later is not safe to use in interrupt context. Should
fix random panics in domU after using the character device with unaligned
buffers.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:07 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.12: +7 -7 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Merge from HEAD.

Revision 1.14.6.1, Fri Jul 7 17:59:21 2006 UTC (17 years, 9 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.14: +0 -808 lines
FILE REMOVED

file xbd_xenbus.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:45:05 +0000

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 7 17:59:21 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, netbsd-4-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: rpaulo-netinet-merge-pcb, newlock2, netbsd-4
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

xbdsize: fix an null dereference.

Revision 1.7.4.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:45:40 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7.4.3: +6 -6 lines
Diff to previous 1.7.4.3 (colored) to branchpoint 1.7 (colored)

sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 25 16:46:59 2006 UTC (17 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.12: +6 -6 lines
Diff to previous 1.12 (colored)

Add a 'base' argument to xenbus_read_ul, so that we can read number is base
other than 10.

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Wed Jun 21 14:58:23 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12.4.1: +808 -0 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored)

sync with head.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 03:45:36 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync with head.

Revision 1.9.2.3 / (download) - annotate - [select for diffs], Thu Jun 1 22:35:38 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.9.2.2: +28 -18 lines
Diff to previous 1.9.2.2 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.5.2.4 / (download) - annotate - [select for diffs], Wed May 24 15:48:26 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.5.2.3: +31 -18 lines
Diff to previous 1.5.2.3 (colored) next main 1.6 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.7.4.3 / (download) - annotate - [select for diffs], Wed May 24 10:57:23 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7.4.2: +28 -18 lines
Diff to previous 1.7.4.2 (colored) to branchpoint 1.7 (colored)

sync with head.

Revision 1.12.4.1, Tue May 23 21:07:56 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.12: +0 -808 lines
FILE REMOVED

file xbd_xenbus.c was added on branch yamt-lazymbuf on 2006-06-21 14:58:23 +0000

Revision 1.12 / (download) - annotate - [select for diffs], Tue May 23 21:07:56 2006 UTC (17 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: yamt-lazymbuf, gdamore-uart
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

Add needed framework for backend drivers.
As we want some control on the name the backend driver will have we
can't use autoconf(9) here. Instead backend drivers registers to
xenbus, which will call a create callback when a new device is there.
Backend devices won't have a "struct device" in xenbus, use a void pointer
instead.

Revision 1.11 / (download) - annotate - [select for diffs], Sun May 14 21:57:13 2006 UTC (17 years, 11 months ago) by elad
Branch: MAIN
Branch point for: chap-midi
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

integrate kauth.

Revision 1.7.2.3 / (download) - annotate - [select for diffs], Sat May 13 16:50:46 2006 UTC (17 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.7.2.2: +25 -15 lines
Diff to previous 1.7.2.2 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1319):
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.10 via patch
Fix NULL pointer deref when a backend switches to closing without
have been connected.
Make sure we connect only once; avoid getting disk attached multiple times
when there are multiple block devices configured (the xenbus seems to call
the callbacks for all xbd when each of them comes up).

Revision 1.8.2.3 / (download) - annotate - [select for diffs], Thu May 11 23:27:14 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.8.2.2: +25 -15 lines
Diff to previous 1.8.2.2 (colored) next main 1.9 (colored)

sync with head

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 10 21:31:49 2006 UTC (17 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.9: +25 -15 lines
Diff to previous 1.9 (colored)

Fix NULL pointer deref when a backend switches to closing without
have been connected.
Make sure we connect only once; avoid getting disk attached multiple times
when there are multiple block devices configured (the xenbus seems to call
the callbacks for all xbd when each of them comes up).

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:38:11 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.9.2.1: +798 -0 lines
Diff to previous 1.9.2.1 (colored)

Sync with head.

Revision 1.9.2.1, Thu Apr 20 18:58:06 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.9: +0 -798 lines
FILE REMOVED

file xbd_xenbus.c was added on branch simonb-timecounters on 2006-04-22 11:38:11 +0000

Revision 1.9 / (download) - annotate - [select for diffs], Thu Apr 20 18:58:06 2006 UTC (18 years ago) by dogcow
Branch: MAIN
Branch point for: simonb-timecounters
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

fix breakage due to iostats header twiddling

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Wed Apr 19 02:34:03 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.8.2.1: +798 -0 lines
Diff to previous 1.8.2.1 (colored)

sync with head - hopefully this will work

Revision 1.8.2.1, Sat Apr 15 06:18:56 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.8: +0 -798 lines
FILE REMOVED

file xbd_xenbus.c was added on branch elad-kernelauth on 2006-04-19 02:34:03 +0000

Revision 1.8 / (download) - annotate - [select for diffs], Sat Apr 15 06:18:56 2006 UTC (18 years ago) by dogcow
Branch: MAIN
Branch point for: elad-kernelauth
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

Make XENU compile again. (I'm not sure if this is the 'correct'
way to it build correctly; there might be some different method to
the new iostats collection framework.)

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Tue Apr 11 12:20:51 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7.4.1: +795 -0 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored)

sync files somehow mis-tagged by yamt-pdpolicy-base2.

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Fri Apr 7 12:51:26 2006 UTC (18 years ago) by tron
Branch: netbsd-3
Changes since 1.7.2.1: +796 -0 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored)

Apply patch (requested by bouyer in ticket #1245):
Pull up Xen3 domU support. This adds support for the Xen-3 memory bootstrap,
xenstore, and block and network device frontend. Xen-3 support is turned
on by 'options XEN3', which disable Xen-2 support.
Changes affecting non-xen3 specific code:
- xbd and xennet at hypervisor now attaches with xbd_hypervisor and
  xennet_hypervisor
- x86_atomic_* renamed to xen_atomic_*
- use genassim.cf to pull in more constant from include files for assembly
- Map the shared info page from locore.S instead of the 0xffffffff hack
  in xen_machdep.c
- remove some unused code
- some __asm__ __volatile__ -> __asm volatile and __inline__ -> inline
- more debug code

Revision 1.7.4.1, Sun Apr 2 15:36:10 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.7: +0 -798 lines
FILE REMOVED

file xbd_xenbus.c was added on branch yamt-pdpolicy on 2006-04-11 12:20:51 +0000

Revision 1.7.2.1, Sun Apr 2 15:36:10 2006 UTC (18 years ago) by tron
Branch: netbsd-3
Changes since 1.7: +0 -798 lines
FILE REMOVED

file xbd_xenbus.c was added on branch netbsd-3 on 2006-04-07 12:51:26 +0000

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 2 15:36:10 2006 UTC (18 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4
Branch point for: yamt-pdpolicy, netbsd-3
Changes since 1.6: +5 -2 lines
Diff to previous 1.6 (colored)

xbd_xenbus_detach(): wait for the backed to release grant reference to the
ring before trying to revoke it, otherwise the kernel may panic in
xengnt_revoke_access.

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:13 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.5.2.2: +3 -3 lines
Diff to previous 1.5.2.2 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Mar 29 04:41:56 2006 UTC (18 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3, yamt-pdpolicy-base2
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Use device_unit().

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Tue Mar 28 09:46:22 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.5.2.1: +795 -0 lines
Diff to previous 1.5.2.1 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.5.2.1, Sun Mar 26 22:05:06 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.5: +0 -795 lines
FILE REMOVED

file xbd_xenbus.c was added on branch peter-altq on 2006-03-28 09:46:22 +0000

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 26 22:05:06 2006 UTC (18 years ago) by bouyer
Branch: MAIN
Branch point for: peter-altq
Changes since 1.4: +54 -10 lines
Diff to previous 1.4 (colored)

Adapt to xenbus changes; add a proper autoconf detach callback and
handle state change to Closing. We can now dynamically attach/detach
block devices.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 25 17:57:25 2006 UTC (18 years ago) by bouyer
Branch: MAIN
Changes since 1.3: +32 -5 lines
Diff to previous 1.3 (colored)

When printing the size of the xbd, also print the number of sectors.
in xbdstart(), check the sector number and transfer size against the
size of the xbd; if we issue an out of bound request the linux xbd backend
will fail to unmap the request, and xbd hangs up.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 25 17:20:32 2006 UTC (18 years ago) by bouyer
Branch: MAIN
Changes since 1.2: +6 -4 lines
Diff to previous 1.2 (colored)

- Add a missing UVM_KMF_WIRED to uvm_km_alloc(), this would trigger an
 assertion in uvm
- xbd_open(): check that the device exists before calling dk_open(). Fix
 a null pointer dereference when trying to open a unconfigured xbd.
Should fix 2 issues reported by Stephane Bortzmeyer on port-xen.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 20 22:31:21 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.1: +3 -5 lines
Diff to previous 1.1 (colored)

Make it build with options DEBUG

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 19 00:36:09 2006 UTC (18 years, 1 month ago) by bouyer
Branch: MAIN

Add a block device frontend driver for Xen-3. xbd at hypervisor now
attaches with xbd_hypervisor, adjust CFATTACH_DECL().

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>