Typo, spelling and grammatical fixes
Minor fixes to documentation and code comments.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
virtio-9p: Fix virtio-9p no longer building after hw-dirs branch merge
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1365495755-10902-1-git-send-email-hdegoede@redhat.comCc: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
Merge remote-tracking branch 'stefanha/net' into staging
Message-id: 1365435829-23535-1-git-send-email-stefanha@redhat.com...
hw: move interrupt controllers to hw/intc/, configure with default-configs/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move GPIO interfaces to hw/gpio/, configure with default-configs/
hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/
hw: move other devices to hw/misc/, configure with default-configs/
hw: move ARM CPU cores to hw/cpu/, configure with default-configs/
hw: move hw/kvm/ to hw/i386/kvm
Peter requested the KVM GIC to be in hw/intc.
hw: move last file to hw/arm/
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move more files to hw/xen/
hw: move char devices to hw/char/, configure via default-configs/
hw: move ISA bridges and devices to hw/isa/, configure with default-configs/
hw: move timer devices to hw/timer/, configure with default-configs/
hw: move SD/MMC devices to hw/sd/, configure with default-configs/
hw: move PCI bridges to hw/pci-* or hw/ARCH
hw: move VFIO and ivshmem to hw/misc/
hw: move DMA controllers to hw/dma/, configure with default-configs/
hw: move watchdogs to hw/watchdog, configure via default-configs/
hw: move MC146818RTC to hw/timer/, configure via default-configs/
hw: move NICs to hw/net/, configure via default-configs/
hw: move block devices to hw/block/, configure via default-configs/
hw: move audio devices to hw/audio/, configure via default-configs/
hw: move display devices to hw/display/, configure via default-configs/
hw: move I2C controllers to hw/i2c/, configure via default-configs/
hw: move SSI controllers to hw/ssi/, configure via default-configs/
hw: move SCSI controllers to hw/scsi/, configure via default-configs/
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.
hw: move virtio devices to hw/ subdirectories
hw: make all of hw/ide/ configurable via default-configs/
hw: make all of hw/usb/ configurable via default-configs/
hw: make all of hw/pci/ configurable via default-configs/
hw: make subdirectories for devices
Prepare the new directory structure.
moxie: configure with default-configs file
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
Merge remote-tracking branch 'kraxel/usb.79' into staging
vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped
Byte swap is redundant because shared memory reading functionsalready swap bytes when required
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
vmxnet3: iPXE compatibility fixes
iPXE vmxnet3 driver makes a few assumptions regarding device operationthat were missed during testing with Linux and Windows drivers.This patch adds following logic: 1. Additional GET commands processing added 2. Max number of RX chunks should be set to 1 when driver passes 0...
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'sstabellini/xen-2013-04-05' into staging
usb-storage: Forward serial number to scsi-disk
usb-storage takes care to fetch the USB serial number from -driveoptions, but it neglected to pass its own 'serial' property to thescsi-disk it creates. With this patch, the 'serial' qdev property andthe 'serial' option in -drive behave the same and correctly apply the...
hw/nand.c: Fix nand erase operation
Usually, nand erase operation has only 2 or 3 address cycles.We need to mask s->addr to zero unset stale high-order bytes in the nand addressbefore using it as the erase address.
This fixes the NAND erase operation in Linux....
cadence_uart: Flush queued characters on reset
Reset can be used to empty the rx-fifo. As the fifo full condition isused to return false from can_receive, queued rx data should be flushedon reset accordingly.
Cc: Wendy Liang <jliang@xilinx.com>Cc: Jason Wu <huanyu@xilinx.com>...
pl330: Don't inhibit ES bits on INTEN
This if-else logic inhibits setting of the event status (ES) bitswhen interrupts are enabled. This is incorrect. ES should be setregardless on INTEN state. INTEN only inhibits the signalling ofevents to PL330 threads, not setting of the ES register....
Allow xen guests to plug disks of 1 TiB or more
The current xen backend driver implementation uses int64_t variablesto store the size of the corresponding backend disk/file. It also usesan int64_t variable to store the block size of that image. When writing...
Xen PV backend: Disable use of O_DIRECT by default as it results in crashes.
Due to what is almost certainly a kernel bug, writes with O_DIRECT maycontinue to reference the page after the write has been marked ascompleted, particularly in the case of TCP retransmit. In other...
Xen PV backend: Move call to bdrv_new from blk_init to blk_connect
This commit delays the point at which bdrv_new (and hence blk_openon the underlying device) is called from blk_init to blk_connect.This ensures that in an inbound live migrate, the block device is...
Introduce 64 bit integer write interface to xenstore
The current implementation of xen_backend only provides 32 bit integerfunctions to write to xenstore. This patch adds two functions thatallow writing 64 bit integers (one generic function and another for...
hw/arm_gic_common: Use vmstate struct rather than save/load functions
Update the GIC save/restore to use vmstate rather than hand-rolledsave/load functions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com>...
pflash_cfi01: Drop unused 'bypass' field
For pflash_cfi01 the 'bypass' field is set to zero and never changes,so remove it (it is a leftover from pflash_cfi02, where bypass isimplemented).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1363717469-30980-2-git-send-email-peter.maydell@linaro.org
pflash_cfi01: Implement migration support
Add a vmstate to pflash_cfi01, so that it can be live migrated.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1363717469-30980-3-git-send-email-peter.maydell@linaro.org
hw/sd.c: fix migration of dynamically allocated buffer "buf"
VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, notfor buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro,which will do migration right.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>...
hw/onenand.c: fix migration of dynamically allocated buffer "otp"
VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, notfor buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro,which will do migration right....
arm_gic: Fix sizes of state fields in preparation for vmstate support
In preparation for switching to vmstate for migration support, fixthe sizes of various GIC state fields. In particular, we replace allthe bitfields (which VMState can't deal with) with straightforward...
hw/arm/nseries: don't print to stdout or stderr
Remove various bits of printing to stdout or stderr from thenseries code, replacing it with a qemu log message where there'san appropriate log category, and just dropping the output forsome of the more debug-like printing....
pl050: Don't send always-constant is_mouse field
The is_mouse field of the pl050 state structure is constant (it trackswhether this is a 'pl050_keyboard' or 'pl050_mouse'), so there'sno need to include it in the VMState structure.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/arm_mptimer: Save the timer state
Add a missing VMSTATE_TIMER() entry to the arm_mptimer vmstatedescription; this omission meant that we would probably hang on reloadwhen the timer failed to fire.
petalogix_ml605_mmu: Cleanup ssi_create_slave()
With the recent m25p80 cleanup there is no need to usessi_create_slave_no_init() anymore. Just use ssi_create_slave().
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
xilinx_zynq: Cleanup ssi_create_slave
extract/unify the constant 0xfee00000 as APIC_DEFAULT_ADDRESS
A common dependency of the constant's current users:- hw/apic_common.c- hw/i386/kvmvapic.c- target-i386/cpu.cis "target-i386/cpu.h".
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
Introduce IO_APIC_DEFAULT_ADDRESS for 0xfec00000
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-10-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc_acpi_init(): don't bail as soon as failing to find default DSDT
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-11-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
change element type from "char" to "unsigned char" in ACPI table data
The data is binary, not textual.
Also, acpi_table_add() abuses the "char *f" pointer -- which normallypoints to file names to load -- to poke into the table. Introduce "charunsigned *table_start" for that purpose....
acpi_table_add(): report fatal errors through an internal Error object
The upcoming changes will need a cleanup section at the end of thefunction, plus OptsVisitor reports errors via Error. For now keepchanneling any Errors to stderr.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>...
acpi_table_add(): accept QemuOpts and parse it with OptsVisitor
As one consequence, strtok() -- which modifies its argument -- is replacedwith g_strsplit().
acpi_table_add(): extract and reimplement internals
The new function acpi_table_install() installs any blob the caller passesin. In the next patches this function will be promoted from helper role toextern.
Reimplementing the logic should make it easier to understand. It also...
like acpi_table_install(), acpi_table_add() should propagate Errors
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1363821803-3380-8-git-send-email-lersek@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
ipoctal232: Convert to use chardev properties directly
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Alberto Garcia <agarcia@igalia.com>Message-id: 1364412581-3672-4-git-send-email-hdegoede@redhat.com...
qemu-char: Add qemu_chr_fe_claim / _release helper functions
Add qemu_chr_fe_claim / _release helper functions for properly dealing withavail_connections.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Message-id: 1364412581-3672-2-git-send-email-hdegoede@redhat.com...
qemu-char: Call fe_claim / fe_release when not using qdev chr properties
chardev-frontends need to explictly check, increase and decrement theavail_connections "property" of the chardev when they are not using aqdev-chardev-property for the chardev.
This fixes things like:...
xilinx_axienet: pump events as appropriate
When the conditions blocking receiving are cleared, check for buffered rxpackets.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
acpi: initialize s4_val used in s4 shutdown
While investigating why a 32 bit Windows 2003 guest wasn't able tosuccessfully perform a shutdown /h, it was discovered that commitafafe4bbe0cf7d3318e1ac7b40925561f86a6bd4 inadvertently dropped theinitialization of the s4_val used to handle s4 shutdown....
usb-hub: limit chain length
USB supports up to 5 hubs chained.Catch attempts to chain more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hub: report status changes only once
usb-tablet: Don't claim wakeup capability for USB-2 version
Our ehci code does not implement wakeup support, so claiming support forit with usb-tablet in USB-2 mode causes all tablet events to get lost.
http://bugzilla.redhat.com/show_bug.cgi?id=929068...
xhci: zap unused name field
xhci: fix numintrs sanity checks
Make sure numintrs is a power of two, msi requires this.
https://bugzilla.redhat.com/show_bug.cgi?id=918035
xhci: remove leftover debug printf
xhci: remove unimplemented printfs
Replace them with a tracepoint, so they don't spam stderr by default.
usb-redir: Fix crash on migration with no client connected
If no client is connected on the src side, then we won't receive aparser during migrate, in this case usbredir_post_load() should be a nop,rather then to try to derefefence the NULL dev->parser pointer....
usb-redir: Add flow control support
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
VMXNET3: initialize rx_ridx to eliminate compile warning
Gcc report "hw/vmxnet3.c:972: error: ‘rx_ridx’ may be useduninitialized in this function", so fix it.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Message-id: 1364264646-27542-1-git-send-email-xiawenc@linux.vnet.ibm.com...
qdev: only send deleted event if device was realized
Reported-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1364402174-16580-1-git-send-email-aliguori@us.ibm.com
vfio: cleanup includes
Starting to get messy, put the back in alphabetical order.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
vfio: Add bootindex support
vfio-pci: Move devices to D0 on reset
Guests may leave devices in a low power state at reboot, but we expectdevices to be woken up for the next boot. Make this happen.
vfio-pci: Add extra debugging
Often when debugging it's useful to be able to disable bypass pathsso no interactions with the device are missed. Add some extra debugoptions to do this. Also add device info on read/write BAR accesses,which is useful when debugging more than one assigned device. A...
qemu vfio-pci: Graphics device quirks
Graphics cards have a number of different backdoors. Some of theseare alternative ways to get PCI BAR addresses, some of them arecomplete mirrors of PCI config space available through MMIO andI/O port access. These quirks cover a number of ATI Radeon and...
qemu vfio-pci: Add support for VGA MMIO and I/O port access
Most VGA cards need some kind of quirk to fully operate since theyhide backdoors to get to other registers outside of PCI config spacewithin the registers, but this provides the base infrastructure. If...
vfio-pci: Generalize PCI config mangling
Kernel-side vfio virtualizes all of config space, but some parts areunique to Qemu. For instance we may or may not expose the ROM BAR,Qemu manages MSI/MSIX, and Qemu manages the multi-function bit so thatsingle function devices can appear as multi-function and vica versa....
vfio-pci: Add PCIe capability mangling based on bus type
Windows seems to pay particular interest to the PCIe header type ofdevices and will fail to load drivers if we attach Endpoint devices orLegacy Endpoint devices to the Root Complex. We can usepci_bus_is_express and pci_bus_is_root to determine the bus type and...
musicpal: qdevify musicpal-misc
Make musicpal-misc into its own (trivial) qdev device, so wecan get rid of the abuse of sysbus_add_memory().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
milkymist-minimac2: Just expose buffers as a sysbus mmio region
Just expose the register buffers memory as a standard sysbus mmioregion which the creator of the device can map, rather thanproviding a qdev property which the creator has to set to thebase address and then doing the mapping in the device's own...
milkymist-softusb: Don't map RAM memory regions in the device itself
Don't map the pmem and dmem RAM memory regions in the milkymist-softusbdevice itself. Instead just expose them as sysbus mmio regions whichthe device creator can map appropriately. This allows us to drop the...
hw/milkymist-softusb: set buffer in softusb_read_{dmem, pmem} error path
Make sure we set the buffer to something in the softusb_read_{dmem,pmem}error paths, since the caller will use the buffer unconditionally.(Newer gcc is smart enough to spot this and complain about 'may be...
sysbus: Remove sysbus_add_memory and sysbus_del_memory
Remove the sysbus_add_memory and sysbus_del_memory functions. Theseare trivial wrappers for mapping a memory region into the systemmemory space, and have no users now. Sysbus devices should never map...