Commit Graph

215 Commits

Author SHA1 Message Date
yamt 5923204be0 fix a race by re-checking req_prod when exiting main loop. 2005-07-19 12:20:29 +00:00
yamt 01fa457bff xen_shm_unmap:
- don't try to remove a request twice.
- fix spl/splx mismatch.
2005-07-19 11:09:52 +00:00
yamt 4ff72cab3e xbdback_co_main_loop: don't forget to set xbdi->cont in the case of error. 2005-07-19 09:45:12 +00:00
tls 0ac3367f2a Improvements to xbdback (the domain 0 driver that provides "xbd" virtual
disks to other domains) from Jed Davis, <jld@panix.com>:

	* Issue multiple requests when necessary rather than
	  assuming that arbitrary requests can be mapped into single
	  contiguous virtual address ranges.

	* Don't assume that all data for a request is consecutive
	  in memory.  With some client OSes, it's not.

	The above two changes fix data corruption issues with Linux
	clients with certain filesystem block sizes.

	* Gracefully handle memory or pool allocation failures after
	  beginning to handle a request from the ring.

	* Merge contiguous requests to avoid the "64K turns into 44K + 20K
	  and doubles the transactions per second at the disk" problem
	  caused by the 11-page limit caused by the structure of Xen
	  ring entries.  This causes a very slight performance decrease
	  for sequential 64K I/O if the disk is not already saturated with
	  requests (about 1%) but halves the transactions per second we
	  hit the disk with -- or better.  It even compensates for bizarre
	  Linux behaviour like breaking long requests up into 5.5K pieces.

	* Probably some stuff I forgot to mention.

Disk throughput (though not latency) is now much, much closer to the
"raw hardware" case than it was before.
2005-07-17 08:23:43 +00:00
yamt 1eb847c433 evtchn_do_event: enable interrupts while calling interrupt handlers. 2005-07-15 09:16:23 +00:00
yamt cdc5b954fc include cardbus/pcmcia.
XXX 32bit cards don't work due to the way how xen handles
pci configuration space.
2005-07-15 07:56:22 +00:00
yamt 300f70f6e0 handle tx buffer exhaustion. 2005-07-07 12:01:25 +00:00
yamt 73a032cf90 create opt_pcifixup.h to match with the recent i386 change. 2005-06-28 12:01:11 +00:00
dyoung 7a7b273b60 Don't include files.ath any more, it's disappeared. 2005-06-25 23:09:54 +00:00
bouyer acd358ae3d Use the time provided by the hypervisor instead of our global time variable
for xen_microtime(). This match more closely what is done on a real i386
(where we read the RTC), and seems to fix gettimeofday() sometime going
backward by several seconds for me.
2005-06-25 18:44:59 +00:00
dyoung 9063402978 Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD.  Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]).  Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
2005-06-22 06:14:51 +00:00
chs b36d2dee68 copy the athhal glue from Makefile.i386. 2005-06-19 20:28:14 +00:00
chs 187b985918 add ath stuff. 2005-06-19 20:22:26 +00:00
bouyer 15ce68ccd1 Allow compiling a domain0 kernel with vga but without pckbc, and add
console support for USB keyboard. Problem pointed out by Karl Janmar on
port-xen.
2005-06-16 10:58:52 +00:00
bouyer 6b930c6d27 Add support for x86 boot flags:
-s boot single user
-a ask root device
XXX -d is ifdef'd out for now, it cause early panic (no console message).
2005-06-15 22:08:08 +00:00
bouyer 48c16dfe5f xen_shm_size isn't patchable because _xen_shm_vaddr2ma[] is static, so
remove comment saying it is. Pointed out by Jed Davis.
2005-06-12 14:59:48 +00:00
sjg aa7b975acd Sometimes .BEGIN target is not wanted - eg in sub-make's. 2005-06-07 18:11:34 +00:00
yamt 84ebe3241f - xen_network_handler: fix transmit stall. (re)start transmit
after collecting tx buffers.
- some assertions.
2005-06-06 11:51:41 +00:00
yamt 6976dba3a6 fix a typo (NETIF_TX_RING_SIZE <-> NETIF_RX_RING_SIZE) 2005-06-06 11:51:02 +00:00
yamt 5c8133c87b privcmd_ioctl: remove unnecessary variable shadowing. 2005-06-01 12:56:02 +00:00
yamt e76114f7e0 appease -Wcast-qual. 2005-06-01 12:05:28 +00:00
yamt 24ca3e95ec sync with i386. (avoid shadowing) 2005-05-31 13:53:15 +00:00
yamt 80d547c255 remove local prototypes of printk. 2005-05-31 12:44:29 +00:00
yamt 457b7ee79b always provide prototype of printk for now. because:
- currently its implementation is always compiled in.
	- there're users which don't honor XENDEBUG.
2005-05-31 12:42:58 +00:00
yamt bcc5a2379e avoid variable shadowing. 2005-05-31 12:36:56 +00:00
yamt 9a13650e12 constify. 2005-05-31 11:57:13 +00:00
yamt 3a00578853 x86_variable_test_bit: don't remove const qualifier unnecessarily. 2005-05-31 04:34:53 +00:00
christos f6b4c20f18 s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name. 2005-05-31 04:03:08 +00:00
chs b0a8a83e7b remove vestigal {,e}intr{names,cnt} symbols now that vmstat doesn't need them. 2005-05-31 00:45:02 +00:00
chs 94622623d8 in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
2005-05-29 15:56:59 +00:00
bouyer 45d876eaeb Reset the microtime state in inittodr(), so that the next clock tick will
initialise the microtime state again. it was initialised at the first
clock tick before time of day was set. Should fix port-xen/29846.
Also, try harder to call microset() once a second; the clock interrupt handler
can be called more often than HZ in some case.
2005-05-27 22:02:25 +00:00
bouyer 7a5d07454c Always call the xpq_queue*() functions at splvm(), so that it's safe to call
them from interrupt context.
xpq_flush_queue() is called from IPL_NET in if_xennet.c, and
other xpq_queue* functions may be called from interrupt context via
pmap_kenter*(). Should fix port-xen/30153.
Thanks to Jason Thorpe and YAMAMOTO Takashi for enlightments on this issue.
2005-05-26 13:54:43 +00:00
yamt b0bd23fffb privcmd_ioctl: don't abuse errno for IOCTL_PRIVCMD_INITDOMAIN_EVTCHN.
renumber the ioctl and keep the old one for compatibility.
PR/30027.
2005-05-24 12:07:12 +00:00
bouyer 1e58e4ef41 - There is a possible race condition with the rx->event stuff, causing
event not to be sent when one is needed. Fixing this would require
  one hypercall per packet, instead of one per NB_XMIT_PAGES_BATCH pages.
  It's not worth it, so always send an event at the end of xennetback_ifstart()
- there is no callback mechanism to notify us when a guest has handled
  packets we sent. If we stop transmitting because the ring is full or we're
  out of pages when the ifq is also full, nothing will call
  xennetback_ifstart() again and transmit is stalled. Abuse the watchdog
  to kick the transmit queue once second after an out of ressources
  condition.
2005-05-18 16:19:23 +00:00
bouyer 2d6b318a94 Reorder the receive code to avoid a possible race with the sc_rx->event
stuff, and fix a possible infinite loop in case of ressource shortage.
2005-05-18 16:11:32 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
yamt 4657218e21 arch/i386/i386/linux_trap.c -> arch/x86/x86/linux_trap.c 2005-05-16 12:05:50 +00:00
bouyer 89e3f91e8d Remove obsolete file missed from the bouyer-xen2 merge.
Pointed out by YAMAMOTO Takashi.
2005-05-12 22:28:54 +00:00
yamt 8595c9071a add no_instrument_function attribute to hypervisor_force_callback
because it's used from mcount.  kernel profiling now works.
2005-05-11 13:53:41 +00:00
yamt 7c723859bb s/ENTRY/NENTRY/ where appropriate. 2005-05-11 13:52:32 +00:00
bouyer 2af19a98f8 Remove some debug printf(), and #ifdef DEBUG some others. 2005-05-10 20:36:01 +00:00
yamt dfc745b200 include atomic.h for x86_atomic_setbits/clearbits_l. 2005-04-30 08:37:16 +00:00
yamt 0a93637210 xennetback_ifstart: test a correct variable, rather than a function. 2005-04-28 18:28:00 +00:00
yamt d9e14a772f rename do_event to evtchan_do_event.
the former is too generic name and it actually hides a bug in xennetback.
2005-04-28 18:26:26 +00:00
lukem 3fd1802e62 Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
2005-04-25 15:02:02 +00:00
yamt 1ceedf04a2 don't use block scope static function decl. found by gcc4. 2005-04-22 14:47:39 +00:00
bouyer 4fe12d1c70 Add polling support to the domain controller. Use this in xencons instead
of relying on the fact that the domain controller is still getting interrupts
when xenconscn_getc()/xenconscn_putc() is called.
Now that polling is fixed, move IPL_CTRL down between IPL_SOFTSERIAL and
IPL_TTY, fixing port-xen/29999 by YAMAMOTO Takashi.
Now that IPL_CTRL is low enouth, remove the softintr stuff from the
domain controller, and call wakeup() directly.

Thanks to YAMAMOTO Takashi and Christian Limpach for feedback and suggestions.
2005-04-20 22:01:24 +00:00
bouyer 6970747e8e 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.
2005-04-20 14:48:29 +00:00
xtraeme 480fde49a6 Fix typo (vitual -> virtual) 2005-04-20 07:59:21 +00:00
bouyer fe7cc0abe1 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.
2005-04-19 22:14:30 +00:00