Commit Graph

227 Commits

Author SHA1 Message Date
bouyer
e6a6daf84f Fix a memory leak. Thanks to YAMAMOTO Takashi for the notice. 2005-08-22 11:04:10 +00:00
bouyer
d342a7617e Define a xendevbus atttibute and add it to hypervisor. Use it for xen devices
which attach to hypervisor. This allows to use config_found_ia() instead of
config_found(), instead of relying on the order of which device are
written in ioconf.c.
From Quentin Garnier.
2005-08-21 22:20:28 +00:00
yamt
6788570f66 xen_parse_cmdline:
- use BOOT_FLAG macro.
- allow RB_KDB because it works fine, depending on type of console.
2005-08-21 13:15:43 +00:00
yamt
1a3bee2634 - count if_opackets correctly.
- reflect tx errors to if_oerrors.
2005-08-21 13:12:59 +00:00
bouyer
cd1cc7810a Also properly check the alignement and boundary constraints. 2005-08-20 20:06:24 +00:00
bouyer
0944c0fa9d Deal with the machine address space being non-contigous in bus_dmamem_alloc():
- Define _BUS_AVAIL_END to 0xffffffff, as we don't have an easy way to
  find the upper bound for our machine address space (and this can change
  when we swap pages with the hypervisor).
- implement _xen_bus_dmamem_alloc_range(), which will request a contigous
  set of pages to the hypervisor if the pages returned by uvm_pglistalloc()
  don't fit the constraints.
We can't deal with the low/high constraints yet, because Xen doesn't offer a
way to get pages in a specific ranges of addresses.

Based on patches from Dave Thompson (in private mail), with heavy hacking
by me.
2005-08-20 19:30:37 +00:00
bouyer
54ecd3d8a1 Implement xpq_queue_machphys_update(), which queues a request to
update the machine to physical table (to be used after a
MEMOP_increase_reservation).
2005-08-20 19:20:54 +00:00
yamt
5cb036f6e3 add wedge support to xbd and cgd. 2005-08-20 12:03:52 +00:00
bouyer
41b1abf49b Provide a PCI_MACHDEP_ENUMERATE_BUS to the MI pci system. We can't use
the generic pci_enumerate_bus() in Xen because the hypervisor may
hide the function 0, but give access to other functions of the same device
and pci_enumerate_bus() will stop if function 0 isn't available.
2005-08-19 17:17:53 +00:00
bouyer
fa7d49200e Make PCI devices usable for non-domain0 kernels. Based on patches sent by
Ceri Storey to port-xen, with some additionnal changes by me:
- include bus_dma.c, bus_space.c and pci_machdep.c if pci is defined
  instead of dom0ops
- Make various initialisations, and probe/attach pci busses based on NPCI
  instead of DOM0OPS
- in conf/files.xen, move xen-specific devices before non-xen specific devices
  so that the xen-specific match function is called first, to avoid false
  attachement from too liberal match function in non-xen code.
2005-08-19 16:06:12 +00:00
cube
9f1eb3e30f Change all archs that did:
#define clockframe somethingelse

to:

struct clockframe {
	struct somethingelse cf_se;
};

and change access macros accordingly.

That means that, at least for that very issue, things will not go
ka-boomy if you don't have the actual definition of struct clockframe
before including systm.h.
2005-08-11 20:32:55 +00:00
yamt
afdf806bac wrap some code with #if defined(NFS_BOOT_BOOTSTATIC). 2005-08-07 04:54:58 +00:00
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