Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Blue Swirl
On Sat, Dec 10, 2011 at 16:29, Jan Kiszka wrote: > On 2011-12-10 17:26, Blue Swirl wrote: >> On Sat, Dec 10, 2011 at 16:03, Jan Kiszka wrote: >>> On 2011-12-10 16:54, Blue Swirl wrote: On Sat, Dec 10, 2011 at 15:51, Jan Kiszka wrote: > On 2011-12-10 16:49, Blue Swirl wrote: >>>

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Jan Kiszka
On 2011-12-10 17:26, Blue Swirl wrote: > On Sat, Dec 10, 2011 at 16:03, Jan Kiszka wrote: >> On 2011-12-10 16:54, Blue Swirl wrote: >>> On Sat, Dec 10, 2011 at 15:51, Jan Kiszka wrote: On 2011-12-10 16:49, Blue Swirl wrote: >> >> +ISADevice *pit_init(int base, qemu_irq irq) > >>>

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Blue Swirl
On Sat, Dec 10, 2011 at 16:03, Jan Kiszka wrote: > On 2011-12-10 16:54, Blue Swirl wrote: >> On Sat, Dec 10, 2011 at 15:51, Jan Kiszka wrote: >>> On 2011-12-10 16:49, Blue Swirl wrote: > > +ISADevice *pit_init(int base, qemu_irq irq) Please retain this function in pc.h, or even

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Jan Kiszka
On 2011-12-10 16:54, Blue Swirl wrote: > On Sat, Dec 10, 2011 at 15:51, Jan Kiszka wrote: >> On 2011-12-10 16:49, Blue Swirl wrote: +ISADevice *pit_init(int base, qemu_irq irq) >>> >>> Please retain this function in pc.h, or even better, introduce i8254.h. >> >> No concerns about i8254.h

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Blue Swirl
On Sat, Dec 10, 2011 at 15:51, Jan Kiszka wrote: > On 2011-12-10 16:49, Blue Swirl wrote: >>> >>> +ISADevice *pit_init(int base, qemu_irq irq) >> >> Please retain this function in pc.h, or even better, introduce i8254.h. > > No concerns about i8254.h, but this function does not qualify for static

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Jan Kiszka
On 2011-12-10 16:49, Blue Swirl wrote: >> >> +ISADevice *pit_init(int base, qemu_irq irq) > > Please retain this function in pc.h, or even better, introduce i8254.h. No concerns about i8254.h, but this function does not qualify for static inline. > >> +{ >> +ISADevice *dev; >> + >> +dev

Re: [Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Blue Swirl
On Sat, Dec 10, 2011 at 12:28, Jan Kiszka wrote: > From: Jan Kiszka > > When the HPET enters legacy mode, the IRQ output of the PIT is > suppressed and replaced by the HPET timer 0. But the current code to > emulate this was broken in many ways. It reset the PIT state after > re-enabling, it work

[Qemu-devel] [PATCH 2/2] i8254: Rework & fix interaction with HPET in legacy mode

2011-12-10 Thread Jan Kiszka
From: Jan Kiszka When the HPET enters legacy mode, the IRQ output of the PIT is suppressed and replaced by the HPET timer 0. But the current code to emulate this was broken in many ways. It reset the PIT state after re-enabling, it worked against a stale static PIT structure, and it did not prope