Re: [Qemu-devel] [PATCH 3/4] Add support for HPET periodic timer.

2007-09-03 Thread GUERRAZ Francois
Hello,

Can you confirm to me that if I have only one periodic timer on my
motherboard I can only have one qemu-instance running using hpet?

Thanks.

François.

Le mardi 21 août 2007 à 21:40 +0200, Luca a écrit :
 On 8/21/07, Matthew Kent [EMAIL PROTECTED] wrote:
  On Sat, 2007-18-08 at 01:11 +0200, Luca Tettamanti wrote:
   plain text document attachment (clock-hpet)
   Linux operates the HPET timer in legacy replacement mode, which means that
   the periodic interrupt of the CMOS RTC is not delivered (qemu won't be 
   able
   to use /dev/rtc). Add support for HPET (/dev/hpet) as a replacement for 
   the
   RTC; the periodic interrupt is delivered via SIGIO and is handled in the
   same way as the RTC timer.
  
   Signed-off-by: Luca Tettamanti [EMAIL PROTECTED]
 
  I must be missing something silly here.. should I be able to open more
  than one instance of qemu with -clock hpet? Because upon invoking a
  second instance of qemu HPET_IE_ON fails.
 
 It depends on your hardware. Theoretically it's possible, but I've yet
 to see a motherboard with more than one periodic timer.
 
 dmesg | grep hpet should tell you something like:
 
 hpet0: 3 64-bit timers, 14318180 Hz
 
 Luca
 
 
 





Re: [Qemu-devel] [PATCH 3/4] Add support for HPET periodic timer.

2007-08-21 Thread Matthew Kent
On Sat, 2007-18-08 at 01:11 +0200, Luca Tettamanti wrote:
 plain text document attachment (clock-hpet)
 Linux operates the HPET timer in legacy replacement mode, which means that
 the periodic interrupt of the CMOS RTC is not delivered (qemu won't be able
 to use /dev/rtc). Add support for HPET (/dev/hpet) as a replacement for the
 RTC; the periodic interrupt is delivered via SIGIO and is handled in the
 same way as the RTC timer.
 
 Signed-off-by: Luca Tettamanti [EMAIL PROTECTED]

I must be missing something silly here.. should I be able to open more
than one instance of qemu with -clock hpet? Because upon invoking a
second instance of qemu HPET_IE_ON fails.

I also tried running the example in the kernel docs under
Documentation/hpet.txt

[EMAIL PROTECTED] [/home/mkent]# ./demo poll /dev/hpet 1 1000
-hpet: executing poll
hpet_poll: info.hi_flags 0x0
hpet_poll: expired time = 0x8
hpet_poll: revents = 0x1
hpet_poll: data 0x1

in another term
[EMAIL PROTECTED] [/home/mkent]# ./demo poll /dev/hpet 1 1000
-hpet: executing poll
hpet_poll: info.hi_flags 0x0
hpet_poll, HPET_IE_ON failed

This is on 2.6.23-rc3 x86_64 with the patch-2.6.23-rc3-hrt2.patch
hrtimers patch.
-- 
Matthew Kent [EMAIL PROTECTED]
http://magoazul.com





Re: [Qemu-devel] [PATCH 3/4] Add support for HPET periodic timer.

2007-08-21 Thread Luca
On 8/21/07, Matthew Kent [EMAIL PROTECTED] wrote:
 On Sat, 2007-18-08 at 01:11 +0200, Luca Tettamanti wrote:
  plain text document attachment (clock-hpet)
  Linux operates the HPET timer in legacy replacement mode, which means that
  the periodic interrupt of the CMOS RTC is not delivered (qemu won't be able
  to use /dev/rtc). Add support for HPET (/dev/hpet) as a replacement for the
  RTC; the periodic interrupt is delivered via SIGIO and is handled in the
  same way as the RTC timer.
 
  Signed-off-by: Luca Tettamanti [EMAIL PROTECTED]

 I must be missing something silly here.. should I be able to open more
 than one instance of qemu with -clock hpet? Because upon invoking a
 second instance of qemu HPET_IE_ON fails.

It depends on your hardware. Theoretically it's possible, but I've yet
to see a motherboard with more than one periodic timer.

dmesg | grep hpet should tell you something like:

hpet0: 3 64-bit timers, 14318180 Hz

Luca




Re: [Qemu-devel] [PATCH 3/4] Add support for HPET periodic timer.

2007-08-21 Thread Matthew Kent
On Tue, 2007-21-08 at 21:40 +0200, Luca wrote:
 On 8/21/07, Matthew Kent [EMAIL PROTECTED] wrote:
  On Sat, 2007-18-08 at 01:11 +0200, Luca Tettamanti wrote:
   plain text document attachment (clock-hpet)
   Linux operates the HPET timer in legacy replacement mode, which means that
   the periodic interrupt of the CMOS RTC is not delivered (qemu won't be 
   able
   to use /dev/rtc). Add support for HPET (/dev/hpet) as a replacement for 
   the
   RTC; the periodic interrupt is delivered via SIGIO and is handled in the
   same way as the RTC timer.
  
   Signed-off-by: Luca Tettamanti [EMAIL PROTECTED]
 
  I must be missing something silly here.. should I be able to open more
  than one instance of qemu with -clock hpet? Because upon invoking a
  second instance of qemu HPET_IE_ON fails.
 
 It depends on your hardware. Theoretically it's possible, but I've yet
 to see a motherboard with more than one periodic timer.

Ah thank you, after re-reading the docs I think I better understand
this.
-- 
Matthew Kent [EMAIL PROTECTED]
http://magoazul.com