ehci: add freq + maxframes properties
Add properties for the wakeup rate and the max number of frames ehciwill process at once.
The wakeup rate defaults to 1000 which equals the usb frame rate. Thiscan be reduced to make qemu wake up less often when ehci is active....
net: Warn about "-net nic" options which were ignored
Diagnose the case where the user asked for a NIC via "-net nic" but the board didn't instantiate that NIC (for example where theuser asked for two NICs but the board only supports one). Notethat this diagnostic doesn't apply to NICs created through -device,...
Optimize screendump
When running kvm-autotest, fputc() is often the second highest (sometimes #1)function showing up in a profile. This is due to fputc() locking the filefor every byte written.
Optimize by buffering a line's worth of pixels and writing that out in a...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
Merge remote-tracking branch 'agraf/xen-next' into staging
kvm: Drop CONFIG_KVM_PARA
The kvm_para.h header is now always available.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
lsi: Fix unused-but-set-variable warning
This warning is new in gcc 4.6.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
xen: Add the Xen platform pci device
Introduce a new emulated PCI device, specific to fully virtualized Xenguests. The device is necessary for PV on HVM drivers to work.
Signed-off-by: Steven Smith <ssmith@xensource.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
xen: fix interrupt routing
Compared to the last version I only added a comment to the code.
- remove i440FX-xen and i440fx_write_config_xenwe don't need to intercept pci config writes to i440FX anymore;
- introduce PIIX3-xen and piix3_write_config_xen...
cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped
If the cirrus_vga PCI BAR is unmapped than we should not only resetmap_addr but also lfb_addr, otherwise we'll keep trying to mapthe old lfb_addr in map_linear_vram.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
xen: Add xc_domain_add_to_physmap to xen_interface.
This function will be used to support sync dirty bitmap.
This come with a check against every Xen release, and specialimplementation for Xen version that doesn't have this specific call.
This function will not be usable with Xen 3.3 because the behavior is...
wdt: remove unused variables
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
smc91c111: qdevify reset
Register the smc91c111 reset function as a qdev reset function.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: don't call qdev pci init method
As pci id initialization is moved to common layer,some initialization function can be empty.So don't call init method if NULL.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ppce500: move device/vendor/class id to qdev
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
usb-ehci: move device/vendor/class id to qdev
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
Merge remote-tracking branch 'kraxel/usb.16' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
ide: Clear error_status after restarting flush
Clearing the error status flag was missing for restarting flushes. Now that theerror status is separate from the BM status register, we can simply set it to 0after restarting the request. This ensures that we never forget to clear a bit....
ide: Add forgotten VMSTATE_END_OF_LIST in subsection
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: allow other dma comands than read and write
Replace the is_read flag with a dma_cmd flag to allow the dma andrestart logic to handler other commands like TRIM.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: add TRIM support
Add support for TRIM sub function of the data set management command,and wire it up to the qemu discard infrastructure.
ide: Split error status from status register
When adding the werror=stop mode, some flags were added to s->statuswhich are used to determine what kind of operation should be restartedwhen the VM is continued.
Unfortunately, it turns out that s->status is in fact a device register...
ide: Fix ide_drive_pio_state_needed()
When a failed PIO request caused the VM to stop, we still need to transfer thePIO state even though DRQ=0 at this point.
hw/9118.c: Implement active-low interrupt support
The 9118 ethernet controller interrupt line is active low unlessthe IRQ config register is programmed to set both the IRQ_POL(polarity: active-high) and IRQ_TYPE (type: push-pull) bits:implement support for inverting the irq output in other configurations....
usb-ccid: Plug memory leak on qdev exit()
ccid_initfn() allocates CCIDBus dynamically, but there is no exitcallback to free it.
Fix by getting rid of the allocation.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
print meaningful error message in case of --disable-vhost-net
When qemu gets compiled without support of vhost-net, any attemptto use it fails with a very clear error message:
qemu-system-x86_64: -netdev ...,vhost=on: vhost-net requested but could not be initialized...
virtio: compat event idx support
Disable event index for compat machine types.
usb: Add defines for USB Serial Bus Release Number register
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: Use defines for serial bus release number register for UHCI
usb: Use defines for serial bus release number register for EHCI
hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register
HcPeriodCurrentED is read-only, but Linux writes to it anyway; silentlyignore this rather than printing a warning message.
(Specifically, drivers/usb/host/ohci-hub.c:ohci_rh_resume() writes a0, in at least kernels 2.6.25 through 2.6.39.)...
hw/usb-ohci.c: Implement remote wakeup
Implement the wakeup callback in the OHCI USBPortOps, so that whena downstream device wakes up it correctly causes the OHCI controllerto come out of suspend.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
usb-uhci: fix expire time initialization.
expire_time must be initialited when the guest activates theusb scheduler, not at device creation time.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: cancel async packets on unplug
This patch adds USBBusOps struct with (for now) only a single callbackwhich is called when a device is about to be destroyed. The USB Hostadapters are implementing this callback and use it to cancel any asyncrequests which might be in flight before the device actually goes away....
usb-ehci: drop EXECUTING checks.
The state machine doesn't stop in EXECUTING state any more when asyncpackets are in flight, so the checks are not needed any more and canbe dropped.
Also kick out the check for the frame timer. As we don't stop & sleep...
Fix USB mouse Set_Protocol behavior
The QEMU USB mouse claims to support the "boot" protocol(bInterfaceSubClass is 1). However, the mouse rejects theSet_Protocol command.
The qemu mouse does support the "boot" protocol specification, so asimple fix is to enable the Set_Protocol request....
The USB tablet should not claim boot protocol support.
The USB tablet advertises that it supports the "boot" protocol.However, its reports aren't "boot" protocol compatible. So, itshouldn't claim that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>...
usb-ehci: itd handling fixes.
This patch fixes a bunch of issues in the itd descriptor handling.Most important fix is to handle transfers which cross page borderscorrectly by looking up the address of the next page. Luckily thelinux uses physically contigous memory so the data used to hits the...
usb-ehci: split trace calls to handle arg count limits
usb-bus: Add knowledge of USB_SPEED_SUPER to usb_speed helper
usb-bus: Don't detach non attached devices on device exit
This causes an "Error: tried to detach unattached usb device " to be printed,this can happen when deleting ie a usb host qdev, which did notget attached (because a device matching the filter never got plugged in)....
usb-ehci: fix offset writeback in ehci_buffer_rw
Two bugs at once:
First the mask is backwards, so the it used to keeps the offset andclears the page address, which is not what we need when we update theoffset.
Second the offset calculation is wrong in case head isn't page aligned....
usb-ehci: fix error handling.
Set the correct bits for nodev, stall and babble errors.Raise errint irq. Fix state transition from WRITEBACKto the next state.
ehci: fix a number of unused-but-set-variable warnings (new with gcc-4.6)
usb-ehci: multiqueue support
This patch adds support for keeping multiple queues going at the sametime. One slow device will not affect other devices any more.
The patch adds code to manage EHCIQueue structs. It also does a numberof changes to the state machine:...
usb-ehci: trace buffer copy
Add a trace point for buffer copies and drop the DPRINTF's.
No change in behavior.
usb-ehci: add queue data struct
Add EHCIQueue struct, move the fields needed to track the queue stateinto that struct. Pass the new struct instead of ehci state down tofunctions which handle the queue state. Lot of variable references havechanged due to that without an actual functional change....
usb-ehci: trace mmio and usbsts
This patch starts adding trace support to ehci. It tracesupdates of the status register (USBSTS), mmio access andcontroller reset.
It also adds functions to set and clear status register bitsand puts them in use everywhere....
usb-ehci: trace state machine changes
Add functions to get and set the current state of the state machine,add tracepoints there to trace state transitions. Add support fortraceing the queue heads and transfer descriptors as we look at them.
Drop a few DPRINTFs and all DPRINTF_ST lines, they are obsolete now....
usb-ehci: trace port state
Trace usb port operations (attach, detach, reset),drop a few obsolete DPRINTF's.
usb-ehci: improve mmio tracing
Add a separate tracepoint to log how register values change in responseto a mmio write. Especially useful for registers which have read-onlyor clear-on-write bits in them.
virtio: event index support
Add support for event_idx feature, and utilize it toreduce the number of interrupts and exits for the guest.
pci: Update pci_regs header
Pulls in latest version from kernel 3.0-rc2.
Some changes around AER now require local defines as QEMU accesses theerror source identification register via sub-words.
CC: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
msix: Use replace local defines with pci_regs versions
This also cleans up an open-coded 64-bit message address readout.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/wdt_i6300esb.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
hw/xio3130_downstream.c: convert to PCIDeviceInfo to initialize ids
hw/xio3130_upstream.c: convert to PCIDeviceInfo to initialize ids
virtio-pci.c: convert to PCIDEviceInfo to initialize ids
virtio: guard against negative vq notifies
The virtio_queue_notify() function checks that the virtqueue number isless than the maximum number of virtqueues. A signed comparison is usedbut the virtqueue number could be negative if a buggy or malicious guest...
virtio: correctly initialize vm_running
Current vm_running was not explicitly initialized and its value was changed byvm state notifier, this may confuse the virtio device being hotplugged such asvirtio-net with vhost backend as it may think the vm was not running. Solve this...
msi: Fix copy&paste mistake in msi_uninit
hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids
hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids
hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids
hw/vga-pci.c: convert to PCIDeviceInfo to initialize ids
hw/vt82c686.c: convert to PCIDeviceInfo to initialize ids
hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize ids
hw/piix4.c: convert to PCIDeviceInfo to initialize ids
hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids
hw/qxl.c: convert to PCIDeviceInfo to initialize ids
hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids
hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids
hw/sun4u.c: convert to PCIDeviceInfo to initialize ids
hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize ids
hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids
hw/ide/via.c: convert to PCIDeviceInfo to initialize ids
hw/intel-hda.c: convert to PCIDeviceInfo to initialize ids
hw/ioh3420.c: convert to PCIDeviceInfo to initialize ids
hw/ivshmem.c: convert to PCIDeviceInfo to initialize ids
hw/lsi53c895a.c: convert to PCIDeviceInfo to initialize ids
hw/ne2000.c: convert to PCIDeviceInfo to initialize ids
hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids
hw/bonito.c: convert to PCIDeviceInfo to initialize ids
hw/cirrus_vga.c: convert to PCIDeviceInfo to initialize ids
hw/e1000.c: convert to PCIDeviceInfo to initialize ids
hw/es1370.c: convert to PCIDeviceInfo to initialize ids
hw/grackle_pci.c: convert to PCIDeviceInfo to initialize ids
hw/gt64xxx.c: convert to PCIDeviceInfo to initialize ids
dec_pci: convert to PCIDeviceInfo to initialize ids
apb_pci: convert to PCIDeviceInfo to initialize ids
Use PCIDeviceInfo to initialize ids.
ide/piix: convert to PCIDeviceInfo to initialize ids
vmware_vga.c: convert to PCIDeviceInfo to initialize ids
hw/ac97.c: convert to PCIDeviceInfo to initialize ids
pci: move ids of config space into PCIDeviceInfo
vender id/device id... in configuration space are read-only registerswhich are commonly defined for all pci devices.So move those initialization into common place.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
usb-uhci: convert to PCIDEviceInfo to initialize ids
eepro100: convert to PCIDeviceInfo to initialize ids
Merge remote branch 'rth/axp-next' into alpha-merge