The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.100 / (download) - annotate - [select for diffs], Wed Sep 7 00:40:19 2022 UTC (19 months, 1 week ago) by knakahara
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, 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, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.99: +5 -5 lines
Diff to previous 1.99 (colored) to selected 1.92 (colored)

NetBSD/x86: Raise the number of interrupt sources per CPU from 32 to 56.

There has been no objection for three years.
    https://mail-index.netbsd.org/port-amd64/2019/09/22/msg003012.html
Implemented by nonaka@n.o, updated by me.

Revision 1.99 / (download) - annotate - [select for diffs], Wed May 25 14:35:15 2022 UTC (22 months, 3 weeks ago) by bouyer
Branch: MAIN
Changes since 1.98: +14 -6 lines
Diff to previous 1.98 (colored) to selected 1.92 (colored)

PVH and HVM guests can easily have more than XEN_LEGACY_MAX_VCPUS (32) cpus.
Support up to HVM_MAX_VCPUS (256). This requires resizing a few arrays in
evtchn.c, and using
VCPUOP_register_vcpu_info for vcpuid >= XEN_LEGACY_MAX_VCPUS
Tested with 96 vCPUs.

Revision 1.98 / (download) - annotate - [select for diffs], Tue May 24 15:55:19 2022 UTC (22 months, 3 weeks ago) by bouyer
Branch: MAIN
Changes since 1.97: +13 -2 lines
Diff to previous 1.97 (colored) to selected 1.92 (colored)

Some devices (e.g. ixg in MSI-X mode) don't to have their handlers called
when no interrupt are pending. So add an extra ih_pending field
to struct intrhand, which is incremeted when the handler is not called because
of IPL level and reset to 0 when called. Check this in Xen's resume
assembly to call only handlers that are really pending.

Revision 1.97 / (download) - annotate - [select for diffs], Thu May 19 09:54:27 2022 UTC (22 months, 4 weeks ago) by bouyer
Branch: MAIN
Changes since 1.96: +53 -8 lines
Diff to previous 1.96 (colored) to selected 1.92 (colored)

Restore de EOI mechanism for pirq, using the newer hypervisor interface.
It is needed.
Hopefully fixes kern/56291, kern/56793, kern/55667

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:04 2020 UTC (3 years, 4 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.95: +2 -4 lines
Diff to previous 1.95 (colored) next main 1.96 (colored) to selected 1.92 (colored)

Sync w/ HEAD.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Nov 15 14:01:06 2020 UTC (3 years, 5 months ago) by bouyer
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-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.95: +2 -4 lines
Diff to previous 1.95 (colored) to selected 1.92 (colored)

Don't restrict debug event to XENPV, it's also usefull for PVH/PVHVM

Revision 1.95 / (download) - annotate - [select for diffs], Wed May 13 13:19:38 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.94: +11 -11 lines
Diff to previous 1.94 (colored) to selected 1.92 (colored)

don't reinitialize mutexes/cv on resume

part of PR port-xen/55207

Revision 1.94 / (download) - annotate - [select for diffs], Thu May 7 19:48:57 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.93: +121 -83 lines
Diff to previous 1.93 (colored) to selected 1.92 (colored)

Change event_set_handler() to take the target CPU parameter. If ci is NULL,
  event_set_handler() will choose the CPU and bind the event.
  If ci is not NULL the caller is responsible for binding the event.
Use a IPI xcall to register the handlers if needed.
pull in a hack from x86 to force pirq handlers to be mpsafe if registered at
a level != IPL_VM. This is for the com at isa interrupt handler, which
registers at IPL_HIGH and has to way to tell it's mpsafe (taking
KERNEL_LOCK at IPL_HIGH causes deadlocks on MP systems).

Revision 1.93 / (download) - annotate - [select for diffs], Wed May 6 13:43:48 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.92: +83 -65 lines
Diff to previous 1.92 (colored)

remove the per-channel spin lock and instead make sure that events
add/remove will only be done on the CPU the handler is bound to, with
interrupts disabled.
Should be similar to the native x86 interrupts add/remove.

Revision 1.92 / (download) - annotate - [selected], Mon May 4 15:55:56 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.91: +5 -3 lines
Diff to previous 1.91 (colored)

add support for using MSI for XenPV Dom0

use PHYSDEVOP_map_pirq to get the pirq/gsi for MSI/MSI-X, switch also INTx
to use it instead of PHYSDEVOP_alloc_irq_vector

MSI confirmed working with single-vector MSI for wm(4), ahcisata(4), bge(4)

XXX added some provision for MSI-X, but it doesn't actually work (no interrupts
delivered), needs some further investigation; disable MSI-X for XENPV
via flag in x86/pci/pci_machdep.c

Revision 1.91 / (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.90: +89 -82 lines
Diff to previous 1.90 (colored) to selected 1.92 (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.88.2.12 / (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.88.2.11: +2 -56 lines
Diff to previous 1.88.2.11 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored) to selected 1.92 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.90 / (download) - annotate - [select for diffs], Tue Apr 21 20:13:40 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.89: +2 -56 lines
Diff to previous 1.89 (colored) to selected 1.92 (colored)

convert to newer HYPERVISOR_physdev_op() interface, now command and the
arg are separate arguments - this is needed for newer physdev_op commands

remove code for PHYSDEVOP_IRQ_UNMASK_NOTIFY, it is obsolete since
interface version 0x00030202 and is unsupported by newer versions of Xen

confirmed working on amd64 Dom0, i386 compile-tested only

Revision 1.80.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.80.2.3: +17 -3 lines
Diff to previous 1.80.2.3 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.88.2.11 / (download) - annotate - [select for diffs], Mon Apr 20 19:46:44 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.10: +7 -7 lines
Diff to previous 1.88.2.10 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Misc fixes after merge

Revision 1.88.2.10 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:01 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.9: +19 -5 lines
Diff to previous 1.88.2.9 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.88.2.9 / (download) - annotate - [select for diffs], Sun Apr 19 20:29:30 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.8: +5 -2 lines
Diff to previous 1.88.2.8 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Move xen_ipi.c to XENPV only.
Make sure we don't need to send events to remote CPUs (outside of IPIs)

Revision 1.88.2.8 / (download) - annotate - [select for diffs], Sun Apr 19 19:39:11 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.7: +50 -22 lines
Diff to previous 1.88.2.7 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Add per-PIC callbacks for interrupt_get_devname(), interrupt_get_assigned()
and interrupt_get_count(). Implement Xen-specific callbacks for
PIC_XEN and use the x86 one for others.
In event_set_handler(), call intr_allocate_io_intrsource() so that
events appears in interrupt list (intrctl list).

Revision 1.88.2.7 / (download) - annotate - [select for diffs], Sun Apr 19 11:40:30 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.6: +6 -4 lines
Diff to previous 1.88.2.6 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Add a struct pic * member to struct intrhand.
This will be used for interrupt_get_count()
For Xen remplace pic_type with a pointer to the pic, and add a pointer
to intrhand, in struct pintrhand
Make event_set_handler return the pointer to struct intrhand.
Don't allocate a fake intrhand in xen_intr_establish_xname(), use the
one returned by event_set_handler().

Revision 1.88.2.6 / (download) - annotate - [select for diffs], Sat Apr 18 20:36:31 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.5: +6 -7 lines
Diff to previous 1.88.2.5 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

If we get an event for another CPU just ignore it. The hypervisor will
callback on the other CPU anyway.

Revision 1.88.2.5 / (download) - annotate - [select for diffs], Sat Apr 18 15:06:18 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.4: +7 -7 lines
Diff to previous 1.88.2.4 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Add PVHVM multiprocessor support:
We need the hypervisor to be set up before cpus attaches.
Move hypervisor setup to a new function xen_hvm_init(), called at the
beggining of mainbus_attach(). This function searches the cfdata[] array
to see if the hypervisor device is enabled (so you can disable PV
support with
disable hypervisor
from userconf).
For HVM, ci_cpuid doens't match the virtual CPU index needed by Xen.
Introduce ci_vcpuid to cpu_info. Introduce xen_hvm_init_cpu(), to be
called for each CPU in in its context, which initialize ci_vcpuid and
ci_vcpu, and setup the event callback.
Change Xen code to use ci_vcpuid.

Do not call lapic_calibrate_timer() for VM_GUEST_XENPVHVM, we will use
Xen timers.

Don't call lapic_initclocks() from cpu_hatch(); instead set
x86_cpu_initclock_func to lapic_initclocks() in lapic_calibrate_timer(),
and call *(x86_cpu_initclock_func)() from cpu_hatch().
Also call x86_cpu_initclock_func from cpu_attach() for the boot CPU.
As x86_cpu_initclock_func is called for all CPUs, x86_initclock_func can
be a NOP for lapic timer.

Reorganize Xen code for x86_initclock_func/x86_cpu_initclock_func.
Move x86_cpu_idle_xen() to hypervisor_machdep.c

Revision 1.88.2.4 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:36 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.3: +3 -3 lines
Diff to previous 1.88.2.3 (colored) to branchpoint 1.88 (colored) to selected 1.92 (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.89 / (download) - annotate - [select for diffs], Mon Apr 13 22:54:12 2020 UTC (4 years ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.88: +19 -5 lines
Diff to previous 1.88 (colored) to selected 1.92 (colored)

By default, events are bound to CPU 0 (exept for IPIs and VTIMERs which
are bound to a different CPU at creation time).
Recent MI changes caused the scheduler to choose a different CPU when
probing and attaching xennet devices (I guess it's the xenbus thread which
runs on a different CPU). This cause the callback to be called on a different
CPU than the one expected by the kernel, and the event is ignored.
It is handled when the clock causes the callback to be called on the right
CPU, which is why xennet still run, but slowly.

Change event_set_handler() to do a EVTCHNOP_bind_vcpu if requested to,
and make sure we don't do it for IPIs and VIRQs (for theses, the op fails).

Revision 1.80.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.80.2.2: +2 -2 lines
Diff to previous 1.80.2.2 (colored) to branchpoint 1.80 (colored) to selected 1.92 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.88.2.3 / (download) - annotate - [select for diffs], Sun Apr 12 17:25:53 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.2: +21 -14 lines
Diff to previous 1.88.2.2 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Get rid of xen-specific ci_x* interrupt handling:
- use the general SIR mechanism, reserving 3 more slots for IPL_VM, IPL_SCHED
  and IPL_HIGH
- remove specific handling from C sources, or change to ipending
- convert IPL number to SIR number in various places
- Remove XUNMASK/XPENDING in assembly or change to IUNMASK/IPENDING
- remove Xen-specific ci_xsources, ci_xmask, ci_xunmask, ci_xpending from
  struct cpu_info
- for now remove a KASSERT that there are no pending interrupts in
  idle_block(). We can get there with some software interrupts pending
  in autoconf XXX needs to be looked at.

Revision 1.88.2.2 / (download) - annotate - [select for diffs], Sun Apr 12 11:16:58 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88.2.1: +2 -33 lines
Diff to previous 1.88.2.1 (colored) to branchpoint 1.88 (colored) to selected 1.92 (colored)

Now that we return from hypervisor_callback via Xdoreti, no need to emulate it
in evtchn_do_event() any more.

Revision 1.88.2.1 / (download) - annotate - [select for diffs], Fri Apr 10 14:38:19 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.88: +2 -3 lines
Diff to previous 1.88 (colored) to selected 1.92 (colored)

Remove extra assignement

Revision 1.80.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.80.2.1: +3 -6 lines
Diff to previous 1.80.2.1 (colored) to branchpoint 1.80 (colored) to selected 1.92 (colored)

Merge changes from current as of 20200406

Revision 1.88 / (download) - annotate - [select for diffs], Mon Apr 6 19:26:00 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200411, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.87: +4 -4 lines
Diff to previous 1.87 (colored) to selected 1.92 (colored)

add known_mpsafe parameter also to pirq_establish(), and pass the parameter
to underlying event_set_handler()

Revision 1.87 / (download) - annotate - [select for diffs], Mon Apr 6 18:02:33 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200406
Changes since 1.86: +3 -6 lines
Diff to previous 1.86 (colored) to selected 1.92 (colored)

remove restriction on interrupt level for MP-safe interrupt handlers

Revision 1.80.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.80: +62 -42 lines
Diff to previous 1.80 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.86 / (download) - annotate - [select for diffs], Thu May 9 17:09:51 2019 UTC (4 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.85: +7 -7 lines
Diff to previous 1.85 (colored) to selected 1.92 (colored)

sti/cli are not allowed on Xen, we have to clear/set a bit in the
shared page. Revert x86_disable_intr/x86_enable_intr to plain function
calls on XENPV.
While there, clean up unused functions and macros, and change cli()/sti()
macros to x86_disable_intr/x86_enable_intr.
Makes Xen domU boot again
(http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/)

Revision 1.85 / (download) - annotate - [select for diffs], Wed Feb 13 06:52:43 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.84: +6 -2 lines
Diff to previous 1.84 (colored) to selected 1.92 (colored)

Further restrict the scope of XENPV to relevant parts.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Feb 13 05:01:58 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored) to selected 1.92 (colored)

In preparation for debut-ing PVHVM mode:

 - Make the struct intrstub uniform across native and XEN.
 - Introduce vector callback entrypoints for PVHVM mode.

Revision 1.79.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.79.2.3: +15 -15 lines
Diff to previous 1.79.2.3 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored) to selected 1.92 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.83 / (download) - annotate - [select for diffs], Tue Dec 25 06:50:12 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.82: +15 -15 lines
Diff to previous 1.82 (colored) to selected 1.92 (colored)

Excise XEN specific code out of x86/x86/intr.c into xen/x86/xen_intr.c

While at it, separate the source function tracking so that the interrupt
paths are truly independant.

Use weak symbol exporting to provision for future PVHVM co-existence
of both files, but with independant paths. Introduce assembler code
such that in a unified scenario, native interrupts get first priority
in spllower(), followed by XEN event callbacks. IPL management and
semantics are unchanged - native handlers and xen callbacks are
expected to maintain their ipl related semantics.

In summary, after this commit, native and XEN now have completely
unrelated interrupt handling mechanisms, including
intr_establish_xname() and assembler stubs and intr handler
management.

Happy Christmas!

Revision 1.79.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.79.2.2: +21 -14 lines
Diff to previous 1.79.2.2 (colored) to branchpoint 1.79 (colored) to selected 1.92 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.82 / (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.81: +21 -14 lines
Diff to previous 1.81 (colored) to selected 1.92 (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.79.2.2 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:49 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.79.2.1: +22 -14 lines
Diff to previous 1.79.2.1 (colored) to branchpoint 1.79 (colored) to selected 1.92 (colored)

Ssync with HEAD

Revision 1.81 / (download) - annotate - [select for diffs], Sun Sep 23 02:27:24 2018 UTC (5 years, 6 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.80: +22 -14 lines
Diff to previous 1.80 (colored) to selected 1.92 (colored)

Encapsulate pre-processing of registered (pirq,evtchn) pair in
preparation for API reorg.

Revision 1.79.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.79: +145 -13 lines
Diff to previous 1.79 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Sun Jun 24 13:35:33 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.79: +145 -13 lines
Diff to previous 1.79 (colored) to selected 1.92 (colored)

add support for kern.intr.list aka intrctl(8) 'list' for xen

event_set_handler() and pirq_establish() now have extra intrname
parameter; shared intr_create_intrid() is used to provide the value

xen drivers were changed to pass the specific driver instance
name as the xname, e.g.  'vcpu0 clock' instead just 'clock', or
'xencons0' instead of 'xencons'

associated evcnt is now changed to use intrname - this matches native x86

Revision 1.79 / (download) - annotate - [select for diffs], Wed Dec 13 16:30:18 2017 UTC (6 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: 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.78: +4 -2 lines
Diff to previous 1.78 (colored) to selected 1.92 (colored)

Fixes for physical interrupts on Xen:
- do not cast int * to intr_handle_t *, they're not the same size
- legacy_irq is not always -1 for ioapic interrupts, test pic_type instead
- change irq2port[] to hold (port + 1) so that 0 is an invalid value
- add KASSERTs to make sure vect, port or irq values extracted from arrays are
  valid (or that they are invalid before write)
- for the !ioapic case, we still need to do PHYSDEVOP_ASSIGN_VECTOR and
  bind_pirq_to_evtch().

now XEN3_DOM0 boots again

Revision 1.62.6.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.62.6.2: +242 -39 lines
Diff to previous 1.62.6.2 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored) to selected 1.92 (colored)

update from HEAD

Revision 1.78 / (download) - annotate - [select for diffs], Sat Nov 11 17:02:53 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.77: +2 -14 lines
Diff to previous 1.77 (colored) to selected 1.92 (colored)

Back out previous KASSERTMSG for now.

The immediate problem appears to have been elsewhere, in the wrong
interrupt level passed by the Xen-specific intr_establish to
event_set_handler.

We should maybe restore these assertions later, but at least one was
violated before cherry's interrupt rototill anyway.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 11 08:23:50 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.76: +14 -2 lines
Diff to previous 1.76 (colored) to selected 1.92 (colored)

Add kasserts to help diagnose xen interrupt level bug.

https://mail-index.netbsd.org/tech-kern/2017/11/09/msg022571.html

Revision 1.76 / (download) - annotate - [select for diffs], Sat Nov 11 08:22:08 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.75: +9 -19 lines
Diff to previous 1.75 (colored) to selected 1.92 (colored)

#if DIAGNOSTIC panic ---> KASSERTMSG

Revision 1.75 / (download) - annotate - [select for diffs], Fri Nov 10 19:24:17 2017 UTC (6 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.74: +29 -12 lines
Diff to previous 1.74 (colored) to selected 1.92 (colored)

Fix theoretical race in xen_evtchn_trymask.

This now matches ioapic_trymask:

- Caller masks CPU interrupts while the PIC's interrupts are unmasked.
- Trymask masks the PIC's interrupts, and tests whether any were
  pending that we missed because the CPU interrupts are masked.

  ==> If there were any pending, trymask unmasks PIC's interrupts and
      returns false.

  ==> If not, interrupts are masked on the PIC and CPU and there were
      none pending and trymask returns true.

No functional change right now because cpu_intr_redistribute is
currently disabled on Xen.

ok cherry

Revision 1.74 / (download) - annotate - [select for diffs], Sat Nov 4 10:26:14 2017 UTC (6 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.73: +167 -2 lines
Diff to previous 1.73 (colored) to selected 1.92 (colored)

Add a PIC_XEN abstraction to evtchn.c

This allows us to get XEN interrupt code closer to unification to x86/intr.c

Revision 1.70.6.2 / (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.70.6.1: +38 -18 lines
Diff to previous 1.70.6.1 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.73.2.2 / (download) - annotate - [select for diffs], Sun Jul 16 14:02:49 2017 UTC (6 years, 9 months ago) by cherry
Branch: perseant-stdc-iso10646
Changes since 1.73.2.1: +887 -0 lines
Diff to previous 1.73.2.1 (colored) to branchpoint 1.73 (colored) next main 1.74 (colored) to selected 1.92 (colored)

2302677

Revision 1.73.2.1, Sun Jul 16 14:02:48 2017 UTC (6 years, 9 months ago) by cherry
Branch: perseant-stdc-iso10646
Changes since 1.73: +0 -887 lines
FILE REMOVED

file evtchn.c was added on branch perseant-stdc-iso10646 on 2017-07-16 14:02:49 +0000

Revision 1.73 / (download) - annotate - [select for diffs], Sun Jul 16 14:02:48 2017 UTC (6 years, 9 months ago) by cherry
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, nick-nhusb-base-20170825
Branch point for: perseant-stdc-iso10646
Changes since 1.72: +18 -18 lines
Diff to previous 1.72 (colored) to selected 1.92 (colored)

Unify the xen and native x86/ interrupt setup functions and
spl traversal data structures.

This is towards PVHVM.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Jul 16 05:03:36 2017 UTC (6 years, 9 months ago) by cherry
Branch: MAIN
Changes since 1.71: +22 -2 lines
Diff to previous 1.71 (colored) to selected 1.92 (colored)

Add a glue function to inspect event channel<->legacy IRQ mappings.
This is towards getting xen to use more x86/ "native" code.

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Tue Apr 14 14:59:11 2015 UTC (9 years ago) by msaitoh
Branch: netbsd-6
Changes since 1.62.2.1: +19 -8 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1278):
	sys/arch/xen/include/evtchn.h: revision 1.23
	sys/arch/xen/xen/evtchn.c: revision 1.71
	sys/arch/xen/xen/pci_intr_machdep.c: revision 1.17
Properly implemement pci_intr_disestablish(9), so that interrupt
handlers stop being called when the device has been detached.
Should fix PR port-xen/47720 (which turns out to not be related to raidframe).
While there fix possible races in event_remove_handler() and pirq_establish().

Revision 1.70.6.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.70: +19 -8 lines
Diff to previous 1.70 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.70.4.1 / (download) - annotate - [select for diffs], Wed Mar 18 04:42:11 2015 UTC (9 years, 1 month ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Changes since 1.70: +19 -8 lines
Diff to previous 1.70 (colored) next main 1.71 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #618):
	sys/arch/xen/include/evtchn.h: revision 1.23
	sys/arch/xen/xen/evtchn.c: revision 1.71
	sys/arch/xen/xen/pci_intr_machdep.c: revision 1.17
Properly implemement pci_intr_disestablish(9), so that interrupt
handlers stop being called when the device has been detached.
Should fix PR port-xen/47720 (which turns out to not be related to raidframe).
While there fix possible races in event_remove_handler() and pirq_establish().

Revision 1.71 / (download) - annotate - [select for diffs], Sat Mar 14 10:49:36 2015 UTC (9 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, 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, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.70: +19 -8 lines
Diff to previous 1.70 (colored) to selected 1.92 (colored)

Properly implemement pci_intr_disestablish(9), so that interrupt
handlers stop being called when the device has been detached.
Should fix PR port-xen/47720 (which turns out to not be related to raidframe).
While there fix possible races in event_remove_handler() and pirq_establish().

Revision 1.62.6.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:30 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.62.6.1: +2 -9 lines
Diff to previous 1.62.6.1 (colored) to branchpoint 1.62 (colored) to selected 1.92 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.55.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.55.2.3: +2 -9 lines
Diff to previous 1.55.2.3 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored) to selected 1.92 (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.69.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.69: +2 -9 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.92 (colored)

sync with head

Revision 1.62.10.1 / (download) - annotate - [select for diffs], Tue Dec 17 22:40:15 2013 UTC (10 years, 4 months ago) by riz
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE
Changes since 1.62: +2 -9 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #995):
	sys/arch/xen/xen/evtchn.c: revision 1.70
Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf.
With help from Robert Elz we've finally figured out what's going on, and
it actually isn't a bug in the handler, but related to spin mutexes.
When a spin mutex is released, the IPL isn't lowered back if the
curcpu is holding other spin mutexes. This is because mutexes may not
be released in order (and, in this case, the CPU in interrupted while
it holds a spin mutex at IPL < IPL_SCHED).
Also remove the test and resetting the IPL, it will be reset anyway
inside the loop, or at the end of the loop.

Revision 1.62.8.1 / (download) - annotate - [select for diffs], Tue Dec 17 22:39:49 2013 UTC (10 years, 4 months ago) by riz
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE
Changes since 1.62: +2 -9 lines
Diff to previous 1.62 (colored) next main 1.63 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #995):
	sys/arch/xen/xen/evtchn.c: revision 1.70
Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf.
With help from Robert Elz we've finally figured out what's going on, and
it actually isn't a bug in the handler, but related to spin mutexes.
When a spin mutex is released, the IPL isn't lowered back if the
curcpu is holding other spin mutexes. This is because mutexes may not
be released in order (and, in this case, the CPU in interrupted while
it holds a spin mutex at IPL < IPL_SCHED).
Also remove the test and resetting the IPL, it will be reset anyway
inside the loop, or at the end of the loop.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Tue Dec 17 22:39:17 2013 UTC (10 years, 4 months ago) by riz
Branch: netbsd-6
Changes since 1.62: +2 -9 lines
Diff to previous 1.62 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #995):
	sys/arch/xen/xen/evtchn.c: revision 1.70
Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf.
With help from Robert Elz we've finally figured out what's going on, and
it actually isn't a bug in the handler, but related to spin mutexes.
When a spin mutex is released, the IPL isn't lowered back if the
curcpu is holding other spin mutexes. This is because mutexes may not
be released in order (and, in this case, the CPU in interrupted while
it holds a spin mutex at IPL < IPL_SCHED).
Also remove the test and resetting the IPL, it will be reset anyway
inside the loop, or at the end of the loop.

Revision 1.39.4.2.10.1 / (download) - annotate - [select for diffs], Fri Dec 13 08:52:52 2013 UTC (10 years, 4 months ago) by sborrill
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE
Changes since 1.39.4.2: +2 -9 lines
Diff to previous 1.39.4.2 (colored) next main 1.39.4.3 (colored) to selected 1.92 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1890):
	sys/arch/xen/xen/evtchn.c:	revision 1.70

Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf
as analysis shows it actually isn't a bug in the handler, but related to
spin mutexes. Fixes port-xen/46313

Revision 1.39.4.2.6.1 / (download) - annotate - [select for diffs], Fri Dec 13 08:49:41 2013 UTC (10 years, 4 months ago) by sborrill
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE
Changes since 1.39.4.2: +2 -9 lines
Diff to previous 1.39.4.2 (colored) next main 1.39.4.3 (colored) to selected 1.92 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1890):
	sys/arch/xen/xen/evtchn.c:	revision 1.70

Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf
as analysis shows it actually isn't a bug in the handler, but related to
spin mutexes. Fixes port-xen/46313

Revision 1.39.4.3 / (download) - annotate - [select for diffs], Wed Dec 11 16:00:46 2013 UTC (10 years, 4 months ago) by sborrill
Branch: netbsd-5
Changes since 1.39.4.2: +2 -9 lines
Diff to previous 1.39.4.2 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored) to selected 1.92 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1890):
	sys/arch/xen/xen/evtchn.c:	revision 1.70

Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf
as analysis shows it actually isn't a bug in the handler, but related to
spin mutexes. Fixes port-xen/46313

Revision 1.70 / (download) - annotate - [select for diffs], Tue Dec 3 20:51:00 2013 UTC (10 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base, netbsd-7-base
Branch point for: nick-nhusb, netbsd-7
Changes since 1.69: +2 -9 lines
Diff to previous 1.69 (colored) to selected 1.92 (colored)

Remove the "evtchn_do_event: handler %p didn't lower ipl %d %d\n" printf.
With help from Robert Elz we've finally figured out what's going on, and
it actually isn't a bug in the handler, but related to spin mutexes.
When a spin mutex is released, the IPL isn't lowered back if the
curcpu is holding other spin mutexes. This is because mutexes may not
be released in order (and, in this case, the CPU in interrupted while
it holds a spin mutex at IPL < IPL_SCHED).
Also remove the test and resetting the IPL, it will be reset anyway
inside the loop, or at the end of the loop.

Revision 1.62.6.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:06 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.62: +5 -9 lines
Diff to previous 1.62 (colored) to selected 1.92 (colored)

resync with head

Revision 1.55.2.3 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:01 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.55.2.2: +3 -3 lines
Diff to previous 1.55.2.2 (colored) to branchpoint 1.55 (colored) to selected 1.92 (colored)

sync with head

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:11 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.55.2.1: +6 -10 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored) to selected 1.92 (colored)

sync with (a bit old) head

Revision 1.69 / (download) - annotate - [select for diffs], Sun Jan 13 21:01:05 2013 UTC (11 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base8, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.68: +5 -9 lines
Diff to previous 1.68 (colored) to selected 1.92 (colored)

Re-apply
http://mail-index.netbsd.org/source-changes/2012/11/25/msg039125.html
http://mail-index.netbsd.org/source-changes/2012/11/25/msg039126.html
they're not involved in i386 domU hang shown by ATF.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jan 12 21:09:10 2013 UTC (11 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.67: +10 -6 lines
Diff to previous 1.67 (colored) to selected 1.92 (colored)

Revert these commits from november 2012:
http://mail-index.netbsd.org/source-changes/2012/11/25/msg039125.html
http://mail-index.netbsd.org/source-changes/2012/11/25/msg039126.html
http://mail-index.netbsd.org/source-changes/2012/11/25/msg039142.html

they cause a i386PAE domU to hang while running ATF tests, as shown in
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/

(we should pay more attention to test results, myself first).

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jan 12 17:39:46 2013 UTC (11 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.66: +47 -76 lines
Diff to previous 1.66 (colored) to selected 1.92 (colored)

Back out this commit:
http://mail-index.netbsd.org/source-changes/2012/12/28/msg039950.html
which cause a panic when running tests on amd64, as shown on:
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/
(i386 hangs for unrelated reasons).

Revision 1.66 / (download) - annotate - [select for diffs], Fri Dec 28 06:29:56 2012 UTC (11 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.65: +78 -49 lines
Diff to previous 1.65 (colored) to selected 1.92 (colored)

Simplify the xen event handler callback by:
 - moving the interrupt handler callback traversal into a separate
   function.
 - using evt_iterate_bits() to scan through the pending bitfield
 - removing cross-cpu pending actions - events recieved on the wrong
   vcpu are re-routed via hypervisor_send_event().
 - simplifying nested while() loops by encapsulating them in
   equivalent functions.

Many thanks for multiple reviews by bouyer@ and jym@

Revision 1.65 / (download) - annotate - [select for diffs], Sun Nov 25 20:56:33 2012 UTC (11 years, 4 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored) to selected 1.92 (colored)

Do not escalate the local spl while taking the interrupt handler list
lock. Re-entrance is protected against within the events handler
framework by toggling interrupts/events, so we don't need (and cannot
use) the spl framework in that path. The other consumers (interrupt
registration/removal code) are not spl sensitive wrt this lock.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Nov 25 08:39:36 2012 UTC (11 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.63: +4 -5 lines
Diff to previous 1.63 (colored) to selected 1.92 (colored)

Make hypervisor_set_ipending() and its consumers cpu unaware. This syncs syntax with semantics

Revision 1.63 / (download) - annotate - [select for diffs], Sun Nov 25 07:48:46 2012 UTC (11 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.62: +3 -6 lines
Diff to previous 1.62 (colored) to selected 1.92 (colored)

hypervisor_set_ipending() should not set the pending flag across cpus. The reason for this is that the pending flag update is not atomic, or protected by a lock. Since its current (mis)use in evtchn_do_event() across cpus is to notify the remote cpu of an interrupt, we use hypervisor_send_event() instead, to trigger an event on the remote cpu, which in turn invokes evtchn_do_event() on that cpu and DTRT on it.

On the local cpu, we protect hypervisor_set_ipending() from re-entry via cli(). Remove a redundant and unprotected call to hypervisor_set_ipending().

Thanks to jym@ for spotting this discrepancy while reviewing a related patch.

See: http://mail-index.netbsd.org/tech-kern/2012/11/12/msg014374.html

Revision 1.55.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.55: +61 -38 lines
Diff to previous 1.55 (colored) to selected 1.92 (colored)

sync with head

Revision 1.56.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:33:46 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.56: +20 -20 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.92 (colored)

merge to -current.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Feb 12 14:24:08 2012 UTC (12 years, 2 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, 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-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: tls-maxphys, netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) to selected 1.92 (colored)

Xen MP merge introduced MP safety around ipl handlers. When removing an
event handler, check handler's function and arguments against the real
ones, not the ones from wrappers.

This fixes a bug where !mpsafe events could not be removed from the handler
chain, thereby blocking suspension of a domU.

ok releng@.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Dec 8 03:34:44 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.92 (colored)

kmem_free() the appropriate size.

Thanks cegger@

Revision 1.60 / (download) - annotate - [select for diffs], Wed Dec 7 16:26:23 2011 UTC (12 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored) to selected 1.92 (colored)

replace malloc() with kmem_zalloc() per request from cherry.
While here fix error path.

XXX: The size allocated and freed for interrupt handlers looks
inconsistent to me.

Revision 1.59 / (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.58: +6 -6 lines
Diff to previous 1.58 (colored) to selected 1.92 (colored)

switch from xen3-public to xen-public.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Dec 7 13:49:04 2011 UTC (12 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.57: +3 -2 lines
Diff to previous 1.57 (colored) to selected 1.92 (colored)

build fix: add back <sys/malloc.h>. malloc(9) is still in use.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Dec 7 12:31:51 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.56: +11 -12 lines
Diff to previous 1.56 (colored) to selected 1.92 (colored)

Move to kmem_zalloc() instead of malloc().

Revision 1.56 / (download) - annotate - [select for diffs], Sat Nov 19 17:13:39 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.55: +44 -21 lines
Diff to previous 1.55 (colored) to selected 1.92 (colored)

[merging from cherry-xenmp] bring in bouyer@'s changes via:
http://mail-index.netbsd.org/source-changes/2011/10/22/msg028271.html
From the Log:
Log Message:
Various interrupt fixes, mainly:
keep a per-cpu mask of enabled events, and use it to get pending events.
A cpu-specific event (all of them at this time) should not be ever masked
by another CPU, because it may prevent the target CPU from seeing it
(the clock events all fires at once for example).

Revision 1.47.6.6 / (download) - annotate - [select for diffs], Sat Oct 22 19:21:57 2011 UTC (12 years, 5 months ago) by bouyer
Branch: cherry-xenmp
Changes since 1.47.6.5: +36 -10 lines
Diff to previous 1.47.6.5 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored) to selected 1.92 (colored)

Various interrupt fixes, mainly:
keep a per-cpu mask of enabled events, and use it to get pending events.
A cpu-specific event (all of them at this time) should not be ever masked
by another CPU, because it may prevent the target CPU from seeing it
(the clock events all fires at once for example).

Revision 1.55 / (download) - annotate - [select for diffs], Wed Sep 21 15:26:47 2011 UTC (12 years, 6 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored) to selected 1.92 (colored)

Initialize mutex before use. Lets me boot a dom0 kernel again
without a lockdebug panic.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Sep 20 00:12:24 2011 UTC (12 years, 6 months ago) by jym
Branch: MAIN
Changes since 1.53: +37 -7 lines
Diff to previous 1.53 (colored) to selected 1.92 (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.47.6.5 / (download) - annotate - [select for diffs], Sun Sep 18 18:46:40 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.47.6.4: +9 -12 lines
Diff to previous 1.47.6.4 (colored) to branchpoint 1.47 (colored) to selected 1.92 (colored)

Use an IPI to re-route events to the cpu where the handler has been registered

Revision 1.53 / (download) - annotate - [select for diffs], Sun Aug 28 22:55:52 2011 UTC (12 years, 7 months ago) by jym
Branch: MAIN
Changes since 1.52: +8 -2 lines
Diff to previous 1.52 (colored) to selected 1.92 (colored)

VIRQ_TIMER virqs are allocated and tracked in a array
(virq_timer_to_evtch, indexed by cpuid) different from the
VIRQ <> event channel one (virq_to_evtch, indexed by event channel ID).

This is fine: fix a "harmless" bug that resulted in the event
channel of VIRQ_TIMER getting lost during bind as it was not stored
in the proper array.

"Harmless" because it is not critical for -current, however in the Xen
save/restore branch this completely cripples restore. Xen clock gets
suspended, but never comes back (fetched channel ID being invalid). Oops.

Add a small comment so we can better see the "get => allocate? => set"
chain of actions when binding/unbinding event channels.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Aug 28 22:36:17 2011 UTC (12 years, 7 months ago) by jym
Branch: MAIN
Changes since 1.51: +15 -14 lines
Diff to previous 1.51 (colored) to selected 1.92 (colored)

KNF, white spaces and comment typo fixes.

Revision 1.42.2.9 / (download) - annotate - [select for diffs], Sun Aug 28 22:34:26 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.42.2.8: +26 -15 lines
Diff to previous 1.42.2.8 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored) to selected 1.92 (colored)

Put some assertions to check values of the VIRQ <> event channels mappings.

Fix the VIRQ_TIMER per-cpu translations, so that save/restore does not
choke on event channel being "-1" anymore (ends badly 99,9% of the time
when used as an index...)

Some KNF and white space fixes.

Revision 1.42.2.8 / (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.42.2.7: +173 -42 lines
Diff to previous 1.42.2.7 (colored) to branchpoint 1.42 (colored) to selected 1.92 (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.47.6.4 / (download) - annotate - [select for diffs], Wed Aug 17 09:40:40 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.47.6.3: +55 -40 lines
Diff to previous 1.47.6.3 (colored) to branchpoint 1.47 (colored) to selected 1.92 (colored)

Pullup relevant changes from -current

Revision 1.51 / (download) - annotate - [select for diffs], Sat Aug 13 17:23:42 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.50: +6 -17 lines
Diff to previous 1.50 (colored) to selected 1.92 (colored)

Use spin mutices correctly.
 - Prune redundant splxx()/splx() pairs.
 - Do not "leak" a mutex_spin_enter() via conditional return.

Thanks rmind@

Revision 1.50 / (download) - annotate - [select for diffs], Thu Aug 11 17:59:00 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
Changes since 1.49: +178 -35 lines
Diff to previous 1.49 (colored) to selected 1.92 (colored)

Make event/interrupt handling MP aware

Revision 1.49 / (download) - annotate - [select for diffs], Wed Aug 10 21:46:02 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.92 (colored)

refactor the bitstring/mask operations to be behind an API. Make pending interrupt marking cpu aware.

Revision 1.47.6.3 / (download) - annotate - [select for diffs], Thu Aug 4 13:04:20 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.47.6.2: +12 -3 lines
Diff to previous 1.47.6.2 (colored) to branchpoint 1.47 (colored) to selected 1.92 (colored)

Send an ipi at IPL_HIGH to remote cpu, in order to get it to run spllower()

Revision 1.47.6.2 / (download) - annotate - [select for diffs], Thu Aug 4 09:07:47 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.47.6.1: +26 -11 lines
Diff to previous 1.47.6.1 (colored) to branchpoint 1.47 (colored) to selected 1.92 (colored)

first cut at per-cpu event handling

Revision 1.42.2.7 / (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.42.2.6: +4 -6 lines
Diff to previous 1.42.2.6 (colored) to branchpoint 1.42 (colored) to selected 1.92 (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.48 / (download) - annotate - [select for diffs], Sat Jul 2 19:07:56 2011 UTC (12 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.47: +4 -6 lines
Diff to previous 1.47 (colored) to selected 1.92 (colored)

Remove all return error checks for event_set_handler(...). It either
succeeds or end in panic.

Revision 1.47.6.1 / (download) - annotate - [select for diffs], Fri Jun 3 13:27:42 2011 UTC (12 years, 10 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.47: +112 -21 lines
Diff to previous 1.47 (colored) to selected 1.92 (colored)

Initial import of xen MP sources, with kernel and userspace tests.
 - this is a source priview.
 - boots to single user.
 - spurious interrupt and pmap related panics are normal

Revision 1.46.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:52:34 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.46: +3 -4 lines
Diff to previous 1.46 (colored) next main 1.47 (colored) to selected 1.92 (colored)

sync with head

Revision 1.42.2.6 / (download) - annotate - [select for diffs], Mon Jan 10 00:37:39 2011 UTC (13 years, 3 months ago) by jym
Branch: jym-xensuspend
Changes since 1.42.2.5: +3 -4 lines
Diff to previous 1.42.2.5 (colored) to branchpoint 1.42 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Mon Dec 20 00:25:46 2010 UTC (13 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: uebayasi-xip-base7, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Changes since 1.46: +3 -4 lines
Diff to previous 1.46 (colored) to selected 1.92 (colored)

Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.

Revision 1.37.2.3 / (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.37.2.2: +2 -12 lines
Diff to previous 1.37.2.2 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored) to selected 1.92 (colored)

sync with head

Revision 1.42.2.5 / (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.42.2.4: +30 -3 lines
Diff to previous 1.42.2.4 (colored) to branchpoint 1.42 (colored) to selected 1.92 (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.42.2.4 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:46 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.42.2.3: +3 -83 lines
Diff to previous 1.42.2.3 (colored) to branchpoint 1.42 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Oct 23 05:10:48 2009 UTC (14 years, 5 months ago) by snj
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, 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
Branch point for: rmind-uvmplock
Changes since 1.45: +2 -7 lines
Diff to previous 1.45 (colored) to selected 1.92 (colored)

Drop 3rd and 4th clauses.  Approved by cl@ and Keir Fraser (copyright
holders).

Revision 1.45 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:11 2009 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.44: +2 -7 lines
Diff to previous 1.44 (colored) to selected 1.92 (colored)

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

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:55 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.37.2.1: +2 -46 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) to selected 1.92 (colored)

sync with head.

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

remove Xen2 support.
ok bouyer@

Revision 1.42.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.42.2.2: +3 -3 lines
Diff to previous 1.42.2.2 (colored) to branchpoint 1.42 (colored) to selected 1.92 (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.42.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.42.2.1: +3 -2 lines
Diff to previous 1.42.2.1 (colored) to branchpoint 1.42 (colored) to selected 1.92 (colored)

Sync with HEAD.

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

Revision 1.37.2.1 / (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.37: +43 -31 lines
Diff to previous 1.37 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.39.2.2 / (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.39.2.1: +3 -2 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 27 15:47:33 2009 UTC (15 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored) to selected 1.92 (colored)

Explicitly #include <sys/device.h> and <sys/evcnt.h>.  These files only
got the definitions they needed by chance, before.

Revision 1.42.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.42: +28 -2 lines
Diff to previous 1.42 (colored) to selected 1.92 (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.39.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:12 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.39: +33 -26 lines
Diff to previous 1.39 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.32.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:39 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.32.6.2: +38 -27 lines
Diff to previous 1.32.6.2 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:33 2008 UTC (15 years, 4 months ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.41: +7 -7 lines
Diff to previous 1.41 (colored) to selected 1.92 (colored)

kill MALLOC and FREE macros.

Revision 1.38.4.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.38: +35 -24 lines
Diff to previous 1.38 (colored) next main 1.39 (colored) to selected 1.92 (colored)

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

Revision 1.39.4.2 / (download) - annotate - [select for diffs], Fri Nov 14 02:59:39 2008 UTC (15 years, 5 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-1-RELEASE, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-2, netbsd-5-1
Changes since 1.39.4.1: +2 -6 lines
Diff to previous 1.39.4.1 (colored) to branchpoint 1.39 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #55):
	sys/arch/xen/xen/evtchn.c: revision 1.41
Remove a debug printf(). It will call splx(), which may panic in spllowwer()
on KASSERT(psl == 0);

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 13 21:39:29 2008 UTC (15 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.40: +2 -6 lines
Diff to previous 1.40 (colored) to selected 1.92 (colored)

Remove a debug printf(). It will call splx(), which may panic in spllowwer()
on KASSERT(psl == 0);

Revision 1.39.4.1 / (download) - annotate - [select for diffs], Tue Nov 11 02:00:06 2008 UTC (15 years, 5 months ago) by snj
Branch: netbsd-5
Changes since 1.39: +32 -21 lines
Diff to previous 1.39 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #39):
	sys/arch/xen/xen/evtchn.c: revision 1.40
evtchn_do_event(): in our C implementation of spllower(), if a handler fails
to restore the spl (shouldn't happen, but ...), we could end up with a
higther pending ipl set and never cleared because iplbit already
handled this level. while (iplmask != 0) {} would then never be true,
and we'd end up triggering KASSERT(iplbit != 0).
Now print the faultly handler and reset the IPL, and start the whole
pending IPL handling again if needed.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 5 21:04:05 2008 UTC (15 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.39: +32 -21 lines
Diff to previous 1.39 (colored) to selected 1.92 (colored)

evtchn_do_event(): in our C implementation of spllower(), if a handler fails
to restore the spl (shouldn't happen, but ...), we could end up with a
higther pending ipl set and never cleared because iplbit already
handled this level. while (iplmask != 0) {} would then never be true,
and we'd end up triggering KASSERT(iplbit != 0).
Now print the faultly handler and reset the IPL, and start the whole
pending IPL handling again if needed.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 24 21:09:24 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.38: +9 -5 lines
Diff to previous 1.38 (colored) to selected 1.92 (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.37.4.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:30:51 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored) next main 1.38 (colored) to selected 1.92 (colored)

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

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:04 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.35.2.1: +9 -9 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored) to selected 1.92 (colored)

sync with head

Revision 1.32.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:54 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.32.6.1: +52 -31 lines
Diff to previous 1.32.6.1 (colored) to branchpoint 1.32 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.38 / (download) - annotate - [select for diffs], Sat May 24 15:09:34 2008 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, haad-dm-base1
Branch point for: haad-dm
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored) to selected 1.92 (colored)

Remork the C implementation of spllower() in evtchn_do_event(), so that
callbacks are always called in decreasing IPL order. Although it's not
strictly a bug, it makes the code easier to read, and avoids processing
the whole IPL range several times.

Revision 1.35.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.35: +42 -21 lines
Diff to previous 1.35 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 21 15:15:34 2008 UTC (15 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.36: +5 -7 lines
Diff to previous 1.36 (colored) to selected 1.92 (colored)

Access Xen's vcpu info structure per-CPU.
Tested on i386 and amd64 (both dom0 and domU) by me.
Xen2 tested (both dom0 and domU) by bouyer.
OK bouyer

Revision 1.36 / (download) - annotate - [select for diffs], Sat Apr 19 13:46:12 2008 UTC (16 years ago) by cegger
Branch: MAIN
Changes since 1.35: +39 -16 lines
Diff to previous 1.35 (colored) to selected 1.92 (colored)

Use interrupt biglock wrapper as in x86/x86/intr.c
This change is based on http://mail-index.netbsd.org/port-amd64/2004/02/22/0000.html
OK bouyer

Revision 1.35 / (download) - annotate - [select for diffs], Mon Apr 14 13:38:03 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.34: +6 -6 lines
Diff to previous 1.34 (colored) to selected 1.92 (colored)

- use POSIX integer types
- ansify functions

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

use aprint_*_dev and device_xname

Revision 1.32.6.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.32: +35 -6 lines
Diff to previous 1.32 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.32.2.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.32: +35 -6 lines
Diff to previous 1.32 (colored) next main 1.33 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.20.24.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:30 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.20.24.2: +68 -27 lines
Diff to previous 1.20.24.2 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.92 (colored)

sync with HEAD

Revision 1.14.2.7 / (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.14.2.6: +35 -6 lines
Diff to previous 1.14.2.6 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 13 22:04:57 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.32: +35 -6 lines
Diff to previous 1.32 (colored) to selected 1.92 (colored)

Implement a C version of splx() in evtchn_do_event(). using plain splx()
here will reenable interrupts as a side effect, and we don't want it here.

It could cause some event handlers to run twice (which should be harmless),
and trap() to be called on the wrong LWP in doreti_checkast (which can
probably cause some damage).

Revision 1.14.2.6 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:29 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.14.2.5: +34 -23 lines
Diff to previous 1.14.2.5 (colored) to branchpoint 1.14 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Feb 19 19:50:53 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.31: +6 -6 lines
Diff to previous 1.31 (colored) to selected 1.92 (colored)

The event bitmasks provided by the hypervisor are unsigned long (so 64bits
on amd64). Make sure to use the right type to store and manipulate them.
This fixes amd64, where basically any event channel > 31 was not working
(and you get there after starting/stopping a domU a few times). Things
would occasionally unwedge though the spllower() callbacks.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Feb 19 13:25:53 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.30: +30 -19 lines
Diff to previous 1.30 (colored) to selected 1.92 (colored)

Fix xenevt to not call softint_schedule() above IPL_HIGH:
Register a ipl callback for IPL_HIGH.
if the current ipl level is too high, just record the event in a bitmap,
and record IPL_HIGH as pending. The callback will process the pending events.

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:21 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.23.2.2: +5 -4 lines
Diff to previous 1.23.2.2 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.14.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:40:34 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.14.2.4: +16 -15 lines
Diff to previous 1.14.2.4 (colored) to branchpoint 1.14 (colored) to selected 1.92 (colored)

sync with head

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 11 20:00:53 2008 UTC (16 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: mjf-devfs-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored) to selected 1.92 (colored)

Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.

Revision 1.20.24.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:18 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.20.24.1: +25 -26 lines
Diff to previous 1.20.24.1 (colored) to branchpoint 1.20 (colored) to selected 1.92 (colored)

sync with HEAD

Revision 1.25.6.3 / (download) - annotate - [select for diffs], Tue Jan 8 23:51:53 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.25.6.2: +1 -0 lines
Diff to previous 1.25.6.2 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored) to selected 1.92 (colored)

Make XEN kernels build again.

Revision 1.25.6.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:10:42 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.25.6.1: +4 -4 lines
Diff to previous 1.25.6.1 (colored) to branchpoint 1.25 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jan 5 19:29:26 2008 UTC (16 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.92 (colored)

Wrap test for debug_port in __predict_false()

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jan 5 19:16:07 2008 UTC (16 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored) to selected 1.92 (colored)

Make sure debug_port isn't used before initialized by setting it to -1.

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:43:31 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.23.2.1: +13 -13 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:43:02 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.25: +13 -13 lines
Diff to previous 1.25 (colored) next main 1.26 (colored) to selected 1.92 (colored)

Sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 13 21:42:06 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.26: +2 -5 lines
Diff to previous 1.26 (colored) to selected 1.92 (colored)

Remove obsolete code and comment.

Revision 1.25.6.1 / (download) - annotate - [select for diffs], Thu Dec 13 19:36:00 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.25: +13 -13 lines
Diff to previous 1.25 (colored) to selected 1.92 (colored)

cleanup the way debug event is handled: make it bypass the IPL system
completely, it's called by shortcuts in the normal path because we want it to
be always called, even if the IPL is high.
Fix debug even recursion on XEN2

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Thu Dec 13 05:05:24 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.25: +16 -13 lines
Diff to previous 1.25 (colored) next main 1.26 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 12 22:16:32 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-kmem-base3
Changes since 1.25: +16 -13 lines
Diff to previous 1.25 (colored) to selected 1.92 (colored)

cleanup the debug event handler to not use the IPL system at all. Fix
debug event storm on XEN2.

Revision 1.20.22.3 / (download) - annotate - [select for diffs], Sun Dec 9 19:36:32 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.20.22.2: +4 -4 lines
Diff to previous 1.20.22.2 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:18:26 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.23: +13 -14 lines
Diff to previous 1.23 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.14.2.4 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:20 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.14.2.3: +13 -14 lines
Diff to previous 1.14.2.3 (colored) to branchpoint 1.14 (colored) to selected 1.92 (colored)

sync with head

Revision 1.20.6.2 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:42 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.20.6.1: +13 -14 lines
Diff to previous 1.20.6.1 (colored) to branchpoint 1.20 (colored) next main 1.21 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Dec 3 15:34:29 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base2, yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-kmem, vmlocking2, bouyer-xeni386
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored) to selected 1.92 (colored)

Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.

Revision 1.20.22.2 / (download) - annotate - [select for diffs], Tue Nov 27 19:36:26 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.20.22.1: +11 -12 lines
Diff to previous 1.20.22.1 (colored) to branchpoint 1.20 (colored) to selected 1.92 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 22 16:17:07 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.23: +11 -12 lines
Diff to previous 1.23 (colored) to selected 1.92 (colored)

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

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

sync with HEAD

Revision 1.14.2.3 / (download) - annotate - [select for diffs], Sat Oct 27 11:29:26 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.14.2.2: +9 -5 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Wed Oct 17 21:08:23 2007 UTC (16 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.22: +9 -10 lines
Diff to previous 1.22 (colored) next main 1.23 (colored) to selected 1.92 (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.23 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:32 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.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.92 (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.20.6.1 / (download) - annotate - [select for diffs], Tue Oct 9 13:38:58 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.20: +9 -5 lines
Diff to previous 1.20 (colored) to selected 1.92 (colored)

Sync with head.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:33:48 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) next main 1.22 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.20.14.1 / (download) - annotate - [select for diffs], Wed Oct 3 19:26:13 2007 UTC (16 years, 6 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.20: +9 -5 lines
Diff to previous 1.20 (colored) next main 1.21 (colored) to selected 1.92 (colored)

Sync with HEAD

Revision 1.20.22.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:11 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.20: +9 -5 lines
Diff to previous 1.20 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Sep 26 19:48:45 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, ppcoea-renovation-base
Branch point for: bouyer-xenamd64
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) to selected 1.92 (colored)

x86 changes for pcc and LKMs.

- Replace most inline assembly with proper functions. As a side effect
  this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
  smaller amount. Nearly all of the inlines did something slow, or something
  that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
  In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Sep 23 16:54:09 2007 UTC (16 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.20: +8 -4 lines
Diff to previous 1.20 (colored) to selected 1.92 (colored)

Ajust for Xen 3.1.0 public headers. From Christoph Egger in private mail.

Revision 1.18.18.2 / (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.18.18.1: +2 -5 lines
Diff to previous 1.18.18.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.92 (colored)

Sync with head.

Revision 1.14.2.2 / (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.14.2.1: +4 -8 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.18.20.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:16:43 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.18.20.1: +2 -5 lines
Diff to previous 1.18.20.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Dec 8 15:05:18 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-idlelwp-base8, yamt-idlelwp, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, post-newlock2-merge, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, newlock2-nbase, newlock2-base, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, ppcoea-renovation, matt-armv6, jmcneill-pm
Changes since 1.19: +2 -5 lines
Diff to previous 1.19 (colored) to selected 1.92 (colored)

- pass intrframe by-pointer, not by-value.
- make i386 and xen use per-cpu interrupt stack.

xen part is reviewed by Manuel Bouyer.

Revision 1.18.18.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:29:39 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.18: +4 -5 lines
Diff to previous 1.18 (colored) to selected 1.92 (colored)

Sync with head.

Revision 1.18.20.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:05:20 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.18: +4 -5 lines
Diff to previous 1.18 (colored) to selected 1.92 (colored)

sync with head

Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 28 18:53:16 2006 UTC (17 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, 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, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.18: +4 -5 lines
Diff to previous 1.18 (colored) to selected 1.92 (colored)

Add Xen3 support for ACPI and/or MPBIOS + IOAPIC. To help with this, physical
CPUs are now configured on mainbus only in dom0, and only to know about
their APIC id. virtual CPUs are attached to hypervisor as:
vcpu* at hypervisor?
and this is what's used as curcpu(). The kernel config files needs to be
updated for this, see XEN3_DOM0 or XEN3_DOMU for examples.
XEN3_DOM0 now has acpi, MPBIOS and ioapic by default.
Note that a Xen dom0 kernel doens't have access to the lapic.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 14:58:23 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.14: +88 -22 lines
Diff to previous 1.14 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.3.2.14 / (download) - annotate - [select for diffs], Fri Apr 7 12:51:26 2006 UTC (18 years 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, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.3.2.13: +79 -17 lines
Diff to previous 1.3.2.13 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.92 (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.17.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:51:48 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.17: +79 -17 lines
Diff to previous 1.17 (colored) next main 1.18 (colored) to selected 1.92 (colored)

sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 15 22:09:52 2006 UTC (18 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.17: +79 -17 lines
Diff to previous 1.17 (colored) to selected 1.92 (colored)

Snapshot of work in progress on NetBSD port to Xen3:
- kernel (both dom0 and domU) boot, console is functionnal and it can starts
  software from a ramdisk
- there is no driver front-end expect console for domU yet.
- dom0 can probe devices and ex(4) work when Xen3 is booted without acpi
  and apic support. But the on-board IDE doens't get interrupts.
  The PCI code still needs work (it's hardcoded to mode 1). Some of this
  code should be shared with ../x86
  The physical insterrupt code needs to get MPBIOS and ACPI support, and
  do interrupt routing to properly interract with Xen.
To enable Xen-3.0 support, add
options XEN3
to your kernel config file (this will disable Xen2 support)
Changes affecting Xen-2.0 support (no functionnal changes intended):
- get more constants from genassym for assembly code
- remove some unneeded registers move from start()
- map the shared info page from start(), and remove the pte = 0xffffffff hack
- vector.S: in hypervisor_callback() make sure %esi points to
  HYPERVISOR_shared_info before accessing the info page. Remplace some
  hand-written assembly with the equivalent macro defined in frameasm.h
- more debug code, dissabled by default.

while here added my copyright on some files I worked on in 2005.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Dec 11 12:19:50 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) to selected 1.92 (colored)

merge ktrace-lwp.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Thu Nov 10 14:00:34 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.4.2.2: +232 -289 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.92 (colored)

Sync with HEAD. Here we go again...

Revision 1.3.2.13 / (download) - annotate - [select for diffs], Thu Aug 25 20:16:21 2005 UTC (18 years, 7 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.3.2.12: +8 -6 lines
Diff to previous 1.3.2.12 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up following revision(s) (requested by bouyer in ticket #694):
	sys/arch/xen/xen/hypervisor.c: revision 1.15
	sys/arch/xen/xen/evtchn.c: revision 1.16
	sys/arch/xen/conf/files.xen: revision 1.27
	sys/arch/xen/i386/machdep.c: revision 1.18
Make PCI devices usable for non-domain0 kernels. Based on patches sent by
Ceri Storey to port-xen, with some additionnal changes by me:
- include bus_dma.c, bus_space.c and pci_machdep.c if pci is defined
  instead of dom0ops
- Make various initialisations, and probe/attach pci busses based on NPCI
  instead of DOM0OPS
- in conf/files.xen, move xen-specific devices before non-xen specific devices
  so that the xen-specific match function is called first, to avoid false
  attachement from too liberal match function in non-xen code.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Aug 19 16:06:12 2005 UTC (18 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.15: +10 -8 lines
Diff to previous 1.15 (colored) to selected 1.92 (colored)

Make PCI devices usable for non-domain0 kernels. Based on patches sent by
Ceri Storey to port-xen, with some additionnal changes by me:
- include bus_dma.c, bus_space.c and pci_machdep.c if pci is defined
  instead of dom0ops
- Make various initialisations, and probe/attach pci busses based on NPCI
  instead of DOM0OPS
- in conf/files.xen, move xen-specific devices before non-xen specific devices
  so that the xen-specific match function is called first, to avoid false
  attachement from too liberal match function in non-xen code.

Revision 1.3.2.12 / (download) - annotate - [select for diffs], Thu Aug 18 20:45:11 2005 UTC (18 years, 8 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.11: +3 -1 lines
Diff to previous 1.3.2.11 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.15 (requested by yamt in ticket #676):
evtchn_do_event: enable interrupts while calling interrupt handlers.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jul 15 09:16:23 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.14: +5 -3 lines
Diff to previous 1.14 (colored) to selected 1.92 (colored)

evtchn_do_event: enable interrupts while calling interrupt handlers.

Revision 1.3.2.11 / (download) - annotate - [select for diffs], Sun May 1 22:11:33 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.10: +4 -4 lines
Diff to previous 1.3.2.10 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.14 (requested by yamt in ticket #238):
rename do_event to evtchan_do_event.
the former is too generic name and it actually hides a bug in xennetback.

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:28:30 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.1: +592 -0 lines
Diff to previous 1.1 (colored) next main 1.2 (colored) to selected 1.92 (colored)

sync with -current

Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 28 18:26:26 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Branch point for: yamt-lazymbuf
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored) to selected 1.92 (colored)

rename do_event to evtchan_do_event.
the former is too generic name and it actually hides a bug in xennetback.

Revision 1.3.2.10 / (download) - annotate - [select for diffs], Thu Apr 28 10:45:59 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.9: +4 -4 lines
Diff to previous 1.3.2.9 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.12 (requested by bouyer in ticket #194):
Fix typo (vitual -> virtual)

Revision 1.3.2.9 / (download) - annotate - [select for diffs], Thu Apr 28 10:39:00 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.8: +23 -8 lines
Diff to previous 1.3.2.8 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.13 (requested by bouyer in ticket #192):
Event handling optimisations:
- sort the ih_evt_handler list by IPL, higher first. Otherwise some handlers
  would have been delayed, event if they could run at the current IPL.
- As ih_evt_handler is sorted, remove IPLs that have been processed for
  an event when calling hypervisor_set_ipending()
- In hypervisor_set_ipending(), enter the event in ipl_evt_mask only
  for the lowest IPL. As deffered IPLs are processed high to low,
  this ensure that hypervisor_enable_event() will be called only when all
  callbacks have been called for an event. We don't need the evtch_maskcount[]
  counters any more.
Thanks to YAMAMOTO Takashi for ideas and feedback.

Revision 1.3.2.8 / (download) - annotate - [select for diffs], Thu Apr 28 10:36:43 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.7: +2 -5 lines
Diff to previous 1.3.2.7 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.11 (requested by bouyer in ticket #192):
Avoid a race between do_hypervisor_event() and stipending() that could
cause an event to be both handled and marked as pending, or being
marked as pending twice (triggering the diagnostic check
evtch_maskcount[port] == 0 in hypervisor_set_ipending):
mask and clear event by word of 32bit in do_hypervisor_event() or stipending(),
instead of by indiviual bits in do_event() or xenevt_event().
In addition this is marginally more efficient.

Revision 1.3.2.7 / (download) - annotate - [select for diffs], Thu Apr 28 10:34:42 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.6: +2 -16 lines
Diff to previous 1.3.2.6 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.10 (requested by bouyer in ticket #192):
Remove unused code.

Revision 1.3.2.6 / (download) - annotate - [select for diffs], Thu Apr 28 10:33:16 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.5: +3 -2 lines
Diff to previous 1.3.2.5 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.9 (requested by bouyer in ticket #192):
don't unmask an event channel until all interrupts for it are served.
fix problems with shared (physical) interrupts.

Revision 1.3.2.5 / (download) - annotate - [select for diffs], Thu Apr 28 10:31:32 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.4: +8 -8 lines
Diff to previous 1.3.2.4 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.8 (requested by bouyer in ticket #192):
make this compilable with IRQ_DEBUG defined.

Revision 1.3.2.4 / (download) - annotate - [select for diffs], Thu Apr 28 10:28:20 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.3: +17 -8 lines
Diff to previous 1.3.2.3 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.7 (requested by bouyer in ticket #192):
Allow to pass a more descriptive name to event_set_handler() (e.g. IRQ number
for physical IRQ, or device name for xen device drivers). This makes
systat and vmstat output more usable, especially as the channel numbers
change each time a guest reboots.

Revision 1.3.2.3 / (download) - annotate - [select for diffs], Thu Apr 28 10:25:29 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.2: +9 -38 lines
Diff to previous 1.3.2.2 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.6 (requested by bouyer in ticket #192):
Remove functions that just call another one.
Inline a function used at only one place.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Thu Apr 28 10:19:17 2005 UTC (18 years, 11 months ago) by tron
Branch: netbsd-3
Changes since 1.3.2.1: +197 -237 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.5 (requested by bouyer in ticket #192):
Get rid of the event to pseudo-irq mapping. We are limited to 32 pseudo-irq,
including soft interrupt, and this is way too low in some use (lots of domains,
or domains with lots of xennet, or even hardware with lots of devices at
different interrupts).
Based on idea from YAMAMOTO Takashi, keep one list of handler per-event and
one per-IPL (so the same handler is now in 2 lists). In the common case were
an event is received at low IPL, we can call the handlers quickly (there
is usually only one handler per event, unless the event is mapped to a
physical interrupt and this interrupt is shared by different devices).
Deffered events and software interrupts are handled by a bitmask (as before)
with one bit per IPL. When one IPL has an event pending all handlers for
this IPL will be called.
With this change, it is now possible to have all the 1024 events active.
While here, handle debug event in a special way: the handler is always called,
regardless of the current IPL. Make the handler print usefull informations
about events and IPL states.
Also remove code not used on Xen in files inherited from the x86 port.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 20 14:48:29 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.12: +23 -8 lines
Diff to previous 1.12 (colored) to selected 1.92 (colored)

Event handling optimisations:
- sort the ih_evt_handler list by IPL, higher first. Otherwise some handlers
  would have been delayed, event if they could run at the current IPL.
- As ih_evt_handler is sorted, remove IPLs that have been processed for
  an event when calling hypervisor_set_ipending()
- In hypervisor_set_ipending(), enter the event in ipl_evt_mask only
  for the lowest IPL. As deffered IPLs are processed high to low,
  this ensure that hypervisor_enable_event() will be called only when all
  callbacks have been called for an event. We don't need the evtch_maskcount[]
  counters any more.

Thanks to YAMAMOTO Takashi for ideas and feedback.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Apr 20 07:59:21 2005 UTC (19 years ago) by xtraeme
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored) to selected 1.92 (colored)

Fix typo (vitual -> virtual)

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 19 22:14:30 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.10: +2 -5 lines
Diff to previous 1.10 (colored) to selected 1.92 (colored)

Avoid a race between do_hypervisor_event() and stipending() that could
cause an event to be both handled and marked as pending, or being
marked as pending twice (triggering the diagnostic check
evtch_maskcount[port] == 0 in hypervisor_set_ipending):
mask and clear event by word of 32bit in do_hypervisor_event() or stipending(),
instead of by indiviual bits in do_event() or xenevt_event().
In addition this is marginally more efficient.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 18 21:31:03 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.9: +2 -16 lines
Diff to previous 1.9 (colored) to selected 1.92 (colored)

Remove unused code.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Apr 18 20:23:56 2005 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.8: +1 -0 lines
Diff to previous 1.8 (colored) to selected 1.92 (colored)

don't unmask an event channel until all interrupts for it are served.
fix problems with shared (physical) interrupts.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 18 20:22:22 2005 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.7: +8 -8 lines
Diff to previous 1.7 (colored) to selected 1.92 (colored)

make this compilable with IRQ_DEBUG defined.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 17 14:50:11 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.6: +17 -8 lines
Diff to previous 1.6 (colored) to selected 1.92 (colored)

Allow to pass a more descriptive name to event_set_handler() (e.g. IRQ number
for physical IRQ, or device name for xen device drivers). This makes
systat and vmstat output more usable, especially as the channel numbers
change each time a guest reboots.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 16 23:33:18 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.5: +11 -40 lines
Diff to previous 1.5 (colored) to selected 1.92 (colored)

Remove functions that just call another one.
Inline a function used at only one place.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 16 22:49:38 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.4: +199 -239 lines
Diff to previous 1.4 (colored) to selected 1.92 (colored)

Get rid of the event to pseudo-irq mapping. We are limited to 32 pseudo-irq,
including soft interrupt, and this is way too low in some use (lots of domains,
or domains with lots of xennet, or even hardware with lots of devices at
different interrupts).
Based on idea from YAMAMOTO Takashi, keep one list of handler per-event and
one per-IPL (so the same handler is now in 2 lists). In the common case were
an event is received at low IPL, we can call the handlers quickly (there
is usually only one handler per event, unless the event is mapped to a
physical interrupt and this interrupt is shared by different devices).
Deffered events and software interrupts are handled by a bitmask (as before)
with one bit per IPL. When one IPL has an event pending all handlers for
this IPL will be called.
With this change, it is now possible to have all the 1024 events active.

While here, handle debug event in a special way: the handler is always called,
regardless of the current IPL. Make the handler print usefull informations
about events and IPL states.
Also remove code not used on Xen in files inherited from the x86 port.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Fri Apr 1 14:29:11 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.4.2.1: +653 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) to selected 1.92 (colored)

Sync with HEAD.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Sun Mar 20 14:33:36 2005 UTC (19 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.3: +24 -6 lines
Diff to previous 1.3 (colored) to selected 1.92 (colored)

Pull up revision 1.4 (requested by bouyer in ticket #32):
Protect various IRQ and event allocation/deallocations with splhigh().
Print the IRQ used for debug and misdirect events.

Revision 1.1.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:33:26 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.1: +653 -0 lines
Diff to previous 1.1 (colored) next main 1.2 (colored) to selected 1.92 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.4.2.1, Thu Mar 17 15:32:38 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.4: +0 -653 lines
FILE REMOVED

file evtchn.c was added on branch ktrace-lwp on 2005-04-01 14:29:11 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Thu Mar 17 15:32:38 2005 UTC (19 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3
Branch point for: ktrace-lwp
Changes since 1.3: +24 -6 lines
Diff to previous 1.3 (colored) to selected 1.92 (colored)

Protect various IRQ and event allocation/deallocations with splhigh().
Print the IRQ used for debug and misdirect events.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Mar 11 15:48:40 2005 UTC (19 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored) to selected 1.92 (colored)

increment couters at the right place, so that deffered interrupts are
accounted too.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Mar 9 22:39:21 2005 UTC (19 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.1: +635 -0 lines
Diff to previous 1.1 (colored) to selected 1.92 (colored)

Merge the bouyer-xen2 branch. This add supports for the Xen 2.0 virtual
machine kernel (both privileged and non-privileged domains), and remove support
for the old xen 1.2.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Wed Mar 9 12:40:17 2005 UTC (19 years, 1 month ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1.2.5: +4 -5 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.92 (colored)

Store the interrupt's name in struct intrsource.is_evname, and use this for
the event counters. Now 'systat vm' displays usefull informations.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Tue Mar 8 19:31:39 2005 UTC (19 years, 1 month ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1.2.4: +60 -4 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored) to selected 1.92 (colored)

Add infrastructure to unregsiter event callbacks.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Mon Jan 31 17:21:16 2005 UTC (19 years, 2 months ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1.2.3: +4 -4 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) to selected 1.92 (colored)

First pieces of domain control operations:
- use an up to date xenio.h
- update privcmd.c for newer ioctls (incomplete, some just return an error for
  now)
- add a /dev/xenevt pseudo-device, which provide to userland an interface to
  xen events
Now xend starts, and basic xm commands (such as list) work.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Jan 21 10:16:08 2005 UTC (19 years, 2 months ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1.2.2: +96 -36 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) to selected 1.92 (colored)

- Add a centralised handler for physical interrupts, which will call the
  real handler. This is not necessery but is usefull for debug.
- make irq_needs_unmask_notify[] per-IRQ, instead of per physical IRQ
- use a static physdev_op_t for PHYSDEVOP_IRQ_UNMASK_NOTIFY (it never changes,
  so no need to allocate a new one each time)
- call pirq_notify() from hypervisor_enable_irq().

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Jan 18 14:52:15 2005 UTC (19 years, 3 months ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1.2.1: +143 -5 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) to selected 1.92 (colored)

Implement physical IRQ mapping.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Mon Dec 13 17:52:21 2004 UTC (19 years, 4 months ago) by bouyer
Branch: bouyer-xen2
Changes since 1.1: +382 -0 lines
Diff to previous 1.1 (colored) to selected 1.92 (colored)

Commit files from netbsd-2.0-xen-sparse/sys/arch/xen in the Xen-2.0
distribution. These are the files modified from the 2.0 tree to get
NetBSD/xen working with Xen 2.

Revision 1.1, Mon Dec 13 17:52:21 2004 UTC (19 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km, kent-audio2, bouyer-xen2
FILE REMOVED

file evtchn.c was initially added on branch bouyer-xen2.

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>