The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: jym-xensuspend


Revision 1.14.2.6 / (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.14.2.5: +3 -3 lines
Diff to previous 1.14.2.5 (colored) to branchpoint 1.14 (colored) next main 1.15 (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.14.2.5 / (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.14.2.4: +3 -3 lines
Diff to previous 1.14.2.4 (colored) to branchpoint 1.14 (colored)

Sync with HEAD

Revision 1.14.2.4 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:22 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.14.2.3: +40 -25 lines
Diff to previous 1.14.2.3 (colored) to branchpoint 1.14 (colored)

Sync with HEAD

Revision 1.14.2.3 / (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.14.2.2: +3 -67 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored)

Sync with HEAD.

Revision 1.14.2.2 / (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.14.2.1: +7 -2 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (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.14.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.14: +11 -3 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Sat Jan 24 19:03:12 2009 UTC (15 years, 2 months ago) by bouyer
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-base2, nick-hppapmap-base, jymxensuspend-base
Branch point for: jym-xensuspend
Changes since 1.13: +9 -7 lines
Diff to previous 1.13 (colored)

Properly check the return value of HYPERVISOR_memory_op(): it returns
the number of successfull operations, so a return value of 0 is also
a failure.

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>