WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

RE: [Xen-users] DVD - Recorder in DomU

To: riedel@xxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] DVD - Recorder in DomU
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Thu, 17 Aug 2006 11:33:10 +0200
Delivery-date: Thu, 17 Aug 2006 02:34:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1155804364702.riedel@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbB2bJNAQG9LM03SzKELjUs7uQPnAABQNdw
Thread-topic: [Xen-users] DVD - Recorder in DomU
 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> riedel@xxxxxxxxxx
> Sent: 17 August 2006 10:46
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] DVD - Recorder in DomU
> 
> Hi everybody,
> 
> I'd like to get my DVD - Recorder to work out of a DomU. 
> Therefor I'd need to
> hide the recorder from DomO. The thing is, that it is plugged 
> to the IDE
> adaptor and I need the other disk visible in Dom0. 
> Is there a possibility to just handover the primary master 
> (or sec. slave or
> what ever)?

Not trivially, if the device is the same PCI device, it's not going to
be handed over as part of a device. I don't know if the two IDE
controllers would appear as different or same device (assuming you have
IDE1 and IDE2 [or IDE0 and IDE1])...  You definitely can't hand over a
slave vs. master, since they are actually using the same port. Bit 4 in
register (base + 6) is used to determine if a command goes to master or
slave. 

Obviously, sharing the same device between domains doesn't work unless
there's some hand-shaking/locking/control between the domains to support
this - which there isn't any between Dom0 and DomU. 

Imagine this:

Dom0 decides to save something to hard-disk, so it writes to IDE
controller registers:
1f2, 1f3, 1f4, 1f5, 1f6 and 1f7. 

But in the middle of that, an interrupt causes DomU to be scheduled, and
DomU is also trying to write commands to the IDE controller... Since
it's using the same base-address, 1f0-1f7 for the commands, it's going
to end up in the same registers. 

So, let's say the interrup happens between 1f6 and 1f7 in the above
sequence. So DomU then writes the entire sequence, including the
comamand and reads/writes the data to the device... Then, Dom0 gets
scheduled back in to perform the final 1f7 write - which is the actual
command to the device - but now all the data of which sector and which
device is all wrong (presumably DomU weren't writing to exactly the same
sector, and certainly not the same device!). 

I don't know how it works to hand over a secondary IDE controller, if it
can be done at all. 

--
Mats
> 
> Thanks a lot,
> 
>                Nicolas Riedel
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
> 
> 
> 



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

<Prev in Thread] Current Thread [Next in Thread>