All of lore.kernel.org
 help / color / mirror / Atom feed
* what the role platform-pci play in comunication between HVM and domain0
@ 2010-09-13 14:49 胡少龙  
  2010-09-13 23:46 ` what the role platform-pci play in comunication betweenHVM " James Harper
  0 siblings, 1 reply; 2+ messages in thread
From: 胡少龙   @ 2010-09-13 14:49 UTC (permalink / raw)
  To: xen-devel

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?

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. 

Hu shaolong




^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: what the role platform-pci play in comunication betweenHVM and domain0
  2010-09-13 14:49 what the role platform-pci play in comunication between HVM and domain0 胡少龙  
@ 2010-09-13 23:46 ` James Harper
  0 siblings, 0 replies; 2+ messages in thread
From: James Harper @ 2010-09-13 23:46 UTC (permalink / raw)
  To: 胡少龙  , xen-devel

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-13 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 14:49 what the role platform-pci play in comunication between HVM and domain0 胡少龙  
2010-09-13 23:46 ` what the role platform-pci play in comunication betweenHVM " James Harper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.