virtio-serial: Enable ioeventfd
Enable ioeventfd for virtio-serial devices by default. Commit25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of usingioeventfd.
Copying a file from guest to host over a virtio-serial channel didn'tshow much difference in time or io_exit rate....
virtio-serial: Use a struct to pass config information from proxy
Instead of using a single variable to pass to the virtio_serial_initfunction, use a struct so that expanding the number of variables to bepassed on later is easier.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
virtio-serial: Disallow generic ports at id 0
Port 0 is reserved for virtconsole devices for backward compatibilitywith the old -virtioconsole (from qemu 0.12) device type.
libvirt prior to commit 8e28c5d40200b4c5d483bd585d237b9d870372e5 usedport 0 for generic ports. libvirt will no longer do that, but disallow...
petalogix_ml605_mmu: remove unused variable
Remove a write-only variable, spotted by GCC 4.6.0:/src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init':/src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable]...
i8254: Fix migration from older versions
qdev conversion broke migration as the previous version used vmstateinstance IDs derived from the iobase. Fix it by registering a legacyalias.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
xilinx: Add AXIENET & DMA models
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Add PetaLogix ml605 MMU little-endian ref design
Add the first Microblaze little endian platform.Platform uses uart16550, axi ethernet, timer, intc.
Signed-off-by: Michal Simek <monstr@monstr.eu>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
always qemu_cpu_kick after unhalting a cpu
This ensures env->halt_cond is broadcast, and the loop inqemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exitednaturally rather than through a timeout.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/fmopl: Fix buffer access out-of-bounds errors
Index 75 is one too large for AR_TABLE75, DR_TABLE75.This error was reported by cppcheck.
hw/fmopl.c:600: error: Buffer access out-of-bounds: OPL.AR_TABLEhw/fmopl.c:601: error: Buffer access out-of-bounds: OPL.DR_TABLE...
moving eeprom initialization
The initialization should not be only on reset but also when initializingthe device.It resolves a bug when hot plugging a pci network device: the mac addresswas always null.
Signed-off-by: William Dauchy <wdauchy@gmail.com>...
pc: fix wrong CMOS values for floppy drives
Before commit 63ffb564dca94f8bda01ed6d209784104630a4d2, states forfloppy drives were calculated in fdc.c:fd_revalidate(). There it isalso considered whether a disk is inserted or not. The commit didn't copythe logic completely to pc.c, which caused a regression....
microblaze: Fix PetaLogix company name
trivial fix.
vmstate: Fix varrays with uint8 indexes
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add UINT32 VARRAYS
vmstate: add VMSTATE_STRUCT_VARRAY_INT32
vmstate: add VMSTATE_INT64_ARRAY
vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
vmstate: Add a way to send a partial array
vmstate: be able to store/save a pci device from a pointer
vmstate: move timers to use test instead of version
vmstate: add VMSTATE_UINT32_EQUAL
xilinx-ethlite: Simplify byteswapping to/from brams
mainstone: PCMCIA support
Extend mst_fpga and mainstone with logic to support PCMCIAattachment (IRQs, status regs).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
mainstone: use gpio 0 for connection of FPGA instead of hooking into PIC directly
pxa2xx_timer: Get rid of .level in PXA2xxTimer0.
pxa2xx_pic: fixup initialisation
This is based on Dmitry Eremin-Solenikov's patch but simplified.
pxa2xx_timer: separate irq for pxa27x handling
First, sysbus_init_irq shan't be called on on-stack variables. Indeed,it only stores a passed pointer in qdev and the stored irq is laterpopulated, so we get a nice write-to-stack bug.Second, irq for pxa27x should probably be handled in a more gentler way,...
lm32: system control model
This patch add support for a system control block. It is supposed toact as helper for the emulated program. E.g. shutting down the VM orprinting test results. This model is intended for testing purposes only anddoesn't fit to any real hardware. Therefore, it is not added to any board...
lm32: support for creating device tree
This patch adds helper functions to create a ROM, which contains a hardwaredescription of a board. This is used in Theobromas LM32 Linux port.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
lm32: EVR32 and uclinux BSP
This patch adds support for the following two BSPs: - LM32 EVR32 BSP (as used by RTEMS) - uclinux BSP by Theobroma Systems
lm32: interrupt controller model
This patch adds the interrupt controller of the lm32. Because the PIC isaccessed through special control registers and opcodes, there are callbacksfrom the lm32 translation code to this model.
Signed-off-by: Michael Walle <michael@walle.cc>...
lm32: juart model
This patch adds the JTAG UART model. It is accessed through special controlregisters and opcodes. Therefore the translation uses callbacks to thismodel.
lm32: pic and juart helper functions
This patch adds init functions for the PIC and JTAG UART commonly usedin the board initialization.
lm32: timer model
This patch adds support for the LatticeMico32 system timer.
lm32: uart model
This patch add support for the LatticeMico32 UART.
target-arm: Integrate secondary CPU reset in arm_boot
Integrate secondary CPU reset into arm_boot, removing it from realview.c.On non-Linux systems secondary CPUs start with the same entry as the bootCPU.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>...
target-arm: Fix soft interrupt in GIC distributor
Fix selection of target list filter mode.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vmstate: remove grackle_pci savevm code
It was migrating the wrong structures, no way it would work
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vmstate: remove uninorth savevm code
gt64xxx: remove savevm support
hw/sd.c: fix sd_set_cb() crash when bdrv == NULL
sd_set_cb() calls bdrv_is_read_only() and bdrv_is_inserted() even ifno block driver is associated with the card reader.
This patch fixes the issues by not setting the irq in this case, thisfixes ARM versatile crash....
hw/irq: Add qemu_irq_split() so one GPIO output can feed two inputs
Add a qemu_irq_split() function which allows a board to wire a singleGPIO output up to two GPIO inputs. This is needed for realview boards,where the MMC card status is visible both in a system register and...
hw/realview: Wire up the MMC card status
Instantiate the three PL061 GPIO modules the realview boards have.Connect the MMC card status outputs of the PL181 MMC controllerto both the system registers and the GPIO module which handlesinternal devices.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/arm_sysctl.c: Wire MCI register MMC card status bits to GPIO inputs
Implement some GPIO inputs which a board can connect up to set theMMC card status bits in the MCI register.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/pl061.c: Implement ARM PL061 as well as Luminary one
ARM's PL061 has a different set of ID registers to the one in theLuminary Stellaris; implement this so that the Linux driver canidentify the Realview PBX PL061 correctly.
hw/pl181: Implement GPIO output pins for card status
Add two GPIO output pins to the PL181 model to indicate the cardpresent and readonly status information. On ARM boards these usuallyare reflected in a system register.
lsi53c895a: Update dnad when skipping MSGOUT bytes
Update not only dbc but also dnad when skipping bytes during the MSGOUTphase. Previously only dbc was updated which is probably wrong andcould lead to bogus message codes being read.
Tested on Linux and Windows Server 2003....
hw/pcnet.c: Fix EPROM contents to suit AMD netware drivers
bugfix under DOS for AMD netware driver:AMD PCNTNW Ethernet MLID v3.10 (960115), network card not found
bugfix works well under DOS with:1.) AMD NDIS driver v2.0.12.) AMD PCNTNW Ethernet MLID v3.10 (960115)...
virtio-net: Fix lduw_p() pointer argument of wrong size
A pointer to a size_t variable was passed as the void * pointer tolduw_p() in virtio_net_receive(). Instead of acting on the 16-bit valuethis caused failure on big-endian hosts.
Avoid this issue in the future by using stw_p() instead. In general we...
pxa2xx: port pxa2xx_rtc to using qdev/vmstate
pxa2xx_dma: Get rid of a forward declaration.
pxa2xx_dma: port to qdev/vmstate
vmstate: move VMSTATE_PCIE_AER_ERRS to hw/hw.h
VMSTATE_PCIE_AER_ERRS is indeed useful for other emulation drivers.Move it to hw/hw.h under the name of VMSTATE_STRUCT_VARRAY_POINTER_UINT16.Also add VMSTATE_STRUCT_VARRAY_POINTER_INT32 which is more or less...
pxa2xx_dma: drop unused pxa2xx_dma_handler_t/handler field
pxa2xx_timer: Store relevant irq line in each timer.
pxa2xx_timer: switch to using qdev/vmstate
pxa2xx_timer: change info struct name to comply with guidelines
It should be PXA2xxTimerInfo, not pxa2xx_timer_info. Replace alloccurences of old name with the new one.
pxa2xx_pic: Set base address for sysbus device.
Thid device's registration was broken sincee1f8c729fa890c67bb4532f22c22ace6fb0e1aaf, this should fix it.
vmstate: add VMSTATE_STRUCT_ARRAY_TEST
This is a _TEST variant of VMSTATE_STRUCT_ARRAY, necessary e.g.for future patch changing pxa2xx_timer to use vmstate.
pxa2xx_pic: update to use qdev
Use qdev/sysbus framework to handle pxa2xx-pic. Instead of exposing IRQsvia array, reference them via qdev_get_gpio_in().
Patch has been modified by the committer.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>...
mst_fpga: correct irq level settings
Final corrections for IRQ levels that are set by mst_fpga:
virtio-serial: kill VirtIOSerialDevice
VirtIOSerialDevice is like VirtIOSerialPort with just the first twofields, which makes it pretty pointless. Using VirtIOSerialPortdirectly works equally well and is less confusing.
[Amit: - rebase - rename 'dev' to 'port' in function params in virtio-serial.h ]...
hw/sd.c: Add missing state change for SD_STATUS, SEND_NUM_WR_BLOCKS
The SD_STATUS and SEND_NUM_WR_BLOCKS commands are supposed to causethe card to send data back to the host. However sd.c was missing thestate change to sd_sendingdata_state for these commands, with the effect...
pls3adsp1800: Base load_elf endianness on target endianness
hw/irq.h: Remove unused SetIRQFunc typedef
Remove the typedef SetIRQFunc, as it is not used by anything.
Revert "prep: Disable second IDE channel, as long as ISA IDE emulation doesn't support same irq for both channels"
This reverts commit 491e2a338fdf8310c84f6ebaed1683a871a0700e.
isa-bus: Remove bogus IRQ sharing check
Nothing prevented IRQ sharing on the ISA bus in principle. Not allboards supported this, neither each and every card nor driver and OS.Still, there existed valid IRQ sharing scenarios, (at least) two of themcan also be found in QEMU: >2 PC UARTs and the PREP IDE buses....
PS/2 keyboard Scancode Set 3 support
The following patch adds PS/2 keyboard Scancode Set 3 support.
Signed-off-by: Roy Tam <roytam@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix obvious mistake in pxa2xx i2s driver
RST bit is (1 << 4) bit, not (1 << 3), fix conditionthat enables i2s if ENB is set and RST is not set.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pxa2xx_keypad: Handle 0xe0xx keycodes
Add handling of 0xe0xx keycodes to pxa2xx_driver.Extended keycodes in keymap should be marked with most significantbit set (i.e. 0x80). Without this patch it's not possible to handlei.e. cursor keys.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>...
pxa2xx_keypad: enhance emulation of KPAS, KPASMKP regs
Add emulation of KPAS register and proper emulation ofKPASMKP regs, so now driver supports multipresses and properlyworks with Linux driver.
qdev: Fix printout of bit device properties with bit index >= 8
Signed-off-by: David 'Digit' Turner <digit@google.com>Acked-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ppc405: Fix memory leak
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Acked-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
s390: Fix memory leak
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pci: Fix memory leak
vhost: disable on tap link down
qemu makes it possible to disable link at tap which is not communicatedto the guest but causes all packets to be dropped.
When vhost-net is enabled, vhost needs to be aware of both the virtiolink_down and the peer link_down. we switch to userspace emulation when...
e1000: verify we have buffers, upfront
The spec says: Any descriptor with a non-zero status byte has beenprocessed by the hardware, and is ready to be handled by the software.
Thus, once we change a descriptor status to non-zero we shouldnever move the head backwards and try to reuse this...
e1000: clear EOP for multi-buffer descriptors
The e1000 spec says: if software statically allocatesbuffers, and uses memory read to check for completed descriptors, itsimply has to zero the status byte in the descriptor to make it readyfor reuse by hardware. This is not a hardware requirement (moving the...
e1000: multi-buffer packet support
e1000 supports multi-buffer packets larger than rxbuf_size.
This fixes the following (on linux):- in guest: ifconfig eth1 mtu 16110- in host: ifconfig tap0 mtu 16110 ping -s 16082 <guest-ip>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
pc: remove test on TARGET_PHYS_ADDR_BITS == 32
Both i386 and x86_64 targets are now using target_phys_bits=64. Removeuseless code.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
i8254: convert to qdev
Convert to qdev. Don't expose PITState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vga-isa: make optional
Ignore failure with vga-isa device creation, but print a warningmessage.
vga-isa: convert to qdev
fdc: make optional
Ignore failure with fdc device creation.
fdc: refactor device creation
Turn fdc_init_isa into an inline function.
Get floppy geometry directly from the drives.
Don't expose FDCtrl.
fdc: use FDriveType for floppy drive type
fdc: move floppy geometry guessing to block.c
Other geometry guessing functions already reside in block.c.
Remove some unused or debugging only fields.
serial: make optional
Ignore failure with serial device creation.
serial: refactor device creation
Turn serial_init into an inline function.
ne2000_isa: make optional
Ignore failure with ne2000_isa device creation.
ne2000_isa: refactor device creation
Turn isa_ne2000_init into an inline function.
parallel: make optional
Ignore failure with parallel device creation.
parallel: refactor device creation
Turn parallel_init into an inline function.
Don't expose ParallelState.
Fix vmport segfault (v2)
Fix regression caused by qdev conversion.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge remote branch 'qemu-kvm/uq/master' into staging
Merge mainstone.h header into mainstone.c
Now the only user of mainstone.h is mainstone.c file. Merge headerinto board file.
mainstone: convert FPGA emulation code to use QDev/SysBus
mainstone: correct and simplify irq handling
Simplify IRQ handling to stop setting an input irq pin. As a win, also getcorrect IRQ status after save/load cycle.
correctly check ppr priority during interrupt injection]
TPR blocks all interrupts in a priority class, so simple "less orequal" check is not enough.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: x86: Introduce kvmclock device to save/restore its state
If kvmclock is used, which implies the kernel supports it, register akvmclock device with the sysbus. Its main purpose is to save and restorethe kernel state on migration, but this will also allow to visualize it...