summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* linux-user: Clarify "Unable to reserve guest address space" errorPeter Maydell2012-08-271-1/+4
| | | | | | | | | | | Now that we default to reserving nearly 4GB of RAM for the guest address space when running a 32 bit linux-user guest on 64 bit hosts, users are much more likely to run into it. Reword the message to be more informative about what failed and provide suggestions for how to fix things. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: fix emulation of getdentsDmitry V. Levin2012-08-272-10/+9
| | | | | | | | | | | In case when TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64, the last byte of the target dirent structure (aka d_type byte) was never copied from the host dirent structure, thus breaking everything that relies on valid d_type value, e.g. glob(3). Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: arg_table need not have global scopeJim Meyering2012-08-271-3/+3
| | | | | | | | Declare arg_table to be "static const", and adjust the two users to also be const. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* tcg/ia64: fix and optimize ld/st slow pathAurelien Jarno2012-08-261-15/+23
| | | | | | | | | | | | Store slow path has been broken in e141ab52d: - the arguments are shifted before the last one (mem_index) is written. - the shift is done for both slow and fast paths. Fix that. Also optimize a bit by bundling the move together. This still can be optimized, but it's better to wait for a decision to be taken on the arguments order. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* tcg/ia64: fix prologue/epilogueAurelien Jarno2012-08-261-10/+10
| | | | | | Prologue and epilogue code has been broken in cea5f9a28. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* tcg/arm: Fix broken CONFIG_TCG_PASS_AREG0 codePeter Maydell2012-08-261-93/+144
| | | | | | | | | | | | | | The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was broken in that it did not respect the ABI requirement that 64 bit values were passed in even-odd register pairs. The simplest way to fix this is to implement some new utility functions for marshalling function arguments into the correct registers and stack, so that the code which sets up the address and data arguments does not need to care whether there has been a preceding env argument. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* i8259: add -no-spurious-interrupt-hack optionMatthew Ogilvie2012-08-245-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a way to optionally suppress spurious interrupts, as a workaround for systems described below: Some old operating systems do not handle spurious interrupts well, and qemu tends to generate them significantly more often than real hardware. Examples: - Microport UNIX System V/386 v 2.1 (ca 1987) (The main problem I'm fixing: Without this patch, it panics sporadically when accessing the hard disk.) - AT&T UNIX System V/386 Release 4.0 Version 2.1a (ca 1991) See screenshot in "QEMU Official OS Support List": http://www.claunia.com/qemu/objectManager.php?sClass=application&iId=9 (I don't have this system to test.) - A report about OS/2 boot lockup from 2004 by Hampa Hug: http://lists.nongnu.org/archive/html/qemu-devel/2004-09/msg00367.html (My patch was partially inspired by his.) Also: http://lists.nongnu.org/archive/html/qemu-devel/2005-06/msg00243.html (I don't have this system to test.) Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* vga: add some optional CGA compatibility hacksMatthew Ogilvie2012-08-244-8/+74
| | | | | | | | | | | | | | | | | | | | | | This patch adds some optional compatibility hacks (default disabled) to allow Microport UNIX to function under qemu. I've tried to structure it to be easy to add more hacks for other old CGA programs, if anyone ever needs them. Microport UNIX System V/386 v 2.1 (ca 1987) tries to program the CGA registers directly with neither the assistance of BIOS, nor with proper handling of EGA/VGA-only registers. Note that it didn't work on real VGA hardware, either (although in that case, the most obvious problems seemed to be out-of-range hsync and/or vsync signalling, rather than the issues in this patch). Eventually real MDA and/or CGA support might provide an alternative to this patch, although a hybrid approach like this patch might still be useful in marginal cases. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* qemu-options.hx: mention retrace= VGA optionMatthew Ogilvie2012-08-241-1/+7
| | | | | | | | | | The feature was added in commit cb5a7aa8c32141bb Sep 2008. My description is based on "Better VGA retrace emulation (needed for some DOS games/demos)" from http://www.boblycat.org/~malc/code/patches/qemu/index.html Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* vl: fix -hdachs/-hda argument order parsing issuesMatthew Ogilvie2012-08-241-21/+18
| | | | | | | | | | | | Without this patch, the -hdachs argument had to occur either BEFORE the corresponding "-hda" option, or AFTER the plain disk image name (if neither -hda nor -drive is used). Otherwise it would effectively be ignored. Option -hdachs still has no effect on -drive, but that seems best. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* target-i386/translate.c: mov to/from crN/drN: ignore mod bitsMatthew Ogilvie2012-08-241-4/+10
| | | | | | | | | | | | | > This instruction is always treated as a register-to-register (MOD = 11) > instruction, regardless of the encoding of the MOD field in the MODR/M > byte. Also, Microport UNIX System V/386 v 2.1 (ca 1987) runs fine on real Intel 386 and 486 CPU's (at least), but does not run in qemu without this patch. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* fix some debug printf format stringsMatthew Ogilvie2012-08-244-7/+10
| | | | | | | | These are normally ifdefed out and don't matter. But if you enable them, they ought to be correct. Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net> Signed-off-by: malc <av1474@comtv.ru>
* ivshmem: fix memory_region_del_eventfd assertion failurePaolo Bonzini2012-08-231-0/+4
| | | | | | | | | | | | We do not register ioeventfds unless the IVSHMEM_IOEVENTFD feature is set. The same feature must be checked before releasing the eventfds. Regression introduced by commit 563027c (ivshmem: use EventNotifier and memory API, 2012-07-05). Reported-by: Cam Macdonnell <cam@cs.ualberta.ca> Tested-by: Cam Macdonnell <cam@cs.ualberta.ca> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qom: object_delete should unparent the object firstPaolo Bonzini2012-08-235-10/+2
| | | | | | | | | | | | | | | | object_deinit is only called when the reference count goes to zero, and yet tries to do an object_unparent. Now, object_unparent either does nothing or it will decrease the reference count. Because we know the reference count is zero, the object_unparent call in object_deinit is useless. Instead, we need to disconnect the object from its parent just before we remove the last reference apart from the parent's. This happens in object_delete. Once we do this, all calls to object_unparent peppered through QEMU can go away. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: don't try to initialize json parser when monitor is HMPAnthony Liguori2012-08-231-2/+2
| | | | | Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-mips: Fix some helper functions (VR54xx multiplication)Stefan Weil2012-08-241-46/+29
| | | | | | | | | | | | | Commits b5dc7732e1cc2fb549e48b7b5d664f2c79628e2e and be24bb4f3007c3e07cbf1934f7e781493d876ab7 optimized the code and removed the correct setting of t0. Fix this. gcc-4.7 detected this bug because parameter arg1 was unused but set in set_HIT0_LO and set_HI_LOT0. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-mips: Enable access to required RDHWR hardware registersMeador Inge2012-08-231-2/+3
| | | | | | | | | | | | | | | | | While running in the usermode emulator all of the required* MIPS32r2 RDHWR hardware registers should be accessible (the Linux kernel enables access to these same registers). Note that these registers are still enabled when the MIPS ISA is not release 2. This is OK since the Linux kernel emulates access to them when they are not available in hardware. * There is also the ULR register which is only recommended for full release 2 compliance. Incidentally, accessing this register in the current implementation works fine without flipping its access bit. Signed-off-by: Meador Inge <meadori@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* monitor: move json init from OPEN event to initAnthony Liguori2012-08-231-1/+3
| | | | | | | | | | | | | | | | | At some point in the past, the OPEN event was changed to be issued from a bottom half. This creates a small window whereas a data callback registered in init may be invoked before the OPEN event has been issued. This is reproducible with: echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp stdio We can fix this for the monitor by moving the parser initialization to init. The remaining state that is set in OPEN appears harmless. Reported-by: Daniel Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* boards: add a 'none' machine type to all platformsAnthony Liguori2012-08-222-0/+42
| | | | | | | | | | | | | | This allows any QEMU binary to be executed with: $QEMU_BINARY -M none -qmp stdio Without errors from missing options that are required by various boards. This also provides a mode that we can use in the future to construct machines entirely through QMP commands. Cc: Daniel Berrange <berrange@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Update version for 1.2.0-rc1 releaseAnthony Liguori2012-08-221-1/+1
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-08-226-17/+18
|\ | | | | | | | | | | | | * qmp/queue/qmp: migration: move total_time from ram stats to migration info monitor: avoid declaring unused variables qapi: Fix memory leak
| * migration: move total_time from ram stats to migration infoJuan Quintela2012-08-214-15/+16
| | | | | | | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * monitor: avoid declaring unused variablesBlue Swirl2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some variables are only used on !win32, declare them only when used. This avoids a warning in mingw32 build: CC i386-softmmu/monitor.o /src/qemu/monitor.c: In function 'monitor_fdset_get_fd': /src/qemu/monitor.c:2575: warning: unused variable 'mon_fd_flags' /src/qemu/monitor.c:2574: warning: unused variable 'mon_fdset_fd' /src/qemu/monitor.c:2573: warning: unused variable 'mon_fdset' Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Fix memory leakStefan Weil2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | valgrind report: ==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601 ==24534== at 0x4824F20: malloc (vg_replace_malloc.c:236) ==24534== by 0x293C88: malloc_and_trace (vl.c:2281) ==24534== by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1) ==24534== by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1) ==24534== by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376) ==24534== by 0x29DEA5: net_client_init (net.c:708) ==24534== by 0x29E6C7: net_init_client (net.c:966) ==24534== by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114) ==24534== by 0x29E85B: net_init_clients (net.c:1008) ==24534== by 0x296F40: main (vl.c:3463) Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'sstabellini/xen-fixes-20120822' into stagingAnthony Liguori2012-08-222-12/+21
|\ \ | | | | | | | | | | | | | | | * sstabellini/xen-fixes-20120822: xen-all.c: fix multiply issue for int and uint types Fix invalidate if memory requested was not bucket aligned
| * | xen-all.c: fix multiply issue for int and uint typesDongxiao Xu2012-08-221-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the two multiply operands are int and uint types separately, the int type will be transformed to uint firstly, which is not the intent in our code piece. The fix is to add (int64_t) transform for the uint type before the multiply. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | Fix invalidate if memory requested was not bucket alignedFrediano Ziglio2012-08-221-4/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | When memory is mapped in qemu_map_cache with lock != 0 a reverse mapping is created pointing to the virtual address of location requested. The cached mapped entry is saved in last_address_vaddr with the memory location of the base virtual address (without bucket offset). However when this entry is invalidated the virtual address saved in the reverse mapping is used. This cause that the mapping is freed but the last_address_vaddr is not reset. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-08-224-67/+79
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machines iscsi: fix races between task completion and abort iscsi: simplify iscsi_schedule_bh iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb Revert "iscsi: Fix NULL dereferences / races between task completion and abort"
| * | virtio-scsi: add backwards-compatibility properties for 1.1 and earlier machinesPaolo Bonzini2012-08-203-8/+16
| | | | | | | | | | | | | | | | | | | | | Hotplug and parameter change are new in 1.2, disable them via compat properties for pc-1.1 and earlier. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | iscsi: fix races between task completion and abortPaolo Bonzini2012-08-201-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two main issues with block/iscsi.c: 1) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which was also directly called in iscsi_aio_cancel 2) a race between task completion and task abortion could happen cause the scsi_free_scsi_task were done before iscsi_schedule_bh has finished. To fix this, all the freeing of IscsiTasks and releasing of the AIOCBs is centralized in iscsi_bh_cb, independent of whether the SCSI command has completed or was cancelled. 3) iscsi_aio_cancel was not synchronously waiting for the end of the command. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | iscsi: simplify iscsi_schedule_bhPaolo Bonzini2012-08-201-15/+9
| | | | | | | | | | | | | | | | | | | | | It is always used with the same callback, remove the argument. And its return value is never used, assume allocation succeeds. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cbPaolo Bonzini2012-08-201-28/+28
| | | | | | | | | | | | | | | | | | | | | Put these functions at the beginning, to avoid forward references in the next patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | Revert "iscsi: Fix NULL dereferences / races between task completion and abort"Paolo Bonzini2012-08-201-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64e69e80920d82df3fa679bc41b13770d2f99360. The commit returned immediately from iscsi_aio_cancel, risking corruption in case the following happens: guest qemu target ========================================================================= send write 1 --------> send write 1 --------> cancel write 1 ------> cancel write 1 ------> <------------------ cancellation processed send write 2 --------> send write 2 --------> <---------------- completed write 2 <------------------ completed write 2 <---------------- completed write 1 <---------------- cancellation not done Here, the guest would see write 2 superseding write 1, when in fact the outcome could have been the opposite. The right behavior is to return only after the target says whether the cancellation was done or not, and it will be implemented by the next three patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-08-224-1/+69
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types Documentation: Warn against qemu-img on active image vmdk: Read footer for streamOptimized images vmdk: Fix header structure Conflicts: hw/virtio-blk.c
| * | | virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine typesStefan Hajnoczi2012-08-174-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMU has a policy of keeping a stable guest device ABI. When new guest device features are introduced they must not change hardware info seen by existing guests. This is important because operating systems or applications may "fingerprint" the hardware and refuse to run when the hardware changes. To always get the latest guest device ABI, run with x86 machine type "pc". This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from existing machine types. Only pc-1.2 and later will expose this feature by default. For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see: commit 13e3dce068773c971ff2f19d986378c55897c4a3 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Thu Aug 9 16:07:19 2012 +0200 virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Anthony Liguori <aliguori@us.ibm.com> reported: This broke qemu-test because it changed the pc-1.0 machine type: Setting guest RANDOM seed to 47167 *** Running tests *** Running test /tests/finger-print.sh... OK --- fingerprints/pc-1.0.x86_64 2011-12-18 13:08:40.000000000 -0600 +++ fingerprint.txt 2012-08-12 13:30:48.000000000 -0500 @@ -55,7 +55,7 @@ /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002 /sys/bus/pci/devices/0000:00:06.0/class=0x010000 /sys/bus/pci/devices/0000:00:06.0/revision=0x00 -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4 +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4 /sys/class/dmi/id/bios_vendor=Bochs /sys/class/dmi/id/bios_date=01/01/2007 /sys/class/dmi/id/bios_version=Bochs Guest fingerprint changed for pc-1.0! Reported-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | Documentation: Warn against qemu-img on active imageKevin Wolf2012-08-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | People have repeatedly expected that you can do things like snapshotting an image with qemu-img while a qemu instance is running. Maybe we need to consider locking the files while they are in use, but having a warning in the qemu-img manpage is doable for 1.2 and can't hurt anyway. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | vmdk: Read footer for streamOptimized imagesKevin Wolf2012-08-171-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The footer takes precedence over the header when it exists. It contains the real grain directory offset that is missing in the header. Without this patch, streamOptimized images with a footer cannot be read. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Jeff Cody <jcody@redhat.com>
| * | | vmdk: Fix header structureKevin Wolf2012-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit bb45ded9 swapped gd_offset and rgd_offset. This is wrong. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | | | Merge remote-tracking branch 'kraxel/usb.59' into stagingAnthony Liguori2012-08-224-10/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/usb.59: ehci: Fix setting of halt bit from usbcmd register updates ehci: fix Interrupt Threshold Control implementation usb: update uas product id usb: async control xfer fixup
| * | | | ehci: Fix setting of halt bit from usbcmd register updatesHans de Goede2012-08-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes linux guests started without any USB devices not seeing newly plugged devices until "lsusb" is done inside the guest. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: fix Interrupt Threshold Control implementationGerd Hoffmann2012-08-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, not all interrupts are subject to Interrupt Threshold Control, some of them must be delivered without delay. Second, Interrupt Threshold Control state must be part of vmstate, otherwise we might loose IRQs on migration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb: update uas product idGerd Hoffmann2012-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pick other product id to fix clash with audio. Current usage list (after applying this patch): 46f4:0001 -- usb-storage 46f4:0002 -- usb-audio 46f4:0003 -- usb-uas Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb: async control xfer fixupGerd Hoffmann2012-08-162-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to clear p->result after copying setup data using usb_packet_copy() because we'll reuse the USBPacket for the data transfer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | | | qapi: add 'query-target' command to return target archDaniel P. Berrange2012-08-224-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a 'query-target' QAPI command to allow management applications to determine what target architecture a QEMU binary is emulating without having to parse the binary name or -help output $ qmp-shell -p /tmp/qemu (QEMU) query-target { u'return': { u'arch': u'x86_64' }} Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | pci: Tidy up PCI host bridgesAndreas Färber2012-08-2210-28/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adopt the QOM parent field name and enforce QOM-style access via casts. Don't just typedef PCIHostState, either use it directly or embed it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGEAndreas Färber2012-08-2213-47/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | pci_host: Turn into SysBus-derived QOM typeAndreas Färber2012-08-222-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The preceding commits fixed misuses of FROM_SYSBUS() that led people to add a bogus busdev field. For qdev the field order was less relevant but for QOM the PCIHostState field (including the SysBusDevice actually initialized with a value) must be placed first within the state struct. To facilitate accessing the PCIHostState fields, derive all PCI host bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE. We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | unin_pci: QOM'ify UniNorth PCI host bridgesAndreas Färber2012-08-221-65/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce type constants and cast macros. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | spapr_pci: QOM'ify sPAPR PCI host bridgeAndreas Färber2012-08-223-46/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce type constant. Introduce cast macro to drop bogus busdev field that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Free the identifier phb as acronym for PCI_HOST_BRIDGE. Updated against conflicting merge from branch 'agraf/ppc-for-upstream' (0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field differently, moved some code around and added new occurrences of 'phb'. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | | prep_pci: QOM'ify Raven PCI host bridgeAndreas Färber2012-08-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce type constant and cast macro. Avoid accessing parent fields directly. Also add missing space and braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud