* [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
@ 2010-09-14 13:51 Bernhard Kohl
2010-09-29 20:36 ` Marcelo Tosatti
2011-02-07 9:42 ` Jan Kiszka
0 siblings, 2 replies; 6+ messages in thread
From: Bernhard Kohl @ 2010-09-14 13:51 UTC (permalink / raw)
To: kvm; +Cc: Bernhard Kohl
The setting of the irq0override flag must be also passed properly
to the KVM_IRQCHIP_IOAPIC.
Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
---
qemu-kvm-x86.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index fd974b3..e35c234 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void)
}
}
for (i = 0; i < 24; ++i) {
- if (i == 0) {
+ if (i == 0 && irq0override) {
r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
- } else if (i != 2) {
+ } else if (i != 2 || !irq0override) {
r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
}
if (r < 0) {
--
1.7.2.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
2010-09-14 13:51 [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing Bernhard Kohl
@ 2010-09-29 20:36 ` Marcelo Tosatti
2011-02-07 9:42 ` Jan Kiszka
1 sibling, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2010-09-29 20:36 UTC (permalink / raw)
To: Bernhard Kohl; +Cc: kvm
On Tue, Sep 14, 2010 at 03:51:40PM +0200, Bernhard Kohl wrote:
> The setting of the irq0override flag must be also passed properly
> to the KVM_IRQCHIP_IOAPIC.
>
> Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
> ---
> qemu-kvm-x86.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
2010-09-14 13:51 [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing Bernhard Kohl
2010-09-29 20:36 ` Marcelo Tosatti
@ 2011-02-07 9:42 ` Jan Kiszka
2011-02-07 10:12 ` Marcelo Tosatti
2011-02-07 10:17 ` Bernhard Kohl
1 sibling, 2 replies; 6+ messages in thread
From: Jan Kiszka @ 2011-02-07 9:42 UTC (permalink / raw)
To: Bernhard Kohl; +Cc: kvm, Marcelo Tosatti
Hi Bernhard,
On 2010-09-14 15:51, Bernhard Kohl wrote:
> The setting of the irq0override flag must be also passed properly
> to the KVM_IRQCHIP_IOAPIC.
>
> Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
> ---
> qemu-kvm-x86.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
> index fd974b3..e35c234 100644
> --- a/qemu-kvm-x86.c
> +++ b/qemu-kvm-x86.c
> @@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void)
> }
> }
> for (i = 0; i < 24; ++i) {
> - if (i == 0) {
> + if (i == 0 && irq0override) {
> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
> - } else if (i != 2) {
> + } else if (i != 2 || !irq0override) {
> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
> }
> if (r < 0) {
While cleaning up the irq0override fragments, I stumbled over this
commit. It is a nop for qemu-kvm, today and also by the time it was applied:
irq0override = !kvm_irqchip || kvm_has_gsi_routing
But, for obvious reasons, the code above is only executed when gsi
routing is available.
Can you remember what motivated this patch?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
2011-02-07 9:42 ` Jan Kiszka
@ 2011-02-07 10:12 ` Marcelo Tosatti
2011-02-07 10:17 ` Bernhard Kohl
1 sibling, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2011-02-07 10:12 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Bernhard Kohl, kvm
On Mon, Feb 07, 2011 at 10:42:22AM +0100, Jan Kiszka wrote:
> Hi Bernhard,
>
> On 2010-09-14 15:51, Bernhard Kohl wrote:
> > The setting of the irq0override flag must be also passed properly
> > to the KVM_IRQCHIP_IOAPIC.
> >
> > Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
> > ---
> > qemu-kvm-x86.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
> > index fd974b3..e35c234 100644
> > --- a/qemu-kvm-x86.c
> > +++ b/qemu-kvm-x86.c
> > @@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void)
> > }
> > }
> > for (i = 0; i < 24; ++i) {
> > - if (i == 0) {
> > + if (i == 0 && irq0override) {
> > r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
> > - } else if (i != 2) {
> > + } else if (i != 2 || !irq0override) {
> > r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
> > }
> > if (r < 0) {
>
> While cleaning up the irq0override fragments, I stumbled over this
> commit. It is a nop for qemu-kvm, today and also by the time it was applied:
>
> irq0override = !kvm_irqchip || kvm_has_gsi_routing
>
> But, for obvious reasons, the code above is only executed when gsi
> routing is available.
>
> Can you remember what motivated this patch?
>
> Jan
Guest OS which can't cope with 0->2 GSI->IOAPIC pin mapping.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
2011-02-07 9:42 ` Jan Kiszka
2011-02-07 10:12 ` Marcelo Tosatti
@ 2011-02-07 10:17 ` Bernhard Kohl
2011-02-07 10:29 ` Jan Kiszka
1 sibling, 1 reply; 6+ messages in thread
From: Bernhard Kohl @ 2011-02-07 10:17 UTC (permalink / raw)
To: ext Jan Kiszka; +Cc: kvm, Marcelo Tosatti
Am 07.02.2011 10:42, schrieb ext Jan Kiszka:
> Hi Bernhard,
>
> On 2010-09-14 15:51, Bernhard Kohl wrote:
>> The setting of the irq0override flag must be also passed properly
>> to the KVM_IRQCHIP_IOAPIC.
>>
>> Signed-off-by: Bernhard Kohl<bernhard.kohl@nsn.com>
>> ---
>> qemu-kvm-x86.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
>> index fd974b3..e35c234 100644
>> --- a/qemu-kvm-x86.c
>> +++ b/qemu-kvm-x86.c
>> @@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void)
>> }
>> }
>> for (i = 0; i< 24; ++i) {
>> - if (i == 0) {
>> + if (i == 0&& irq0override) {
>> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
>> - } else if (i != 2) {
>> + } else if (i != 2 || !irq0override) {
>> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
>> }
>> if (r< 0) {
> While cleaning up the irq0override fragments, I stumbled over this
> commit. It is a nop for qemu-kvm, today and also by the time it was applied:
>
> irq0override = !kvm_irqchip || kvm_has_gsi_routing
>
> But, for obvious reasons, the code above is only executed when gsi
> routing is available.
>
> Can you remember what motivated this patch?
>
> Jan
>
For our legacy OS which only could handle the timer interrupt
at irq 0, I set in qemu "irq0override=0;". In fact I added
temporarily a command line option for that. Of course this
setting needed to be passed to kvm.
Today we have a correction in our OS and can use qemu-kvm's
default setting.
Bernhard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing
2011-02-07 10:17 ` Bernhard Kohl
@ 2011-02-07 10:29 ` Jan Kiszka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2011-02-07 10:29 UTC (permalink / raw)
To: Bernhard Kohl; +Cc: kvm@vger.kernel.org, Marcelo Tosatti
On 2011-02-07 11:17, Bernhard Kohl wrote:
> Am 07.02.2011 10:42, schrieb ext Jan Kiszka:
>> Hi Bernhard,
>>
>> On 2010-09-14 15:51, Bernhard Kohl wrote:
>>> The setting of the irq0override flag must be also passed properly
>>> to the KVM_IRQCHIP_IOAPIC.
>>>
>>> Signed-off-by: Bernhard Kohl<bernhard.kohl@nsn.com>
>>> ---
>>> qemu-kvm-x86.c | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
>>> index fd974b3..e35c234 100644
>>> --- a/qemu-kvm-x86.c
>>> +++ b/qemu-kvm-x86.c
>>> @@ -1388,9 +1388,9 @@ int kvm_arch_init_irq_routing(void)
>>> }
>>> }
>>> for (i = 0; i< 24; ++i) {
>>> - if (i == 0) {
>>> + if (i == 0&& irq0override) {
>>> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
>>> - } else if (i != 2) {
>>> + } else if (i != 2 || !irq0override) {
>>> r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
>>> }
>>> if (r< 0) {
>> While cleaning up the irq0override fragments, I stumbled over this
>> commit. It is a nop for qemu-kvm, today and also by the time it was applied:
>>
>> irq0override = !kvm_irqchip || kvm_has_gsi_routing
>>
>> But, for obvious reasons, the code above is only executed when gsi
>> routing is available.
>>
>> Can you remember what motivated this patch?
>>
>> Jan
>>
> For our legacy OS which only could handle the timer interrupt
> at irq 0, I set in qemu "irq0override=0;". In fact I added
> temporarily a command line option for that. Of course this
> setting needed to be passed to kvm.
As I already suspected: private changes... :)
>
> Today we have a correction in our OS and can use qemu-kvm's
> default setting.
So I'm going to file a revert. Or does anyone feel strong about making
this configurable?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-02-07 10:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 13:51 [PATCH] qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing Bernhard Kohl
2010-09-29 20:36 ` Marcelo Tosatti
2011-02-07 9:42 ` Jan Kiszka
2011-02-07 10:12 ` Marcelo Tosatti
2011-02-07 10:17 ` Bernhard Kohl
2011-02-07 10:29 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox