hw/virtio/virtio: Don't allow guests to add/remove queues
A queue size of 0 is used to indicate a nonexistent queue, sodon't allow the guest to flip a queue between zero-size andnon-zero-size. Don't permit setting of negative queue sizeseither.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
mips: revert commit b332d24a8e1290954029814d09156b06ede358e2
Now that this code path is not triggered anymore during the tests,revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPStarget without kernel nor bios doesn't really make sense. At the same...
fw_cfg: the I/O port variant expects little-endian
The I/O port variant of fw_cfg is used by sparc64, which is a big-endian machine.Firmware swaps bytes before sending them to fw_cfg, so we need to unswap them inthe device.
This is only used on sparc64 and on (little-endian) x86, so it does not affect...
Bugfix for loading multiboot kernels
This patch fixes a bug in rom_copy introduced bycommit d60fa42e8bae39440f997ebfe8fe328269a57d16.
rom_copy failed to load roms with a "datasize" of 0.As a result, multiboot kernels were not loaded correctlywhen they contain a segment with a "file size" of 0....
target-i386: Fix X86CPU error handling
Error **errp argument is not for emitting warnings, it means an errorhas occurred and the caller should not make any assumptions about thestate of other return values (unless otherwise documented).
Therefore cpu_x86_create() must unref the new X86CPU itself, and...
pxa2xx: Avoid object_get_link_property() assertion for "parent_bus"
pxa2xx_i2c_init() creates a pxa2xx-i2c-slave device on a second i2c-bus,which has a NULL parent device. This causes an assertion inobject_get_canonical_path() when accessing pxa2xx-i2c-slave's...
Merge remote-tracking branch 'stefanha/net' into staging
Message-id: 1375704975-19128-1-git-send-email-stefanha@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kraxel/usb.86' into staging
Message-id: 1375362669-14815-1-git-send-email-kraxel@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pcnet: Flush queued packets on end of STOP state
Analogously to other NICs, we have to inform the network layer whenthe can_receive handler will no longer report 0. Without this, we mayget stuck waiting on queued incoming packets.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Merge remote-tracking branch 'afaerber/tags/prep-for-upstream' into staging
PReP machine and devices
virtio-console: Use exitfn for virtserialport, too
virtconsole and virtserialport are identical in every other aspectexcept for the distinguishing VirtIOSerialPortClass::is_console field.
Cc: qemu-stable@nongnu.orgSigned-off-by: Andreas Färber <afaerber@suse.de>...
virtio-9p-device: Avoid freeing uninitialized memory
In virtio_9p_device_init() there are 6x goto out that will lead tov9fs_path_free() attempting to free unitialized path.data field.Easiest way to trigger is: qemu-system-x86_64 -device virtio-9p-pci
Fix this by moving v9fs_path_init() before any goto out....
xhci: fix segfault
Guest trying to reset a endpoint of a disconnected device resulted inxhci trying to dereference uport while being NULL, thereby crashingqemu. Fix that by adding a check. Drop unused dev variable whiletouching that code bit.
Cc: qemu-stable@nongnu.org...
usb-redir: fix use-after-free
Reinitialize dev->cs to NULL after deleting it, to make sure it isn'tused afterwards.
Reported-by: Martin Cerveny <M.Cerveny@computer.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
i82378: Cleanup implementation
- i82378 only exists on PCI bus; do not split implementation in 2 structs- remove BARs, which are not specified in datasheet- replace custom isa_mmio implementation by PCI bus IO region usage- use QOM casts when required...
pci-host/prep: Set isa_mem_base in the PCI host bridge
Currently, it is done by i82378 PCI-ISA bridge, which shouldn'tcare about it.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Andreas Färber <andreas.faerber@web.de>
qdev: Fix 32-bit compilation in print_size
Signed-off-by: Richard Henderson <rth@twiddle.net>Message-id: 1375208443-17288-2-git-send-email-rth@twiddle.netSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Use clz in print_size
We can compute a floor log2 value with clz rather than a division loop.
Signed-off-by: Richard Henderson <rth@twiddle.net>Message-id: 1375208443-17288-3-git-send-email-rth@twiddle.netSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kraxel/usb.85' into staging
Message-id: 1375173371-3378-1-git-send-email-kraxel@redhat.com...
Merge remote-tracking branch 'borntraeger/s390-for-1.6' into staging
mips_fulong2e: Silence BIOS loading warning for qtest
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1375106733-832-3-git-send-email-afaerber@suse.de...
mips_malta: Silence BIOS loading warning for qtest
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1375106733-832-4-git-send-email-afaerber@suse.de...
mips_jazz: Silence BIOS loading warning for qtest
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1375106733-832-5-git-send-email-afaerber@suse.de...
mips_r4k: Silence BIOS loading warning for qtest
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Message-id: 1375106733-832-6-git-send-email-afaerber@suse.de...
s390/sclpconsole: handle char layer busy conditions
Handle busy conditions (errno=EAGAIN) in char layer by usingthe new char layer in the sclp console.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
xhci: handle USB_RET_IOERROR
https://bugzilla.redhat.com/show_bug.cgi?id=980377
Cc: qemu-stable@nongnu.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
uhci: egsm fix
When the guest goes suspend the uhci controller while there arepending resume requests on the ports go signal global resumeinstantly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hcd-ohci: add dma error handling
Current hcd-ohci does not handle DMA errors. However they may happenso here we introduce simple error handling.
On such errors, a typical OHCI will stop operating, signal the guestabout the error by sending "UnrecoverableError Event", set itself into...
spapr: Rename 'dprintf' to 'DPRINTF'
'dprintf' is the name of a POSIX standard function so we should not bestealing it for our debug macro. Rename to 'DPRINTF' (in line witha number of other source files.)
s390x: Rename 'dprintf' to 'DPRINTF'
pc: limit 64 bit hole to 2G by default
It turns out that some 32 bit windows guests crashif 64 bit PCI hole size is >2G.Limit it to 2G for piix and q35 by default.User may override default 64-bit PCI hole size byusing "pci-hole64-size" property.
Examples:...
pc: add Q35 to QOM composition tree under /machine
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Message-id: 1375109277-25561-5-git-send-email-imammedo@redhat.com...
qdev: Add SIZE type to qdev properties
This patch adds a 'SIZE' type property to qdev.
Signed-off-by: Ian Molton <ian.molton@collabora.co.uk>Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>...
pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
pc: add I440FX QOM cast macro
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Message-id: 1375109277-25561-3-git-send-email-imammedo@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc: replace i440fx_common_init() with i440fx_init()
It isn't used anywhere else.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
spapr_pci: QOM cast cleanup
Signed-off-by: Andreas Färber <afaerber@suse.de>
pl031: Rename pl031_state to PL031State
pl031: QOM cast cleanup
puv3_ost: QOM cast cleanup
pxa2xx_timer: QOM'ify pxa25x-timer and pxa27x-timer
Introduce type constant for new abstract base type, use QOM casts andlet both non-abstract types inherit from the new base type.
slavio_timer: QOM cast cleanup
tusb6010: QOM cast cleanup
xilinx_timer: QOM cast cleanup
exynos4210_i2c: QOM cast cleanup
Fix one ->qdev access and rename parent field.
opencores_eth: QOM cast cleanup
mipsnet: QOM cast cleanup
kvmvapic: QOM cast cleanup
kvm/ioapic: QOM cast cleanup
ioapic: QOM cast cleanup
pl022: Rename pl022_state to PL022State
pl022: QOM cast cleanup
xilinx_spi: QOM cast cleanup
arm_timer: Rename sp804_state to SP804State
arm_timer: QOM cast cleanup for SP804State
arm_timer: QOM cast cleanup for icp_pit_state
cadence_ttc: QOM cast cleanup
etraxfs_timer: Rename etrax_timer to ETRAXTimerState
etraxfs_timer: QOM cast cleanup
exynos4210_mct: QOM cast cleanup
exynos4210_pwm: QOM cast cleanup
exynos4210_rtc: QOM cast cleanup
grlib_gptimer: QOM cast cleanup
lm32_timer: QOM cast cleanup
m48t59: QOM cast cleanup for M48t59SysBusState
milkymist-sysctl: QOM cast cleanup
xgmac: QOM cast cleanup
Introduce type constant and use QOM casts and typedef consistently.
xilinx_ethlite: QOM cast cleanup
ds1225y: Drop bogus qdev field from NvRamState
It is not a device, and the field is not used from code either.
ds1225y: QOM cast cleanup for SysBusNvRamState
ppce500_spin: QOM cast cleanup
Introduce type constant and use QOM cast.
milkymist-memcard: QOM cast cleanup
pl181: Rename pl181_state to PL181State
pl181: QOM cast cleanup
sun4m: QOM cast cleanup for IDRegState
sun4m: QOM cast cleanup for AFXState
sun4m: QOM cast cleanup for PROMState
sun4m: QOM cast cleanup for RamDevice
sun4u: QOM cast cleanup for PROMState
sun4u: QOM cast cleanup for RamDevice
mst_fpga: QOM cast cleanup
puv3_pm: QOM cast cleanup
slavio_misc: QOM cast cleanup for MiscState
slavio_misc: QOM cast cleanup for APCState
zynq_slcr: QOM cast cleanup
cadence_gem: QOM cast cleanup
etraxfs_eth: QOM cast cleanup
etraxfs_eth: Rename fs_eth to ETRAXFSEthState
Also add a typedef.
lan9118: QOM cast cleanup
lance: QOM cast cleanup
milkymist-minimac2: QOM cast cleanup
smc91c111: QOM cast cleanup
stellaris_enet: QOM cast cleanup
stellaris_enet: Fix NetClientInfo::cleanup
Drop freeing stellaris_enet_state - that is done by QOM later on unref.
Both MemoryRegion init and savevm registration happen in SysBusDeviceinitfn currently, so move them into an unrealizefn for now.
arm_sysctl: QOM cast cleanup
eccmemctl: QOM cast cleanup
exynos4210_pmu: QOM cast cleanup
lm32_sys: QOM cast cleanup
milkymist-hpdmc: QOM cast cleanup
milkymist-pfpu: QOM cast cleanup