summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-03acpi: initialize s4_val used in s4 shutdownBruce Rogers5-5/+6
While investigating why a 32 bit Windows 2003 guest wasn't able to successfully perform a shutdown /h, it was discovered that commit afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4 inadvertently dropped the initialization of the s4_val used to handle s4 shutdown. Initialize the value as before. Signed-off-by: Bruce Rogers <brogers@suse.com> Message-id: 1364928100-487-1-git-send-email-brogers@suse.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-03target-i386: Check for host features before filter_features_for_kvm()Eduardo Habkost1-3/+3
commit 5ec01c2e96910e1588d1a0de8609b9dda7618c7f broke "-cpu ..,enforce", as it has moved kvm_check_features_against_host() after the filter_features_for_kvm() call. filter_features_for_kvm() removes all features not supported by the host, so this effectively made kvm_check_features_against_host() impossible to fail. This patch changes the call so we check for host feature support before filtering the feature bits. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-id: 1364935692-24004-1-git-send-email-ehabkost@redhat.com Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-03tpm: Fix several compiler warnings (redefined data types)Stefan Weil2-9/+4
Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1364933691-21197-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-03Merge remote-tracking branch 'sstabellini/xen-2013-04-03' into stagingAnthony Liguori1-21/+37
# By Hanweidong (1) and Stefano Stabellini (1) # Via Stefano Stabellini * sstabellini/xen-2013-04-03: xen-mapcache: pass the right size argument to test_bits xen-mapcache: replace last_address_index with a last_entry pointer
2013-04-03xen-mapcache: pass the right size argument to test_bitsHanweidong1-4/+22
Compute the correct size for test_bits(). qemu_get_ram_ptr() and qemu_safe_ram_ptr() will call xen_map_cache() with size is 0 if the requested address is in the RAM. Then xen_map_cache() will pass the size 0 to test_bits() for checking if the corresponding pfn was mapped in cache. But test_bits() will always return 1 when size is 0 without any bit testing. Actually, for this case, test_bits should check one bit. So this patch introduced a __test_bit_size which is greater than 0 and a multiple of XC_PAGE_SIZE, then test_bits can work correctly with __test_bit_size >> XC_PAGE_SHIFT as its size. Signed-off-by: Zhenguo Wang <wangzhenguo@huawei.com> Signed-off-by: Weidong Han <hanweidong@huawei.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-03xen-mapcache: replace last_address_index with a last_entry pointerStefano Stabellini1-18/+16
Replace last_address_index and last_address_vaddr with a single pointer to the last MapCacheEntry used. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-04-02Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori14-28/+37
# By Stefan Hajnoczi # Via Luiz Capitulino * luiz/queue/qmp: chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors qemu-socket: set passed fd non-blocking in socket_connect() net: ensure "socket" backend uses non-blocking fds oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
2013-04-02configure: remove unset variablesPaolo Bonzini1-2/+0
These variables have not been set for a long time. Do not include them in config-host.mak. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1364918276-11866-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptorsStefan Hajnoczi1-0/+3
When we receive a file descriptor over a UNIX domain socket the O_NONBLOCK flag is preserved. Clear the O_NONBLOCK flag and rely on QEMU file descriptor users like migration, SPICE, VNC, block layer, and others to set non-blocking only when necessary. This change ensures we don't accidentally expose O_NONBLOCK in the QMP API. QMP clients should not need to get the non-blocking state "correct". A recent real-world example was when libvirt passed a non-blocking TCP socket for migration where we expected a blocking socket. The source QEMU produced a corrupted migration stream since its code did not cope with non-blocking sockets. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-04-02qemu-socket: set passed fd non-blocking in socket_connect()Stefan Hajnoczi1-0/+1
socket_connect() sets non-blocking on TCP or UNIX domain sockets if a callback function is passed. Do the same for file descriptor passing, otherwise we could unexpectedly be using a blocking file descriptor. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-04-02net: ensure "socket" backend uses non-blocking fdsStefan Hajnoczi1-1/+6
There are several code paths in net_init_socket() depending on how the socket is created: file descriptor passing, UDP multicast, TCP, or UDP. Some of these support both listen and connect. Not all code paths set the socket to non-blocking. This patch addresses the file descriptor passing and UDP cases which were missing socket_set_nonblock(fd) calls. I considered moving socket_set_nonblock(fd) to a central location but it turns out the code paths are different enough to require non-blocking at different places. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-04-02oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()Stefan Hajnoczi14-27/+27
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets. Rename to qemu_set_nonblock() just like qemu_set_cloexec(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-04-02VMXNET3: initialize rx_ridx to eliminate compile warningWenchao Xia1-1/+1
Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be used uninitialized in this function", so fix it. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Message-id: 1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02qdev: only send deleted event if device was realizedAnthony Liguori1-9/+14
Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364402174-16580-1-git-send-email-aliguori@us.ibm.com
2013-04-02QOM-ify the TPM supportStefan Berger8-59/+413
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>
2013-04-02qemu-char: rewrite io_channel_send_all and drop the '_all' suffixAnthony Liguori1-16/+20
The current code is oddly written and have equally odd semantics. Despite the '_all' suffix, upon EAGAIN the result will be a partial write but instead of returning the partial write, we return EAGAIN. Change the behavior to write as much as we can until we get an EAGAIN returning a partial write if we do. Reported-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364575190-731-1-git-send-email-aliguori@us.ibm.com
2013-04-02ui/gtk: Set QEMU window iconStefan Weil1-0/+13
The QEMU icon which is already used for SDL is now also loaded by GTK. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1364653300-26813-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02po: add French translationAurelien Jarno1-0/+62
Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-6-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02po: update existing translation filesAurelien Jarno3-26/+92
Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-5-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02po/Makefile: correctly pass QEMU versionAurelien Jarno1-1/+1
Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-4-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02po/Makefile: simplifyAurelien Jarno1-8/+4
In the hope we get more translations, we should not have to modify po/Makefile for each of them. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-3-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02gtk: make more messages translatableAurelien Jarno1-2/+2
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1364836326-8707-2-git-send-email-aurelien@aurel32.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02append the terminating '\0' to bootorder stringAmos Kong1-3/+3
Problem was introduced in commit c8a6ae8b. The last terminating '\0' was lost, use the right length 5 ("HALT\0"). Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Message-id: 1363774594-21001-1-git-send-email-akong@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-02Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20130401.0' ↵Anthony Liguori2-55/+1128
into staging vfio-pci pull request 20130401 # gpg: Signature made Mon 01 Apr 2013 02:40:45 PM CDT using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found # By Alex Williamson # Via Alex Williamson * awilliam/tags/vfio-pci-for-qemu-20130401.0: vfio: cleanup includes vfio: Add bootindex support vfio-pci: Move devices to D0 on reset vfio-pci: Add extra debugging qemu vfio-pci: Graphics device quirks qemu vfio-pci: Add support for VGA MMIO and I/O port access vfio-pci: Add PCIe capability mangling based on bus type vfio-pci: Generalize PCI config mangling linux-headers: Update to v3.9-rc2
2013-04-02microblaze: Add support for the sleep insnEdgar E. Iglesias1-0/+17
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2013-04-01vfio: cleanup includesAlex Williamson1-5/+5
Starting to get messy, put the back in alphabetical order. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio: Add bootindex supportAlex Williamson1-0/+5
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Move devices to D0 on resetAlex Williamson1-0/+23
Guests may leave devices in a low power state at reboot, but we expect devices to be woken up for the next boot. Make this happen. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Add extra debuggingAlex Williamson1-10/+30
Often when debugging it's useful to be able to disable bypass paths so no interactions with the device are missed. Add some extra debug options to do this. Also add device info on read/write BAR accesses, which is useful when debugging more than one assigned device. A couple DPRINTFs also had redundant "vfio:" prefixes. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01qemu vfio-pci: Graphics device quirksAlex Williamson1-2/+718
Graphics cards have a number of different backdoors. Some of these are alternative ways to get PCI BAR addresses, some of them are complete mirrors of PCI config space available through MMIO and I/O port access. These quirks cover a number of ATI Radeon and Nvidia devices. On the ATI/AMD side, this should enable HD5450 and HD7850 and hopefully a host of devices around those generations. For Nvidia, my card selection is much more dated. A 8400gs works well with both the Window shipped driver and the Nvidia downloaded driver. A 7300le works as well, with the caveat that generating the Window experience index with the Nvidia driver causes the card to reset several times before generating a BSOD. An NVS 290 card seems to run well with the shipped Windows driver, but generates a BSOD with the Nvidia driver. All of the Nvidia devices work with the Linux Nvidia proprietary driver and nouveau, the HD5450 works with either radeon or fglrx, HD7850 works with vesa and fglrx (not supported by radeon). Extremely limited 3D testing. Device reset is also an issue with graphics. It's unfortunately very common that the devices offer no means to reset the card or doesn't seem effective. Nvidia devices are pretty good about being able to get the device to a working state through the VGA BIOS init, Radeon devices less so, and often require a host reboot. Work remains to be done here. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01qemu vfio-pci: Add support for VGA MMIO and I/O port accessAlex Williamson1-0/+169
Most VGA cards need some kind of quirk to fully operate since they hide backdoors to get to other registers outside of PCI config space within the registers, but this provides the base infrastructure. If we could identity map PCI resources for assigned devices we would need a lot fewer quirks. To enable this, use a kernel side vfio-pci driver that incorporates VGA support (v3.9), and use the -vga none option and add the x-vga=on option for the vfio-pci device. The "x-" denotes this as an experimental feature. You may also need to use a cached copy of the VGA BIOS for your device, passing it to vfio-pci using the romfile= option. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Add PCIe capability mangling based on bus typeAlex Williamson1-1/+128
Windows seems to pay particular interest to the PCIe header type of devices and will fail to load drivers if we attach Endpoint devices or Legacy Endpoint devices to the Root Complex. We can use pci_bus_is_express and pci_bus_is_root to determine the bus type and mangle the type appropriately: * Legacy PCI * No change, capability is unmodified for compatibility. * PCI Express * Integrated Root Complex Endpoint -> Endpoint * PCI Express Root Complex * Endpoint -> Integrated Root Complex Endpoint * Legacy Endpoint -> none, capability hidden We also take this opportunity to explicitly limit supported devices to Endpoints, Legacy Endpoints, and Root Complex Integrated Endpoints. We don't currently have support for other types and users often cause themselves problems by assigning them. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01vfio-pci: Generalize PCI config manglingAlex Williamson1-38/+42
Kernel-side vfio virtualizes all of config space, but some parts are unique to Qemu. For instance we may or may not expose the ROM BAR, Qemu manages MSI/MSIX, and Qemu manages the multi-function bit so that single function devices can appear as multi-function and vica versa. Generalize this into a bitmap of Qemu emulated bits. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01linux-headers: Update to v3.9-rc2Alex Williamson1-0/+9
Unedited scripts/update-linux-headers.sh run against v3.9-rc2 tag Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-04-01tcg/mips: Implement muls2_i32Aurelien Jarno2-1/+7
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: use clz32/ctz32 instead of reinventing the wheelAurelien Jarno2-30/+3
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: enable SSE4.1 and SSE4.2 in TCG modeAurelien Jarno1-6/+7
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstrX instructions with "Masked(-)" polarityAurelien Jarno1-1/+1
valids can equals to -1 if the reg/mem string is empty. Change the expression to have an empty xor mask in that case. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstrX instructions in "Equal ordered" modeAurelien Jarno1-2/+3
The inner loop should only change the current bit of the result, instead of the whole result. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstrX instructions in "Equal each" modeAurelien Jarno1-1/+1
pcmpXstrX instructions in "Equal each" mode force both invalid element pair to true. It means (upper - MAX(valids, validd)) bits should be set to 1, not (upper - MAX(valids, validd) + 1). Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstrX instructions in "Ranges" modeAurelien Jarno1-2/+2
Fix the order of the of the comparisons to match the "Intel 64 and IA-32 Architectures Software Developer's Manual". Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstrm instructionsAurelien Jarno1-8/+8
pcmpXstrm instructions returns their result in the XMM0 register and not in the first operand. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpXstri instructionsAurelien Jarno1-2/+2
ffs1 returns the first bit set to one starting counting from the most significant bit. pcmpXstri returns the most significant bit set to one, starting counting from the least significant bit. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.2: fix pcmpgtq instructionAurelien Jarno1-2/+1
The "Intel 64 and IA-32 Architectures Software Developer's Manual" (at least recent versions) clearly says that the comparison is signed. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01target-i386: SSE4.1: fix pinsrb instructionAurelien Jarno1-2/+2
gen_op_mov_TN_reg() loads the value in cpu_T[0], so this temporary should be used instead of cpu_tmp0. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-01Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori4-56/+58
# By Dunrong Huang (1) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: hw/tcx: Remove unused 'addr' field and the property that sets it hw/i386/pc: format load_linux function configure: show debug-info option in --help output
2013-04-01sysbus: Remove sysbus_add_memory and sysbus_del_memoryPeter Maydell2-23/+0
Remove the sysbus_add_memory and sysbus_del_memory functions. These are trivial wrappers for mapping a memory region into the system memory space, and have no users now. Sysbus devices should never map their own memory regions anyway; the correct API for mapping an mmio region is for the creator of the device to use sysbus_mmio_map. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363358063-23973-6-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01hw/milkymist-softusb: set buffer in softusb_read_{dmem, pmem} error pathPeter Maydell1-0/+2
Make sure we set the buffer to something in the softusb_read_{dmem,pmem} error paths, since the caller will use the buffer unconditionally. (Newer gcc is smart enough to spot this and complain about 'may be used uninitialized'.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1364496184-11994-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01milkymist-softusb: Don't map RAM memory regions in the device itselfPeter Maydell2-12/+13
Don't map the pmem and dmem RAM memory regions in the milkymist-softusb device itself. Instead just expose them as sysbus mmio regions which the device creator can map appropriately. This allows us to drop the pmem_base and dmem_base properties. Instead of going via cpu_physical_memory_read/_write when the device wants to access the RAMs, we just keep a host pointer to the memory and use that. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1363358063-23973-5-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-01milkymist-minimac2: Just expose buffers as a sysbus mmio regionPeter Maydell2-5/+2
Just expose the register buffers memory as a standard sysbus mmio region which the creator of the device can map, rather than providing a qdev property which the creator has to set to the base address and then doing the mapping in the device's own init function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc> Message-id: 1363358063-23973-4-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>