Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: What has changed in order to bring Dom0 support for NetBSD



On Tue, Jul 26, 2005 at 01:16:24AM +0000, Wojciech A. Koszek wrote:
> Hello,
> Could someone write very short summary of tasks,
> which had to be done in order to get NetBSD/Xen 
> working in Domain 0? 
> 
> I've looked at commit information from the time of
> Manuel Bouyer's branch integration, but this change
> brought not only Dom0 and is hard to analyze.
> 
> PS: I know PCI code needs to be replaced so that it
> calls HYPERVISOR_* instead of directly calling
> priviledged instruction.

Hi,
sorry for not replying sooner, I was on vacation.
>From what I remember, we needed (all this relative to the plain i386 port):
- change the pci_conf_* methods for PCI registers to go though hypervisor
  calls instead of direct registers access (xen/pci_machdep.c)
- change the PCI bus detection method to use the informations provided by
  the hypervisor (xen/hypervisor.c)
- change the interrupt register routine for PCI and ISA devices to use
  the appropriate hypervisor event (xen/pci_machdep.c and xen/isa_machdep.c)
- change the bus_dma(9) methods for deal with physical vs machine addresses
  (include/bus_private.h + tweaks to arch/x86/x86/bus_dma.c)

With this, a domain0 kernel should be able to probe and use the hardware.
Next, you have to write the xbd and network backends. In NetBSD the code is
in xen/xbdback.c and xen/xennetback.c. You also need to write kernel support
for domain0 operations though 2 special files:
/kern/xen/privcmd (xen/privcmd.c)
/dev/xenevt (xen/xenevt.c)
then you need to port the xentools to FreeBSD.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index