Commit Graph

295 Commits

Author SHA1 Message Date
bouyer
2e57249e9d Use x86_lfence/x86_sfence instead of linux wmb()/mb() 2006-03-06 20:00:06 +00:00
bouyer
9c7083dfa0 Implement MULTI_update_va_mapping() and MULTI_update_va_mapping_otherdomain(),
which fills in multicall arguments for __HYPERVISOR_update_va_mapping
and __HYPERVISOR_update_va_mapping_otherdomain dealing with
differences between i386 and amd64.
2006-03-06 19:57:31 +00:00
bouyer
fa2d4a51e2 Add xen_atomic_cmpxchg16(), which exports the cmpxchgw instruction to C. 2006-03-06 19:55:47 +00:00
bouyer
198cdcf732 Correct arguments for __HYPERVISOR_set_timer_op 2006-03-06 19:54:50 +00:00
bouyer
e4e15333af Add x86_sfence() for symetry, which is just a __insn_barrier() here. 2006-03-06 19:54:14 +00:00
he
483f1a7d27 Before symlinking opt_ah.h, make sure the target doesn't already exist.
This fixes a build problem with UPDATE set.
2006-03-03 14:55:14 +00:00
thorpej
a4f36d5d21 Use device_is_a(). 2006-02-26 06:17:00 +00:00
thorpej
458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
thorpej
58853410ae Use device_class() instead of accessing dv_class directly. 2006-02-21 04:32:38 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
tron
cbb0e8c88b Share Intel hardware random number generator support between amd64 and
i386 port. This will benefit EM64T systems using Intel i9xx chipsets.
2006-02-12 18:16:01 +00:00
jld
12c1c974f7 Use 64-bit intermediate in get_tsc_offset_ns to avoid overflow.
Discussed (3 weeks ago) on port-xen; okayed by yamt@, bouyer@.
2006-02-03 04:59:03 +00:00
bouyer
86110231a4 Check the destination ethernet address when not in promiscous mode.
Fix problem where packets would be duplicated, possibly looping, when
a domU is doing IP routing.
Problem reported and fix tested by Mike M. Volokhov on port-xen

While there, add some __predict_false/true in conditionnals where
appropriate, remove a always-true test, and fix handling of
mbuf shortage.
2006-02-01 19:12:02 +00:00
bouyer
ea223f367a Fif off-by-one error: the last byte of a packet is at offset len - 1,
not len.
Should fix KASSERT panic reported by Mike M. Volokhov on port-xen.
2006-01-26 19:17:25 +00:00
yamt
3bf197127a merge xen pmap_enter, pmap_enter_ma, pmap_remap_pages.
ok'ed by Manuel Bouyer.
2006-01-23 20:19:08 +00:00
bouyer
4021f3f608 Fix bad cut'n'paste: use the target of strncpy() in sizeof(). 2006-01-22 20:15:51 +00:00
bouyer
87d63b6c1c Remove files not needed in the kernel. 2006-01-20 18:17:59 +00:00
bouyer
8f162b7ed8 Snapshot of work in progress on NetBSD port to Xen3:
- kernel (both dom0 and domU) boot, console is functionnal and it can starts
  software from a ramdisk
- there is no driver front-end expect console for domU yet.
- dom0 can probe devices and ex(4) work when Xen3 is booted without acpi
  and apic support. But the on-board IDE doens't get interrupts.
  The PCI code still needs work (it's hardcoded to mode 1). Some of this
  code should be shared with ../x86
  The physical insterrupt code needs to get MPBIOS and ACPI support, and
  do interrupt routing to properly interract with Xen.
To enable Xen-3.0 support, add
options XEN3
to your kernel config file (this will disable Xen2 support)
Changes affecting Xen-2.0 support (no functionnal changes intended):
- get more constants from genassym for assembly code
- remove some unneeded registers move from start()
- map the shared info page from start(), and remove the pte = 0xffffffff hack
- vector.S: in hypervisor_callback() make sure %esi points to
  HYPERVISOR_shared_info before accessing the info page. Remplace some
  hand-written assembly with the equivalent macro defined in frameasm.h
- more debug code, dissabled by default.

while here added my copyright on some files I worked on in 2005.
2006-01-15 22:09:51 +00:00
bouyer
5e035a6853 Import Xen3 public headers from xen-3.0-testing as of 7 Jan 2006. 2006-01-15 21:42:21 +00:00
yamt
468012e183 privcmd_ioctl: wrap IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD in #ifdef COMPAT_30. 2006-01-14 11:03:35 +00:00
bouyer
3c69e23dad ctrl_if.h isn't needed here. 2006-01-08 19:00:59 +00:00
bouyer
56b1a39e10 Move if_xennet private functions and structures from if_xennetvar.h
to if_xennet.c
2006-01-08 14:45:41 +00:00
bouyer
4f02289d67 Make stts a no-op as clts already is
Always call HYPERVISOR_fpu_taskswitch() at the end of npxsave_lwp().

This fixes the FPU problems detected by paranoia on a NetBSD/Xen guest.
Based on patch sent by Paul Ripke on port-xen, but reworked by me.
Should fix port-xen/30977.
2006-01-03 20:18:51 +00:00
jmmv
eb23406894 Add a 'struct bootinfo' to represent the bootinfo structure used in the
kernel by x86 platforms (instead of a simple char *).  This way, the code
in, e.g., lookup_bootinfo, is a bit easier to understand.

While here, move the lookup_bootinfo function used in x86 platforms (amd64,
i386 and xen) to a common file (x86/x86_machdep.c), as it was exactly the
same in all of them.
2005-12-30 13:37:57 +00:00
perry
2d542ba1f8 inline -> __inline 2005-12-28 19:09:29 +00:00
yamt
9297401d54 - add ioctls to set/get disk bufq strategy.
- implement them for some drivers.
2005-12-26 10:36:47 +00:00
perry
50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
yamt
50c06dae27 xennet_softstart: turn "xennet: no mbuf cluster" printf to DPRINTF. 2005-12-15 13:45:32 +00:00
yamt
6b6b3253b2 fix a compilation problem after ktrace-lwp merge. 2005-12-13 08:24:30 +00:00
jld
341dd78856 Make xenevt.c compile after lwp changes; not tested yet. 2005-12-12 22:56:50 +00:00
christos
24ecd917a6 change a_p -> a_l->l_proc [untested] 2005-12-12 20:06:22 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
30e4cf555e remove xen-specific ddb_trap_hook.
you can use DDB_COMMANDONENTER="tr;sh re" to achive the similar behaviour.
2005-11-26 12:19:53 +00:00
yamt
bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
yamt
73ad976942 simplify memory layout. 2005-11-22 06:18:01 +00:00
bouyer
c59d1285cc Sync with i386/conf/GENERIC:
- add a buch of PCI storage devices
- add firewire devices
- add some missing PCI network devices
- add serial and parallel PCI adapters
- add lpt0 at isa
- add com1 at isa
  com0 not added for the benefit of serial console users (it will conflicts
  with the Xen kernel).
XXX this means that setups with serial console on com1 will now break with the
default kernel.
Use userconf(4) (add -c to kernel command line) or change your setup to
com0 instead (most bios allows arbitrary mappings of com ports)
2005-11-21 22:15:13 +00:00
jld
55b8d39e63 Correct minor precedence mistakes in updates to pm_stats.wired_count 2005-11-16 22:41:20 +00:00
yamt
4868e1f967 add missing IPL_SOFTXENEVT.
pointed by Hisashi T Fujinaka on current-users@.
2005-11-08 22:57:30 +00:00
yamt
06cf1c7649 copy.S should belong to MD_SFILES, not MD_CFILES. 2005-11-08 01:02:39 +00:00
yamt
443e88c5cf some assym cleanup.
- move copyin and friends from locore.S to their own file, copy.S.
  share it between i386 and xen.
- defparam KERNBASE and kill KERNBASE_LOCORE hack.
- add more symbols to assym.h and use it where appropriate.
2005-11-07 11:42:34 +00:00
yamt
83c44381ee Xsoftnet: remove an unnecessary assignment. 2005-11-07 08:52:07 +00:00
yamt
06085e8f52 - use sys/spl.h.
- add some IPL_ definitions.
2005-11-03 13:06:06 +00:00
yamt
0416d5be24 add splraiseipl(). 2005-10-29 11:07:45 +00:00
yamt
54007a40c0 remove duplicated spllpt(). 2005-10-28 10:34:18 +00:00
yamt
464cf44f6c dksubr: do b_blkno -> b_rawblkno translation earlier so that bufq can uses it. 2005-10-18 00:14:43 +00:00
yamt
aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
bouyer
65679198a8 Also remove pkt_next now that packets are not recorded in a per-page list. 2005-10-08 20:23:59 +00:00
bouyer
0e12d49f1c If a domain has more than one interface, a page can hold packets for different
xennetback instances. To support this, more fields from xni_page to xni_pkt.
This would also have the effect to move more code into the
while (!SLIST_EMPTY(&pkt_page->xni_pkt_head)) loop in xennetback_tx_free().
By passing xni_pkt instead of xni_page to xennetback_tx_free we can
avoid the loop, and the xni_pkt_head list completely. There is even a sligh
performance increase if the domU deals with xni_txring->event properly.

Based on comments from YAMAMOTO Takashi.
2005-10-08 20:22:05 +00:00
bouyer
181bca1deb Fix problem pointed out by YAMAMOTO Takashi:
In theory mbufs can have an infinite life time and could block the transmit
ring (as slots are released when the mbuf external storage is freed). To
avoid this, when we're processing the last slot of the ring copy the buffer
and release the slot immediatly.
2005-10-03 22:15:44 +00:00