summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen
Commit message (Collapse)AuthorAgeFilesLines
* - make printf conditionalkmacy2010-02-211-17/+21
| | | | - fix witness warnings by making configuration lock a mutex
* In blkif_queue_cb(), test the return value from gnttab_claim_grant_reference()gibbs2009-12-291-1/+1
| | | | for >= 0 instead of != ENOSPC.
* Correct alignment and boundary constraints in blkfront's bus dma tag. Thegibbs2009-12-281-2/+2
| | | | | | | | | blkif interface in Xen requires all I/O to be 512 byte aligned with each segment bounded by a 4k page. Note: This submission only documents the proper contraints for blkif I/O. The alignment code in busdma does not yet handle alignment constraints correctly in all cases.
* Add media ioctl support and link notifications so that devd will attemptgibbs2009-12-011-16/+46
| | | | | | | to run dhclient on a netfront (xn) device that is setup for DHCP in /etc/rc.conf. PR: kern/136251 (fixed differently than the submitted patch)
* Merge Scott Long's latest blkfront now that the licensing issues are resolvedkmacy2009-11-302-539/+654
|
* Update license to reflect terms in xen 2.0 as of the time when the driver ↵kmacy2009-11-302-17/+40
| | | | | | was ported to FreeBSD
* remove annoying printf that cripples kdb on PV guestskmacy2009-11-241-1/+0
|
* fixup kernel core dumps on paravirtual guestskmacy2009-11-241-1/+1
|
* Remove commented out reference to if_watchdog and an assignment of zero tojhb2009-11-191-4/+0
| | | | | | if_timer. Reviewed by: scottl
* add core dump support to blkfrontkmacy2009-08-301-2/+87
| | | | Obtained from: Frank Suchomel
* Cleanups to the Xen console driver:ed2009-08-241-41/+27
| | | | | | | | | | | | | | - Use CONSOLE_DRIVER() instead of the deprecated CONS_DRIVER() declaration. - This means we cannot use cn_checkc anymore, which is supposed to do the same as cn_getc nowadays. Remove the cn_getc implementation (that was never being called) and rename cn_checkc to cn_getc. - Don't run-time patch cn_putc, but add the logic to xc_cnputc(). This means I could do some cleanups to our console code... Tested by: nobody on hackers@
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-202-4/+4
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-022-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* update backend_changed to reflect .m prototypekmacy2009-06-132-2/+5
|
* Fix compilation when compiled w/out WITNESS.adrian2009-06-071-0/+1
| | | | Submitted by: Edwin Shao <poleris@gmail.com>
* Last minute TTY API change: remove mutex argument from tty_alloc().ed2009-05-291-1/+1
| | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
* Delete useless #ifdef; make it more obvious if setting TSO fails.adrian2009-05-271-4/+1
|
* Clear IFF_DRV_OACTIVE if at least one TX xen/mbuf ring slot has been freed.adrian2009-05-271-1/+2
|
* Enforce that there are actually enough xenbus TX ring descriptors availableadrian2009-05-271-3/+13
| | | | before attempting to queue the packet.
* Comment tidyup; comment where the next explicit check shouldadrian2009-05-271-11/+23
| | | | appear.
* Ensure that there are enough TX mbuf ring slots available before beginningadrian2009-05-271-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to dequeue a packet. The tx path was trying to ensure that enough Xenbus TX ring slots existed but it didn't check to see whether the mbuf TX ring slots were also available. They get freed in xn_txeof() which occurs after transmission, rather than earlier on in the process. (The same happens under Linux too.) Due to whatever reason (CPU use, scheduling, memory constraints, whatever) the mbuf TX ring may not have enough slots free and would allocate slot 0. This is used as the freelist head pointer to represent "free" mbuf TX ring slots; setting this to an actual mbuf value rather than an id crashes the code. This commit introduces some basic code to track the TX mbuf ring use and then (hopefully!) ensures that enough slots are free in said TX mbuf ring before it enters the actual work loop. A few notes: * Similar logic needs to be introduced to check there are enough actual slots available in the xenbuf TX ring. There's some logic which is invoked earlier but it doesn't hard-check against the number of available ring slots. Its trivial to do; I'll do it in a subsequent commit. * As I've now commented in the source, it is likely possible to deadlock the driver under certain conditions where the rings aren't receiving any changes (which I should enumerate) and thus Xen doesn't send any further software interrupts. I need to make sure that the timer(s) are running right and the queues are periodically kicked. PR: 134926
* Do the invariant check before the mbuf is dereferenced.adrian2009-05-271-2/+2
|
* Flesh out some inline documentation which hopefully reflect the intendedadrian2009-05-271-0/+23
| | | | reality of these functions.
* Add in some INVARIANT checks in the TX mbuf descriptor "freelist" management ↵adrian2009-05-271-0/+2
| | | | | | | | code. Slot 0 must always remain "free" and be a pointer to the first free entry in the mbuf descriptor list. It is thus an error to have code allocate or push slot 0 back into the list.
* The merge in r189699 reverted part of the work done in a previous commitadrian2009-05-181-5/+6
| | | | | | (r188036.) Re-revert that change so the Xen networking functions again.
* Disable some un-needed console debugging.adrian2009-05-181-1/+1
|
* don't acquire tty lock with console lock heldkmacy2009-05-112-1/+5
|
* xen console lock needs to be a spin lock in case it is acquired from an ↵kmacy2009-05-113-5/+16
| | | | interrupt context
* Fix the Xen build for i386 PV mode.dfr2009-04-012-2/+9
|
* Merge in support for Xen HVM on amd64 architecture.dfr2009-03-119-262/+1505
|\
| * Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64dfr2008-11-2212-8290/+0
| | | | | | | | performance in Xen's HVM mode.
| * Add newline to sys/conf/files so that netfront.c compiles, s/ext_arg1/ext_args/kmacy2008-10-181-3/+4
| |
| * update console to pre-MPSAFE tty interfaceskmacy2008-10-151-40/+167
| |
* | fix non-witness compilekmacy2009-02-051-0/+1
| |
* | Adds support for SCTP checksum offload. This meansrrs2009-02-031-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | we, like TCP and UDP, move the checksum calculation into the IP routines when there is no hardware support we call into the normal SCTP checksum routine. The next round of SCTP updates will use this functionality. Of course the IGB driver needs a few updates to support the new intel controller set that actually does SCTP csum offload too. Reviewed by: gnn, rwatson, kmacy
* | break out of loop if we run out of mbufskmacy2009-02-021-5/+6
| |
* | Last step of splitting up minor and unit numbers: remove minor().ed2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev(). We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check. Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now. I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
* | merge 186535, 186537, and 186538 from releng_7_xenkmacy2008-12-295-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Integrate 185578 from dfrkmacy2008-12-043-241/+300
| | | | | | | | Use newbus to managed devices
* | Don't call ether_ioctl() with locks held. Loop in xn_rxeof() until the backenddfr2008-11-301-81/+85
| | | | | | | | | | stops adding stuff to the ring otherwise we miss RX interrupts which kills performance.
* | Remove unused consdev structure fields.ed2008-10-271-1/+0
|/ | | | | | The cn_unit and cn_tp fields don't seem to be used anywhere. Some drivers set them, while others don't. Just remove them, in an attempt to make our consdev code a little easier to understand.
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Update xen/interface includes to the latest in mercurialkmacy2008-09-262-6/+10
| | | | MFC after: 1 month
* reflect header change in netfrontkmacy2008-09-251-1/+1
| | | | MFC after: 1 month
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadattilio2008-08-281-1/+1
| | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Evidently the block device starts at 767.kmacy2008-08-241-1/+1
| | | | MFC after: 1 month
* make block devices start at 0kmacy2008-08-231-3/+4
|
* For reasons that I have not delved in to Xen 3.2 netback now does header ↵kmacy2008-08-211-21/+38
| | | | | | | | | splitting so packets > 128 bytes are now split in to multiple buffer. This fixes netfront to handle multiple buffers per rx packet. MFC after: 1 month
* change netfront to match xen31_6kmacy2008-08-202-3/+3
| | | | fix console locking
* mark blkfront_info as readykmacy2008-08-201-1/+2
| | | | MFC after: 1 month
OpenPOWER on IntegriCloud