summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-22bootdevice: add validate check for qemu_boot_set()Gonglei1-0/+8
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22bootdevice: add Error **errp argument for qemu_boot_set()Gonglei3-13/+17
It will be useful for checking when we change traditional boot order dynamically and propagate error message to the monitor. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22bootdevice: add Error **errp argument for validate_bootdevices()Gonglei3-8/+17
It will be useful for checking when we change traditional boot order dynamically and propagate error message to the monitor. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-22bootdevice: move code about bootorder from vl.c to bootdevice.cGonglei4-68/+70
First, we can downsize vl.c, make it simpler by little and little. Second, I can maintain those code and make some improvement. Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2014-12-20Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into ↵Peter Maydell6-46/+82
staging # gpg: Signature made Fri 19 Dec 2014 13:18:18 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: e1000: defer packets until BM enabled net: Use g_new() & friends where that makes obvious sense net: Fuse g_malloc(); memset() into g_new0() net: don't use set/get_pointer() in set/get_netdev() tap: fix vcpu long time io blocking on tap Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20Merge remote-tracking branch 'remotes/kraxel/tags/pull-roms-20141217-1' into ↵Peter Maydell7-0/+0
staging update ipxe from 69313ed to 35c5379 # gpg: Signature made Wed 17 Dec 2014 14:45:04 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-roms-20141217-1: update ipxe from 69313ed to 35c5379 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20exec: change default exception_index value for migration to -1Paolo Bonzini1-2/+2
In QEMU 2.2 the exception_index value was added to the migration stream through a subsection. The default was set to 0, which is wrong and should have been -1. However, 2.2 does not have commit e511b4d (cpu-exec: reset exception_index correctly, 2014-11-26), hence in 2.2 the exception_index is never used and is set to -1 on the next call to cpu_exec. So we can change the migration stream to make the default -1. The effects are: - 2.2.1 -> 2.2.0: cpu->exception_index set incorrectly to 0 if it were -1 on the source; then reset to -1 in cpu_exec. This is TCG only; KVM does not use exception_index. - 2.2.0 -> 2.2.1: cpu->exception_index set incorrectly to -1 if it were 0 on the source; but it would be reset to -1 in cpu_exec anyway. This is TCG only; KVM does not use exception_index. - 2.2.1 -> 2.1: two bugs fixed: 1) can migrate backwards if cpu->exception_index is set to -1; 2) should not migrate backwards (but 2.2.0 allows it) if cpu->exception_index is set to 0 - 2.2.0 -> 2.3.0: 2.2.0 will send the subsection unnecessarily if exception_index is -1, but that is not a problem. 2.3.0 will set cpu->exception_index to -1 if it is 0 on the source, but this would be anyway a problem for 2.2.0 -> 2.2.x migration (due to lack of commit e511b4d in 2.2.x) so we can ignore it - 2.2.1 -> 2.3.0: everything works. In addition, play it safe and never send the subsection unless TCG is in use. KVM does not use exception_index (PPC KVM stores values in it for use in the subsequent call to ppc_cpu_do_interrupt, but does not need it as soon as kvm_handle_debug returns). Xen and qtest do not run any code for the CPU at all. Reported-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1418989994-17244-3-git-send-email-pbonzini@redhat.com Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-20cpu: initialize cpu->exception_index on resetPaolo Bonzini2-3/+1
This unbreaks linux-user (broken by e511b4d, cpu-exec: reset exception_index correctly, 2014-11-26). Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Message-id: 1418989994-17244-2-git-send-email-pbonzini@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-19e1000: defer packets until BM enabledMichael S. Tsirkin1-1/+20
Some guests seem to set BM for e1000 after enabling RX. If packets arrive in the window, device is wedged. Probably works by luck on real hardware, work around this by making can_receive depend on BM. Tested-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19net: Use g_new() & friends where that makes obvious senseMarkus Armbruster3-5/+5
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19net: Fuse g_malloc(); memset() into g_new0()Markus Armbruster1-2/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19net: don't use set/get_pointer() in set/get_netdev()Jason Wang1-38/+44
Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This trick works but result a unclean and fragile implementation (e.g print_netdev and parse_netdev). This patch solves this issue by not using set/get_pinter() and set and get netdev directly in set_netdev() and get_netdev(). After this the parse_netdev() and print_netdev() were no longer used and dropped from the source. [Renamed 'err' label to 'out' as suggested by Markus Armbruster. --Stefan] Cc: Markus Armbruster <armbru@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-19tap: fix vcpu long time io blocking on tapWangkai (Kevin,C)1-0/+12
[Adjusted doc comment for grammar. --Stefan] Signed-off-by: Wangkai <wangkai86@huawei.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-12-17Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20141216-1' into ↵Peter Maydell4-19/+42
staging cirrus hwcursor fixes. set secondary-vga category. # gpg: Signature made Tue 16 Dec 2014 14:44:09 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vga-20141216-1: vga: set catagory bit for secondary vga device move hw cursor pos from cirrus to vga cirrus: Force use of shadow pixmap when HW cursor is enabled vga: Add mechanism to force the use of a shadow surface Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17Merge remote-tracking branch 'remotes/xtensa/tags/20141217-xtensa' into stagingPeter Maydell10-362/+426
Xtensa updates for 2.3: - fix cross-page opcode handling; - move window overflow exception generation decision to translation phase; - don't generate dead code after privilege, window overflow or coprocessor exception; - add monitor command 'info opcount' for dumping TCG opcode counters. # gpg: Signature made Wed 17 Dec 2014 02:57:01 GMT using RSA key ID F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" * remotes/xtensa/tags/20141217-xtensa: target-xtensa: don't generate dead code target-xtensa: record available window in TB flags target-xtensa: test cross-page opcode target-xtensa: fix translation for opcodes crossing page boundary tcg: add separate monitor command to dump opcode counters Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17Merge remote-tracking branch 'remotes/lalrae/tags/mips-20141216' into stagingPeter Maydell11-392/+620
* remotes/lalrae/tags/mips-20141216: (30 commits) target-mips: remove excp_names[] from linux-user as it is unused disas/mips: disable unused mips16_to_32_reg_map[] disas/mips: remove unused mips_msa_control_names_numeric[32] target-mips: convert single case switch into if statement target-mips: Fix DisasContext's ulri member initialization target-mips: Use local float status pointer across MSA macros target-mips: Add missing calls to synchronise SoftFloat status linux-user: Use the 5KEf processor for 64-bit emulation target-mips: Also apply the CP0.Status mask to MTTC0 target-mips: gdbstub: Clean up FPU register handling target-mips: Correct 32-bit address space wrapping target-mips: Tighten ISA level checks target-mips: Fix CP0.Config3.ISAOnExc write accesses target-mips: Output CP0.Config2-5 in the register dump target-mips: Fix the 64-bit case for microMIPS MOVE16 and MOVEP target-mips: Correct the writes to Status and Cause registers via gdbstub target-mips: Correct the handling of writes to CP0.Status for MIPSr6 target-mips: Correct MIPS16/microMIPS branch size calculation target-mips: Restore the order of helpers target-mips: Remove unused `FLOAT_OP' macro ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-17update ipxe from 69313ed to 35c5379Gerd Hoffmann7-0/+0
Anton D. Kachalov (1): [intel] Add 8086:1557 card (Intel 82599 10G ethernet mezz) Christian Hesse (1): [build] Merge util/geniso and util/genliso Curtis Larsen (3): [efi] Use EFI_CONSOLE_CONTROL_PROTOCOL to set text mode if available [efi] Report errors from attempting to disconnect existing drivers [efi] Try various possible SNP receive filters Dale Hamel (1): [smbios] Expose board serial number as ${board-serial} Florian Schmaus (1): [build] Set GITVERSION only if there is a git repository Hannes Reinecke (3): [ethernet] Provide eth_random_addr() to generate random Ethernet addresses [igbvf] Assign random MAC address if none is set [igbvf] Allow changing of MAC address Jan Kiszka (1): [intel] Add I217-LM PCI ID Marin Hannache (4): [nfs] Fix an invalid free() when loading a symlink [nfs] Fix an invalid free() when loading a regular (non-symlink) file [nfs] Rewrite NFS URI handling [readline] Add CTRL-W shortcut to remove a word Michael Brown (144): [profile] Allow interrupts to be excluded from profiling results [intel] Exclude time spent in hypervisor from profiling [build] Fix version.o dependency upon git index [tcp] Defer sending ACKs until all received packets have been processed [lkrnprefix] Function as a bzImage kernel [build] Avoid errors when build directory is mounted via NFS [undi] Apply quota only to number of complete received packets [lkrnprefix] Make real-mode setup code relocatable [intel] Increase receive ring fill level [syslog] Strip invalid characters from hostname [test] Add self-tests for strdup() [libc] Prevent strndup() from reading beyond the end of the string [efi] Allow for optional protocols [efi] Make EFI_DEVICE_PATH_TO_TEXT_PROTOCOL optional [efi] Make EFI_HII_DATABASE_PROTOCOL optional [efi] Do not try to fetch loaded image device path protocol [ipv6] Fix definition of IN6_IS_ADDR_LINKLOCAL() [dhcpv6] Do not set sin6_scope_id on the unspecified client socket address [ipv6] Do not set sin6_scope_id on source address [ipv6] Include network device when transcribing multicast addresses [ipv6] Avoid potentially copying from a NULL pointer in ipv6_tx() [librm] Allow for the PIC interrupt vector offset to be changed [ifmgmt] Do not sleep CPU while configuring network devices [scsi] Improve sense code parsing [iscsi] Read IPv4 settings only from the relevant network device [iscsi] Include IP address origin in iBFT [debug] Allow debug message colours to be customised via DBGCOL=... [build] Expose build timestamp, build name, and product names [efi] Allow device paths to be easily included in debug messages [efi] Provide a meaningful EFI SNP device name [efi] Restructure EFI driver model [build] Fix erroneous object name in version object [build] Add yet another potential location for isolinux.bin [efi] Allow network devices to be created on top of arbitrary SNP devices [autoboot] Allow autoboot device to be identified by link-layer address [efi] Identify autoboot device by MAC address when chainloading [efi] Attempt to start only drivers claiming support for a device [efi] Rewrite SNP NIC driver [efi] Include SNP NIC driver within the all-drivers target [crypto] Add support for iPAddress subject alternative names [crypto] Fix debug message [netdevice] Reset network device index when last device is unregistered [efi] Update EDK2 headers [efi] Install our own disk I/O protocol and claim exclusive use of it [efi] Allow for interception of boot services calls by loaded image [efi] Print well-known GUIDs by name in debug messages [efi] Include EFI_CONSOLE_CONTROL_PROTOCOL header [ioapi] Fail ioremap() when attempting to map a zero bus address [intel] Check for ioremap() failures [realtek] Check for ioremap() failures [vmxnet3] Check for ioremap() failures [skel] Check for ioremap() failures [myson] Check for ioremap() failures [natsemi] Check for ioremap() failures [i386] Add functions to read and write model-specific registers [x86_64] Add functions to read and write model-specific registers [efi] Show more diagnostic information when building with DEBUG=efi_wrap [ioapi] Centralise notion of PAGE_SIZE [lotest] Discard packets arriving on the incorrect network device [xen] Import selected public headers [xen] Add basic support for PV-HVM domains [xen] Add support for Xen netfront virtual NICs [efi] Default to releasing network devices for use via SNP [efi] Unload started images only on failure [efi] Fill in loaded image's DeviceHandle if firmware fails to do so [efi] Fix incorrect debug message level when device has no device path [efi] Report exact failure when unable to open the device path [netdevice] Avoid registering duplicate network devices [efi] Ignore failures when attempting to install SNP HII protocol [efi] Expand the range of well-known EFI GUIDs in debug messages [efi] Provide efi_handle_name() for debugging [efi] Add ability to dump all openers of a given protocol on a handle [efi] Use efi_handle_name() instead of efi_handle_devpath_text() [efi] Use efi_handle_name() instead of efi_devpath_text() where applicable [efi] Allow compiler to perform type checks on EFI_HANDLE [efi] Avoid unnecessarily passing pointers to EFI_HANDLEs [efi] Dump existing openers when we are unable to open a protocol [efi] Dump handle information around connect/disconnect attempts [efi] Improve debugging of the debugging facilities [efi] Add excessive sanity checks into efi_debug functions [efi] Also try original ComponentName protocol for retrieving driver names [efi] Print raw device path when we have no DevicePathToTextProtocol [efi] Add ability to dump SNP device mode information [efi] Reset multicast filter list when setting SNP receive filters [efi] Provide centralised definitions of commonly-used GUIDs [efi] Open device path protocol only at point of use [efi] Move abstract device path and handle functions to efi_utils.c [efi] Generalise snpnet_pci_info() to efi_locate_device() [bios] Support displaying and hiding cursor [efi] Support displaying and hiding cursor [readline] Ensure cursor is visible when prompting for input [xen] Accept alternative Xen platform PCI device ID 5853:0002 [xen] Use version 1 grant tables by default [xen] Cope with unexpected initial backend states [smc9000] Avoid using CONFIG as a preprocessor macro [build] Allow for named configurations at build time [intel] Display PBS value when applying ICH errata workaround [intel] Display before and after values for both PBS and PBA [intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs [efi] Add definitions of GUIDs observed during Windows boot [efi] Dump details of any calls to our dummy block and disk I/O protocols [romprefix] Do not preserve unused register %di [build] Remove obsolete references to .zrom build targets [build] Allow ISA ROMs to be built [build] Avoid deleting config header files if build is interrupted [prefix] Halt system without burning CPU if we cannot access the payload [prefix] Report both %esi and %ecx when opening payload fails [util] Use PCI length field to obtain length of individual images [mromprefix] Use PCI length field to obtain length of individual images [mromprefix] Allow for .mrom images larger than 128kB [efi] Show details of intercepted LoadImage() calls [efi] Make our virtual file system case insensitive [efi] Wrap any images loaded by our wrapped image [efi] Use the SNP protocol instance to match the SNP chainloading device [efi] Avoid returning uninitialised data from PCI configuration space reads [efi] Make EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL optional [efi] Allow for non-PCI snpnet devices [build] Clean up all binary directories on "make [very]clean" [efi] Add efifatbin utility [efi] Provide dummy device path in efi_image_probe() [dhcp] Check for matching chaddr in received DHCP packets [dhcp] Remove obsolete dhcp_chaddr() function [build] Use -malign-double to build 32-bit UEFI binaries [efi] Centralise definitions of more protocol GUIDs [efi] Add definitions of GUIDs observed when chainloading from Intel driver [efi] Free transmit ring entry before calling netdev_tx_complete() [efi] Generalise snpnet_dev_info() to efi_device_info() [efi] Update to current EDK2 headers [efi] Add NII / UNDI driver [efi] Check for presence of UNDI in NII protocol [efi] Include NII driver within "snp" and "snponly" build targets [ping] Report timed-out pings via the callback function [ping] Allow termination after a specified number of packets [ping] Allow "ping" command output to be inhibited [intel] Use autoloaded MAC address instead of EEPROM MAC address [crypto] Fix parsing of OCSP responder ID key hash [vmxnet3] Add profiling code to exclude time spent in the hypervisor [netdevice] Fix erroneous use of free(iobuf) instead of free_iob(iobuf) [libc] Add ASSERTED macro to test if any assertion has triggered [list] Add sanity checks after list-adding functions [malloc] Tidy up debug output [malloc] Sanity check parameters to alloc_memblock() and free_memblock() [malloc] Check integrity of free list [malloc] Report caller address as soon as memory corruption is detected Peter Lemenkov (1): [build] Check if git index actually exists Robin Smidsrød (2): [build] Add named configuration for VirtualBox [build] Avoid using embedded script in VirtualBox named configuration Sven Ulland (1): [lacp] Set "aggregatable" flag in response LACPDU Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-17target-xtensa: don't generate dead codeMax Filippov1-279/+321
Don't generate TCG operations when privilege, register window or coprocessor checks fail. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-17target-xtensa: record available window in TB flagsMax Filippov4-62/+42
Record last valid 4-register window pane number in TB flags so that a window overflow exception throw point is known at the translation time. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2014-12-17target-xtensa: test cross-page opcodeMax Filippov1-13/+13
Alter cross-page TB test to also test cross-page opcode. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-12-17target-xtensa: fix translation for opcodes crossing page boundaryMax Filippov1-4/+23
If TB ends with an opcode that crosses page boundary and the following page is not executable then EPC1 for the code fetch exception wrongly points at the beginning of the TB. Always treat instruction that crosses page boundary as a separate TB. Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-12-17tcg: add separate monitor command to dump opcode countersMax Filippov5-4/+27
Currently 'info jit' outputs half of the information to monitor and the rest to qemu log. Dumping opcode counts to monitor as a part of 'info jit' command doesn't sound useful. Add new monitor command 'info opcount' that only dumps opcode counters. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2014-12-16qemu-log: add log category for MMU infoAntony Pavlov12-58/+61
Running barebox on qemu-system-mips* with '-d unimp' overloads stderr by very very many mips_cpu_handle_mmu_fault() messages: mips_cpu_handle_mmu_fault address=b80003fd ret 0 physical 00000000180003fd prot 3 mips_cpu_handle_mmu_fault address=a0800884 ret 0 physical 0000000000800884 prot 3 mips_cpu_handle_mmu_fault pc a080cd80 ad b80003fd rw 0 mmu_idx 0 So it's very difficult to find LOG_UNIMP message. The mips_cpu_handle_mmu_fault() messages appear on enabling ANY logging! It's not very handy. Adding separate log category for *_cpu_handle_mmu_fault() logging fixes the problem. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Alexander Graf <agraf@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1418489298-1184-1-git-send-email-antonynpavlov@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20141216-1' into ↵Peter Maydell6-24/+45
staging misc spice updates. # gpg: Signature made Tue 16 Dec 2014 14:03:07 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20141216-1: spice: fix memory leak spice: remove spice-experimental.h include spice: do not require TCP ports spice: rework mirror allocation, add no-resize fast path spice: reduce refresh rate in native mode spice: use bottom half instead of refresh timer for cursor updates Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16Merge remote-tracking branch 'remotes/amit-migration/tags/for-2.3-2' into ↵Peter Maydell21-529/+622
staging Migration pull for 2.3. Mostly moving the code to the migration/ directory, and updating MAINTAINERS. I've also folded my other MAINTAINERS update patches into this, as they're small by themselves. # gpg: Signature made Tue 16 Dec 2014 12:21:24 GMT using RSA key ID 854083B6 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-migration/tags/for-2.3-2: MAINTAINERS: Update for migrated migration code Split the QEMU buffered file code out Split struct QEMUFile out Remove migration- pre/post fixes off files in migration/ dir Start migrating migration code into a migration directory qmp-command.hx: add missing docs for migration capabilites cpu: verify that block->host is set cpu: assert host pointer offset within block exec: add wrapper for host pointer access MAINTAINERS: add include files to virtio-serial entry MAINTAINERS: add entry for virtio-rng MAINTAINERS: migration: add vmstate static checker files MAINTAINERS: Add myself to migration maintainers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16vga: set catagory bit for secondary vga deviceGonglei1-0/+1
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16move hw cursor pos from cirrus to vgaGerd Hoffmann2-16/+17
2014-12-16cirrus: Force use of shadow pixmap when HW cursor is enabledBenjamin Herrenschmidt1-1/+8
The HW cursor cannot be painted on a shared surface. This fixes HW cursor display in Windows NT 4.0 and Windows 98. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16vga: Add mechanism to force the use of a shadow surfaceBenjamin Herrenschmidt2-2/+16
This prevents surface sharing which will be necessary to fix cirrus HW cursor support. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: fix memory leakGonglei1-4/+1
If errors happen for middle items of channel_list, qmp_query_spice_channels() returns NULL, and the variable cur_item going out of scope leaks the storage it points to. The flag is a compatibility thing for older spice-server versions. Meanwhile our minimum spice version requirement is new enough that we should never ever see this error, and if we do something went very seriously wrong. Let's using assert() instead of returning NULL to avoid a memory leak. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: remove spice-experimental.h includeMarc-André Lureau2-2/+0
Nothing seems to be using functions from spice-experimental.h (better that way). Let's remove its inclusion. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: do not require TCP portsMarc-André Lureau1-4/+0
It is possible to use Spice server without TCP port. On local VM, qemu (and libvirt) can add new clients thanks to QMP add_client command. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: rework mirror allocation, add no-resize fast pathGerd Hoffmann1-7/+26
Add fast path to qemu_spice_display_switch in case old and new displaysurface have identical size (happens with display panning and page flipping). We just swap the backing store then and don't go through the whole process of deleting and creating the primary surface. To simplify the code a bit move mirror surface allocation to qemu_spice_display_switch(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: reduce refresh rate in native modeGerd Hoffmann1-0/+3
Now that cursor updates are out of the way qxl needs the refresh timer only when when running in vga mode, for dirty bitmap checking. In native qxl mode the guest will notify us, so we don't need to poll and can use the idle interval (one refresh wakeup every few seconds). Cc: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16spice: use bottom half instead of refresh timer for cursor updatesGerd Hoffmann4-7/+15
Calling directly doesn't work due to the qxl-render code running in spice server thread context. Meanwhile bottom half scheduling is thread-safe though, so we can use that to kick a cursor update in main i/o thread context. Cc: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-12-16target-mips: remove excp_names[] from linux-user as it is unusedLeon Alrae1-1/+1
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16disas/mips: disable unused mips16_to_32_reg_map[]Leon Alrae1-1/+2
This array is used by print_mips16_insn_arg() which is guarded by #if 0. Therefore doing the same with the array as it generates clang warnings. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16disas/mips: remove unused mips_msa_control_names_numeric[32]Leon Alrae1-7/+0
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16target-mips: convert single case switch into if statementLeon Alrae1-3/+1
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-12-16target-mips: Fix DisasContext's ulri member initializationMaciej W. Rozycki1-1/+1
Set DisasContext's ulri member to 0 or 1 as with other bool members. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Use local float status pointer across MSA macrosMaciej W. Rozycki1-35/+34
Reduce line wrapping throughout MSA helper macros by using a local float status pointer rather than referring to the float status through the environment each time. No functional change. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Add missing calls to synchronise SoftFloat statusMaciej W. Rozycki4-17/+17
Add missing calls to synchronise the SoftFloat status with the CP1.FSCR: + for the rounding and flush-to-zero modes upon processor reset, + for the flush-to-zero mode on FSCR updates through the GDB stub. Refactor code accordingly and remove the redundant RESTORE_ROUNDING_MODE macro. Signed-off-by: Thomas Schwinge <thomas@codesourcery.com> Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16linux-user: Use the 5KEf processor for 64-bit emulationMaciej W. Rozycki1-1/+1
Replace the 20Kc original MIPS64 ISA processor used for 64-bit user emulation with the 5KEf processor that implements the MIPS64r2 ISA, complementing the choice of the 24Kf processor for 32-bit emulation. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Also apply the CP0.Status mask to MTTC0Maciej W. Rozycki1-1/+2
Make CP0.Status writes made with the MTTC0 instruction respect this register's mask just like all the other places. Also preserve the current values of masked out bits. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: gdbstub: Clean up FPU register handlingMaciej W. Rozycki1-19/+19
Rewrite the FPU register access parts of `mips_cpu_gdb_read_register' and `mips_cpu_gdb_write_register' for consistency between each other. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Correct 32-bit address space wrappingMaciej W. Rozycki2-8/+19
Make sure the address space is unconditionally wrapped on 32-bit processors, that is ones that do not implement at least the MIPS III ISA. Also make MIPS16 SAVE and RESTORE instructions use address calculation rather than plain arithmetic operations for stack pointer manipulation so that their semantics for stack accesses follows the architecture specification. That in particular applies to user software run on 64-bit processors with the CP0.Status.UX bit clear where the address space is wrapped to 32 bits. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Tighten ISA level checksMaciej W. Rozycki3-15/+114
Tighten ISA level checks down to MIPS II that many of our instructions are missing. Also make sure any 64-bit instruction enables are only applied to 64-bit processors, that is ones that implement at least the MIPS III ISA. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Fix CP0.Config3.ISAOnExc write accessesMaciej W. Rozycki3-2/+15
Fix CP0.Config3.ISAOnExc write accesses on microMIPS processors. This bit is mandatory for any processor that implements the microMIPS instruction set. This bit is r/w for processors that implement both the standard MIPS and the microMIPS instruction set. This bit is r/o and hardwired to 1 if only the microMIPS instruction set is implemented. There is no other bit ever writable in CP0.Config3 so defining a corresponding `CP0_Config3_rw_bitmask' member in `CPUMIPSState' is I think an overkill. Therefore make the ability to write the bit rely on the presence of ASE_MICROMIPS set in the instruction flags. The read-only case of the microMIPS instruction set being implemented only can be added when we add support for such a configuration. We do not currently have such support, we have no instruction flag that would control the presence of the standard MIPS instruction set nor any associated code in instruction decoding. This change is needed to boot a microMIPS Linux kernel successfully, otherwise it hangs early on as interrupts are enabled and then the exception handler invoked loops as its first instruction is interpreted in the wrong execution mode and triggers another exception right away. And then over and over again. We already check the current setting of the CP0.Config3.ISAOnExc in `set_hflags_for_handler' to set the ISA bit correctly on the exception handler entry so it is the ability to set it that is missing only. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Output CP0.Config2-5 in the register dumpMaciej W. Rozycki1-0/+4
Include CP0.Config2 through CP0.Config5 registers in the register dump produced with the `info registers' monitor command. Align vertically with the registers already output. Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2014-12-16target-mips: Fix the 64-bit case for microMIPS MOVE16 and MOVEPMaciej W. Rozycki1-3/+3
Fix microMIPS MOVE16 and MOVEP instructions on 64-bit processors by using register addition operations. This copies the approach taken with MIPS16 MOVE instructions (I8_MOV32R and I8_MOVR32 opcodes) and follows the observation that OPC_ADDU expands to tcg_gen_mov_tl whenever `rt' is 0 and `rs' is not, therefore copying `rs' to `rd' verbatim. This is not the case with OPC_ADDIU where a sign-extension from bit #31 is made, unless in the uninteresting case of `rs' being 0, losing the upper 32 bits of the value copied for any proper 64-bit values. This also serves as an optimization as one op is produced in generated code rather than two (again, unless `rs' is 0, where it doesn't change anything). Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>