Commit Graph

26 Commits

Author SHA1 Message Date
Kip Macy
c9a425bae3 don't hold spin lock across free 2010-02-21 01:12:18 +00:00
Martin Blapp
c2ede4b379 Remove extraneous semicolons, no functional changes.
Submitted by:	Marc Balmer <marc@msys.ch>
MFC after:	1 week
2010-01-07 21:01:37 +00:00
Justin T. Gibbs
88dd7ba72b Correct bug introduced while purging the -ERRNO Linuxism from the
grant table API.  Valid grant refs are in the range of positive 32bit
integers.  ENOSPACE, being 29, is also a positive integer.  Return
GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails.
2009-12-29 23:28:13 +00:00
John Baldwin
a56fe095f0 Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio
2009-08-20 19:17:53 +00:00
Attilio Rao
444b91868b Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)
2009-08-02 14:28:40 +00:00
Alan Cox
9e367360e3 Catch up with r195249, "Improve the handling of cpuset with interrupts."
Specifically, update the return type of xenpic_assign_cpu() so that this
file compiles again.

Approved by:	re (kib)
2009-07-21 16:54:11 +00:00
Adrian Chadd
946a48449b Make ipi_cpu() function as intended.
IPI's in Xen are implemented through hypervisor event channels.
The MP code creates a pair of IRQs for each base IPI per CPU
(one for IPI function dispatch calls, one for IPI bitmap dispatch calls.)
Using PCPU_GET() was returning the IRQ of the IPI handler for the
current CPU; thus calls to ipi_cpu() were sending itself a message.
Instead, looking up the IPI in the target CPU ipi-to-irq map is needed.

Note: This doesn't fix Xen SMP (far from it!) but it at least
sends IPI's to the right places. Next - sending IPIs..

PR:	135069
2009-05-30 08:53:13 +00:00
Adrian Chadd
1fc05890ae Don't call the watch callback if its NULL.
I'm not sure what series of events is leading up to this watch event
being received with no callback info and it should be investigated.
I'm triggering it somehow by registering an RTC device (which will
show up in a subsequent commit.)
2009-05-28 04:03:16 +00:00
Doug Rabson
3e33218d77 Fix the Xen build for i386 PV mode. 2009-04-01 17:06:28 +00:00
Doug Rabson
1267802438 Merge in support for Xen HVM on amd64 architecture. 2009-03-11 15:30:12 +00:00
Kip Macy
3a6d1fcf9c merge 186535, 186537, and 186538 from releng_7_xen
Log:
 - merge in latest xenbus from dfr's xenhvm
 - fix race condition in xs_read_reply by converting tsleep to mtx_sleep

Log:
 unmask evtchn in bind_{virq, ipi}_to_irq

Log:
 - remove code for handling case of not being able to sleep
 - eliminate tsleep - make sleeps atomic
2008-12-29 06:31:03 +00:00
Kip Macy
23dc562170 Integrate 185578 from dfr
Use newbus to managed devices
2008-12-04 07:59:05 +00:00
Kip Macy
7a8ec5a2ad merge fix for boot-time hang on centos' xen 2008-11-14 07:06:27 +00:00
Kip Macy
965b65a466 Fix evtchn initialization on SMP 2008-10-24 07:57:48 +00:00
Kip Macy
b1efbd6b47 Fix IPI support 2008-10-23 07:20:43 +00:00
Kip Macy
852c25eda2 move ipi_pcpu to evtchn.c 2008-09-26 05:54:24 +00:00
Kip Macy
920ba15bf9 Update xen/interface includes to the latest in mercurial
MFC after:	1 month
2008-09-26 05:29:39 +00:00
Kip Macy
a972cc523a partial update to interface headers to 3.2
MFC after:	1 month
2008-09-25 07:01:31 +00:00
Kip Macy
92c4060160 - add more debug cruft to xenbus
- probe backend
- separate probing from initialization
- add xenbus_strstate
- replace pause with tsleep (which should probably be cv_wait)
2008-08-20 09:20:12 +00:00
Kip Macy
08279d945d Check for watch events when doing inline message processing
MFC after:	1 month
2008-08-20 03:27:12 +00:00
Kip Macy
04e1532fc5 Xen 3.2 now interleaves watch events with regular message notifications.
More graciously handle processing messages and watch events inline prior
to threads being up and running.

MFC after:	1 month
2008-08-20 02:42:08 +00:00
Kip Macy
1bdf6e36a7 avoid evtchn_init name collision in gdb
MFC after:	1 month
2008-08-19 02:31:01 +00:00
Kip Macy
9ec83e3b86 Make sure we don't lose the most significant bits of the frame number on PAE or 64-bit
MFC after:	1 month
2008-08-17 23:32:34 +00:00
Kip Macy
178c2c7969 Import check for xen features.
MFC after:	1 month
2008-08-15 21:20:44 +00:00
Kip Macy
f0c468df71 Compile fixes for xen build.
MFC after:	1 month.
2008-08-15 04:00:44 +00:00
Kip Macy
30d1eefe39 Import OS interfaces to Xen services.
MFC after:	2 weeks
2008-08-12 07:36:56 +00:00