[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.
#autoballoon="auto"

# full path of the lockfile used by xl during domain creation
#lockfile="/var/lock/xl"

# default output format used by "xl list -l"
#output_format="json"

# first block device to be used for temporary VM disk mounts
#blkdev_start="xvda"

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

# default backend domain to connect guest vifs to. This can be any
# valid domain identifier.
#vif.default.backend="0"

# default gateway device to use with vif-route hotplug script
#vif.default.gatewaydev="eth0"

# default vif script to use if none is specified in the guest config
#vif.default.script="vif-bridge"

# default bridge device to use with vif-bridge hotplug scripts
#vif.default.bridge="xenbr0"

# 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.
#claim_mode=1

Thanks
Nagesh

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.

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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