summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-15qemu-fsdev-dummy.c: Include module.hEduardo Habkost1-0/+1
module.h is where machine_init() is defined, but qemu-fsdev-dummy.c doesn't include it. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-15qdev: Split up header so it can be used in cpu.hAnthony Liguori8-366/+392
Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for now by splitting out qdev.h along the same lines that we previously split the C file. Then cpu.h just needs to include qdev-core.h. hw/qdev.h is split into following new headers: hw/qdev-core.h hw/qdev-properties.h hw/qdev-monitor.h Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> [ehabkost: re-add DEFINE_PROP_PCI_HOST_DEVADDR, that was removed on the original patch (by mistake, I guess)] [ehabkost: kill qdev_prop_set_vlan() declaration] [ehabkost: moved get_fw_dev_path() comment to the original location (I don't know why it was moved)] [ehabkost: removed qdev_exists() declaration] [ehabkost: keep using 'QemuOpts' instead of 'struct QemuOpts', as qdev-core.h includes qemu-option.h] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-15Move qemu_irq typedef out of qemu-common.hIgor Mammedov8-1/+10
It's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov <imammedo@redhat.com> [ehabkost: re-added the typedef to hw/irq.h after rebasing] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-15qemu-common.h: Comment about usage rulesEduardo Habkost1-1/+10
Every time we make a tiny change on a header file, we often find circular header dependency problems. To avoid this nightmare, we need to stop including qemu-common.h from other headers, and we should gradually move the declarations from the catch-all qemu-common.h header to their specific headers. This simply adds a comment documenting the rules about qemu-common.h, hoping that people will see it before including qemu-common.h from other header files, and before adding more declarations to qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-14Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-1.3.0-rc0' ↵Anthony Liguori9-49/+241
into staging vfio-pci: KVM INTx accel & common msi_get_message * awilliam/tags/vfio-pci-for-qemu-1.3.0-rc0: vfio-pci: Use common msi_get_message vfio-pci: Add KVM INTx acceleration linux-headers: Update to 3.7-rc5 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14Merge remote-tracking branch 'kraxel/pixman.v5' into stagingAnthony Liguori4-9/+28
* kraxel/pixman.v5: pixman: cleanup properly on make distclean pixman: add licensing info pixman: build internal version early pixman: pass cflags, add -fPIC pixman: disable gtk pixman: set --host for cross builds pixman: add output dir to include path Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14Merge remote-tracking branch 'bonzini/nbd-next' into stagingAnthony Liguori8-36/+275
* bonzini/nbd-next: nbd: fixes to read-only handling hmp: add NBD server commands nbd: disallow nbd-server-add before nbd-server-start nbd: force read-only export for read-only devices nbd: fix nbd_server_stop crash when no server was running nbd: accept URIs nbd: accept relative path to Unix socket qemu-nbd: initialize main loop before block layer Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori7-24/+46
* bonzini/scsi-next: virtio-scsi: use dma_context_memory dma: Define dma_context_memory and use in sysbus-ohci megasas: Correct target/lun mapping scsi-disk: flush cache after disabling it megasas: do not include block_int.h scsi: remove superfluous call to scsi_device_set_ua virtio-scsi: factor checks for VIRTIO_SCSI_S_DRIVER_OK when reporting events scsi: do not return short responses for emulated commands Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14Merge remote-tracking branch 'kraxel/usb.70' into stagingAnthony Liguori26-797/+775
* kraxel/usb.70: ehci: fix migration xhci: Fix some DMA host endian bugs usb/combined-packet: Move freeing of combined to usb_combined_packet_remove() xhci: Add support for packets with both data and an error status ehci: Add support for packets with both data and an error status ehci: Get rid of the magical PROC_ERR status usb-redir: Allow packets to have both data and an error-status usb: split packet result into actual_length + status Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14Merge remote-tracking branch 'spice/spice.v63' into stagingAnthony Liguori10-274/+79
* spice/spice.v63: spice: fix initialization order pflib: unused, remove it. spice: switch to pixman qxl: call dpy_gfx_resize when entering vga mode qxl: fix cursor reset hw/qxl: qxl_send_events: nop if stopped hw/qxl: guest bug on primary create with stride %4 != 0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-14pixman: cleanup properly on make distcleanGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: add licensing infoGerd Hoffmann2-0/+10
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: build internal version earlyGerd Hoffmann1-3/+4
Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: pass cflags, add -fPICGerd Hoffmann1-1/+1
Pass on CFLAGS to the pixman configure script. Add -fPIC to the cflags, needed to make the final link succeed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: disable gtkGerd Hoffmann1-1/+1
gtk is only needed to build test cases. Disable it to simplify the build. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: set --host for cross buildsGerd Hoffmann2-1/+6
Set --host when calling pixman configure while doing cross builds so pixman's autoconf picks up the cross build tools correctly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-14pixman: add output dir to include pathGerd Hoffmann1-5/+7
Needed to make sure the (generated) pixman-version.h file is found. Based on a patch from Blue Swirl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-13vfio-pci: Use common msi_get_messageAlex Williamson1-23/+1
We can get rid of our local version now that a helper exists. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2012-11-13vfio-pci: Add KVM INTx accelerationAlex Williamson1-0/+186
This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx injection and unmask. This significantly boosts the performance of devices making use of legacy interrupts (ex. ~60% better netperf TCP_RR scores for an e1000e assigned to a Linux guest and booted with pci=nomsi). This also avoids flipping mmaps on and off to simulate EOIs, so greatly improves performance of device access in addition to interrupt latency. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2012-11-13linux-headers: Update to 3.7-rc5Alex Williamson8-26/+54
update-linux-headers.sh script run against Linux tag v3.7-rc5 Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2012-11-13nbd: fixes to read-only handlingPaolo Bonzini1-13/+12
We do not need BLKROSET if the kernel supports setting flags. Also, always do BLKROSET even for a read-write export, otherwise the read-only state remains "sticky" after the invocation of "qemu-nbd -r". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12aio: fix aio_ctx_prepare with idle bottom halvesPaolo Bonzini1-4/+2
Commit ed2aec4867f0d5f5de496bb765347b5d0cfe113d changed the return value of aio_ctx_prepare from false to true when only idle bottom halves are available. This broke PC old-style DMA, which uses them. Fix this by making aio_ctx_prepare return true only when non-idle bottom halves are scheduled to run. Reported-by: malc <av1474@comtv.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
2012-11-12virtio-scsi: use dma_context_memoryPaolo Bonzini1-1/+1
Until address_space_rw was introduced, NULL was accepted as a placeholder for DMA with no IOMMU (to address_space_memory). This does not work anymore, and dma_context_memory needs to be specified explicitly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12dma: Define dma_context_memory and use in sysbus-ohciPeter Maydell3-1/+11
Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use it in the sysbus-ohci device, which fixes a segfault when attempting to use that device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
2012-11-12megasas: Correct target/lun mappingHannes Reinecke2-1/+2
The structure to reference a logical drive has an unused field, which can be used to carry the lun ID. This enabled seabios to establish the proper target/LUN mapping. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12scsi-disk: flush cache after disabling itPaolo Bonzini1-0/+9
SBC says that "if an application client changes the WCE bit from one to zero via a MODE SELECT command, then the device server shall write any data in volatile cache to non-volatile medium before completing the command". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12megasas: do not include block_int.hPaolo Bonzini1-1/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12scsi: remove superfluous call to scsi_device_set_uaPaolo Bonzini1-1/+0
Suggested by Laszlo Ersek. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12virtio-scsi: factor checks for VIRTIO_SCSI_S_DRIVER_OK when reporting eventsPaolo Bonzini1-3/+5
Suggested by Laszlo Ersek. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12scsi: do not return short responses for emulated commandsPaolo Bonzini1-16/+18
The inquiry command, for the case of VPD=1, was returning short responses; the number of returned bytes was just the number of bytes in the request, without padding to the specified allocation length with zero bytes. This is usually harmless, but it is a violation of the SCSI specification. To fix this, always pad with zero bytes to r->cmd.xfer in scsi_disk_emulate_command, and return at most r->buflen bytes (the size of the buffer for command data) rather than at most buflen bytes (the number of bytes that was filled in). Before this patch, "strace sg_inq -p0x83 /dev/sda" would report a non-zero resid value. After this patch, it reports resid=0. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12hmp: add NBD server commandsPaolo Bonzini3-0/+124
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12nbd: disallow nbd-server-add before nbd-server-startPaolo Bonzini1-0/+5
It works nicely with the QMP commands, but it adds useless complication with HMP. In particular, see the following: (qemu) nbd_server_add -w scsi0-hd0 (qemu) nbd_server_start -a localhost:10809 NBD server already exporting device scsi0-hd0 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12nbd: force read-only export for read-only devicesPaolo Bonzini1-0/+7
This is the desired behavior for HMP, but it is a better choice for QMP as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12nbd: fix nbd_server_stop crash when no server was runningPaolo Bonzini1-3/+5
This failed on the new assertion of qemu_set_fd_handler2: qemu-system-x86_64: /home/pbonzini/work/upstream/qemu/iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12nbd: accept URIsPaolo Bonzini2-9/+114
The URI syntax is consistent with the Gluster syntax. Export names are specified in the path, preceded by one or more (otherwise unused) slashes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12nbd: accept relative path to Unix socketPaolo Bonzini1-10/+7
Adding the "is_unix" member now will simplify the parsing of NBD URIs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12qemu-nbd: initialize main loop before block layerPaolo Bonzini1-1/+1
qemu-nbd was broken because they initialized the block layer while qemu_aio_context was still NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-11tcg: properly check that op's output needs to be synced to memoryKirill Batuzov1-4/+4
Fix typo introduced in b3a1be87bac3a6aaa59bb88c1410f170dc9b22d5. Reported-by: Ruslan Savchenko <ruslan.savchenko@gmail.com> Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-11-11target-mips: Fix seg fault for LUI when MIPS_DEBUG_DISAS==1.Eric Johnson1-7/+11
The call to gen_logic_imm for OPC_LUI passes -1 for rs. This causes the MIPS_DEBUG statement to seg fault due to the deference of regnames[rs]. This patch fixes that. Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (aurel32: replaced static string formating by a static string)
2012-11-10target-i386: avoid using cpu_single_envBlue Swirl1-218/+222
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-11-10target-xtensa: avoid using cpu_single_envBlue Swirl1-5/+5
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-11-10target-unicore32: avoid using cpu_single_envBlue Swirl1-4/+4
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-11-10kvm: avoid using cpu_single_envBlue Swirl1-10/+11
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-11-10disas: avoid using cpu_single_envBlue Swirl17-86/+100
Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-11-10slirp: remove unused function u_sleepBlue Swirl2-15/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10sun4c: remove unused functionsBlue Swirl2-27/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10m48t59: remove unused m48t59_set_addrBlue Swirl2-8/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10tests/tcg: new test for i386 FPREM and FPREM1Catalin Patulea2-0/+362
This is setting the stage for a cleanup of FPREM and FPREM1 helpers while being sure that they behave same as bare metal. The test constructs operands using combinations of corner cases for the floating-point bitfields and prints operands, result and FPU status word for FPREM and FPREM1. The outputs can then be compared between bare metal and QEMU. The 'run-test-i386-fprem' make target does just that. Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10memory: Don't dump disabled regionsJan Kiszka1-1/+1
This makes "info mtree" output readable again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-10memory: Reintroduce dirty flag to optimize changes on disabled regionsJan Kiszka1-2/+13
Cirrus is triggering this, e.g. during Win2k boot: Changes only on disabled regions require no topology update when transaction depth drops to 0 again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>