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

Re: [Xen-users] How to access SM BUS/I2C device from guest VM

Thanks Ian.
In our hardware EEPROM,CPLD (I2C/SM bus) devices are connected to PCIe bridge.
01:00.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12T3G2 PCI Express Gen2 Switch (rev 01)
02:02.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12T3G2 PCI Express Gen2 Switch (rev 01)
02:04.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12T3G2 PCI Express Gen2 Switch (rev 01)

| IDT PCIe bridge |
         Â|  ÂI2C/SM BUS
       Â| ÂCPLD |

How to access I2C/SM bus device which is connected to a PCIe bridge device from the Guest VM.
In DOM0, I am accessing I2C device via 01:00.0 PCI config space.
I would like to passthrough 01:00.0 device to guest vm and access I2C/SM bus device from Guest VM

xl.cfg(5) is it file name ?, In my system xl.cfg is present.
## Global XL config file ##

# Control whether dom0 is ballooned down when xen doesn't have enough
# free memory to create a domain. Â"auto" means only balloon if dom0
# starts with all the host's memory.

# full path of the lockfile used by xl during domain creation

# default output format used by "xl list -l"

# first block device to be used for temporary VM disk mounts

# default option to run hotplug scripts from xl
# if disabled the old behaviour will be used, and hotplug scripts will be
# launched by udev.

# default backend domain to connect guest vifs to. This can be any
# valid domain identifier.

# default gateway device to use with vif-route hotplug script

# default vif script to use if none is specified in the guest config

# default bridge device to use with vif-bridge hotplug scripts

# Reserve a claim of memory when launching a guest. This guarantees immediate
# feedback whether the guest can be launched due to memory exhaustion
# (which can take a long time to find out if launching huge guests).
# see xl.conf(5) for details.


On Tue, Mar 3, 2015 at 7:32 PM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
On Mon, 2015-03-02 at 11:31 +0530, Nagesh Lagishetty wrote:
> Hi,
> I am using xen-4.4.2.
> Host : Ubuntu (12.04)
> Guest vm : ubuntu (12.04)
> I have to access/control a I2C device from Guest VM, how to access it?
> At the time of ubuntu guest VM boot, I am seeing a message as SM BUS
> controller not enabled.
> Target is to access the I2C device from guest VM.
> I am able to access the I2C/SM bus devices from Dom 0, but I need to
> access the same from DomU.
> Please help me on this issue.

Depending how the device is actually wired onto the system you either
want pci passthrough (to expose the controller) or to make the relevant
ioports/iomem/irqs available to the guest. See xl.cfg(5) pci=, iomem=,
irq= and ioports=.

In the case of PCI passthrough there is also a page on the wiki.


Xen-users mailing list



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