All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH][STABLE] hpet: Fix emulation of HPET_TN_SETVAL
@ 2009-04-16 20:08 Jan Kiszka
  2009-04-17 21:21 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2009-04-16 20:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Beth Kon, Alexander Graf, Gleb Natapov, Dmitry Eremin-Solenikov

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that
HPET_TN_SETVAL rather means: Set _both_ the comparator value and
register.

With this patch applied, I'm again able to boot 2.6.30-rc kernels as
they no longer panic like this (which was due to the comparator
register remaining 0):

ENABLING IO-APIC IRQs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 hw/hpet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/hpet.c b/hw/hpet.c
index 7df2d05..c7945ec 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -411,7 +411,7 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr,
                            (timer->config & HPET_TN_SETVAL))
                     timer->cmp = (timer->cmp & 0xffffffff00000000ULL)
                                   | new_val;
-                else {
+                if (timer_is_periodic(timer)) {
                     /*
                      * FIXME: Clamp period to reasonable min value?
                      * Clamp period to reasonable max value


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Qemu-devel] [PATCH][STABLE] hpet: Fix emulation of HPET_TN_SETVAL
  2009-04-16 20:08 [Qemu-devel] [PATCH][STABLE] hpet: Fix emulation of HPET_TN_SETVAL Jan Kiszka
@ 2009-04-17 21:21 ` Anthony Liguori
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2009-04-17 21:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Beth Kon, Alexander Graf, Gleb Natapov, Dmitry Eremin-Solenikov

Jan Kiszka wrote:
> While Intel's spec is not that clear here, latest changes to Linux' HPET
> code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
> HPET_COUNTER when programming periodic mode") strongly suggest that
> HPET_TN_SETVAL rather means: Set _both_ the comparator value and
> register.
>
> With this patch applied, I'm again able to boot 2.6.30-rc kernels as
> they no longer panic like this (which was due to the comparator
> register remaining 0):
>
> ENABLING IO-APIC IRQs
> ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
> ..MP-BIOS bug: 8254 timer not connected to IO-APIC
> ...trying to set up timer (IRQ0) through the 8259A ...
> ..... (found apic 0 pin 2) ...
> ....... failed.
> ...trying to set up timer as Virtual Wire IRQ...
> ..... failed.
> ...trying to set up timer as ExtINT IRQ...
> ..... failed :(.
> Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>   
Applied to trunk and stable.  Thanks.

-- 
Regards,

Anthony Liguori

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

end of thread, other threads:[~2009-04-17 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16 20:08 [Qemu-devel] [PATCH][STABLE] hpet: Fix emulation of HPET_TN_SETVAL Jan Kiszka
2009-04-17 21:21 ` Anthony Liguori

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.