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

Re: [Xen-devel] Qemu upstream drive question



On Thu, Feb 16, 2012 at 8:13 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Thu, 2012-02-16 at 10:53 +0000, Daniel Castro wrote:
>> Hello All,
>>
>> When a HVM guest is started upstream qemu presents the emulated drives
>> as PCI devices or ata drives?
>
>> If more than drive is present how can I know which drive is which in 
>> xenstore?
>
> Emulated devices do not appear in xenstore.
>
> Some PV devices may have an emulated equivalent but the rule of thumb is
> that an OS should only use either PV or Emulated devices and not mix and
> match.
>
> In Linux we implement this by requiring that the emulated devices are
> unplugged before we will use the PV path.
>
> In principal you can infer which Emulated device might matches a PV
> device, the file docs/misc/vbd-interface.txt in the xen tree gives some
> hints about this, but basically PV disks 0..3 can correspond to the
> first four IDE devices (primary-master, primary-slave, secondary-master
> & secondary-slave).
>
> I presume you are asking in the context of SeaBIOS. In that context you
> could argue against unplugging because the guest OS may want to use
> emulated devices, however I would suggest that for simplicity for time
> being you just unplug the emulated devices before you enable the PV
> path.
Thanks for the response Ian, I am not sure I understand you. What I do
is something similar to this:
Find the emulated devices. ATA Devices are the drives and the PCI
device is for what?
Find if the device is a disk. (in the context of a vbd the xenstore id
corresponds to what?)
If disk, then find corresponding entry on xenstore. Example
device/vbd/832, device/vbd/985
Change state of device. (This step means unplug?)
Write device details to xenstore -rings, ref, etc
Write in Seabios device details -size, CHS, etc.
Change status in xenstore to plug the PV device
Device is ready to use.


Thanks for your very useful information.
>
> Ian.
>
>



-- 
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |
+-------------------------------------+

_______________________________________________
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®.