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-devel

RE: [Xen-devel] disable qemu PCI devices in HVM domains

To: "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] disable qemu PCI devices in HVM domains
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Fri, 12 Dec 2008 09:06:30 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 11 Dec 2008 14:06:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18753.21669.490034.489140@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D0154FF52@trantor><C5668895.20147%keir.fraser@xxxxxxxxxxxxx><AEC6C66638C05B468B556EA548C1A77D0154FF67@trantor> <18753.21669.490034.489140@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aclbuhoqr0BLOGEhQ/CaC00xxoX3kAAIV93g
Thread-topic: [Xen-devel] disable qemu PCI devices in HVM domains
> 
> James Harper writes ("RE: [Xen-devel] disable qemu PCI devices in HVM
> domains"):
> > Basically, I use ioports 0x10-0x1F for communication.
> 
> You seem to mean thedse absolute addresses in IO space ?  Rather than
> offsets in the Xen platform device, for example ?

Yes. Under the current scheme I need to disable the other PCI devices
before the platform pci device is enumerated.

> And your driver is
> going to write, blind, into these locations ?

No. A read is done first to check for some magic bytes.

> Surely that risks
> causing problems if your driver is run in a situation where those
> ports are used for something else ?

Perhaps, but under Xen+qemu we have a tightly controlled situation where
that is unlikely, I would have thought. Perhaps you have a situation in
mind where this would be a problem? Would a passed-through pci device
ever try and use these ports? If I had allocated them in qemu then
wouldn't pci passthrough avoid them?

> I like the principle of disabling the drivers via an instruction to
> qemu rather than by attempting to wrestle with the Windows driver
> machinery to try to hide the devices.  But couldn't we simulate a PCI
> unplug or a medium change or something instead ? Then you could do it
> later in the boot after your own drivers have properly bound.
> 
> And presumably the instrunction to do so should be given via the Xen
> PCI platform device ?
> 

Possibly. A hot unplug could work too, but it would need to happen after
windows had enumerated all the pci devices (if done from platform pci)
but before windows had enumerated and started using the ide devices.
Remember that windows is closed source and therefore is a huge pita when
trying to do something they hadn't thought of, like make something
happen at a very specific point during boot.

> Also, what if the user wants (for some reason) to use PV drivers for
> disk but emulated-real-hardware drivers for network, or something ?

I could allow for that - just set up the disable flag as masks instead.
The previous 'xenhide' windows driver scheme allowed that, but it was
seldom used. With the exception of a user trying to avoid a bug in the
PV drivers (in which case time would be better spent fixing the bug than
implementing a mechanism to avoid it) the only time it would be useful
is for when a CDROM is used - blkback doesn't have a mechanism for
ejecting physical CDROM devices. Unfortunately the latter would be even
harder as the CDROM is not a PCI device itself, and at the PCI device
level we don't know what is going to be attached...

James


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