summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-12-19Revert "pci: interrupt disable bit support"Anthony Liguori2-28/+2
This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607. Per discussion with Michael Tsirkin, this is too risky for 0.12 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d587e0787153f0224a6140c5015609963ceaabfb)
2009-12-19target-ppc: fix ppc32 kvm buildAlexander Graf1-0/+2
My segment sync patch broke compilation on PPC32, because it was trying to sync the SLB even though ppc32 CPUs don't have an SLB. So let's only sync it when we're on a PP64 one! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 82c09f2f0d0f405428ce0c567da2ada493acc30b)
2009-12-18S390: Bail out without KVMAlexander Graf1-0/+7
Currently only the S390 KVM target works. To keep users from accidently not using KVM, let's not even initialize the machine when KVM is not used. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit e249651ca94058547f7ae84694e82bb1ee03bc3c)
2009-12-18S390: Don't tell guest we're updating config spaceAlexander Graf1-1/+1
Currently we always set the "config space changed" bit to 1 when triggering any virtio interrupt. While that worked in 2.6.27, newer kernels interpret that value as "only the config space changed and nothing else happened". Since we usually trigger interrupts to tell the guest that something did happen, we just not tell it the config space changed for now until we implement the correct callback for that. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 86f3dba6518bd5fd106e1cf3f36dafda41ff377b)
2009-12-18add default virtcon initializationAlexander Graf1-0/+2
When going through the default devices, we don't initialize the virtio console, unless we're doing -nographic. I suppose that's just a leftover from the recent code restructuring, so let's put it in. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 38536da1e3cfde355169a81a3abe3235fd13fc6a)
2009-12-18S390: Loop through virtio console devicesAlexander Graf1-1/+5
We used to always create one single virtio console device. This breaks when either zero of multiple virtio console devices are requested, so let's use the same code as on x86. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit a1e4b07f04d8f31e8c0c1bf97385f426d3fcf5e6)
2009-12-18target-s390: Fail on unknown instructionsAlexander Graf1-1/+1
We were being a bit too nice and didn't give the guest an invalid instruction interrupt. While that works, it's not exactly the fastest thing to do, since now the guest doesn't know that we're not really implementing that instruction, so it continues doing it. We run into this with the set_page_unstable hint instruction. So let's bail out in these cases. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit d7963c43b9646e4dfc69a4253c61e4bab7b661cd)
2009-12-18osdep: Fix runtime failure on older Linux kernelsAndre Przywara1-6/+12
If QEMU finds newer kernel header files on compilation time, it will use advertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test. If later the executables are executed on an older kernel (<2.6.27, like Xen Dom0 2.6.18), then QEMU will fail on opening sockets and creating pipes and returns the rather unspecific "qemu_init_main_loop failed". This patch fixes this by checking the return values of these calls for EINVAL and ENOSYS and falling back to the older versions automatically. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-17Fix a make -j raceJuergen Lock1-1/+1
Make libuser.a depend on $(GENERATED_HEADERS) too so make -j won't start building it before the headers exist. (There may be more bugs like this but at least this makes (g)make -j4 started from scratch on a quadcore now always complete here again.) Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit c1bb0dcef2d3a62c89cef81a0f1a0e5e97ef325b)
2009-12-17target-alpha: Fix generic ctz64.Richard Henderson1-1/+1
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 06445248d23d2422a0fb5736b64f9e5a66539749)
2009-12-16s390: Fix buggy assignmentStefan Weil1-1/+1
nd->model keeps dynamically allocated model names. So casting of a constant string is wrong here. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 5a2b3fc5aaae48859e09a8d96f4f92578b060892)
2009-12-13target-mips: fix user-mode emulation startupNathan Froyd2-8/+8
Running programs with the MIPS user-mode emulator fails during dynamic loading, as floating-point instructions are not enabled in in env->hflags. Move the code for doing so from fpu_init to cpu_reset so the MIPS_HFLAG_{FPU,F64} setting doesn't get clobbered by cpu_reset setting env->hflags to MIPS_HFLAG_UM. The same end can be achieved by swapping the ordering of fpu_init and cpu_reset in cpu_mips_init, but it seemed better to consolidate the CONFIG_USER_ONLY code into a single location. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 91a759352623e4a3da969fa66626cc99241e9da2)
2009-12-13target-i386: Update CPUID feature set for TCGAndre Przywara1-13/+12
The CPUID features QEMU presented to the guest were not up-to-date with QEMU's emulated feature set. Add the missing bits of recent (and not so recent) additions to QEMU's emulation engine. For stability reasons only the user mode usable bits are exposed for now, features like Monitor or CR8LEG are left out. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit f1e00a9cf326acc1f2386a72525af8859852e1df)
2009-12-13s390: typo fixMichael S. Tsirkin1-1/+1
s390 code has an obvious typo, which results in: hw/s390-virtio.c: At top level: hw/s390-virtio.c:249: error: request for member ‘no_vga’ in something not a structure or union Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-13s390: fix build on 32 bit hostMichael S. Tsirkin1-1/+1
Building on 32 bit host we get: hw/s390-virtio.c: In function ‘s390_init’: hw/s390-virtio.c:184: error: integer constant is too large for ‘unsigned long’ type 64 bit values must be ULL. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-12Update Changelog and VERSION for 0.12.0-rc2v0.12.0-rc2Anthony Liguori2-1/+37
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-12v2: properly save kvm system time msr registersGlauber Costa3-0/+20
Currently, the msrs involved in setting up pvclock are not saved over migration and/or save/restore. This patch puts their value in special fields in our CPUState, and deal with them using vmstate. kvm also has to account for it, by including them in the msr list for the ioctls. This is a backport from qemu-kvm.git [v2: sucessfully build without kerneldir ] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 1a03675db146dfc760b3b48b3448075189f142cc)
2009-12-12VNC: Convert do_info_vnc() to QObjectLuiz Capitulino3-33/+166
Return a QDict with server information. Connected clients are returned as a QList of QDicts. The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() and put_addr_qdict()) are used to insert 'host' and 'service' information in the returned QDict. This patch is big, but I don't see how to split it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d96fd29cca420d1ff3d34cde233cf41a3818c550)
2009-12-12PCI: Convert pci_device_hot_add() to QObjectLuiz Capitulino3-6/+40
Return a QDict with information about the just added device. This commit should not change user output. Please, note that this patch does not do error handling conversion. In error conditions the handler still calls monitor_printf(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 7a344f7ac7bb651d0556a933ed8060d3a9e5d949)
2009-12-12char: Convert qemu_chr_info() to QObjectLuiz Capitulino3-4/+46
Each device is represented by a QDict. The returned QObject is a QList of all devices. This commit should not change user output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 588b38320134edee4a569f60ed88c9848961d6ee)
2009-12-12block: Convert bdrv_info_stats() to QObjectLuiz Capitulino3-14/+76
Each device statistic information is stored in a QDict and the returned QObject is a QList of all devices. This commit should not change user output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 218a536a7a7c6d3679d5eca0103f32fd11fbfaf0)
2009-12-12block: Convert bdrv_info() to QObjectLuiz Capitulino4-25/+111
Each block device information is stored in a QDict and the returned QObject is a QList of all devices. This commit should not change user output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d15e546567d75fca36d852c39e30adaab02121a7)
2009-12-12migration: Convert do_info_migrate() to QObjectLuiz Capitulino3-17/+107
Return a QDict, which may contain up to more two QDicts, depending on the type of migration we're performing. IMPORTANT: as a QInt stores a int64_t integer, RAM values are going to be stored as int64_t and not as uint64_t as they are today. If this is a problem QInt will have to be changed. This commit should not change user output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit c86a668390d16d6b3249acd50bfa61ad825c7a80)
2009-12-12monitor: Convert do_info_mice() to QObjectLuiz Capitulino3-9/+59
Each mouse is represented by a QDict, the returned QObject is a QList of all mice. This commit should not change user output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit e78c48ec4e192ef1b1a210bdf5a8d253d7826c25)
2009-12-12monitor: Convert do_info_uuid() to QObjectLuiz Capitulino1-3/+23
snprintf() is used because the UUID_FMT is too complex for qobject_from_jsonf(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 9603ceba2edd1dc7e3823da76d84706d3d1c3d78)
2009-12-12monitor: Convert do_info_hpet() to QObjectLuiz Capitulino1-3/+21
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 14f0720df929181eed5424b3f436d84ce05541c3)
2009-12-12monitor: Convert do_info_name() to QObjectLuiz Capitulino1-4/+28
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit e05486cba662ccceef6be4b3ce38961876aa8f6e)
2009-12-12monitor: Convert do_info_kvm() to QObjectLuiz Capitulino1-8/+33
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 2af5ba712b3e03cf644320f7386bf1dfd2c2b6a8)
2009-12-12monitor: Convert do_info_status() to QObjectLuiz Capitulino1-9/+35
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit c0e8520ed5efef2891e2e930a1bb21c1b040410f)
2009-12-12monitor: do_info_version(): Use QDictLuiz Capitulino1-20/+22
All 'info' commands should use QDict, this commit also kills monitor_print_qobject() as do_info_version() doesn't use it anymore (and no handler will). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 45e914cfe03f9fcf946bdc124f752d8f288eff05)
2009-12-12monitor: do_info_cpus(): Use QBoolLuiz Capitulino1-13/+25
While there update the documentation as well. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 55483ad657dcb62cde09bce3b38a5fc28d08f999)
2009-12-12monitor: Fix do_info_commands() outputLuiz Capitulino1-3/+27
Should return a QDict and should not print the user protocol bits (eg. "c|cont"). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 1a728677d4e2f0434caf352c0e88100652fd6711)
2009-12-12monitor: Fix do_info_balloon() outputLuiz Capitulino1-3/+16
Monitor commands should always return values in bytes and info commands should always return a QDict. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 7f1796713ed2f338bd9abc094aacf10f67aed1e5)
2009-12-12QDict: Introduce qdict_get_qlist()Luiz Capitulino3-1/+16
A helper function to get a QList from a QDict. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f2e1750803240ec8b78ae126af0d54f7896ee11d)
2009-12-12QDict: Introduce qdict_get_qbool()Luiz Capitulino3-1/+17
This is a helper function that does type checking before retrieving a QBool from the dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit cd4dde36ae8e7bd8e02839533c5708011bf994cf)
2009-12-12Makefile: move QObject objs to their own entryLuiz Capitulino1-2/+7
Other subsystems will need to link against them. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 2a01000f7df5faeeb06742b8f7afabf9e8a9d2b6)
2009-12-12Introduce qemu-objects.h header fileLuiz Capitulino1-0/+24
An easy way to include all QEMU objects. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 2471dd00ef212af4b7e1262d5339f0db17e55661)
2009-12-12vnc: fix capslock tracking logic.Gerd Hoffmann1-3/+5
The capslock tracking logic added by commit 6b1325029d80455b9da7cd7bd84a88cb915b867c doesn't work correctly for vnc clients without EXT_KEY_EVENT support. The reason is that qemu converts keysyms for letters to lowercase for the keysym2scancode lookup. It then also passes the lowercase value down to do_key_event(), but the capslock tracking code needs it with the correct case to work properly. This patch adds a new variable for the lowercase keysym so we'll keep the unmodified value for do_key_event(). The keysym2scancode is not needed with EXT_KEY_EVENT capable clients like any app based on the gtk-vnc widget, so I missed that case in testing ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4a93fe17081c7ae7f4d5607b266ca384d328986c)
2009-12-12QemuOpts: allow larger option values.Gerd Hoffmann1-2/+2
Use case: loooooooooooooooooong file names for -drive file=... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d318ff9900f080dfa802bbbea81f1a68dcd02013)
2009-12-12scsi: fix drive hotplug.Gerd Hoffmann1-0/+1
This patch fills the DriveInfo->unit after hotplugging a scsi disk. It makes a difference when auto-assigning a scsi id, where unit was left filled with '-1' instead of the actual scsi id. With this patch applied the the drive naming logic in drive_init() works as good as it did in previous releases. Which means it works fine with a single scsi bus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 11f4d7f483d9ca3a8979abd605cf1468b3e96aa2)
2009-12-12pci: don't hw_error() when no slot is available.Gerd Hoffmann1-2/+9
Current PCI code will simply hw_error() and thus abort in case no free PCI slot is available or the requested PCI slot is already in use by another device. For the hotplug case this behavior is not acceptable. This patch makes qemu pass up the error properly, so the calling code can decide whenever it wants to exit with an error (on startup) or whenever it wants to continue (hotplug). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 09e3acc6cfabfd85a9dacc04471df5f05019c779)
2009-12-12pci: don't abort() when trying to hotplug with acpi off.Gerd Hoffmann1-1/+16
The PCI bus on x86 requires ACPI for hotplug support, thus disbling ACPI also disables hotplug for the PCI bus. This patch makes qemu check whenever the PCI bus in question can handle hotplug before trying to add devices. This is needed because qdev will abort() on any attempt to hotplug devices into a non-hotpluggable bus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 53e0d8affe8514b070db2d265af13a534cb8eda4)
2009-12-12Set default console to virtio on S390xGerd Hoffmann3-1/+26
All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. Add flags to QEMUMachine to indicate which kind of default devices make sense for the machine in question. Use it for S390x: enable virtcon, disable serial, parallel and vga. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 986c5f78543bdbd696664447ecdd08cf6d935370)
2009-12-12default devices: virtio consoles.Gerd Hoffmann1-30/+35
This patch adds a variable default_virtcon which says whenever a default virtio console should be added. It is disabled by default, followup patch will enable it for s390. It is cleared when qemu finds '-virtiocon', '-device virtio-console-s390' or '-device virtio-console-pci' on the command line. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit aee1b935c53cc747528138a85fcce8163d272598)
2009-12-12add -qmp convinience switchGerd Hoffmann2-5/+11
Acts like -monitor but switched into qmp mode. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6ca5582d4f06d8ff0c646b8fe3cfe721dc573597)
2009-12-12add new -mon switchGerd Hoffmann2-0/+15
Add -mon switch which maps pretty straight forward into the QemuOpts internal representation: -mon chardev=<name>[,mode=[control|readline]][,[no]default] Via config file: [mon] chardev = "<name>" mode = "readline" default = "on" Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 22a0e04b9bb5a02e13b3e5cf5ea8abfac5f34120)
2009-12-12rework -monitor handling, switch to QemuOptsGerd Hoffmann3-43/+96
This patch reworks the -monitor handling: - It adds a new "mon" QemuOpts list for the monitor(s). - It adds a monitor_parse() function to parse the -monitor switch. - It adds a mon_init function to initialize the monitor(s) from the "mon" QemuOpts list. - It winds up everything and removes the old bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 88589343708f10f1ded0af100b2e11eec623bae2)
2009-12-12un-static qemu_chr_parse_compat()Gerd Hoffmann2-1/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 33521634bf15996e020c51c47abaaa68e27bf356)
2009-12-12default devices: drivesGerd Hoffmann1-6/+10
Add a default_drive variable which specified whenever the default drives (cdrom, floppy, sd) should be created. It is cleared when the new -nodefaults switch is specified on the command line. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit aa40fc9c96474b0135d1b940611862f260aedba7)
2009-12-12default devices: networkGerd Hoffmann3-1/+6
Add a default_net variable which specified whenever a default network should be created. It is cleared in case any -net option is specified and it is also added to the new -nodefaults switch. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit cb4522ccf67ba84d246291d9f75bd7f3df137d1a)