Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-14 Thread Sebastian Herbszt

malc wrote:

On Wed, 13 May 2009, Sebastian Herbszt wrote:


Jan Kiszka wrote:
 Moreover, does sound work at all with your qemu?
 The image I tried [1] issues two beeps after loading (obviously via
 direct hw access) - a good way to check general support. Note that one
 reason for broken host sound with qemu can be OSS. For that reason I
 always configure my qemu with --audio-drv-list=alsa.

Thats a good hint :)
Seems i used to compile qemu without --audio-drv-list. Since dsound and
fmod drivers don't compile here (i likely miss some libs in my mingw), i
used sdl.


Don't do that. Here's a nice tutorial Kazu made that will probably help 
you: http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html


So you're saying the use of sdl for audio is not recommended?


Now i can hear those two beeps with the image you suggested. Tho those are
coming
thru my sound card and not the hosts pc speaker (even with -soundhw pcspk,
but maybe
that option means something different).


And it will always come through your soundcard. pcspk is not a passthrough
thing.


Thanks for the clarification.

 With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu

somewhat freezes.


Huh?


With this INT 10h function qemu should beep once, but it does loop the beep 
infinitely.
Normally i can exit qemu by clicking on the [x] window close icon, but while 
it does
endlessly beep that doesn't work (vista says process doesn't respond). Using 
quit in the
monitor window doesn't work either.

- Sebastian

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-14 Thread malc
On Thu, 14 May 2009, Sebastian Herbszt wrote:

 malc wrote:
  On Wed, 13 May 2009, Sebastian Herbszt wrote:
  
   Jan Kiszka wrote:
Moreover, does sound work at all with your qemu?
The image I tried [1] issues two beeps after loading (obviously via
direct hw access) - a good way to check general support. Note that one
reason for broken host sound with qemu can be OSS. For that reason I
always configure my qemu with --audio-drv-list=alsa.
   
   Thats a good hint :)
   Seems i used to compile qemu without --audio-drv-list. Since dsound
   and
   fmod drivers don't compile here (i likely miss some libs in my mingw), i
   used sdl.
  
  Don't do that. Here's a nice tutorial Kazu made that will probably help you:
  http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html
 
 So you're saying the use of sdl for audio is not recommended?

Yes.

 
   Now i can hear those two beeps with the image you suggested. Tho those are
   coming
   thru my sound card and not the hosts pc speaker (even with -soundhw
   pcspk,
   but maybe
   that option means something different).
  
  And it will always come through your soundcard. pcspk is not a passthrough
  thing.
 
 Thanks for the clarification.
 
  With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu
   somewhat freezes.
  
  Huh?
 
 With this INT 10h function qemu should beep once, but it does loop the beep
 infinitely.
 Normally i can exit qemu by clicking on the [x] window close icon, but while
 it does
 endlessly beep that doesn't work (vista says process doesn't respond). Using
 quit in the
 monitor window doesn't work either.
 

Can you post some .com file sparing me from writing the code for one
myself?

-- 
mailto:av1...@comtv.ru
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-12 Thread Jan Kiszka
Sebastian Herbszt wrote:
 Jan Kiszka wrote:
 Sebastian Herbszt wrote:
 Anyway, using timer ticks since midnight should be possible (INT 08h
 handler is set up
 before vga bios is called).
 
 I have implemented the beep for vgabios-6b and it works on bochs but
 fails on qemu.
 With -soundhw pcspk i should hear it thru the hosts pc speaker, right?

Yep, that's how it should work. Mind to share your code and tell us
which test case you used?

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-12 Thread malc
On Wed, 13 May 2009, Sebastian Herbszt wrote:

 Jan Kiszka wrote:
  Sebastian Herbszt wrote:
   With the modified vgabios (see below) it does beep on bochs on vista,
   but not on qemu.
  
  Works fine for me!
  
  Did you check twice that your modified vgabios is actually loaded by
  qemu (e.g. via strace)?
 
 Yes, it uses the right rom.
 
  Moreover, does sound work at all with your qemu?
  The image I tried [1] issues two beeps after loading (obviously via
  direct hw access) - a good way to check general support. Note that one
  reason for broken host sound with qemu can be OSS. For that reason I
  always configure my qemu with --audio-drv-list=alsa.
 
 Thats a good hint :)
 Seems i used to compile qemu without --audio-drv-list. Since dsound and
 fmod drivers don't compile here (i likely miss some libs in my mingw), i
 used sdl.

Don't do that. Here's a nice tutorial Kazu made that will probably help 
you: http://www.h7.dion.ne.jp/~qemu-win/Audio-en.html

 Now i can hear those two beeps with the image you suggested. Tho those are
 coming
 thru my sound card and not the hosts pc speaker (even with -soundhw pcspk,
 but maybe
 that option means something different).

And it will always come through your soundcard. pcspk is not a passthrough
thing.

 With INT 10h AH=0Eh i now can hear a beep too, but it doesn't stop and qemu
 somewhat freezes.

Huh?

  Jan
  
  PS: Your patch was mangled by your mail client. Fortunately, it was
  small enough for manual fixing.
 
 Unfortunatelly Windows Mail tends to do this and i failed to find an option to
 fix it.
 
 - Sebastian
 
 
 

-- 
mailto:av1...@comtv.ru
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-09 Thread Sebastian Herbszt

Jan Kiszka wrote:

Sebastian Herbszt wrote:

Jan Kiszka wrote:

Sebastian Herbszt wrote:

Simon Bienlein wrote:

Is a support for BIOS worked on right now?


The vgabios (vgabios.c) has a FIXME should beep. Volker, do you plan
to fix this?

Which frequency should be used for the beep? Which delay?


I would try 1 KHz and some hundred milliseconds.


I just looked at some vga bios and it uses about 896,45 Hz.


Getting a delay using inb(0x61)  0x10 is still a no go on qemu,
right?


Looks like (should be far too inaccurate for longer delays). What about
0x40:0x6c, the BIOS' daily timer counter?


The bios i looked at used the refresh request port 0x61. This is
supported by bochs and
there is also a patch for qemu to replace the dummy [1]. The rombios
uses this to provide
INT 15h AH=86h functionality; this is likely broken with the dummy code
in qemu.


I see no problem with improving qemu's emulation accuracy this way a
bit. But I wouldn't built new delay implementations on top of it,
specifically if the code is in fact aware of running over a hypervisor.
Such micro-timings are far too inaccurate for longer delays in an
environment where you cannot be sure of running all the time during that
period.


Volker, mind to resubmit the patch once again?


Anyway, using timer ticks since midnight should be possible (INT 08h
handler is set up
before vga bios is called).


I have implemented the beep for vgabios-6b and it works on bochs but fails on 
qemu.
With -soundhw pcspk i should hear it thru the hosts pc speaker, right?

- Sebastian

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-07 Thread Jan Kiszka
Sebastian Herbszt wrote:
 Jan Kiszka wrote:
 Sebastian Herbszt wrote:
 Simon Bienlein wrote:
 Is a support for BIOS worked on right now?

 The vgabios (vgabios.c) has a FIXME should beep. Volker, do you plan
 to fix this?

 Which frequency should be used for the beep? Which delay?

 I would try 1 KHz and some hundred milliseconds.
 
 I just looked at some vga bios and it uses about 896,45 Hz.
 
 Getting a delay using inb(0x61)  0x10 is still a no go on qemu,
 right?

 Looks like (should be far too inaccurate for longer delays). What about
 0x40:0x6c, the BIOS' daily timer counter?
 
 The bios i looked at used the refresh request port 0x61. This is
 supported by bochs and
 there is also a patch for qemu to replace the dummy [1]. The rombios
 uses this to provide
 INT 15h AH=86h functionality; this is likely broken with the dummy code
 in qemu.

I see no problem with improving qemu's emulation accuracy this way a
bit. But I wouldn't built new delay implementations on top of it,
specifically if the code is in fact aware of running over a hypervisor.
Such micro-timings are far too inaccurate for longer delays in an
environment where you cannot be sure of running all the time during that
period.

 
 Anyway, using timer ticks since midnight should be possible (INT 08h
 handler is set up
 before vga bios is called).
 
 [1] http://article.gmane.org/gmane.comp.emulators.bochs.devel/7594
 
 - Sebastian
 

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-06 Thread Jan Kiszka
Sebastian Herbszt wrote:
 Simon Bienlein wrote:
 Is a support for BIOS worked on right now?
 
 The vgabios (vgabios.c) has a FIXME should beep. Volker, do you plan
 to fix this?
 
 Which frequency should be used for the beep? Which delay?

I would try 1 KHz and some hundred milliseconds.

 Getting a delay using inb(0x61)  0x10 is still a no go on qemu, right?

Looks like (should be far too inaccurate for longer delays). What about
0x40:0x6c, the BIOS' daily timer counter?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-06 Thread Sebastian Herbszt

Jan Kiszka wrote:

Sebastian Herbszt wrote:

Simon Bienlein wrote:

Is a support for BIOS worked on right now?


The vgabios (vgabios.c) has a FIXME should beep. Volker, do you plan
to fix this?

Which frequency should be used for the beep? Which delay?


I would try 1 KHz and some hundred milliseconds.


I just looked at some vga bios and it uses about 896,45 Hz.


Getting a delay using inb(0x61)  0x10 is still a no go on qemu, right?


Looks like (should be far too inaccurate for longer delays). What about
0x40:0x6c, the BIOS' daily timer counter?


The bios i looked at used the refresh request port 0x61. This is supported by 
bochs and
there is also a patch for qemu to replace the dummy [1]. The rombios uses this 
to provide
INT 15h AH=86h functionality; this is likely broken with the dummy code in qemu.

Anyway, using timer ticks since midnight should be possible (INT 08h handler 
is set up
before vga bios is called).

[1] http://article.gmane.org/gmane.comp.emulators.bochs.devel/7594

- Sebastian

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-05 Thread Simon Bienlein

Hello Jan,
Am 04.05.2009 23:00, schrieb Jan Kiszka:

Samuel Thibault wrote:

 Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :

 When I boot the VM from the Lenny CD, there is no audible signal tone.

 Hmm, I successfully tested with '-soundbw pcspk' + my patches or
 -no-kvm-pit. There is probably a different, unrelated issue with your setup.


 Remember that the BIOS support for beeps is probably still missing.
 Simon, you should also test beeps from an installed Linux guest.



Yeah, I forgot... :)

Indeed, I only tested the console beep of a fully installed Linux guest.


In this surrounding, the beep works fine at my place at well. However, 
the beep worked without the patching of the sources when I entered 
-no-kvm-pit. For me as a user there is no noticeable change with the patch.


Is a support for BIOS worked on right now?

Thanks in advance for the further help.

Simon
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-05 Thread Sebastian Herbszt

Simon Bienlein wrote:

Is a support for BIOS worked on right now?


The vgabios (vgabios.c) has a FIXME should beep. Volker, do you plan to fix 
this?

Which frequency should be used for the beep? Which delay?
Getting a delay using inb(0x61)  0x10 is still a no go on qemu, right?

- Sebastian

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-04 Thread Simon Bienlein

Hello Jan,

thank you very much for processing my request.
I [1]patched the KVM sources from Lenny and created a new Debian packet. 
When I boot the VM from the Lenny CD, there is no audible signal tone.
It does not make a difference whether I start the KVM with or without 
the option -no-kvm-pit. What do I have to do in order to test the new 
function?


Thanks in advance for the further help.

Simon

1. http://patchwork.kernel.org/patch/19687/
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-04 Thread Jan Kiszka
Simon Bienlein wrote:
 Hello Jan,
 
 thank you very much for processing my request.
 I [1]patched the KVM sources from Lenny and created a new Debian packet.

Did you patch both kernel and user space? Note that my kernel patch was
against the kernel git repository, not against the external modules
delivered with kvm releases. Feasible to convert them, but maybe not
straightforward.

 When I boot the VM from the Lenny CD, there is no audible signal tone.
 It does not make a difference whether I start the KVM with or without
 the option -no-kvm-pit. What do I have to do in order to test the new
 function?

Hmm, I successfully tested with '-soundbw pcspk' + my patches or
-no-kvm-pit. There is probably a different, unrelated issue with your setup.

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-04 Thread Jan Kiszka
Samuel Thibault wrote:
 Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :
 When I boot the VM from the Lenny CD, there is no audible signal tone.
 Hmm, I successfully tested with '-soundbw pcspk' + my patches or
 -no-kvm-pit. There is probably a different, unrelated issue with your setup.
 
 Remember that the BIOS support for beeps is probably still missing.
 Simon, you should also test beeps from an installed Linux guest.
 

Yeah, I forgot... :)

Indeed, I only tested the console beep of a fully installed Linux guest.

Jan



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-05-04 Thread Samuel Thibault
Jan Kiszka, le Mon 04 May 2009 22:29:39 +0200, a écrit :
  When I boot the VM from the Lenny CD, there is no audible signal tone.
 
 Hmm, I successfully tested with '-soundbw pcspk' + my patches or
 -no-kvm-pit. There is probably a different, unrelated issue with your setup.

Remember that the BIOS support for beeps is probably still missing.
Simon, you should also test beeps from an installed Linux guest.

Samuel
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-04-23 Thread Jan Kiszka
Avi Kivity wrote:
 Jan Kiszka wrote:
 Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
 onto those resources but doesn't communicate changes to this user space
 backend.
   
 
 In this case, the -no-kvm-pit option should help.

Probably fine in many cases (where the PIT is no longer used anyway),
just a bit unintuitive for users.

I wonder why KVM moved port 0x61 handling into kernel space at all. By
leaving it in pcspk hands and extending the latter to sync with the
in-kernel PIT on sample generation, this speaker regression (of
kvm-userspace) should have been avoidable.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-04-23 Thread Avi Kivity

Jan Kiszka wrote:

Avi Kivity wrote:
  

Jan Kiszka wrote:


Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
onto those resources but doesn't communicate changes to this user space
backend.
  
  

In this case, the -no-kvm-pit option should help.



Probably fine in many cases (where the PIT is no longer used anyway),
just a bit unintuitive for users.
  


Yes, it's only a workaround.


I wonder why KVM moved port 0x61 handling into kernel space at all. By
leaving it in pcspk hands and extending the latter to sync with the
in-kernel PIT on sample generation, this speaker regression (of
kvm-userspace) should have been avoidable.
  


I'd rather not have partial components in the kernel.  This case is 
particularly icky though.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Qemu-devel] Re: Question about KVM and PC speaker

2009-04-23 Thread Jan Kiszka
Avi Kivity wrote:
 Jan Kiszka wrote:
 Avi Kivity wrote:
  
 Jan Kiszka wrote:

 Huh, it is! Then the problem is a KVM-only thing: The kernel part hooks
 onto those resources but doesn't communicate changes to this user space
 backend.
 
 In this case, the -no-kvm-pit option should help.
 

 Probably fine in many cases (where the PIT is no longer used anyway),
 just a bit unintuitive for users.
   
 
 Yes, it's only a workaround.
 
 I wonder why KVM moved port 0x61 handling into kernel space at all. By
 leaving it in pcspk hands and extending the latter to sync with the
 in-kernel PIT on sample generation, this speaker regression (of
 kvm-userspace) should have been avoidable.
   
 
 I'd rather not have partial components in the kernel.  This case is
 particularly icky though.

But you surely don't want to issue the sound from kernel space.
Moreover, these are separate components: the PIT doesn't bother about
the speaker, if it's on or off. We just need to make pcspk KVM-aware. I
think I will post a patch later today.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html