x86 definitions (especially CPUState uses) prevent many files from
being compiled within libhw.
Move x86 specific declarations (APIC stuff) to a separate file.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This reverts commit d7234f4d7e.
Conflicts:
hw/xen_machine_pv.c
This should have never been committed.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
There is no need to save r7, it is used to store the address
of the env structure and is not modified by GCC.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
mkdir() only takes path argument on mingw32:
CC i386-softmmu/vl.o
/src/qemu/vl.c: In function 'qmp_add_default':
/src/qemu/vl.c:3763: error: too many arguments to function 'mkdir'
/src/qemu/vl.c:3769: error: too many arguments to function 'mkdir'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
CC curses.o
cc1: warnings being treated as errors
/src/qemu/curses.c: In function 'curses_display_init':
/src/qemu/curses.c:341: error: initialization from incompatible pointer type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Basically, -qmp unix:%{home}/.qemu/qmp/%{uuid}.sock,server,nowait
%{uuid} will be -uuid if it's specified, otherwise, if libuuid is available,
we generate a uuid. If it's not available, we don't create one.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Instead, we introduce a default_qmp flag. We don't use it yet, but will in the
next patch.
This has a user-visible impact as specifying just -qmp will now also show a
monitor on the 'vc'.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Right now, downscript is not invoked reliably. If you execute 'quit' from the
monitor, it won't be invoked.
This fixes that by converting tap to use an exit_notifier to execute the
downscript. In this case, allowing an exit notifier to include state is
critically important for the conversion.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
All of these users have global state so we really don't see a benefit from
exit_notifier. However, using exit_notifier means that there's one less
justification for having global state in the first place.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Today we poll the mouse mode whenever there is a mouse movement. There is a
subtle usability problem with this though.
If we're in relative mode and grab is enabled, when we change to absolute mode,
we break grab. This gives a user a seamless transition when the new pointer
is enabled.
But because we poll for mouse change, this grab break won't occur until the user
attempts to move the mouse. By using notifiers, the grab break happens as soon
as possible.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>
For QMP, we just add an attribute which is backwards compatible. For the human
monitor, we add (absolute) to the end of the line.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Right now, DisplayState clients rely on polling the mouse mode to determine
when the device is changed to an absolute device. Use a notification list to
add an explicit notification.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute
device. kbd_mouse_has_absolute tells us whether we have any device that is
capable of absolute input.
This lets us tell a user that they have configured an absolute device but that
the guest is not currently using it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
And convert usb-hid to use it (to avoid regression with bisection)
Right now, when we do info mice and we've added a usb tablet, we don't see it
until the guest starts using the tablet. We implement this behavior in order
to provide a means to delay registration of a mouse handler since we treat
the last registered handler as the current handler.
This is a usability problem though as we would like to give the user feedback
that they've either 1) not added an absolute device 2) there is an absolute
device but the guest isn't using it 3) we have an absolute device and it's
active.
By using QTAILQ and having an explicit activation function that moves the
handler to the front of the queue, we can implement the same semantics as
before with respect to automatically switching to usb tablet while providing
the user with a whole lot more information.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Notifiers are data-less callbacks and a notifier list is a list of registered
notifiers that all are interested in a particular event.
We'll use this in a few patches to implement mouse change notification.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2
- Do not do memory allocations by placing list nodes in notifier
This reverts commit 3c9c706c3b.
This breaks build (gcc 4.3.2):
CC usb-linux.o
cc1: warnings being treated as errors
/src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table':
/src/qemu/usb-linux.c:759: error: 'type' may be used uninitialized in
this function
Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
It allways returned true, that is the equivalent of not having the
callback.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
values are already pointers, no need to cast them to void *
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>