i386/vmmouse: Properly reset state
PATCH 1/1 i386/vmmouse: Properly reset state
From: Jan Kiszka <[email protected]>
nb_queue was not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.
The state of absolute does not matter as the next vmmouse_update_handler call will align it again.
--- hw/i386/vmmouse.c | 1 + 1 file changed, 1 insertion(+)
hw/i386/vmmouse.c +1 -0
@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d)VMMouseState *s =VMMOUSE (d); s->queue_size =VMMOUSE_QUEUE_SIZE ; + s->nb_queue =0 ;vmmouse_disable (s); }
--
2.16.4
Quoted 26 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
nb_queuewas not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.The state of absolute does not matter as the next
vmmouse_update_handlercall will align it again.Signed-off-by Jan Kiszka <[email protected]>--- hw/i386/vmmouse.c | 1 + 1 file changed, 1 insertion(+)hw/i386/vmmouse.c +1
-1@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d)VMMouseState *s =VMMOUSE (d); s->queue_size =VMMOUSE_QUEUE_SIZE ; + s->nb_queue =0 ;vmmouse_disable (s); } --
Quoted 3 lines
2.16.4
Ping - or who is looking after this?
Jan
Eduardo Habkost
Reviewed-byQuoted 24 lines · Jan Kiszka
Quoted 23 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
nb_queuewas not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.The state of absolute does not matter as the next
vmmouse_update_handlercall will align it again.Signed-off-by Jan Kiszka <[email protected]>--- hw/i386/vmmouse.c | 1 + 1 file changed, 1 insertion(+)hw/i386/vmmouse.c +1
-0@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d)VMMouseState *s =VMMOUSE (d); s->queue_size =VMMOUSE_QUEUE_SIZE ; + s->nb_queue =0 ;
Quoted 8 lines
Quoted 6 lines
hw/i386/vmmouse.c +0
-1vmmouse_disable (s); } --2.16.4
Ping - or who is looking after this?
Despite being in hw/i386, I think we can say vmmouse.c doesn't have a maintainer. Last time someone changed vmmouse.c in a meaningful way (not just adapting to API changes or removing duplicate code) was in 2012.
But the change makes sense to me, so:
I'll queue it.
Signature · 1 line
Eduardo
Philippe Mathieu-Daudé
Reviewed-byHi Jan,
Quoted 22 lines · Eduardo Habkost
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
nb_queuewas not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.The state of absolute does not matter as the next
vmmouse_update_handlercall will align it again.Signed-off-by Jan Kiszka <[email protected]>--- hw/i386/vmmouse.c | 1 + 1 file changed, 1 insertion(+)hw/i386/vmmouse.c +0
-0@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d)VMMouseState *s =VMMOUSE (d);
Quoted 2 lines
Quoted 2 lines
hw/i386/vmmouse.c static void vmmouse_reset(DeviceState *d) · line 260
Quoted 2 lines
hw/i386/vmmouse.c +1
-0s->queue_size =VMMOUSE_QUEUE_SIZE ; + s->nb_queue =0 ;
Don't we also need to reset the status in case vmmouse_get_status() is called directly after reset?
s->status = 0;
With it:
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
hw/i386/vmmouse.c +0
-1vmmouse_disable (s); } --2.16.4
Quoted 7 lines
Quoted 1 line
Ping - or who is looking after this?
Despite being in hw/i386, I think we can say
vmmouse.cdoesn't have a maintainer. Last time someone changedvmmouse.cin a meaningful way (not just adapting to API changes or removing duplicate code) was in 2012.
Well it does has a few:
$ ./scripts/get_maintainer.pl -f hw/i386/vmmouse.c "Michael S. Tsirkin" <[email protected]> (supporter:PC) Marcel Apfelbaum <[email protected]> (supporter:PC) Paolo Bonzini <[email protected]> (maintainer:X86 TCG CPUs) Richard Henderson <[email protected]> (maintainer:X86 TCG CPUs) Eduardo Habkost <[email protected]> (maintainer:X86 TCG CPUs)
However the correct section should rather be "PC Chipset".
Quoted 6 lines
But the change makes sense to me, so:
Reviewed-by Eduardo Habkost <[email protected]>I'll queue it.
Quoted 25 lines · Philippe Mathieu-Daudé
Hi Jan,
Quoted 22 lines · Eduardo Habkost
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
nb_queuewas not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.The state of absolute does not matter as the next
vmmouse_update_handlercall will align it again.Signed-off-by Jan Kiszka <[email protected]>--- hw/i386/vmmouse.c | 1 + 1 file changed, 1 insertion(+)hw/i386/vmmouse.c +0
-0@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d)VMMouseState *s =VMMOUSE (d);
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
hw/i386/vmmouse.c static void vmmouse_reset(DeviceState *d) · line 260
Quoted 2 lines
hw/i386/vmmouse.c +1
-0s->queue_size =VMMOUSE_QUEUE_SIZE ; + s->nb_queue =0 ;Don't we also need to reset the status in case
vmmouse_get_status()is called directly after reset?s->status = 0;
Thanks for checking. We call vmmouse_disable() here, and that sets status to 0xffff anyway.
Jan
Quoted 36 lines
With it:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
hw/i386/vmmouse.c +0
-1vmmouse_disable (s); } --2.16.4
Quoted 7 lines
Quoted 1 line
Ping - or who is looking after this?
Despite being in hw/i386, I think we can say
vmmouse.cdoesn't have a maintainer. Last time someone changedvmmouse.cin a meaningful way (not just adapting to API changes or removing duplicate code) was in 2012.Well it does has a few:
$ ./scripts/get_maintainer.pl -f hw/i386/vmmouse.c "Michael S. Tsirkin" <[email protected]> (supporter:PC) Marcel Apfelbaum <[email protected]> (supporter:PC) Paolo Bonzini <[email protected]> (maintainer:X86 TCG CPUs) Richard Henderson <[email protected]> (maintainer:X86 TCG CPUs) Eduardo Habkost <[email protected]> (maintainer:X86 TCG CPUs)However the correct section should rather be "PC Chipset".
Quoted 6 lines
But the change makes sense to me, so:
Reviewed-by Eduardo Habkost <[email protected]>I'll queue it.
Philippe Mathieu-Daudé
Reviewed-byQuoted 33 lines · Jan Kiszka
Quoted 32 lines · Philippe Mathieu-Daudé
Hi Jan,
Quoted 23 lines · Eduardo Habkost
Quoted 22 lines · Jan Kiszka
Quoted 21 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
nb_queuewas not zeroed so that we no longer delivered events if a previous guest left the device in an overflow state.The state of absolute does not matter as the next
vmmouse_update_handler
call will align it again.Signed-off-by Jan Kiszka <[email protected]>---
hw/i386/vmmouse.c| 1 +1 file changed, 1 insertion(+)hw/i386/vmmouse.c +0
-0@@ -257,6 +257,7 @@ static void vmmouse_reset(DeviceState *d) VMMouseState *s = VMMOUSE(d);Quoted 2 lines
Quoted 2 lines
hw/i386/vmmouse.c static void vmmouse_reset(DeviceState *d) · line 260
Quoted 2 lines
hw/i386/vmmouse.c +1
-0s->queue_size = VMMOUSE_QUEUE_SIZE; + s->nb_queue = 0;Don't we also need to reset the status in case
vmmouse_get_status()is called directly after reset?
Quoted 6 lines
Quoted 2 lines
s->status= 0;Thanks for checking. We call
vmmouse_disable()here, and that sets status to0xffffanyway.
I missed that, you are correct :)
So:
Quoted 33 lines
Quoted 33 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
hw/i386/vmmouse.c +0
-0vmmouse_disable(s); }Signature · 1 line
2.16.4Quoted 7 lines
Quoted 1 line
Ping - or who is looking after this?
Despite being in hw/i386, I think we can say
vmmouse.cdoesn't have a maintainer. Last time someone changedvmmouse.cin a meaningful way (not just adapting to API changes or removing duplicate code) was in 2012.Well it does has a few:
$ ./scripts/get_maintainer.pl -f hw/i386/vmmouse.c "Michael S. Tsirkin" <[email protected]> (supporter:PC) Marcel Apfelbaum <[email protected]> (supporter:PC) Paolo Bonzini <[email protected]> (maintainer:X86 TCG CPUs) Richard Henderson <[email protected]> (maintainer:X86 TCG CPUs) Eduardo Habkost <[email protected]> (maintainer:X86 TCG CPUs)However the correct section should rather be "PC Chipset".
Quoted 6 lines
But the change makes sense to me, so:
Reviewed-by Eduardo Habkost <[email protected]>I'll queue it.