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

[Xen-devel] [RFC][PATCH 0/6] HVM PCI Passthrough (non-IOMMU)


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Guy Zana" <guy@xxxxxxxxxxxx>
  • Date: Thu, 31 May 2007 19:04:16 -0400
  • Delivery-date: Thu, 31 May 2007 16:05:17 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acej2ANIHj0e4HFgRwSUi2VMdgXlmQ==
  • Thread-topic: [RFC][PATCH 0/6] HVM PCI Passthrough (non-IOMMU)

The following patches can be applied cleanly to C/S 15011 (unstable).

They provide HVM PCI Pass-through for non-IOMMU based machines. 
In order to support DMA, a single HVM, called NativeDom, has its P2M
table 
populated in a 1:1 fashion, where each gpfn==mfn.

* Tested on 32bit Windows and Linux operating systems based HVMs.
* Dom0/Xen is compiled in x86_32 mode. 
* Only level-triggered interrupts are supported in this version, this is
good 
  for most PCI devices.
* Edge-triggered interrupts should be easily supported by just asserting
them
  when they are raised - this is not implemented in this patch.

To test the patches, you'll have to change some hard-coded parts in the
code:
    * The bus, device and function of the device that you are going to
allocate 
      for NativeDom (pass-through.h)
    * The pt_init() function (pass-through.c) currently programmed to do

      pass-through for 3 USB devices on the DQ965GF desktop,
      change it as you wish.
    * You'll have to hide the device that you are giving to the HVM so
dom0 
      doesn't use it. Use the pciback kernel parameter in order to do
so.

The files are organized as follows:

1) conf.patch   - Some changes to the general configuration files.
2) misc.patch   - Some global changes & fixes
3) 1to1.patch   - Provides the new memory layout and the allocator that 
                  support it.
4) int.patch    - Interrupts binding / injecting.
5) ioemu.patch  - Changes to the device model, provides PCI
configuration 
                  updates, BAR emulation and PIO/MMIO access functions,
which 
                  should be moved to the Hypervisor, but we suggest to
keep 
                  them for debugging purposes)
6) libpci.patch - A library to access the PCI config space, probe the
bus for 
                  devices, etc. It is basically a copy & paste from the
libpci 
                  app, with some additions.

Please see our presentation:
http://www.xensource.com/files/xensummit_4/Neocleus_HVM_PCI_Pass-through
_Zana.pdf


Thanks,
Guy.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.