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] what the role platform-pci play in comunication betweenH

To: 胡少龙 <sunofblack@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] what the role platform-pci play in comunication betweenHVM and domain0
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Tue, 14 Sep 2010 09:46:05 +1000
Cc:
Delivery-date: Mon, 13 Sep 2010 16:46:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <315107.73827.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <315107.73827.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActTVXoFGEzo5k2ITemnlfgdGHdf3QARqh+A
Thread-topic: [Xen-devel] what the role platform-pci play in comunication betweenHVM and domain0
> Hi,
> 
> Can someone interpret how HVM guest communicate with domain0, as i know, H VM
> can not use event channel directly, is the platform-pci offer a way to solve
> this?
> 

Reading the source is the best way to understand this.

> Please try to explain concretely, for example :
> 
> 1.how does HVM send a event to domain0, how does domain0 catch this event, and
> assoicate it with a handler
> 
> 2.the opposite direction, how does domain0 send event to HVM guest? Does it do
> something through the platform-pci? what the platform-pci does first? Does it
> create a virtual pci device? Then does domain0 send event to this pci device
> to fire a interupt ? How does it do this? Finally, I just need to deal with
> this interupt?
> 
> Something like that, i hope someone can give a detailed depiction that can
> make me draw a flow chart. Thanks.
> 

The platform PCI device is used firstly to tell the DomU that it is a HVM domU, 
and to give the driver something to attach to. The interrupt attached to the 
PCI device is used by xen to signal the DomU. The order of initialisation is 
something like:

. DomU OS loads the PV driver (because the driver is registered against the PCI 
device)
. DomU PV driver requests that Xen copy the hypercall entry points to a page of 
memory (via an msr write).
. DomU PV driver tells Xen which IRQ to use for event channel notification 
(from the PCI device configuration space)
. DomU PV driver sets up the grant tables and event channels
. DomU PV driver initialises xenbus
. DomU PV driver initialises other PV drivers (disk, net, etc)

DomU->Dom0 event signalling is done via a hypercall (same as PV DomU)
Dom0->DomU event signalling is done via the platform PCI IRQ

I'm sure that people on the list will be happy to answer specific questions but 
asking for detailed explanations might not get an answer - in order for you to 
do something useful with that information you'll need to understand the source 
code anyway so you might as well start from there :)

James


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

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