* i8259 defaults wrong?
@ 2009-08-17 2:20 ` Herbert Poetzl
0 siblings, 0 replies; 10+ messages in thread
From: Herbert Poetzl @ 2009-08-17 2:20 UTC (permalink / raw)
To: kvm, qemu-devel
Greetings!
looking at the i8259 implementation found in qemu
as well as in the in-kernel kvm implementation, I
see that on pic_reset() special_fully_nested_mode
is set to zero, but the intel(r) 8259A manual says
on page 15:
Fully Nested Mode
This mode is entered after initialization unless
another mode is programmed.
any comments are appreciated, a patch should be
trivial, but I'd gladly submit one if requested.
TIA,
Herbert
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] i8259 defaults wrong?
@ 2009-08-17 2:20 ` Herbert Poetzl
0 siblings, 0 replies; 10+ messages in thread
From: Herbert Poetzl @ 2009-08-17 2:20 UTC (permalink / raw)
To: kvm, qemu-devel
Greetings!
looking at the i8259 implementation found in qemu
as well as in the in-kernel kvm implementation, I
see that on pic_reset() special_fully_nested_mode
is set to zero, but the intel(r) 8259A manual says
on page 15:
Fully Nested Mode
This mode is entered after initialization unless
another mode is programmed.
any comments are appreciated, a patch should be
trivial, but I'd gladly submit one if requested.
TIA,
Herbert
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: i8259 defaults wrong?
2009-08-17 2:20 ` [Qemu-devel] " Herbert Poetzl
@ 2009-08-17 9:54 ` Avi Kivity
-1 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2009-08-17 9:54 UTC (permalink / raw)
To: kvm, qemu-devel
On 08/17/2009 05:20 AM, Herbert Poetzl wrote:
> Greetings!
>
> looking at the i8259 implementation found in qemu
> as well as in the in-kernel kvm implementation, I
> see that on pic_reset() special_fully_nested_mode
> is set to zero, but the intel(r) 8259A manual says
> on page 15:
>
> Fully Nested Mode
>
> This mode is entered after initialization unless
> another mode is programmed.
>
> any comments are appreciated, a patch should be
> trivial, but I'd gladly submit one if requested.
>
>
Well, does the BIOS set fully nested mode on reset? If not, a kvm
change is difficult, since the bios and kvm are updated independently.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: i8259 defaults wrong?
@ 2009-08-17 9:54 ` Avi Kivity
0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2009-08-17 9:54 UTC (permalink / raw)
To: kvm, qemu-devel
On 08/17/2009 05:20 AM, Herbert Poetzl wrote:
> Greetings!
>
> looking at the i8259 implementation found in qemu
> as well as in the in-kernel kvm implementation, I
> see that on pic_reset() special_fully_nested_mode
> is set to zero, but the intel(r) 8259A manual says
> on page 15:
>
> Fully Nested Mode
>
> This mode is entered after initialization unless
> another mode is programmed.
>
> any comments are appreciated, a patch should be
> trivial, but I'd gladly submit one if requested.
>
>
Well, does the BIOS set fully nested mode on reset? If not, a kvm
change is difficult, since the bios and kvm are updated independently.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: i8259 defaults wrong?
2009-08-17 2:20 ` [Qemu-devel] " Herbert Poetzl
@ 2009-08-18 1:02 ` Herbert Poetzl
-1 siblings, 0 replies; 10+ messages in thread
From: Herbert Poetzl @ 2009-08-18 1:02 UTC (permalink / raw)
To: kvm, qemu-devel; +Cc: Avi Kivity
>On Mon, Aug 17, 2009 at 04:20:24AM +0200, Herbert Poetzl wrote:
>>
>> Greetings!
>>
>> looking at the i8259 implementation found in qemu
>> as well as in the in-kernel kvm implementation, I
>> see that on pic_reset() special_fully_nested_mode
>> is set to zero, but the intel(r) 8259A manual says
>> on page 15:
>>
>> Fully Nested Mode
>>
>> This mode is entered after initialization unless
>> another mode is programmed.
>>
>> any comments are appreciated, a patch should be
>> trivial, but I'd gladly submit one if requested.
>
> Well, does the BIOS set fully nested mode on reset?
no idea, but as far as I tested, it doesn't matter
for Linux guests, but makes some other operating
systems - which seem to heavily rely on this default
(e.g. OpenStep, darwin) - work like expected.
> If not, a kvm change is difficult, since the bios
> and kvm are updated independently.
nevertheless IMHO it should be fixed ASAP, and the
required change is trivial, i.e. only a single line
in the kvm/qemu code needs to be changed to make it
work correctly (see patches below)
best,
Herbert
please CC me as I'm not subscribed to either list
; fix i8259 reset behaviour
; qemu/kvm (outside the kernel)
;
--- ./hw/i8259.c.orig 2009-08-12 19:45:45.000000000 +0200
+++ ./hw/i8259.c 2009-08-17 03:48:15.000000000 +0200
@@ -295,7 +295,7 @@ static void pic_reset(void *opaque)
s->init_state = 0;
s->auto_eoi = 0;
s->rotate_on_auto_eoi = 0;
- s->special_fully_nested_mode = 0;
+ s->special_fully_nested_mode = 1;
s->init4 = 0;
s->single_mode = 0;
/* Note: ELCR is not reset */
; fix i8259 reset behaviour
; kvm (inside the kernel)
--- ./arch/x86/kvm/i8259.c.orig 2009-06-11 17:12:23.000000000 +0200
+++ ./arch/x86/kvm/i8259.c 2009-08-18 02:50:00.000000000 +0200
@@ -279,7 +279,7 @@ void kvm_pic_reset(struct kvm_kpic_state
s->init_state = 0;
s->auto_eoi = 0;
s->rotate_on_auto_eoi = 0;
- s->special_fully_nested_mode = 0;
+ s->special_fully_nested_mode = 1;
s->init4 = 0;
}
>> TIA,
>> Herbert
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: i8259 defaults wrong?
@ 2009-08-18 1:02 ` Herbert Poetzl
0 siblings, 0 replies; 10+ messages in thread
From: Herbert Poetzl @ 2009-08-18 1:02 UTC (permalink / raw)
To: kvm, qemu-devel; +Cc: Avi Kivity
>On Mon, Aug 17, 2009 at 04:20:24AM +0200, Herbert Poetzl wrote:
>>
>> Greetings!
>>
>> looking at the i8259 implementation found in qemu
>> as well as in the in-kernel kvm implementation, I
>> see that on pic_reset() special_fully_nested_mode
>> is set to zero, but the intel(r) 8259A manual says
>> on page 15:
>>
>> Fully Nested Mode
>>
>> This mode is entered after initialization unless
>> another mode is programmed.
>>
>> any comments are appreciated, a patch should be
>> trivial, but I'd gladly submit one if requested.
>
> Well, does the BIOS set fully nested mode on reset?
no idea, but as far as I tested, it doesn't matter
for Linux guests, but makes some other operating
systems - which seem to heavily rely on this default
(e.g. OpenStep, darwin) - work like expected.
> If not, a kvm change is difficult, since the bios
> and kvm are updated independently.
nevertheless IMHO it should be fixed ASAP, and the
required change is trivial, i.e. only a single line
in the kvm/qemu code needs to be changed to make it
work correctly (see patches below)
best,
Herbert
please CC me as I'm not subscribed to either list
; fix i8259 reset behaviour
; qemu/kvm (outside the kernel)
;
--- ./hw/i8259.c.orig 2009-08-12 19:45:45.000000000 +0200
+++ ./hw/i8259.c 2009-08-17 03:48:15.000000000 +0200
@@ -295,7 +295,7 @@ static void pic_reset(void *opaque)
s->init_state = 0;
s->auto_eoi = 0;
s->rotate_on_auto_eoi = 0;
- s->special_fully_nested_mode = 0;
+ s->special_fully_nested_mode = 1;
s->init4 = 0;
s->single_mode = 0;
/* Note: ELCR is not reset */
; fix i8259 reset behaviour
; kvm (inside the kernel)
--- ./arch/x86/kvm/i8259.c.orig 2009-06-11 17:12:23.000000000 +0200
+++ ./arch/x86/kvm/i8259.c 2009-08-18 02:50:00.000000000 +0200
@@ -279,7 +279,7 @@ void kvm_pic_reset(struct kvm_kpic_state
s->init_state = 0;
s->auto_eoi = 0;
s->rotate_on_auto_eoi = 0;
- s->special_fully_nested_mode = 0;
+ s->special_fully_nested_mode = 1;
s->init4 = 0;
}
>> TIA,
>> Herbert
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: i8259 defaults wrong?
2009-08-18 1:02 ` [Qemu-devel] " Herbert Poetzl
@ 2009-08-18 7:46 ` Avi Kivity
-1 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2009-08-18 7:46 UTC (permalink / raw)
To: Herbert Poetzl; +Cc: kvm, qemu-devel
On 08/18/2009 04:02 AM, Herbert Poetzl wrote:
>>
>> Well, does the BIOS set fully nested mode on reset?
>>
> no idea, but as far as I tested, it doesn't matter
> for Linux guests, but makes some other operating
> systems - which seem to heavily rely on this default
> (e.g. OpenStep, darwin) - work like expected.
>
>
Please send the patches then separately to their lists with appropriate
signoffs. I'll give it an autotest run and see.
> please CC me as I'm not subscribed to either list
>
But you have
Mail-Followup-To: kvm@vger.kernel.org, qemu-devel@nongnu.org,
Avi Kivity<avi@redhat.com>
This is incredibly annoying.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: i8259 defaults wrong?
@ 2009-08-18 7:46 ` Avi Kivity
0 siblings, 0 replies; 10+ messages in thread
From: Avi Kivity @ 2009-08-18 7:46 UTC (permalink / raw)
To: Herbert Poetzl; +Cc: qemu-devel, kvm
On 08/18/2009 04:02 AM, Herbert Poetzl wrote:
>>
>> Well, does the BIOS set fully nested mode on reset?
>>
> no idea, but as far as I tested, it doesn't matter
> for Linux guests, but makes some other operating
> systems - which seem to heavily rely on this default
> (e.g. OpenStep, darwin) - work like expected.
>
>
Please send the patches then separately to their lists with appropriate
signoffs. I'll give it an autotest run and see.
> please CC me as I'm not subscribed to either list
>
But you have
Mail-Followup-To: kvm@vger.kernel.org, qemu-devel@nongnu.org,
Avi Kivity<avi@redhat.com>
This is incredibly annoying.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: i8259 defaults wrong?
2009-08-17 2:20 ` [Qemu-devel] " Herbert Poetzl
@ 2009-08-18 9:39 ` Bernhard Kauer
-1 siblings, 0 replies; 10+ messages in thread
From: Bernhard Kauer @ 2009-08-18 9:39 UTC (permalink / raw)
To: kvm, qemu-devel
On Mon, Aug 17, 2009 at 04:20:24AM +0200, Herbert Poetzl wrote:
> looking at the i8259 implementation found in qemu
> as well as in the in-kernel kvm implementation, I
> see that on pic_reset() special_fully_nested_mode
> is set to zero, but the intel(r) 8259A manual says
> on page 15:
>
> Fully Nested Mode
>
> This mode is entered after initialization unless
> another mode is programmed.
>
> any comments are appreciated,
You confuse two modes of the PIC: the FullyNestedMode
and the SpecialFullyNestedMode. See page 18 in the
manual.
The first ist the "default" mode, where an IRQ in
service from a slave masks further interrupts from this
slave. In SFNM a slave PIC can still issue another
IRQ.
Greetings,
Bernhard Kauer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] i8259 defaults wrong?
@ 2009-08-18 9:39 ` Bernhard Kauer
0 siblings, 0 replies; 10+ messages in thread
From: Bernhard Kauer @ 2009-08-18 9:39 UTC (permalink / raw)
To: kvm, qemu-devel
On Mon, Aug 17, 2009 at 04:20:24AM +0200, Herbert Poetzl wrote:
> looking at the i8259 implementation found in qemu
> as well as in the in-kernel kvm implementation, I
> see that on pic_reset() special_fully_nested_mode
> is set to zero, but the intel(r) 8259A manual says
> on page 15:
>
> Fully Nested Mode
>
> This mode is entered after initialization unless
> another mode is programmed.
>
> any comments are appreciated,
You confuse two modes of the PIC: the FullyNestedMode
and the SpecialFullyNestedMode. See page 18 in the
manual.
The first ist the "default" mode, where an IRQ in
service from a slave masks further interrupts from this
slave. In SFNM a slave PIC can still issue another
IRQ.
Greetings,
Bernhard Kauer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-08-18 10:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 2:20 i8259 defaults wrong? Herbert Poetzl
2009-08-17 2:20 ` [Qemu-devel] " Herbert Poetzl
2009-08-17 9:54 ` Avi Kivity
2009-08-17 9:54 ` [Qemu-devel] " Avi Kivity
2009-08-18 1:02 ` Herbert Poetzl
2009-08-18 1:02 ` [Qemu-devel] " Herbert Poetzl
2009-08-18 7:46 ` Avi Kivity
2009-08-18 7:46 ` [Qemu-devel] " Avi Kivity
2009-08-18 9:39 ` Bernhard Kauer
2009-08-18 9:39 ` [Qemu-devel] " Bernhard Kauer
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.