Skip to contentSkip to conversation

about VIRQ & PIRQ

DISCUSSION Koripella Srinivas 3 participants 3 messages Jun 7, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 2 lines

To understand better, have a look at .../xen/arch/x86/irq.c, and in particular the function __do_IRQ_guest().

But do hvm guests use event channels as used in /xen/arch/x86/irq.c. My thinking was they use emulated pic/apic.

----- Original Message ----
From: "[email protected]" <[email protected]>
To: [email protected]
Sent: Wednesday, 6 June, 2007 8:37:57 PM
Subject: Xen-devel Digest, Vol 28, Issue 52

Send Xen-devel mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Xen-devel digest..."

Today's Topics:

1. RE: FW: about VIRQ & PIRQ (Petersson, Mats)
2. Re: FW: about VIRQ & PIRQ (pradeep singh rautela)
3. Re: [patch 14/33] xen: xen time implementation
(Jeremy Fitzhardinge)
4. Re: troubles using network boot with HVM guest (Guillaume Rousse)
5. Re: troubles using network boot with HVM guest (Tim Deegan)

----------------------------------------------------------------------

Message: 1
Date: Wed, 6 Jun 2007 16:09:06 +0200
From: "Petersson, Mats" <[email protected]>
Subject: RE: [Xen-devel] FW: about VIRQ & PIRQ
To: "pradeep singh rautela" <[email protected]>, "Mark Williamson"
<[email protected]>
Cc: "Gautham Kampalapur Shankar, TLS, Chennai" <[email protected]>,
[email protected]
Message-ID:

    <[email protected]>

Content-Type: text/plain; charset=us-ascii

Quoted 25 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of pradeep singh rautela
Sent: 06 June 2007 09:19
To: Mark Williamson
Cc: Gautham Kampalapur Shankar, TLS, Chennai; [email protected]
Subject: Re: [Xen-devel] FW: about VIRQ & PIRQ

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Mark,
[snip]

Quoted 2 lines

If I recall correctly, PIRQs are mapped one-to-one onto the

lower numbered

Quoted 1 line

event channels (I'm not sure if this is specific to

XenLinux or part of the

Quoted 3 lines

Xen API).

A VIRQ is a interrupt-like event that originates from Xen

itself. An example

Quoted 8 lines
Quoted 1 line

would be notifications from the Xen virtual timer device.

Again, the guest

Quoted 1 line

sees it as an event channel notification but this time we

call it a VIRQ to

Quoted 1 line

show that it comes from an entirely *virtual* source.

Does this means if hypervisor recieves an interrupt from an external card on the behalf of a domU, it actually buffers it like a an APIC before eventually generating a VIRQ to the respective domU?

Yes, essentially so. There is a bitmap for each guest of "pending interrupts", which is read based on an event to the guest.

Quoted 7 lines

The above question is more obvious when we have an external hardware device which generates interrupts are a very high rate e.g a busy network card.

So, does Xen buffers the recieved IRQs if it is unable to send the IRQ to the correct domU?

It is "never unable" to send the IRQ to the guest. The guest may be unable to TAKE the interrupt at this point, but it's never unable for the hypervisor to "send" the IRQ to the guest.

To understand better, have a look at .../xen/arch/x86/irq.c, and in particular the function __do_IRQ_guest().

Quoted 6 lines

I hope same holds true while handling interrupts on the behalf of dom0.
Or is it that, Xen just forwards the interrupt to dom0 which then handles the actual creation of a VIRQ using event channels to notify a domU?

I think I've told you before, Dom0 is no different from any other domain when it comes to how it interacts with the hypervisor, aside from having a bit set that says "You're allowed to do things like creating/destroying other guests". Interrupt handling in Dom0 is exactly identical to any other guest - there is nothing in the above irq.c file that says "if (domain is dom0) ..." (in fact, the only domain_id usage is for a printk in the "dump_irqs" function, which is for dumping the current IRQ state on the console when in Xen console-mode.

--
Mats

Quoted 30 lines

Thank you
- --psr

Quoted 2 lines

There are actually more variations to event channels:

events might also come

Quoted 1 line

from another domain we are communicating with, or (I think)

from another VCPU

Quoted 8 lines

in the same domain.

Hope this helps,
Cheers,
Mark

--
Dave: Just a question. What use is a unicyle with no seat?

And no pedals!

Quoted 1 line

Mark: To answer a question with a question: What use is a

skateboard?

Quoted 8 lines

Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 21 lines

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFGZm36ky6Gd9lpXlERApaLAJ9PHCvWMG8a16m3gNhb2P/dlJMi2QCfbFkN b7sUQ0B9sswcA2gxxsQTdBo=
=YlzF
-----END PGP SIGNATURE-----

Signature · 9 lines
---
pradeep singh rautela

"Genius is 1% inspiration, and 99% perspiration" - not me :)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

------------------------------

Message: 2
Date: Wed, 6 Jun 2007 19:44:08 +0530
From: "pradeep singh rautela" <[email protected]>
Subject: Re: [Xen-devel] FW: about VIRQ & PIRQ
To: "Petersson, Mats" <[email protected]>
Cc: "Gautham Kampalapur Shankar, TLS, Chennai" <[email protected]>,
[email protected], Mark Williamson
<[email protected]>
Message-ID:

    <[email protected]>

Content-Type: text/plain; charset=UTF-8; format=flowed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/6/07, Petersson, Mats wrote:
[snip]

Quoted 13 lines
Quoted 3 lines

Does this means if hypervisor recieves an interrupt from an external card on the behalf of a domU, it actually buffers it like a an APIC before eventually generating a VIRQ to the respective domU?

Yes, essentially so. There is a bitmap for each guest of "pending interrupts", which is read based on an event to the guest.

Quoted 5 lines

The above question is more obvious when we have an external hardware device which generates interrupts are a very high rate e.g a busy network card.

Quoted 6 lines
Quoted 2 lines

So, does Xen buffers the recieved IRQs if it is unable to send the IRQ to the correct domU?

It is "never unable" to send the IRQ to the guest. The guest may be unable to TAKE the interrupt at this point, but it's never unable for the hypervisor to "send" the IRQ to the guest.

Yes, messed that up here.

Quoted 11 lines

To understand better, have a look at .../xen/arch/x86/irq.c, and in particular the function __do_IRQ_guest().

Quoted 6 lines

I hope same holds true while handling interrupts on the behalf of dom0.
Or is it that, Xen just forwards the interrupt to dom0 which then handles the actual creation of a VIRQ using event channels to notify a domU?

Quoted 8 lines

I think I've told you before, Dom0 is no different from any other domain when it comes to how it interacts with the hypervisor, aside from having a bit set that says "You're allowed to do things like creating/destroying other guests". Interrupt handling in Dom0 is exactly identical to any other guest - there is nothing in the above irq.c file that says "if (domain is dom0) ..." (in fact, the only domain_id usage is for a printk in the "dump_irqs" function, which is for dumping the current IRQ state on the console when in Xen console-mode.

Thank you Mats.

Regards
- --psr

Quoted 57 lines

--
Mats

Quoted 51 lines

Thank you
- --psr

Quoted 2 lines

There are actually more variations to event channels:

events might also come

Quoted 1 line

from another domain we are communicating with, or (I think)

from another VCPU

Quoted 8 lines

in the same domain.

Hope this helps,
Cheers,
Mark

--
Dave: Just a question. What use is a unicyle with no seat?

And no pedals!

Quoted 1 line

Mark: To answer a question with a question: What use is a

skateboard?

Quoted 8 lines

Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFGZm36ky6Gd9lpXlERApaLAJ9PHCvWMG8a16m3gNhb2P/dlJMi2QCfbFkN b7sUQ0B9sswcA2gxxsQTdBo=
=YlzF
-----END PGP SIGNATURE-----
--
---
pradeep singh rautela

"Genius is 1% inspiration, and 99% perspiration" - not me :)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFGZsEZky6Gd9lpXlERAhXHAJ98OdKCPTGoi3DeKQgTzgkzK8yH7ACdEaJC 6vBKuDO2Ro5+s/o1jQk7AN4=
=jN20
-----END PGP SIGNATURE-----

Signature · 18 lines
---
pradeep singh rautela

"Genius is 1% inspiration, and 99% perspiration" - not me :)



------------------------------









      Download prohibited? No problem! To chat from any browser without download, Click Here: http://in.messenger.yahoo.com/webmessengerpromo.php

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Koripella Srinivas [mailto:[email protected]]
Sent: 07 June 2007 03:46
To: [email protected]; Petersson, Mats; pradeep singh rautela"; Mark Williamson
Subject: Re: FW: about VIRQ & PIRQ

Quoted 6 lines

Hi,

Quoted 2 lines

To understand better, have a look at .../xen/arch/x86/irq.c, and in particular the function __do_IRQ_guest().

But do hvm guests use event channels as used in /xen/arch/x86/irq.c. My thinking was they use emulated pic/apic.

That is correct - the HVM guests use a different principle - although there's still an event-channel for the QEMU to signal to the hypervisor that there's an interrupt pending so that the hypervisor will "look" at the emulated pic/apic.

--
Mats

#2 lore raw
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

To understand better, have a look at .../xen/arch/x86/irq.c, and in particular the function __do_IRQ_guest().

But do hvm guests use event channels as used in /xen/arch/x86/irq.c. My thinking was they use emulated pic/apic.

That is correct - the HVM guests use a different principle - although there's still an event-channel for the QEMU to signal to the hypervisor that there's an interrupt pending so that the hypervisor will "look" at the emulated pic/apic.

Additionally, HVM guests can make use of Xen event channels if paravirtualised driver support is added to them. I'm not sure how they actually interface with the event channels.

For "normal" HVM guests that don't have any Xen-aware software installed in them this is irrelevant.

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!