- Sep 18, 2014
-
-
Eduardo Habkost authored
This reverts commit 5e490b6a. Cc: qemu-stable@nongnu.org Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Sep 16, 2014
-
-
Peter Maydell authored
Now we have removed the legacy register_char_driver() we can rename register_char_driver_qapi() to the more obvious and shorter name. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1409653457-27863-6-git-send-email-peter.maydell@linaro.org
-
- Sep 09, 2014
-
-
Hu Tao authored
When using monitor command object_add to add a memory backend whose size is way too big to allocate memory for it, qemu just exits. In the case we'd better give an error message and keep guest running. The problem can be reproduced as follows: 1. run qemu 2. (monitor)object_add memory-backend-ram,size=100000G,id=ram0 Reviewed-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Hu Tao authored
Add parameter errp to memory_region_init_ram and update all call sites to pass in &error_abort. Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Reviewed-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 20, 2014
-
-
Michael S. Tsirkin authored
When memory is allocated on a wrong node, MPOL_MF_STRICT doesn't move it - it just fails the allocation. A simple way to reproduce the failure is with mlock=on realtime feature. The code comment actually says: "ensure policy won't be ignored" so setting MPOL_MF_MOVE seems like a better way to do this. Cc: qemu-stable@nongnu.org Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Aug 18, 2014
-
-
Paolo Bonzini authored
The function is empty after the previous patch, so remove it. Reviewed-by:
Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 06, 2014
-
-
Paolo Bonzini authored
From: Paolo Bonzini <pbonzini@redhat.com> chr-testdev enables a virtio serial channel to be used for guest initiated qemu exits. hw/misc/debugexit already enables guest initiated qemu exits, but only for PC targets. chr-testdev supports any virtio-capable target. kvm-unit-tests/arm is already making use of this backend. Currently there is a single command implemented, "q". It takes a (prefix) argument for the exit code, thus an exit is implemented by writing, e.g. "1q", to the virtio-serial port. It can be used as: $QEMU ... \ -device virtio-serial-device \ -device virtserialport,chardev=ctd -chardev testdev,id=ctd or, use: $QEMU ... \ -device virtio-serial-device \ -device virtconsole,chardev=ctd -chardev testdev,id=ctd to bind it to virtio-serial port0. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 24, 2014
-
-
Eduardo Habkost authored
g_free() is NULL-safe. Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jun 23, 2014
-
-
Paolo Bonzini authored
The next patch will modify this function to initialize state that is common to all backends. Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Jun 19, 2014
-
-
Hu Tao authored
Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> [Raise errors on setting properties if !CONFIG_NUMA. Add BUILD_BUG_ON checks. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Paolo Bonzini authored
A new "share" property can be used with the "memory-file" backend to map memory with MAP_SHARED instead of MAP_PRIVATE. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Paolo Bonzini authored
And allow preallocation of file-based memory even without -mem-prealloc. Some care is necessary because -mem-prealloc does not allow disabling preallocation for hostmem-file. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> MST: comment tweak
-
Hu Tao authored
This allows the superclass to set various policies on the memory region that the subclass creates. Drops hostmem-ram's complete method accordingly. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Hu Tao authored
..to keep names consistant. Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Jun 18, 2014
-
-
Igor Mammedov authored
Provides framework for splitting host RAM allocation/ policies into a separate backend that could be used by devices. Initially only legacy RAM backend is provided, which uses memory_region_init_ram() allocator and compatible with every CLI option that affects memory_region_init_ram(). Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- May 08, 2014
-
-
Michael Tokarev authored
Current Makefile system allows using foo.o-cflags variables to store object-specific CFLAGS. Convert some usages of old syntax (using QEMU_CFLAGS += construct) to the new syntax. Do not touch multifile modules for now, as build system isn't ready for this. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 05, 2014
-
-
Markus Armbruster authored
Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see commit 84d18f06). I guess the error_is_set(errp) in the ObjectProperty set() methods are merely fragile right now, because I can't find a call chain that passes a null errp argument. Make the code more robust and more obviously correct: receive the error in a local variable, then propagate it through the parameter. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Mar 24, 2014
-
-
Richard W.M. Jones authored
backends/baum.c: In function ‘chr_baum_init’: backends/baum.c:569:64: error: missing binary operator before token "(" #if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0) ^ backends/baum.c:598:64: error: missing binary operator before token "(" #if defined(CONFIG_SDL) && SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0) Signed-off-by:
Richard W.M. Jones <rjones@redhat.com> Message-id: 1395437377-5779-1-git-send-email-rjones@redhat.com Reviewed-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Mar 05, 2014
-
-
Dave Airlie authored
I've ported the SDL1.2 code over, and rewritten it to use the SDL2 interface. The biggest changes were in the input handling, where SDL2 has done a major overhaul, and I've had to include a generated translation file to get from SDL2 codes back to qemu compatible ones. I'm still not sure how the keyboard layout code works in qemu, so there may be further work if someone can point me a test case that works with SDL1.2 and doesn't with SDL2. Some SDL env vars we used to set are no longer used by SDL2, Windows, OSX support is untested, I don't think we can link to SDL1.2 and SDL2 at the same time, so I felt using --with-sdlabi=2.0 to select the new code should be fine, like how gtk does it. v1.1: fix keys in text console v1.2: fix shutdown, cleanups a bit of code, support ARGB cursor v2.0: merge the SDL multihead patch into this, g_new the number of consoles needed, wrap DCL inside per-console structure. Signed-off-by:
Dave Airlie <airlied@redhat.com> Fixes & improvements by kraxel: * baum build fix * remove text console logic * adapt to new input core * codestyle fixups Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Jan 28, 2014
-
-
Igor Mammedov authored
in addition fix default backend leak by releasing it if its initialization failed. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Igor Mammedov authored
Introduces USER_CREATABLE interface that must be implemented by objects which are designed to created with -object CLI option or object-add QMP command. Interface provides an ability to do an optional second stage initialization of the object created with -object/object-add commands. By providing complete() callback, which is called after the object properties were set. It allows to: * prevents misusing of -object/object-add by filtering out objects that are not designed for it. * generalize second stage backend initialization instead of adding custom APIs to perform it * early error detection of backend initialization at -object/ object-add time rather than through a proxy DEVICE object that tries to use backend. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Jan 06, 2014
-
-
Paolo Bonzini authored
The file descriptor is never initialized to -1, which makes rng-random close stdin if an object is created and immediately destroyed. If we change it to -1, we also need to protect qemu_set_fd_handler from receiving a bogus file descriptor. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- Nov 21, 2013
-
-
Amos Kong authored
The buffer content might be read out more than once, currently we just repeatedly read the first data block, buffer offset is missing. Cc: qemu-stable@nongnu.org Signed-off-by:
Amos Kong <akong@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Amos Kong authored
We didn't set default chr_name, the free is redundant. Signed-off-by:
Amos Kong <akong@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Amos Kong authored
The buffer content might be read out more than once, currently we just repeatedly read the first data block, buffer offset is missing. Cc: qemu-stable@nongnu.org Signed-off-by:
Amos Kong <akong@redhat.com> Message-id: 1385023371-8198-3-git-send-email-akong@redhat.com Signed-off-by:
Anthony Liguori <aliguori@amazon.com>
-
Amos Kong authored
We didn't set default chr_name, the free is redundant. Signed-off-by:
Amos Kong <akong@redhat.com> Message-id: 1385023371-8198-2-git-send-email-akong@redhat.com Signed-off-by:
Anthony Liguori <aliguori@amazon.com>
-
- Aug 22, 2013
-
-
Alex Bligh authored
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by:
Alex Bligh <alex@alex.org.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Alex Bligh authored
Rename four functions in preparation for new API. Rename qemu_timer_expired to timer_expired Rename qemu_timer_expire_time_ns to timer_expire_time_ns Rename qemu_timer_pending to timer_pending Rename qemu_timer_expired_ns to timer_expired_ns Signed-off-by:
Alex Bligh <alex@alex.org.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 17, 2013
-
-
Luiz Capitulino authored
Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Acked-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jun 10, 2013
-
-
Michael Roth authored
When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET, and it was issued as a bottom-half: 86e94dea Which we basically used to print out a greeting/prompt for the monitor. AFAICT the only reason this was ever done in a BH was because in some cases we'd modify the chr_write handler for a new chardev backend *after* the site where we issued the reset (see: 86e94d:qemu_chr_open_stdio()) At some point this event was renamed to CHR_EVENT_OPENED, and we've maintained the use of this BH ever since. However, due to 9f939df9, we schedule the BH via g_idle_add(), which is causing events to sometimes be delivered after we've already begun processing data from backends, leading to: known bugs: QMP: session negotation resets with OPENED event, in some cases this is causing new sessions to get sporadically reset potential bugs: hw/usb/redirect.c: can_read handler checks for dev->parser != NULL, which may be true if CLOSED BH has not been executed yet. In the past, OPENED quiesced outstanding CLOSED events prior to us reading client data. If it's delayed, our check may allow reads to occur even though we haven't processed the OPENED event yet, and when we do finally get the OPENED event, our state may get reset. qtest.c: can begin session before OPENED event is processed, leading to a spurious reset of the system and irq_levels gdbstub.c: may start a gdb session prior to the machine being paused To fix these, let's just drop the BH. Since the initial reasoning for using it still applies to an extent, work around that by deferring the delivery of CHR_EVENT_OPENED until after the chardevs have been fully initialized, toward the end of qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This defers delivery long enough that we can be assured a CharDriverState is fully initialized before CHR_EVENT_OPENED is sent. Also, rather than requiring each chardev to do an explicit open, do it automatically, and allow the small few who don't desire such behavior to suppress the OPENED-on-init behavior by setting a 'explicit_be_open' flag. We additionally add missing OPENED events for stdio backends on w32, which were previously not being issued, causing us to not recieve the banner and initial prompts for qmp/hmp. Reported-by:
Stefan Priebe <s.priebe@profihost.ag> Signed-off-by:
Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by:
Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Apr 16, 2013
-
-
Amit Shah authored
Not handling EAGAIN triggers the assert qemu/backends/rng-random.c:44:entropy_available: assertion failed: (len != -1) Aborted (core dumped) This happens when starting a guest with '-device virtio-rng-pci', issuing a 'cat /dev/hwrng' in the guest, while also doing 'cat /dev/random' on the host. Reported-by:
yunpingzheng <yunzheng@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com> Message-id: eacda84dfaf2d99cf6d250b678be4e4d6c2088fb.1366108096.git.amit.shah@redhat.com Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Apr 15, 2013
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The TPM subsystem does not have a full front-end/back-end separation. The sole available backend, tpm_passthrough, depends on the data structures of the sole available frontend, tpm_tis. However, we can at least try to split the user interface (tpm.c) from the implementation (hw/tpm). The patches makes tpm.c not include tpm_int.h, which is shared between tpm_tis.c and tpm_passthrough.c; instead it moves more stuff to tpm_backend.h. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Apr 05, 2013
-
-
Hans de Goede authored
chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Apr 02, 2013
-
-
Stefan Berger authored
QOM-ified the TPM support with much code borrowed from the rng implementation. All other TPM related code moves will be provided in a subsequent patch. Signed-off-by:
Stefan Berger <stefanb@linux.vnet.ibm.com> Message-id: 1364469981.24703.1.camel@d941e-10 Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Mar 27, 2013
-
-
Hans de Goede authored
To better reflect that it is for handling a backend being opened. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-3-git-send-email-hdegoede@redhat.com Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- Mar 13, 2013
-
-
Gerd Hoffmann authored
This patch adds 'braille' support to qapi and also switches over the braille chardev initialization to the new qapi code path. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Gerd Hoffmann authored
This patch adds 'msmouse' support to qapi and also switches over the msmouse chardev initialization to the new qapi code path. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-