The NetBSD Project

CVS log for src/sys/arch/xen/x86/xen_ipi.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Wed Jan 5 20:21:29 2022 UTC (16 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored)

remove DIAGNOSTIC so that function is defined for KASSERTMSG. Hope that the
compiler removes it.

Revision 1.20.10.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:22:24 2021 UTC (2 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.20: +14 -4 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Pull up following revision(s) (requested by kre in ticket #1675):

	sys/arch/xen/x86/xen_ipi.c: revision 1.24 (patch)

make compile without DDB
PR port-xen/50282

Revision 1.39 / (download) - annotate - [select for diffs], Thu May 7 19:48:58 2020 UTC (3 years 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-futex, 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.38: +3 -3 lines
Diff to previous 1.38 (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.38 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:17 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.37: +40 -31 lines
Diff to previous 1.37 (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.35.6.7 / (download) - annotate - [select for diffs], Sat Apr 25 13:16:48 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.6: +3 -3 lines
Diff to previous 1.35.6.6 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.25.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:13 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.25.2.3: +4 -3 lines
Diff to previous 1.25.2.3 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Sync with HEAD

Revision 1.37 / (download) - annotate - [select for diffs], Tue Apr 21 18:24:05 2020 UTC (3 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Remove spurious reference to XEN_IPI_KICK - it represents the absence of
a specific IPI type.

Revision 1.35.6.6 / (download) - annotate - [select for diffs], Mon Apr 20 19:46:44 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.5: +3 -3 lines
Diff to previous 1.35.6.5 (colored) to branchpoint 1.35 (colored)

Misc fixes after merge

Revision 1.35.6.5 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:01 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.4: +4 -5 lines
Diff to previous 1.35.6.4 (colored) to branchpoint 1.35 (colored)

Sync with HEAD

Revision 1.35.6.4 / (download) - annotate - [select for diffs], Sat Apr 18 15:06:18 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.3: +5 -5 lines
Diff to previous 1.35.6.3 (colored) to branchpoint 1.35 (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.35.6.3 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:35 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.2: +36 -33 lines
Diff to previous 1.35.6.2 (colored) to branchpoint 1.35 (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.36 / (download) - annotate - [select for diffs], Mon Apr 13 22:54:12 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base1
Changes since 1.35: +7 -6 lines
Diff to previous 1.35 (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.25.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:12 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.25.2.2: +1 -1 lines
Diff to previous 1.25.2.2 (colored) to branchpoint 1.25 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.35.6.2 / (download) - annotate - [select for diffs], Sun Apr 12 17:17:38 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35.6.1: +4 -4 lines
Diff to previous 1.35.6.1 (colored) to branchpoint 1.35 (colored)

Add XEN_IPI_KPREEMPT to list of valid IPIs

Revision 1.35.6.1 / (download) - annotate - [select for diffs], Sat Apr 11 18:26:07 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.35: +12 -4 lines
Diff to previous 1.35 (colored)

Move softint and preemtion-related functions out of x86/x86/intr.c to
  its own file, x86/x86/x86_softintr.c
Add x86/x86/x86_softintr.c for native and XenPV
Make sure XenPV also check ci_ioending, which is used for softints.
Switch XenPV to fast softints and allow kernel preemption.
kpreempt_disable() before calling pmap_changeprot_local()
run  xen_wallclock_time() and xen_global_systime_ns() at splshed() to
  avoid being interrupted.

XXX amd64 lock stubs are racy for XPENDING

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.25.2.1: +16 -5 lines
Diff to previous 1.25.2.1 (colored) to branchpoint 1.25 (colored)

Merge changes from current as of 20200406

Revision 1.35 / (download) - annotate - [select for diffs], Sun Dec 1 15:34:46 2019 UTC (3 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: bouyer-xenpvh
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Fix false sharing problems with cpu_info.  Identified with tprof(8).
This was a very nice win in my tests on a 48 CPU box.

- Reorganise cpu_data slightly according to usage.
- Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc).
- On x86, put some items in their own cache lines according to usage, like
  the IPI bitmask and ci_want_resched.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Nov 23 19:40:38 2019 UTC (3 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.33: +16 -5 lines
Diff to previous 1.33 (colored)

cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 12 06:31:04 2019 UTC (3 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Rewrite the FPU code on x86. This greatly simplifies the logic and removes
the dependency on IPL_HIGH. NVMM is updated accordingly. Posted on
port-amd64 a week ago.

Bump the kernel version to 9.99.16.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:56 2019 UTC (3 years, 11 months ago) by christos
Branch: phil-wifi
Changes since 1.25: +7 -7 lines
Diff to previous 1.25 (colored)

Sync with HEAD

Revision 1.32 / (download) - annotate - [select for diffs], Sat Feb 2 12:32:55 2019 UTC (4 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: 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, isaki-audio2-base, isaki-audio2
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored)

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

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

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jan 27 05:08:58 2019 UTC (4 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.30: +3 -5 lines
Diff to previous 1.30 (colored)

fix duplicated chunk from merge

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:39 2019 UTC (4 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.29: +5 -3 lines
Diff to previous 1.29 (colored)

Merge the [pgoyette-compat] branch

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

Sync with HEAD, resolve a few conflicts

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

Bifurcate the interrupt establish functions between XEN and non-XEN

Thus intr_establish_xname() becomes xen_intr_establish_xname() etc.

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

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

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

Sync with HEAD, resolve a couple of conflicts

Revision 1.28 / (download) - annotate - [select for diffs], Fri Oct 26 05:33:21 2018 UTC (4 years, 7 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Wed Oct 24 03:59:33 2018 UTC (4 years, 7 months ago) by cherry
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

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

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:43 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.23.2.1: +4 -4 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored)

Sync with HEAD

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 24 12:26:14 2018 UTC (4 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

Fix what looks like a typo in xen_send_ipi():
ci != NULL || ci != curcpu()
is always true

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:47 2018 UTC (4 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.23: +21 -8 lines
Diff to previous 1.23 (colored)

Sync with HEAD

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jun 24 13:35:32 2018 UTC (4 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.24: +10 -7 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Sat Jun 23 15:53:14 2018 UTC (4 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.23: +14 -4 lines
Diff to previous 1.23 (colored)

make compile without DDB

PR port-xen/50282

Revision 1.10.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (5 years, 5 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.10.2.2: +16 -18 lines
Diff to previous 1.10.2.2 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

update from HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Mon Nov 6 15:27:09 2017 UTC (5 years, 6 months ago) by cherry
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.22: +15 -8 lines
Diff to previous 1.22 (colored)

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

This completes the API transition.

Revision 1.18.4.2 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:57 2017 UTC (5 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.18.4.1: +4 -15 lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

Sync with HEAD

Revision 1.22 / (download) - annotate - [select for diffs], Tue Aug 15 09:16:59 2017 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.21: +4 -8 lines
Diff to previous 1.21 (colored)

Remove unused arg, to have the same definition as amd64.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Aug 12 07:21:57 2017 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.20: +3 -10 lines
Diff to previous 1.20 (colored)

Remove vm86.

Pass 3.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:40 2016 UTC (6 years, 10 months ago) by msaitoh
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, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, 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, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:04 2015 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.18: +5 -3 lines
Diff to previous 1.18 (colored)

Sync with HEAD

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Sun Feb 8 22:18:30 2015 UTC (8 years, 3 months 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.18: +5 -3 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Pull up following revision(s) (requested by joerg in ticket #498):
	sys/arch/xen/x86/xen_ipi.c: revision 1.19
valid_ipimask is only used under DIAGNOSTIC, so only define it then.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 7 20:01:48 2015 UTC (8 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: 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
Changes since 1.18: +5 -3 lines
Diff to previous 1.18 (colored)

valid_ipimask is only used under DIAGNOSTIC, so only define it then.

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

Rebase to HEAD as of a few days ago.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:11 2014 UTC (8 years, 9 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.17: +31 -5 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Rebase.

Revision 1.5.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.5.2.3: +4 -18 lines
Diff to previous 1.5.2.3 (colored) to branchpoint 1.5 (colored) next main 1.6 (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.18 / (download) - annotate - [select for diffs], Mon May 19 22:47:54 2014 UTC (9 years ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-base
Branch point for: nick-nhusb, netbsd-7
Changes since 1.17: +31 -5 lines
Diff to previous 1.17 (colored)

Implement MI IPI interface with cross-call support.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (9 years ago) by rmind
Branch: rmind-smpnet
Changes since 1.11: +4 -18 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

sync with head

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 12 23:24:09 2014 UTC (9 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.16: +3 -7 lines
Diff to previous 1.16 (colored)

Change i386 to use x86/fpu.c instead of i386/isa/npx.c
This changes the trap10 and trap13 code to call directly into fpu.c,
  removing all the code for T_ARITHTRAP, T_XMM and T_FPUNDA from i386/trap.c
Not all of the code thate appeared to handle fpu traps was ever called!
Most of the changes just replace the include of machine/npx.h with x86/fpu.h
  (or remove it entirely).

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 11 20:17:16 2014 UTC (9 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Move sys/arch/amd64/amd64/fpu.c and sys/arch/amd64/include/fpu.h
into sys/arch/x86 in preparation for using the same code for i386.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jan 26 19:16:17 2014 UTC (9 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.14: +3 -7 lines
Diff to previous 1.14 (colored)

Remove support for 'external' floating point units and the MS-DOS
  compatible method of handling floating point exceptions.
Make kernel support for teh fpu non-optional (486SX should still work).
Only 386 cpus support external fpu, and i386 support was removed years ago.
This means that the npx code no longer uses port 0xf0 or interupt 13.
All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c
  is now mandatory for all i386 kernels.
I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu()
  to match the very similar amd64 functions.
The fpu of the boot cpu is now initialised by a direct call from
  cpu_configure(), this enables FP emulation for a 486SX.
  (for amd64 the cr0 values are set in locore.S and similar).
This fixes a long-standing bug in linux_setregs() - which did not
  save the fpu regsiters if they were active.
I've test booted a single cpu i386 kernel (using anita).
amd64 builds - none of teh changes should affect it.
The i386 XEN kernels build, but I'm not sure where they set cr0, and
  it might have got lost!

Revision 1.14 / (download) - annotate - [select for diffs], Sun Dec 1 01:05:16 2013 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.13: +20 -1 lines
Diff to previous 1.13 (colored)

revert fpu/pcu changes until we figure out what's wrong; they cause random
freezes

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 23 20:18:50 2013 UTC (9 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.12: +4 -23 lines
Diff to previous 1.12 (colored)

Use the MI "pcu" framework for bookkeeping of npx/fpu states on x86.
This reduces the amount of MD code enormously, and makes it easier
to implement support for newer CPU features which require more fpu
state, or for fpu usage by the kernel.
For access to FPU state across CPUs, an xcall kthread is used now
rather than a dedicated IPI.
No user visible changes intended.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 14 13:07:55 2013 UTC (9 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.11: +3 -9 lines
Diff to previous 1.11 (colored)

GC max_cpus.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:06 2013 UTC (10 years, 3 months ago) by tls
Branch: tls-maxphys
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored)

resync with head

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:01 2013 UTC (10 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.5.2.2: +4 -3 lines
Diff to previous 1.5.2.2 (colored) to branchpoint 1.5 (colored)

sync with head

Revision 1.11 / (download) - annotate - [select for diffs], Thu Dec 27 06:42:14 2012 UTC (10 years, 5 months ago) by cherry
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.10: +4 -3 lines
Diff to previous 1.10 (colored)

Remove unused header evtchn.h from intr.h

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:11 2012 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
Changes since 1.5.2.1: +8 -12 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored)

sync with head

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Wed Feb 22 18:56:45 2012 UTC (11 years, 3 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.9: +4 -5 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Pull up following revision(s) (requested by bouyer in ticket #29):
	sys/arch/xen/x86/x86_xpmap.c: revision 1.39
	sys/arch/xen/include/hypervisor.h: revision 1.37
	sys/arch/xen/include/intr.h: revision 1.34
	sys/arch/xen/x86/xen_ipi.c: revision 1.10
	sys/arch/x86/x86/cpu.c: revision 1.97
	sys/arch/x86/include/cpu.h: revision 1.48
	sys/uvm/uvm_map.c: revision 1.315
	sys/arch/x86/x86/pmap.c: revision 1.165
	sys/arch/xen/x86/cpu.c: revision 1.81
	sys/arch/x86/x86/pmap.c: revision 1.167
	sys/arch/xen/x86/cpu.c: revision 1.82
	sys/arch/x86/x86/pmap.c: revision 1.168
	sys/arch/xen/x86/xen_pmap.c: revision 1.17
	sys/uvm/uvm_km.c: revision 1.122
	sys/uvm/uvm_kmguard.c: revision 1.10
	sys/arch/x86/include/pmap.h: revision 1.50
Apply patch proposed in PR port-xen/45975 (this does not solve the exact
problem reported here but is part of the solution):
xen_kpm_sync() is not working as expected,
leading to races between CPUs.
1 the check (xpq_cpu != &x86_curcpu) is always false because we
  have different x86_curcpu symbols with different addresses in the kernel.
  Fortunably, all addresses dissaemble to the same code.
  Because of this we always use the code intended for bootstrap, which doesn't
  use cross-calls or lock.
2 once 1 above is fixed, xen_kpm_sync() will use xcalls to sync other CPUs,
  which cause it to sleep and pmap.c doesn't like that. It triggers this
  KASSERT() in pmap_unmap_ptes():
  KASSERT(pmap->pm_ncsw == curlwp->l_ncsw);
3 pmap->pm_cpus is not safe for the purpose of xen_kpm_sync(), which
  needs to know on which CPU a pmap is loaded *now*:
  pmap->pm_cpus is cleared before cpu_load_pmap() is called to switch
  to a new pmap, leaving a window where a pmap is still in a CPU's
  ci_kpm_pdir but not in pm_cpus. As a virtual CPU may be preempted
  by the hypervisor at any time, it can be large enough to let another
  CPU free the PTP and reuse it as a normal page.
To fix 2), avoid cross-calls and IPIs completely, and instead
use a mutex to update all CPU's ci_kpm_pdir from the local CPU.
It's safe because we just need to update the table page, a tlbflush IPI will
happen later. As a side effect, we don't need a different code for bootstrap,
fixing 1). The mutex added to struct cpu needs a small headers reorganisation.
to fix 3), introduce a pm_xen_ptp_cpus which is updated from
cpu_pmap_load(), whith the ci_kpm_mtx mutex held. Checking it with
ci_kpm_mtx held will avoid overwriting the wrong pmap's ci_kpm_pdir.
While there I removed the unused pmap_is_active() function;
and added some more details to DIAGNOSTIC panics.
When using uvm_km_pgremove_intrsafe() make sure mappings are removed
before returning the pages to the free pool. Otherwise, under Xen,
a page which still has a writable mapping could be allocated for
a PDP by another CPU and the hypervisor would refuse it (this is
PR port-xen/45975).
For this, move the pmap_kremove() calls inside uvm_km_pgremove_intrsafe(),
and do pmap_kremove()/uvm_pagefree() in batch of (at most) 16 entries
(as suggested by Chuck Silvers on tech-kern@, see also
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012727.html and
followups).
Avoid early use of xen_kpm_sync(); locks are not available at this time.
Don't call cpu_init() twice.
Makes LOCKDEBUG kernels boot again
Revert pmap_pte_flush() -> xpq_flush_queue() in previous.

Revision 1.6.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:33:45 2012 UTC (11 years, 3 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.6: +8 -12 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

merge to -current.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Feb 17 18:40:20 2012 UTC (11 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.9: +4 -5 lines
Diff to previous 1.9 (colored)

Apply patch proposed in PR port-xen/45975 (this does not solve the exact
problem reported here but is part of the solution):
xen_kpm_sync() is not working as expected,
leading to races between CPUs.
1 the check (xpq_cpu != &x86_curcpu) is always false because we
  have different x86_curcpu symbols with different addresses in the kernel.
  Fortunably, all addresses dissaemble to the same code.
  Because of this we always use the code intended for bootstrap, which doesn't
  use cross-calls or lock.

2 once 1 above is fixed, xen_kpm_sync() will use xcalls to sync other CPUs,
  which cause it to sleep and pmap.c doesn't like that. It triggers this
  KASSERT() in pmap_unmap_ptes():
  KASSERT(pmap->pm_ncsw == curlwp->l_ncsw);
3 pmap->pm_cpus is not safe for the purpose of xen_kpm_sync(), which
  needs to know on which CPU a pmap is loaded *now*:
  pmap->pm_cpus is cleared before cpu_load_pmap() is called to switch
  to a new pmap, leaving a window where a pmap is still in a CPU's
  ci_kpm_pdir but not in pm_cpus. As a virtual CPU may be preempted
  by the hypervisor at any time, it can be large enough to let another
  CPU free the PTP and reuse it as a normal page.

To fix 2), avoid cross-calls and IPIs completely, and instead
use a mutex to update all CPU's ci_kpm_pdir from the local CPU.
It's safe because we just need to update the table page, a tlbflush IPI will
happen later. As a side effect, we don't need a different code for bootstrap,
fixing 1). The mutex added to struct cpu needs a small headers reorganisation.

to fix 3), introduce a pm_xen_ptp_cpus which is updated from
cpu_pmap_load(), whith the ci_kpm_mtx mutex held. Checking it with
ci_kpm_mtx held will avoid overwriting the wrong pmap's ci_kpm_pdir.

While there I removed the unused pmap_is_active() function;
and added some more details to DIAGNOSTIC panics.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Dec 30 12:16:19 2011 UTC (11 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.8: +3 -4 lines
Diff to previous 1.8 (colored)

Remove spurious (debug) printf()

Revision 1.8 / (download) - annotate - [select for diffs], Wed Dec 28 18:59:21 2011 UTC (11 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.7: +5 -7 lines
Diff to previous 1.7 (colored)

Remove temporary variable definition that is unused in non DIAGNOSTIC builds.

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

switch from xen3-public to xen-public.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:44 2011 UTC (11 years, 6 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.5: +22 -7 lines
Diff to previous 1.5 (colored)

sync with head

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 7 15:51:31 2011 UTC (11 years, 6 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.5: +22 -7 lines
Diff to previous 1.5 (colored)

Add an ipi callback to force hypervisor callback. this is useful to "re-route" interrupts to a given vcpu

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 27 01:02:37 2011 UTC (11 years, 8 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Sun Sep 18 18:46:40 2011 UTC (11 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.1.2.3: +22 -7 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

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

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Sat Aug 27 15:59:49 2011 UTC (11 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.4.2.1: +298 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Add/remove files, like in HEAD.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Wed Aug 17 09:40:40 2011 UTC (11 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.1.2.2: +14 -27 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Pullup relevant changes from -current

Revision 1.4.2.1, Mon Aug 15 20:17:12 2011 UTC (11 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.4: +0 -298 lines
FILE REMOVED

file xen_ipi.c was added on branch jym-xensuspend on 2011-08-27 15:59:49 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Mon Aug 15 20:17:12 2011 UTC (11 years, 9 months ago) by cherry
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: jym-xensuspend
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

invert buggy ci_flag test

Revision 1.3 / (download) - annotate - [select for diffs], Wed Aug 10 20:38:45 2011 UTC (11 years, 9 months ago) by cherry
Branch: MAIN
Changes since 1.2: +14 -27 lines
Diff to previous 1.2 (colored)

KNF police (rmind@ :-)

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 10 11:39:46 2011 UTC (11 years, 9 months ago) by cherry
Branch: MAIN
Changes since 1.1: +311 -0 lines
Diff to previous 1.1 (colored)

xen ipi infrastructure

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sun Jul 31 20:49:12 2011 UTC (11 years, 10 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.1.2.1: +46 -3 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

grow MP support for i386. boots to single user

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Fri Jun 3 13:27:41 2011 UTC (12 years ago) by cherry
Branch: cherry-xenmp
Changes since 1.1: +268 -0 lines
Diff to previous 1.1 (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.1, Fri Jun 3 13:27:41 2011 UTC (12 years ago) by cherry
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Branch point for: cherry-xenmp
FILE REMOVED

file xen_ipi.c was initially added on branch cherry-xenmp.

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>