summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-09-06usb-ccid: enable debugusb-ccid.kvm.v18Alon Levy1-1/+1
2010-09-06usb-ccid: use reader_id_t, small cleanupAlon Levy1-7/+5
2010-09-06only attach/detach if auto_attach==0; but remove card on ReaderRemove anywayAlon Levy1-2/+6
2010-09-06usb-ccid: use answer queue instead of single outstanding answerAlon Levy1-17/+91
2010-09-06usb-ccid: treat ReaderAdd/ReaderRemove as attach/detach commands. default to ↵Alon Levy1-11/+13
already attached
2010-09-06virtio-console: send CLOSE/OPEN/READY qemu char-dev ioctlsAlon Levy1-0/+31
2010-09-06usb-ccid: add smart card reader CCID usb deviceAlon Levy1-0/+1006
The usb-ccid device talks the protocol in vscard_common.h through the chardev it is attached to. A program implementing a virtual card based on static certificates or a real card on the client is available at: http://cgit.freedesktop.org/~alon/cac_card (temporary home) cac_card written by Robert Relyea <rrelyea@redhat.com> Signed-off-by Alon Levy <alevy@redhat.com>
2010-09-06spice-vmc: add a reset handler used to unregister spice interface (and ↵Alon Levy1-0/+10
trigger server mouse)
2010-09-06qxl: add guestdebug propertyGerd Hoffmann2-1/+6
2010-09-06[temporary] qxl: disable cursor callbacksGerd Hoffmann1-0/+4
Will deadlock in case cursor rendering is triggered via QXL_IO_UPDATE_AREA.
2010-09-06[rhel6 compat]: qxl: compat io sizeGerd Hoffmann1-2/+7
2010-09-06[rhel6 compat] add rhel6.0.0 machine typeGerd Hoffmann1-0/+56
2010-09-01qxl: migration fix #1Gerd Hoffmann1-7/+11
The pointer to the modes table must be updated in post-load when migrating between spice 0.4 and spice 0.6. Note: rhel-6.0.z needs that one too.
2010-09-01spice-vmc: compiler warning fix on fprintfspice.kvm.v18Alon Levy1-1/+1
2010-08-31Merge branch 'spice.v18' into spice.kvm.v18Gerd Hoffmann12-11/+2307
Conflicts: Makefile.target configure monitor.c pc-bios/vgabios-cirrus.bin pc-bios/vgabios.bin
2010-08-31[rhel6 compat] adjust vga ram sizeGerd Hoffmann1-1/+1
2010-08-31spice: add virtio-serial based spice vmchannel backend.Gerd Hoffmann1-0/+262
Adds the spicevmc device. This is a communication channel between the spice client and the guest. It is used to send display information and mouse events from the spice clients to the guest.
2010-08-31spice: add qxl deviceGerd Hoffmann7-1/+2028
qxl is a paravirtual graphics card. The qxl device is the bridge between the guest and the spice server (aka libspice-server). The spice server will send the rendering commands to the spice client, which will actually render them. The spice server is also able to render locally, which is done in case the guest wants read something from video memory. Local rendering is also used to support display over vnc and sdl. qxl is activated using "-vga qxl". qxl supports multihead, additional cards can be added via '-device qxl".
2010-08-31all vga: refuse hotplugging.Gerd Hoffmann3-0/+12
Try to pci hotplug a vga card, watch qemu die with hw_error(). This patch fixes it.
2010-08-31switch vmware_vga to pci vgabiosGerd Hoffmann1-6/+1
2010-08-31switch stdvga to pci vgabiosGerd Hoffmann1-4/+3
2010-08-28isapc: fix segfault.Isaku Yamahata1-0/+1
https://bugs.launchpad.net/bugs/611646 reports that ./i386-softmmu/qemu -M isapc segfaults. This patch fixes the segfault introduced by f885f1eaa8711c06033ceb1599e3750fb37c306f It's because i440fx_state in pc_init1() isn't initialized. > Core was generated by `./i386-softmmu/qemu -M isapc'. > Program terminated with signal 11, Segmentation fault. > [New process 19686] > at qemu/hw/piix_pci.c:136 > (gdb) where > at qemu/hw/piix_pci.c:136 > boot_device=0x7fffe1f5b040 "cad", kernel_filename=0x0, > kernel_cmdline=0x6469bf "", initrd_filename=0x0, > cpu_model=0x654d10 "486", pci_enabled=0) > at qemu/hw/pc_piix.c:178 > boot_device=0x7fffe1f5b040 "cad", kernel_filename=0x0, > kernel_cmdline=0x6469bf "", initrd_filename=0x0, cpu_model=0x654d10 "486") > at qemu/hw/pc_piix.c:207 > envp=0x7fffe1f5b188) > at qemu/vl.c:2871 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-26Merge commit '9e84a4708f820976afd825745d4110dbaf58f431' into upstream-mergeMarcelo Tosatti6-24/+37
* commit '9e84a4708f820976afd825745d4110dbaf58f431': etraxfs_eth: correct use of ! and & Sparc: update OpenBIOS images to r859 ppc4xx: load Bamboo kernel, initrd, and fdt at fixed addresses ppc4xx: don't unregister RAM at reset ppc4xx: correct SDRAM controller warning message condition Fix "make install" with a cross toolchain PPC: Update openbios binary to r859 PPC: Add PV hypercall transport through fw_cfg Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-26Merge commit '2446333cd5b5c985f6517dee7004e542ecacd21c' into upstream-mergeMarcelo Tosatti45-5/+42
* commit '2446333cd5b5c985f6517dee7004e542ecacd21c': Rearrange block headers compile -fsdev and -virtfs cmd line options unconditionally. kvm: remove guest triggerable abort() kvm: Don't walk memory_size == 0 slots in kvm_client_migration_log Conflicts: hw/pc.c hw/pci-hotplug.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-26Merge commit '3329f07b7a8b919d4a5641611beb0671a2c381a2' into upstream-mergeMarcelo Tosatti11-15/+34
* commit '3329f07b7a8b919d4a5641611beb0671a2c381a2': QemuOpts: make most qemu_*_opts static QemuOpts: allow new option groups be registered at runtime. VGA: Don't register deprecated VBE range QMP: Update README file QMP doc: Add 'Stability Considerations' section QMP/monitor: update do_info_version() to output broken down version string QMP: update 'query-version' documentation vnc: check fd before calling qemu_set_fd_handler2() in vnc_client_write() virtio-serial: Cleanup on device hot-unplug target-i386: svm: Fix MSRPM check Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-26Merge commit '6977dfe6af975d72a8140dbc91effe8b8f2a58f8' into upstream-mergeMarcelo Tosatti7-36/+882
* commit '6977dfe6af975d72a8140dbc91effe8b8f2a58f8': (24 commits) exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_from_ptr() exec: replace tabs by spaces. arch_init: replace tabs by spaces. pckbd: support for commands 0xf0-0xff: Pulse output bit Replace qemu_malloc + memset with qemu_mallocz Use ARRAY_SIZE macro Remove useless NULL check for qemu_strdup return value Remove useless NULL checks for qemu_malloc return value savevm: Reset last block info at beginning of each save set proper migration status on ->write error (v5) rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix QEMUFileBuffered: indicate that we're ready when the underlying file is ready sparc escc IUS improvements (SunOS 4.1.4 fix) Fix mingw32 build win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined) win32: Add missing function setenv Disable build of ivshmem on non-KVM systems Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems TCG: Revert ppc64 tcg_out_movi32 change TCG: Fix Darwin/ppc calling convention recognition ... Conflicts: exec.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-26Merge commit '84b89d782f03b99770759f1d9d6e4e95a2641c35' into upstream-mergeMarcelo Tosatti4-5/+28
* commit '84b89d782f03b99770759f1d9d6e4e95a2641c35': Add qemu_ram_alloc_from_ptr function microblaze: Fix the target version of stat64 struct audio/sdl: return on error mips: Add support for VInt and VEIC irq modes audio/sdl: be more anal about errors audio: make audio_pt_init block all signals sparc32: use FW_CFG_CMDLINE_SIZE ide: Avoid canceling IDE DMA block: Change bdrv_eject() not to drop the image block: Fix bdrv_has_zero_init block migration: replace tabs by spaces. loadvm: improve tests before bdrv_snapshot_goto() block: Change bdrv_commit to handle multiple sectors at once fix last cpu timer initialization Conflicts: cpu-common.h exec.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-08-26etraxfs_eth: correct use of ! and &Blue Swirl1-1/+1
Combining bitwise AND and logical NOT is suspicious. Fixed by this Coccinelle script: // From http://article.gmane.org/gmane.linux.kernel/646367 @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-26ppc4xx: load Bamboo kernel, initrd, and fdt at fixed addressesHollis Blanchard1-21/+18
We can't use the return value of load_uimage() for the kernel because it can't account for BSS size, and the PowerPC kernel does not relocate blobs before zeroing BSS. Instead, we now load at the fixed addresses chosen by u-boot (the normal firmware for the board). Signed-off-by: Hollis Blanchard <hollis@penguinppc.org>
2010-08-26ppc4xx: don't unregister RAM at resetHollis Blanchard1-1/+0
The PowerPC 4xx SDRAM controller emulation unregisters RAM in its reset callback. However, qemu_system_reset() is now called at initialization time, so all RAM is unregistered before starting the guest (!). Signed-off-by: Hollis Blanchard <hollis@penguinppc.org>
2010-08-26ppc4xx: correct SDRAM controller warning message conditionHollis Blanchard1-1/+1
The message "Truncating memory to %d MiB to fit SDRAM controller limits" should be displayed only when a user chooses an amount of RAM which can't be represented by the PPC 4xx SDRAM controller (e.g. 129MB, which would only be valid if the controller supports a bank size of 1MB). Signed-off-by: Hollis Blanchard <hollis@penguinppc.org>
2010-08-26PPC: Add PV hypercall transport through fw_cfgAlexander Graf3-0/+17
On KVM for PPC we need to tell the guest which instructions to use when doing a hypercall. The clean way to do this is to go through an ioctl from userspace and passing it on to the guest using the device tree. So let's do the qemu part here: read out the hypercall and pass it on to the guest's fw_cfg so openBIOS can read it out and expose it again. Signed-off-by: Alexander Graf <agraf@suse.de>
2010-08-24Rearrange block headersBlue Swirl45-5/+42
Changing block.h or blockdev.h resulted in recompiling most objects. Move DriveInfo typedef and BlockInterfaceType enum definitions to qemu-common.h and rearrange blockdev.h use to decrease churn. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-22QemuOpts: make most qemu_*_opts staticGerd Hoffmann6-6/+6
Switch tree to lookup-by-name using qemu_find_opts(). Also hook up virtfs options so qemu_find_opts works for them too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-22VGA: Don't register deprecated VBE rangeAlex Williamson1-7/+0
Old versions of the BOCHs VGA BIOS (cira 2003) made use of VBE registers at 0xff80/81. In VBE API version 0xb0c2 these were moved to 0x1ce/cf. Unfortunately, QEMU still registers handlers for the old range. If a guest attempts to assign an I/O device overlapping this region, QEMU exits with a hw_error. Windows guests seem to like to assign I/O devices to the high end of the address space, so it's pretty easy to hot add an rtl8139 to a Win2k8 guest and trigger the bug. I can't find any reason to register these handlers, so let's remove the cruft. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-22virtio-serial: Cleanup on device hot-unplugAmit Shah3-1/+27
Free malloc'ed memory, unregister from savevm and clean up virtio-common bits on device hot-unplug. This was found performing a migration after device hot-unplug. Reported-by: <lihuang@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-22pckbd: support for commands 0xf0-0xff: Pulse output bitBernhard Kohl1-3/+20
I have a guest OS which sends the command 0xfd to the keyboard controller during initialization. To get rid of the message "qemu: unsupported keyboard cmd=0x%02x\n" I added support for the pulse output bit commands. I found the following explanation here: http://www.win.tue.nl/~aeb/linux/kbd/scancodes-11.html#ss11.3 Command 0xf0-0xff: Pulse output bit Bits 3-0 of the output port P2 of the keyboard controller may be pulsed low for approximately 6 µseconds. Bits 3-0 of this command specify the output port bits to be pulsed. 0: Bit should be pulsed. 1: Bit should not be modified. The only useful version of this command is Command 0xfe. (For MCA, replace 3-0 by 1-0 in the above.) Command 0xfe: System reset Pulse bit 0 of the output port P2 of the keyboard controller. This will reset the CPU. Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-20Replace qemu_malloc + memset with qemu_malloczBlue Swirl2-4/+2
Replace a qemu_malloc call, followed by a memset, with qemu_mallocz. Found with this Coccinelle semantic patch, adapted from Coccinelle test package rule 94: @@ type T; expression x; expression E; @@ - x = (T)qemu_malloc(E) + x = qemu_mallocz(E) ... ( - memset(x,0,E); | - memset(x,0,sizeof(*x)); ) Some files (tests/*) had to be filtered out. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-19Remove useless NULL check for qemu_strdup return valueBlue Swirl1-3/+0
Found with this Coccinelle semantic patch: @@ expression E; identifier ptr; identifier fn ~= "qemu_strn?dup"; @@ -ptr = fn(E); -if (ptr == NULL) { ... } - +ptr = fn(E); Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-17device-assignment: Byte-wise ROM readAlex Williamson1-4/+5
The host kernel filters the PCI option ROM, returning only bytes for the actual ROM size, not for the whole BAR. That means we typically do a short read of the PCI sysfs ROM file. Read it a byte at a time so we know how much to actually copy and only skip the copy if we get nothing. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2010-08-17device-assignment: Always use slow mapping for PCI option ROMAlex Williamson1-6/+2
KVM doesn't support read-only mappings for MMIO space. Performance isn't an issue for the option ROM mapping, so always use slow mapping. kvm.git cset b4f8c249 will make kvm hang with a "Bad address" fault without this. We can also then drop the extraneous mprotects since the guest has no way to write to these regions. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2010-08-17device-assignment: Fix slow option ROM mappingAlex Williamson1-1/+3
cpu_register_io_memory() supports individual function pointers being NULL, not the structure itself. Create and pass the right thing. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Chris Wright <chrisw@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2010-08-15sparc escc IUS improvements (SunOS 4.1.4 fix)Artyom Tarasenko1-26/+30
According to scc_escc_um.pdf: - Reset Highest IUS must update irq status to allow processing of the next priority interrupt. - rx interrupt has always higher priority than tx on same channel The documentation only explicitly says that Reset Highest IUS command (0x38) clears IUS bits, not that it clears the corresponding interrupt too, so don't clear interrupts on this command. The patch allows SunOS 4.1.4 to use the serial ports Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-10RESEND: Inter-VM shared memory PCI deviceCam Macdonell1-0/+828
resend for bug fix related to removal of irqfd Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] Interrupts are supported between multiple VMs by using a shared memory server by using a chardev socket. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] [,chardev=<id>][,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master] -chardev socket,path=<path>,id=<id> The shared memory server, sample programs and init scripts are in a git repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-10Support marking a device as non-migratableCam Macdonell1-0/+2
A non-migratable device should be removed before migration and re-added after. Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-09Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori1-2/+21
2010-08-03sparc32: use FW_CFG_CMDLINE_SIZEBlue Swirl1-0/+3
Add support for getting kernel command line size with FW_CFG_CMDLINE_SIZE. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-03ide: Avoid canceling IDE DMAAndrea Arcangeli1-2/+21
The reason for not actually canceling the I/O is because with virtualization and lots of VM running, a guest fs may mistake a overload of the host, as an IDE timeout. So rather than canceling the I/O, it's safer to wait I/O completion and simulate that the I/O has completed just before the io cancellation was requested by the guest. This way if ntfs or an app writes data without checking for -EIO retval, and it thinks the write has succeeded, it's less likely to run into troubles. Similar issues for reads. Furthermore because the DMA operation is splitted into many synchronous aio_read/write if there's more than one entry in the SG table, without this patch the DMA would be cancelled in the middle, something we've no idea if it happens on real hardware too or not. Overall this seems a great risk for zero gain. This approach is sure safer than previous code given we can't pretend all guest fs code out there to check for errors and reply the DMA if it was completed partially, given a timeout would never materialize on a real harddisk unless there are defective blocks (and defective blocks are practically only an issue for reads never for writes in any recent hardware as writing to blocks is the way to fix them) or the harddisk breaks as a whole. Signed-off-by: Izik Eidus <ieidus@redhat.com> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-08-03Fix apic build with kvm disabledAvi Kivity1-2/+2
Signed-off-by: Avi Kivity <avi@redhat.com>
2010-08-02fix last cpu timer initializationArtyom Tarasenko1-2/+2
The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset. Don't mark non-existing timers as running. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>