Commit Graph

314 Commits

Author SHA1 Message Date
jld
2e34cd0e5e Add some missing memory barriers I noticed.
Discussed on port-xen.
2006-03-17 06:04:24 +00:00
bouyer
14e4157f2e Add a xenbus_read_ul() which reads a node and convert it to unsigned long.
Make xenbus_switch_state() and xenbus_read_driver_state() do something usefull.
2006-03-16 23:08:08 +00:00
bouyer
62b855014e m_copyback() doesn't work the way I expexted it: it doesn't update the
mbuf fields, and it seems it doesn't allocate mbuf clusters for large
packets. So revert to using MCLGET() if needed and memcpy to get the
data in the mbuf.
Should fix panic in m_makewritable() reported by Mike M. Volokhov
and Andreas Wrede on port-xen, patch tested by Andreas Wrede.
2006-03-16 23:02:50 +00:00
bouyer
aceceafca7 Implement watch of xenstore nodes, and install watches for otherend'state
node.
2006-03-15 22:20:06 +00:00
drochner
47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
dyoung
fe756b012b config(8) creates opt_ah.h, no need to do so here. 2006-03-08 17:06:07 +00:00
jld
25ab6c9464 Improve timekeeping under Xen. Specifically, replace use of
cc_microtime with a MD function that isn't affected by erratic "clock
interrupts" and instead takes more advantage of time information
provided by the hypervisor.  Fixes, most importantly, a case where the
clock as seen by userland would sometimes bounce back and forth by up to
1<<31 us (~35 min).

Approved by bouyer@; explained in more detail in
http://mail-index.netbsd.org/port-xen/2006/02/28/0002.html
2006-03-07 23:08:14 +00:00
bouyer
028c20dba6 Adapt for recent changes in UVM. 2006-03-06 22:10:28 +00:00
bouyer
be18814951 Fix build issues that didn't show up in my private tree. 2006-03-06 22:04:18 +00:00
bouyer
2e3fa7a73a Add a Xen Virtual Network device driver for Xenbus. 2006-03-06 20:36:12 +00:00
bouyer
60d4a96e28 pull in the grant table and Xenbus interfaces, and attach xenbus at hypervisor. 2006-03-06 20:34:09 +00:00
bouyer
8adab3e01b Map the XenStore shared page for non-domain0. 2006-03-06 20:32:28 +00:00
bouyer
f0dc72de02 Implement granttables operations. 2006-03-06 20:30:40 +00:00
bouyer
636656c40d Xenbus public functions 2006-03-06 20:29:52 +00:00
bouyer
1604640823 Adapt for NetBSD and add glue for config(9). Enough to get guest domain
virtual devices probed and attached, domain0 and xenstore watch needs to
be done.
2006-03-06 20:21:35 +00:00
bouyer
ed3fe49dd5 Import xenbus sources, from linux sparse tree in the 20060107 xen-3.0
snapshot.
2006-03-06 20:16:33 +00:00
bouyer
df06d5bae0 Add back a cn_check_magic() call which was commented out by mistake in
previous commit.
2006-03-06 20:12:09 +00:00
bouyer
59b2aa00f1 xenconscn_getc(): if xencons_console_device is NULL loop here instead
of in ddb.
2006-03-06 20:10:51 +00:00
bouyer
8508673945 Mark ring indexes as volatile. 2006-03-06 20:00:51 +00:00
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