All of lore.kernel.org
 help / color / mirror / Atom feed
* fail to register IRQ for virtualization exception
@ 2016-09-02  2:59 Big Strong
  2016-09-02  7:52 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Big Strong @ 2016-09-02  2:59 UTC (permalink / raw)
  To: xen-devel, Jan Beulich, Tamas Lengyel


[-- Attachment #1.1: Type: text/plain, Size: 837 bytes --]

Hello.

I'm recently trying to utilize the virtualization exception (#VE) feature.
As the document says, #VE is handled by guest interrupt handler. The IRQ
number of #VE is 20. However, when I tried to register an IRQ handler for
#VE, it returns errno -22, which means invalid arguments.

request_irq(20, ve_handler, IRQF_NO_SUSPEND, "ve", NULL)

Is there anything wrong?

To handle this system reserved exception, should I modify the linux kernel
instead of using loadable kernel module (LKM)? As the IRQ number 20 is not
defined in linux kernel (traps.h), also no exception handling function is
defined (traps.c). As it is defined as a system reserved exception, so I
can't register it using LKM?

BTW, I've already enabled #VE feature using HVMOP_altp2m_vcpu_enable_notify.

The attachment is the definition of #VE from Intel Manual.

[-- Attachment #1.2: Type: text/html, Size: 5685 bytes --]

[-- Attachment #2: 20160902105041.png --]
[-- Type: image/png, Size: 52793 bytes --]

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: fail to register IRQ for virtualization exception
  2016-09-02  2:59 fail to register IRQ for virtualization exception Big Strong
@ 2016-09-02  7:52 ` Jan Beulich
  2016-09-02  8:35   ` Big Strong
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2016-09-02  7:52 UTC (permalink / raw)
  To: Big Strong; +Cc: Tamas Lengyel, xen-devel

>>> On 02.09.16 at 04:59, <fangtuo90@gmail.com> wrote:
> I'm recently trying to utilize the virtualization exception (#VE) feature.
> As the document says, #VE is handled by guest interrupt handler. The IRQ
> number of #VE is 20. However, when I tried to register an IRQ handler for
> #VE, it returns errno -22, which means invalid arguments.
> 
> request_irq(20, ve_handler, IRQF_NO_SUSPEND, "ve", NULL)
> 
> Is there anything wrong?

You're mixing up exception vectors and IRQ numbers.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: fail to register IRQ for virtualization exception
  2016-09-02  7:52 ` Jan Beulich
@ 2016-09-02  8:35   ` Big Strong
  2016-09-02 12:35     ` Big Strong
  0 siblings, 1 reply; 4+ messages in thread
From: Big Strong @ 2016-09-02  8:35 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Tamas Lengyel, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 674 bytes --]

Sorry for that. Could you give any suggestions on how to register the IRQ
handler for #VE?

2016-09-02 15:52 GMT+08:00 Jan Beulich <JBeulich@suse.com>:

> >>> On 02.09.16 at 04:59, <fangtuo90@gmail.com> wrote:
> > I'm recently trying to utilize the virtualization exception (#VE)
> feature.
> > As the document says, #VE is handled by guest interrupt handler. The IRQ
> > number of #VE is 20. However, when I tried to register an IRQ handler for
> > #VE, it returns errno -22, which means invalid arguments.
> >
> > request_irq(20, ve_handler, IRQF_NO_SUSPEND, "ve", NULL)
> >
> > Is there anything wrong?
>
> You're mixing up exception vectors and IRQ numbers.
>
> Jan
>
>

[-- Attachment #1.2: Type: text/html, Size: 1184 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: fail to register IRQ for virtualization exception
  2016-09-02  8:35   ` Big Strong
@ 2016-09-02 12:35     ` Big Strong
  0 siblings, 0 replies; 4+ messages in thread
From: Big Strong @ 2016-09-02 12:35 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Tamas Lengyel, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 845 bytes --]

Or should I modify the linux kernel to add support for handling #VE
exception?

2016-09-02 16:35 GMT+08:00 Big Strong <fangtuo90@gmail.com>:

> Sorry for that. Could you give any suggestions on how to register the IRQ
> handler for #VE?
>
> 2016-09-02 15:52 GMT+08:00 Jan Beulich <JBeulich@suse.com>:
>
>> >>> On 02.09.16 at 04:59, <fangtuo90@gmail.com> wrote:
>> > I'm recently trying to utilize the virtualization exception (#VE)
>> feature.
>> > As the document says, #VE is handled by guest interrupt handler. The IRQ
>> > number of #VE is 20. However, when I tried to register an IRQ handler
>> for
>> > #VE, it returns errno -22, which means invalid arguments.
>> >
>> > request_irq(20, ve_handler, IRQF_NO_SUSPEND, "ve", NULL)
>> >
>> > Is there anything wrong?
>>
>> You're mixing up exception vectors and IRQ numbers.
>>
>> Jan
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 1660 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-09-02 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02  2:59 fail to register IRQ for virtualization exception Big Strong
2016-09-02  7:52 ` Jan Beulich
2016-09-02  8:35   ` Big Strong
2016-09-02 12:35     ` Big Strong

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.