* [Qemu-devel] Problem with QEMU on KVM
@ 2010-04-10 20:09 Gerhard Wiesinger
2010-04-11 10:19 ` Mulyadi Santosa
2010-04-19 18:37 ` Gerhard Wiesinger
0 siblings, 2 replies; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-10 20:09 UTC (permalink / raw)
To: qemu-devel
Hello,
Booting DOS 6.22 with NT4 Bootloader works fine. With enabled KVM it
boots, but hangs at counting down the boot loader selection menu (30s,
29s, hang). Booting Knoppix 6.2 from CD wwith KVM orks well.
Versions (0.12.3):
x86_64-softmmu: OK
i386-softmmu: OK
x86_64-softmmu with -enable-kvm: Boot problem
i386-softmmu with -enable-kvm: Boot problem
Host is: Fedora 11
2.6.30.10-105.2.23.fc11.x86 on AMD Phenom II Quad Core
Any ideas?
Thanx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-10 20:09 [Qemu-devel] Problem with QEMU on KVM Gerhard Wiesinger
@ 2010-04-11 10:19 ` Mulyadi Santosa
2010-04-11 13:52 ` Gerhard Wiesinger
2010-04-19 18:37 ` Gerhard Wiesinger
1 sibling, 1 reply; 20+ messages in thread
From: Mulyadi Santosa @ 2010-04-11 10:19 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: qemu-devel
Hi...
On Sun, Apr 11, 2010 at 03:09, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> Hello,
>
> Booting DOS 6.22 with NT4 Bootloader works fine. With enabled KVM it boots,
> but hangs at counting down the boot loader selection menu (30s, 29s, hang).
> Booting Knoppix 6.2 from CD wwith KVM orks well.
>
> Versions (0.12.3):
> x86_64-softmmu: OK
> i386-softmmu: OK
> x86_64-softmmu with -enable-kvm: Boot problem
> i386-softmmu with -enable-kvm: Boot problem
>
> Host is: Fedora 11
> 2.6.30.10-105.2.23.fc11.x86 on AMD Phenom II Quad Core
IMHO, the problem is, we have to find out first, how the bootloader do
the timing. Is it using tight loop? Counting from TSC? PIT? or else?
I suggest to dump the executed TB in Qemu. Please read about -d option.
NB: I am not an expert, just trying to help....
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-11 10:19 ` Mulyadi Santosa
@ 2010-04-11 13:52 ` Gerhard Wiesinger
2010-04-12 9:16 ` Mulyadi Santosa
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-11 13:52 UTC (permalink / raw)
To: Mulyadi Santosa; +Cc: qemu-devel
On Sun, 11 Apr 2010, Mulyadi Santosa wrote:
> Hi...
>
> On Sun, Apr 11, 2010 at 03:09, Gerhard Wiesinger <lists@wiesinger.com> wrote:
>> Hello,
>>
>> Booting DOS 6.22 with NT4 Bootloader works fine. With enabled KVM it boots,
>> but hangs at counting down the boot loader selection menu (30s, 29s, hang).
>> Booting Knoppix 6.2 from CD wwith KVM orks well.
>>
>> Versions (0.12.3):
>> x86_64-softmmu: OK
>> i386-softmmu: OK
>> x86_64-softmmu with -enable-kvm: Boot problem
>> i386-softmmu with -enable-kvm: Boot problem
>>
>> Host is: Fedora 11
>> 2.6.30.10-105.2.23.fc11.x86 on AMD Phenom II Quad Core
>
> IMHO, the problem is, we have to find out first, how the bootloader do
> the timing. Is it using tight loop? Counting from TSC? PIT? or else?
>
> I suggest to dump the executed TB in Qemu. Please read about -d option.
>
> NB: I am not an expert, just trying to help....
OK, uses the following ports:
Port 0x20: 8259 interrupt controller
Port 0x40: 8253 timer
Interrupt 0x1A:
ah=0x00: fetches system timer counters
ah=0x02: reads the clock
ah=0x04: fetches date
So there must be something wrong with KVM with the above functionality (I
guess the timers).
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-11 13:52 ` Gerhard Wiesinger
@ 2010-04-12 9:16 ` Mulyadi Santosa
2010-04-12 12:07 ` Jamie Lokier
0 siblings, 1 reply; 20+ messages in thread
From: Mulyadi Santosa @ 2010-04-12 9:16 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: qemu-devel
Hi Gerhard...
On Sun, Apr 11, 2010 at 20:52, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> OK, uses the following ports:
> Port 0x20: 8259 interrupt controller
> Port 0x40: 8253 timer
>
> Interrupt 0x1A:
> ah=0x00: fetches system timer counters
> ah=0x02: reads the clock
> ah=0x04: fetches date
>
> So there must be something wrong with KVM with the above functionality (I
> guess the timers).
Hmm, my silly guess is, maybe the timer is seen as decremented....or
at least "stuck".
I have very little knowledge about git, but maybe you can start doing
git bisect to narrow which git commit that introduce such behaviour.
Meanwhile, let's wait for comments from one of the KVM developers.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-12 9:16 ` Mulyadi Santosa
@ 2010-04-12 12:07 ` Jamie Lokier
2010-04-13 0:28 ` Mulyadi Santosa
2010-04-13 19:38 ` [Qemu-devel] " Gerhard Wiesinger
0 siblings, 2 replies; 20+ messages in thread
From: Jamie Lokier @ 2010-04-12 12:07 UTC (permalink / raw)
To: Mulyadi Santosa; +Cc: Gerhard Wiesinger, qemu-devel
Mulyadi Santosa wrote:
> Hi Gerhard...
>
> On Sun, Apr 11, 2010 at 20:52, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> > OK, uses the following ports:
> > Port 0x20: 8259 interrupt controller
> > Port 0x40: 8253 timer
> >
> > Interrupt 0x1A:
> > ah=0x00: fetches system timer counters
> > ah=0x02: reads the clock
> > ah=0x04: fetches date
> >
> > So there must be something wrong with KVM with the above functionality (I
> > guess the timers).
>
> Hmm, my silly guess is, maybe the timer is seen as decremented....or
> at least "stuck".
>
> I have very little knowledge about git, but maybe you can start doing
> git bisect to narrow which git commit that introduce such behaviour.
> Meanwhile, let's wait for comments from one of the KVM developers.
There are various -no-kvm-XXX options to try:
-no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
-no-kvm-pit disable KVM kernel mode PIT
-no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
Any of them might be causing this problem.
They disable in-kernel emulation of the interrupt controller and timer
chips, and force the qemu version to be used. It's possible the
in-kernel emulation is buggier than the qemu version.
-- Jamie
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-12 12:07 ` Jamie Lokier
@ 2010-04-13 0:28 ` Mulyadi Santosa
2010-04-13 16:32 ` [Qemu-devel] " Jan Kiszka
2010-04-13 19:38 ` [Qemu-devel] " Gerhard Wiesinger
1 sibling, 1 reply; 20+ messages in thread
From: Mulyadi Santosa @ 2010-04-13 0:28 UTC (permalink / raw)
To: Jamie Lokier; +Cc: Gerhard Wiesinger, qemu-devel
Hi Jamie...
On Mon, Apr 12, 2010 at 19:07, Jamie Lokier <jamie@shareable.org> wrote:
> There are various -no-kvm-XXX options to try:
>
> -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
> -no-kvm-pit disable KVM kernel mode PIT
> -no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
I try to read the source code without too much luck understanding the
meaning of the above parameters, especially the reinjection. Please
CMIIW, interrupt reinjection is a way to handle lost ticks, right?
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] Re: Problem with QEMU on KVM
2010-04-13 0:28 ` Mulyadi Santosa
@ 2010-04-13 16:32 ` Jan Kiszka
2010-04-19 6:45 ` Gerhard Wiesinger
0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2010-04-13 16:32 UTC (permalink / raw)
To: Mulyadi Santosa; +Cc: Gerhard Wiesinger, qemu-devel
Mulyadi Santosa wrote:
> Hi Jamie...
>
> On Mon, Apr 12, 2010 at 19:07, Jamie Lokier <jamie@shareable.org> wrote:
>> There are various -no-kvm-XXX options to try:
>>
>> -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
>> -no-kvm-pit disable KVM kernel mode PIT
>> -no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
>
> I try to read the source code without too much luck understanding the
> meaning of the above parameters, especially the reinjection. Please
> CMIIW, interrupt reinjection is a way to handle lost ticks, right?
Those switches only exist in the qemu-kvm branch. The fact that
-enable-kvm has some effect for you makes me think that you tried
upstream KVM support (ie. the one that comes with vanilla QEMU), right?
It would be interesting to check if you can reproduce the problem also
with qemu-kvm(-0.12.3 or git head). As you may also face an issue of the
kvm kernel bits, it would be furthermore helpful to check with the
latest kernel from kvm.git or the modules build via kvm-kmod as well.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-12 12:07 ` Jamie Lokier
2010-04-13 0:28 ` Mulyadi Santosa
@ 2010-04-13 19:38 ` Gerhard Wiesinger
1 sibling, 0 replies; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-13 19:38 UTC (permalink / raw)
To: Jamie Lokier; +Cc: Mulyadi Santosa, qemu-devel
On Mon, 12 Apr 2010, Jamie Lokier wrote:
> Mulyadi Santosa wrote:
>> Hi Gerhard...
>>
>> On Sun, Apr 11, 2010 at 20:52, Gerhard Wiesinger <lists@wiesinger.com> wrote:
>>> OK, uses the following ports:
>>> Port 0x20: 8259 interrupt controller
>>> Port 0x40: 8253 timer
>>>
>>> Interrupt 0x1A:
>>> ah=0x00: fetches system timer counters
>>> ah=0x02: reads the clock
>>> ah=0x04: fetches date
>>>
>>> So there must be something wrong with KVM with the above functionality (I
>>> guess the timers).
>>
>> Hmm, my silly guess is, maybe the timer is seen as decremented....or
>> at least "stuck".
>>
>> I have very little knowledge about git, but maybe you can start doing
>> git bisect to narrow which git commit that introduce such behaviour.
>> Meanwhile, let's wait for comments from one of the KVM developers.
>
> There are various -no-kvm-XXX options to try:
>
> -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
> -no-kvm-pit disable KVM kernel mode PIT
> -no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
>
> Any of them might be causing this problem.
>
> They disable in-kernel emulation of the interrupt controller and timer
> chips, and force the qemu version to be used. It's possible the
> in-kernel emulation is buggier than the qemu version.
Hello Jamie, thanx so far.
I'm starting in this way:
/root/download/qemu/qemu-0.12.3/x86_64-softmmu/qemu-system-x86_64 -enable-kvm -a_lot_of_other_options
All options you mentioned don't work:
/root/download/qemu/qemu-0.12.3/x86_64-softmmu/qemu-system-x86_64: invalid option -- '-no-kvm-irqchip'
/root/download/qemu/qemu-0.12.3/x86_64-softmmu/qemu-system-x86_64: invalid option -- '-no-kvm-pit'
/root/download/qemu/qemu-0.12.3/x86_64-softmmu/qemu-system-x86_64: invalid option -- '-no-kvm-no-kvm-irqchip'
Is there another way of startup or is it working only on newer versions?
BTW: For me it is very unclear what's the difference between the
following commands:
qemu
qemu -enable-kvm
kvm
How can I build the kvm executable? Different source tree? Newer version
from branch?
Maybe someone can explain the different versions of qemu/kvm and branches
etc. and possible features in detail.
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] Re: Problem with QEMU on KVM
2010-04-13 16:32 ` [Qemu-devel] " Jan Kiszka
@ 2010-04-19 6:45 ` Gerhard Wiesinger
2010-04-19 10:39 ` Jan Kiszka
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-19 6:45 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Mulyadi Santosa, qemu-devel
On Tue, 13 Apr 2010, Jan Kiszka wrote:
> Mulyadi Santosa wrote:
>> Hi Jamie...
>>
>> On Mon, Apr 12, 2010 at 19:07, Jamie Lokier <jamie@shareable.org> wrote:
>>> There are various -no-kvm-XXX options to try:
>>>
>>> -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
>>> -no-kvm-pit disable KVM kernel mode PIT
>>> -no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
>>
>> I try to read the source code without too much luck understanding the
>> meaning of the above parameters, especially the reinjection. Please
>> CMIIW, interrupt reinjection is a way to handle lost ticks, right?
>
> Those switches only exist in the qemu-kvm branch. The fact that
> -enable-kvm has some effect for you makes me think that you tried
> upstream KVM support (ie. the one that comes with vanilla QEMU), right?
>
I tried 0.12.3 stable and also qemu git master:
http://git.savannah.gnu.org/cgit/qemu.git/log/
> It would be interesting to check if you can reproduce the problem also
> with qemu-kvm(-0.12.3 or git head). As you may also face an issue of the
> kvm kernel bits, it would be furthermore helpful to check with the
> latest kernel from kvm.git or the modules build via kvm-kmod as well.
Can you please post links to the different git repositories, since a lot
of different repositories exist here (qemu-kvm and kernel).
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] Re: Problem with QEMU on KVM
2010-04-19 6:45 ` Gerhard Wiesinger
@ 2010-04-19 10:39 ` Jan Kiszka
0 siblings, 0 replies; 20+ messages in thread
From: Jan Kiszka @ 2010-04-19 10:39 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: Mulyadi Santosa, qemu-devel
Gerhard Wiesinger wrote:
> On Tue, 13 Apr 2010, Jan Kiszka wrote:
>
>> Mulyadi Santosa wrote:
>>> Hi Jamie...
>>>
>>> On Mon, Apr 12, 2010 at 19:07, Jamie Lokier <jamie@shareable.org> wrote:
>>>> There are various -no-kvm-XXX options to try:
>>>>
>>>> -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
>>>> -no-kvm-pit disable KVM kernel mode PIT
>>>> -no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection
>>> I try to read the source code without too much luck understanding the
>>> meaning of the above parameters, especially the reinjection. Please
>>> CMIIW, interrupt reinjection is a way to handle lost ticks, right?
>> Those switches only exist in the qemu-kvm branch. The fact that
>> -enable-kvm has some effect for you makes me think that you tried
>> upstream KVM support (ie. the one that comes with vanilla QEMU), right?
>>
>
> I tried 0.12.3 stable and also qemu git master:
> http://git.savannah.gnu.org/cgit/qemu.git/log/
>
>> It would be interesting to check if you can reproduce the problem also
>> with qemu-kvm(-0.12.3 or git head). As you may also face an issue of the
>> kvm kernel bits, it would be furthermore helpful to check with the
>> latest kernel from kvm.git or the modules build via kvm-kmod as well.
>
> Can you please post links to the different git repositories, since a lot
> of different repositories exist here (qemu-kvm and kernel).
http://www.linux-kvm.org/page/Code
HTH,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-10 20:09 [Qemu-devel] Problem with QEMU on KVM Gerhard Wiesinger
2010-04-11 10:19 ` Mulyadi Santosa
@ 2010-04-19 18:37 ` Gerhard Wiesinger
2010-04-21 0:36 ` Jamie Lokier
1 sibling, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-19 18:37 UTC (permalink / raw)
Cc: qemu-devel, Gerd Hoffmann
On Sat, 10 Apr 2010, Gerhard Wiesinger wrote:
> Hello,
>
> Booting DOS 6.22 with NT4 Bootloader works fine. With enabled KVM it boots,
> but hangs at counting down the boot loader selection menu (30s, 29s, hang).
> Booting Knoppix 6.2 from CD wwith KVM orks well.
>
> Versions (0.12.3):
> x86_64-softmmu: OK
> i386-softmmu: OK
> x86_64-softmmu with -enable-kvm: Boot problem
> i386-softmmu with -enable-kvm: Boot problem
>
> Host is: Fedora 11
> 2.6.30.10-105.2.23.fc11.x86 on AMD Phenom II Quad Core
Hello,
OK, works well with version from
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
The only thing which is broken so far in DOS: PS/2 mouse does not work
correctly with VNC (buttons are pressed even if no button is pressed, position is
random). This also happens with the unstable version of QEMU, so this is
looks like not to be KVM related:
http://git.savannah.gnu.org/cgit/qemu.git/
(Works well with 0.12.3 stable)
Any ideas from which change this might come (PS/2 mouse code seems to be
stable only keyboard LEDs added by Gerd)?
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-19 18:37 ` Gerhard Wiesinger
@ 2010-04-21 0:36 ` Jamie Lokier
2010-04-21 18:20 ` Gerhard Wiesinger
0 siblings, 1 reply; 20+ messages in thread
From: Jamie Lokier @ 2010-04-21 0:36 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: qemu-devel, Gerd Hoffmann
Gerhard Wiesinger wrote:
> Any ideas from which change this might come (PS/2 mouse code seems to be
> stable only keyboard LEDs added by Gerd)?
No, but you might find it with "git bisect" since you have a working
and non-working version.
-- Jamie
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-21 0:36 ` Jamie Lokier
@ 2010-04-21 18:20 ` Gerhard Wiesinger
2010-04-22 10:47 ` Gerd Hoffmann
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-21 18:20 UTC (permalink / raw)
To: Jamie Lokier; +Cc: qemu-devel, Gerd Hoffmann
On Wed, 21 Apr 2010, Jamie Lokier wrote:
> Gerhard Wiesinger wrote:
>> Any ideas from which change this might come (PS/2 mouse code seems to be
>> stable only keyboard LEDs added by Gerd)?
>
> No, but you might find it with "git bisect" since you have a working
> and non-working version.
Tried that, but no useful output (at least for me):
git bisect start
git bisect bad
git bisect good v0.12.3
Bisecting: a merge base must be tested
[749717a0ea2f60d33d01c1e37fa24dfa7250dfc0] Add S390 maintainer information
Had also a look at ps2.c/ps2.h, pckbd.c: There were no changes which could
explain such a behaviour. Also keyboard is very strange which switches to
CAPS LOCK (shift state) very unmotivated.
Can someone reproduce this behaviour, maybe with VNC and also with SDL?
Any further ideas?
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-21 18:20 ` Gerhard Wiesinger
@ 2010-04-22 10:47 ` Gerd Hoffmann
2010-04-23 19:50 ` Gerhard Wiesinger
0 siblings, 1 reply; 20+ messages in thread
From: Gerd Hoffmann @ 2010-04-22 10:47 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: qemu-devel
Hi,
> Had also a look at ps2.c/ps2.h, pckbd.c: There were no changes which
> could explain such a behaviour. Also keyboard is very strange which
> switches to CAPS LOCK (shift state) very unmotivated.
Hmm. Recent qemu tries hard to make sure vncviewer and guest
capslock/numlock state are in sync. It is a heuristic though and can
fail in certain cases. Try "-vnc $display,no-lock-key-sync", does that
help?
cheers,
Gerd
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-22 10:47 ` Gerd Hoffmann
@ 2010-04-23 19:50 ` Gerhard Wiesinger
2010-04-24 6:58 ` Gerhard Wiesinger
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-23 19:50 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Anthony Liguori, qemu-devel
On Thu, 22 Apr 2010, Gerd Hoffmann wrote:
> Hi,
>
>> Had also a look at ps2.c/ps2.h, pckbd.c: There were no changes which
>> could explain such a behaviour. Also keyboard is very strange which
>> switches to CAPS LOCK (shift state) very unmotivated.
>
> Hmm. Recent qemu tries hard to make sure vncviewer and guest
> capslock/numlock state are in sync. It is a heuristic though and can fail in
> certain cases. Try "-vnc $display,no-lock-key-sync", does that help?
Tracked down the problem of the mouse that te mouse is in absolute
mouse mode (verified by logging, therefore coordinates are very high and absolute
and not relative):
static void pointer_event(VncState *vs, int button_mask, int x, int y)
{
...
if (vs->absolute) {
kbd_mouse_event(ds_get_width(vs->ds) > 1 ?
x * 0x7FFF / (ds_get_width(vs->ds) - 1) : 0x4000,
ds_get_height(vs->ds) > 1 ?
y * 0x7FFF / (ds_get_height(vs->ds) - 1) : 0x4000,
dz, buttons);
} else if (vnc_has_feature(vs, VNC_FEATURE_POINTER_TYPE_CHANGE)) {
x -= 0x7FFF;
y -= 0x7FFF;
/////////////////////////////////////////////////////////////
// We get here in (verified by core dump), but we should get into last
// else
/////////////////////////////////////////////////////////////
kbd_mouse_event(x, y, dz, buttons);
} else {
if (vs->last_x != -1)
kbd_mouse_event(x - vs->last_x,
y - vs->last_y,
dz, buttons);
vs->last_x = x;
vs->last_y = y;
}
...
}
Guess problems comes from the following commit (not yet verified):
commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
Author: Anthony Liguori <aliguori@us.ibm.com>
Date: Wed Mar 10 09:38:29 2010 -0600
input: make vnc use mouse mode notifiers
When we switch to absolute mode, we send out a notification (if the client
supports it). Today, we only send this notification when the client sends us
a mouse event and we're in the wrong mode.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-23 19:50 ` Gerhard Wiesinger
@ 2010-04-24 6:58 ` Gerhard Wiesinger
2010-05-04 5:09 ` Gerhard Wiesinger
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-04-24 6:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Gerd Hoffmann
On Fri, 23 Apr 2010, Gerhard Wiesinger wrote:
> On Thu, 22 Apr 2010, Gerd Hoffmann wrote:
>
>> Hi,
>>
>>> Had also a look at ps2.c/ps2.h, pckbd.c: There were no changes which
>>> could explain such a behaviour. Also keyboard is very strange which
>>> switches to CAPS LOCK (shift state) very unmotivated.
>>
>> Hmm. Recent qemu tries hard to make sure vncviewer and guest
>> capslock/numlock state are in sync. It is a heuristic though and can fail
>> in certain cases. Try "-vnc $display,no-lock-key-sync", does that help?
>
> Tracked down the problem of the mouse that te mouse is in absolute mouse mode
> (verified by logging, therefore coordinates are very high and absolute and
> not relative):
> static void pointer_event(VncState *vs, int button_mask, int x, int y)
> {
> ...
> if (vs->absolute) {
> kbd_mouse_event(ds_get_width(vs->ds) > 1 ?
> x * 0x7FFF / (ds_get_width(vs->ds) - 1) : 0x4000,
> ds_get_height(vs->ds) > 1 ?
> y * 0x7FFF / (ds_get_height(vs->ds) - 1) : 0x4000,
> dz, buttons);
> } else if (vnc_has_feature(vs, VNC_FEATURE_POINTER_TYPE_CHANGE)) {
> x -= 0x7FFF;
> y -= 0x7FFF;
> /////////////////////////////////////////////////////////////
> // We get here in (verified by core dump), but we should get into last
> // else
> /////////////////////////////////////////////////////////////
> kbd_mouse_event(x, y, dz, buttons);
> } else {
> if (vs->last_x != -1)
> kbd_mouse_event(x - vs->last_x,
> y - vs->last_y,
> dz, buttons);
> vs->last_x = x;
> vs->last_y = y;
> }
>
> ...
> }
>
> Guess problems comes from the following commit (not yet verified):
> commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
> Author: Anthony Liguori <aliguori@us.ibm.com>
> Date: Wed Mar 10 09:38:29 2010 -0600
>
> input: make vnc use mouse mode notifiers
>
> When we switch to absolute mode, we send out a notification (if the
> client
> supports it). Today, we only send this notification when the client
> sends us
> a mouse event and we're in the wrong mode.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Ok, verified:
git revert -n 37c34d9d5d87ea9d51760310c8863b82cb8c055a
=> works well.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-04-24 6:58 ` Gerhard Wiesinger
@ 2010-05-04 5:09 ` Gerhard Wiesinger
2010-05-04 13:32 ` Anthony Liguori
0 siblings, 1 reply; 20+ messages in thread
From: Gerhard Wiesinger @ 2010-05-04 5:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Gerd Hoffmann
On Sat, 24 Apr 2010, Gerhard Wiesinger wrote:
>> Guess problems comes from the following commit (not yet verified):
>> commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>> Author: Anthony Liguori <aliguori@us.ibm.com>
>> Date: Wed Mar 10 09:38:29 2010 -0600
>>
>> input: make vnc use mouse mode notifiers
>>
>> When we switch to absolute mode, we send out a notification (if the
>> client
>> supports it). Today, we only send this notification when the client
>> sends us
>> a mouse event and we're in the wrong mode.
>>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>
>
> Ok, verified:
> git revert -n 37c34d9d5d87ea9d51760310c8863b82cb8c055a
> => works well.
Still got no feedback and saw no further changes to fix this problem.
Thnx.
Ciao,
Gerhard
--
http://www.wiesinger.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] Problem with QEMU on KVM
2010-05-04 5:09 ` Gerhard Wiesinger
@ 2010-05-04 13:32 ` Anthony Liguori
2010-05-04 21:30 ` [Qemu-devel] " K D
0 siblings, 1 reply; 20+ messages in thread
From: Anthony Liguori @ 2010-05-04 13:32 UTC (permalink / raw)
To: Gerhard Wiesinger; +Cc: qemu-devel, Gerd Hoffmann
On 05/04/2010 12:09 AM, Gerhard Wiesinger wrote:
> On Sat, 24 Apr 2010, Gerhard Wiesinger wrote:
>>> Guess problems comes from the following commit (not yet verified):
>>> commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>>> Author: Anthony Liguori <aliguori@us.ibm.com>
>>> Date: Wed Mar 10 09:38:29 2010 -0600
>>>
>>> input: make vnc use mouse mode notifiers
>>>
>>> When we switch to absolute mode, we send out a notification (if
>>> the client
>>> supports it). Today, we only send this notification when the
>>> client sends us
>>> a mouse event and we're in the wrong mode.
>>>
>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>
>>
>> Ok, verified:
>> git revert -n 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>> => works well.
>
> Still got no feedback and saw no further changes to fix this problem.
Fix is on the list.
Regards,
Anthony Liguori
> Thnx.
>
> Ciao,
> Gerhard
>
> --
> http://www.wiesinger.com/
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Problem with QEMU / KVM
2010-05-04 13:32 ` Anthony Liguori
@ 2010-05-04 21:30 ` K D
0 siblings, 0 replies; 20+ messages in thread
From: K D @ 2010-05-04 21:30 UTC (permalink / raw)
To: Anthony Liguori, Gerhard Wiesinger; +Cc: qemu-devel, kvm, Gerd Hoffmann
[-- Attachment #1: Type: text/plain, Size: 2867 bytes --]
Hi
I built 2.6.27.10 kernel with KVM configured as built-in.
CONFIG_HAVE_KVM=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_INTEL=y
I built qemu-kvm 0.12.2 from sources pointing to above kernel. When I spawn a VM, it hangs at boot. Pl see below. I copied qemu-kvm binary and bios, vga etc binaries. I installed grub on a manually created img file. This image has nothing but grub, its stage1,1_5,stage2, my kernel and initrd files.
Am spawning VM as below:
qemu-system-x86_64 -hda vmhd.img -L . -curses -show-cursor
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> kernel /boot/vmos root=/dev/ram0 ramdisk_size=32768 rw single
[Linux-bzImage, setup=0x1800, size=0x1cb9b0]
grub> initrd /boot/initrdfs.gz
[Linux-initrd @ 0x6751000, 0x189b587 bytes]
grub> boot
I copied all these binaries from my dev host to this linux box.
-rw-r--r-- 1 root root 131072 May 2 21:31 bios.bin
-rw-r--r-- 1 root root 1025 May 2 21:31 linuxboot.bin
-rw-r--r-- 1 root root 1024 May 2 21:31 multiboot.bin
-rw-r--r-- 1 root root 524288 May 2 21:31 ppc_rom.bin
-rw-r--r-- 1 root root 72192 May 2 21:31 pxe-e1000.bin
-rw-r--r-- 1 root root 56832 May 2 21:31 pxe-i82559er.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-ne2k_pci.bin
-rw-r--r-- 1 root root 56832 May 2 21:31 pxe-pcnet.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-rtl8139.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-virtio.bin
-rwxr-xr-x 1 root root 8960 May 2 21:31 vapic.bin
-rw-r--r-- 1 root root 35840 May 2 21:31 vgabios-cirrus.bin
-rw-r--r-- 1 root root 39936 May 2 21:31 vgabios.bin
Appreciate your help.
________________________________
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Gerhard Wiesinger <lists@wiesinger.com>
Cc: qemu-devel@nongnu.org; Gerd Hoffmann <kraxel@redhat.com>
Sent: Tue, May 4, 2010 6:32:50 AM
Subject: Re: [Qemu-devel] Problem with QEMU on KVM
On 05/04/2010 12:09 AM, Gerhard Wiesinger wrote:
> On Sat, 24 Apr 2010, Gerhard Wiesinger wrote:
>>> Guess problems comes from the following commit (not yet verified):
>>> commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>>> Author: Anthony Liguori <aliguori@us.ibm.com>
>>> Date: Wed Mar 10 09:38:29 2010 -0600
>>>
>>> input: make vnc use mouse mode notifiers
>>>
>>> When we switch to absolute mode, we send out a notification (if the client
>>> supports it). Today, we only send this notification when the client sends us
>>> a mouse event and we're in the wrong mode.
>>>
>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>
>>
>> Ok, verified:
>> git revert -n 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>> => works well.
>
> Still got no feedback and saw no further changes to fix this problem.
Fix is on the list.
Regards,
Anthony Liguori
> Thnx.
>
> Ciao,
> Gerhard
>
> -- http://www.wiesinger.com/
>
[-- Attachment #2: Type: text/html, Size: 4455 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] Problem with QEMU / KVM
@ 2010-05-04 21:30 ` K D
0 siblings, 0 replies; 20+ messages in thread
From: K D @ 2010-05-04 21:30 UTC (permalink / raw)
To: Anthony Liguori, Gerhard Wiesinger; +Cc: qemu-devel, kvm, Gerd Hoffmann
[-- Attachment #1: Type: text/plain, Size: 2867 bytes --]
Hi
I built 2.6.27.10 kernel with KVM configured as built-in.
CONFIG_HAVE_KVM=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_INTEL=y
I built qemu-kvm 0.12.2 from sources pointing to above kernel. When I spawn a VM, it hangs at boot. Pl see below. I copied qemu-kvm binary and bios, vga etc binaries. I installed grub on a manually created img file. This image has nothing but grub, its stage1,1_5,stage2, my kernel and initrd files.
Am spawning VM as below:
qemu-system-x86_64 -hda vmhd.img -L . -curses -show-cursor
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> kernel /boot/vmos root=/dev/ram0 ramdisk_size=32768 rw single
[Linux-bzImage, setup=0x1800, size=0x1cb9b0]
grub> initrd /boot/initrdfs.gz
[Linux-initrd @ 0x6751000, 0x189b587 bytes]
grub> boot
I copied all these binaries from my dev host to this linux box.
-rw-r--r-- 1 root root 131072 May 2 21:31 bios.bin
-rw-r--r-- 1 root root 1025 May 2 21:31 linuxboot.bin
-rw-r--r-- 1 root root 1024 May 2 21:31 multiboot.bin
-rw-r--r-- 1 root root 524288 May 2 21:31 ppc_rom.bin
-rw-r--r-- 1 root root 72192 May 2 21:31 pxe-e1000.bin
-rw-r--r-- 1 root root 56832 May 2 21:31 pxe-i82559er.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-ne2k_pci.bin
-rw-r--r-- 1 root root 56832 May 2 21:31 pxe-pcnet.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-rtl8139.bin
-rw-r--r-- 1 root root 56320 May 2 21:31 pxe-virtio.bin
-rwxr-xr-x 1 root root 8960 May 2 21:31 vapic.bin
-rw-r--r-- 1 root root 35840 May 2 21:31 vgabios-cirrus.bin
-rw-r--r-- 1 root root 39936 May 2 21:31 vgabios.bin
Appreciate your help.
________________________________
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Gerhard Wiesinger <lists@wiesinger.com>
Cc: qemu-devel@nongnu.org; Gerd Hoffmann <kraxel@redhat.com>
Sent: Tue, May 4, 2010 6:32:50 AM
Subject: Re: [Qemu-devel] Problem with QEMU on KVM
On 05/04/2010 12:09 AM, Gerhard Wiesinger wrote:
> On Sat, 24 Apr 2010, Gerhard Wiesinger wrote:
>>> Guess problems comes from the following commit (not yet verified):
>>> commit 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>>> Author: Anthony Liguori <aliguori@us.ibm.com>
>>> Date: Wed Mar 10 09:38:29 2010 -0600
>>>
>>> input: make vnc use mouse mode notifiers
>>>
>>> When we switch to absolute mode, we send out a notification (if the client
>>> supports it). Today, we only send this notification when the client sends us
>>> a mouse event and we're in the wrong mode.
>>>
>>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>
>>
>> Ok, verified:
>> git revert -n 37c34d9d5d87ea9d51760310c8863b82cb8c055a
>> => works well.
>
> Still got no feedback and saw no further changes to fix this problem.
Fix is on the list.
Regards,
Anthony Liguori
> Thnx.
>
> Ciao,
> Gerhard
>
> -- http://www.wiesinger.com/
>
[-- Attachment #2: Type: text/html, Size: 4447 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2010-05-04 21:31 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-10 20:09 [Qemu-devel] Problem with QEMU on KVM Gerhard Wiesinger
2010-04-11 10:19 ` Mulyadi Santosa
2010-04-11 13:52 ` Gerhard Wiesinger
2010-04-12 9:16 ` Mulyadi Santosa
2010-04-12 12:07 ` Jamie Lokier
2010-04-13 0:28 ` Mulyadi Santosa
2010-04-13 16:32 ` [Qemu-devel] " Jan Kiszka
2010-04-19 6:45 ` Gerhard Wiesinger
2010-04-19 10:39 ` Jan Kiszka
2010-04-13 19:38 ` [Qemu-devel] " Gerhard Wiesinger
2010-04-19 18:37 ` Gerhard Wiesinger
2010-04-21 0:36 ` Jamie Lokier
2010-04-21 18:20 ` Gerhard Wiesinger
2010-04-22 10:47 ` Gerd Hoffmann
2010-04-23 19:50 ` Gerhard Wiesinger
2010-04-24 6:58 ` Gerhard Wiesinger
2010-05-04 5:09 ` Gerhard Wiesinger
2010-05-04 13:32 ` Anthony Liguori
2010-05-04 21:30 ` Problem with QEMU / KVM K D
2010-05-04 21:30 ` [Qemu-devel] " K D
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.