scsi-disk: Fixup debugging statement
A debugging statement wasn't converted to the new interface.
Signed-off-by: Hannes Reinecke <hare@suse.de>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi-disk: Mask out serial number EVPD
If the serial number is not set we should mask it out in thelist of supported VPD pages and mark it as not supported.
scsi: Add 'hba_private' to SCSIRequest
'tag' is just an abstraction to identify the commandfrom the driver. So we should make that explicit byreplacing 'tag' with a driver-defined pointer 'hba_private'.This saves the lookup for driver handling several commands...
iov: Update parameter usage in iov_(to|from)_buf()
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't.This patch adds the missing parameter to iov_from_buf().It also renames the 'offset' parameter to 'iov_off' toemphasize it's the offset into the iovec and not the buffer....
esp: cancel current request only if some request is in flight
This bug was introduced in 94d3f98a3f3caddd7875f9a11776daeb84962a7b:scsi_cancel_io was checking if some request was pending before tryingto cancel it, while scsi_req_cancel always cancels the request....
spapr: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
s390-virtio: use specific endian ld/st_phys
ppc405_uc: use specific endian ld/st_phys
pl080: use specific endian ld/st_phys
msix: use specific endian ld/st_phys
msi: use specific endian ld/st_phys
intel-hda: use specific endian ld/st_phys
hpet: use specific endian ld/st_phys
ide: Initialise buffers with zeros
Just in case there's still a way how a guest can read out buffers when it's notsupposed to, let's zero the buffers during initialisation so that we don't leakinformation to the guest.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
ide: Ignore reads during PIO in and writes during PIO out
This fixes https://bugs.launchpad.net/qemu/+bug/786209:
When the DRQ_STAT bit is set, the IDE core permits both data reads and data writes, regardless of whether the current transfer was initiated as a read or write....
virtio-blk: Turn drive serial into a qdev property
It needs to be a qdev property, because it belongs to the drive'sguest part. Precedence: commit a0fef654 and 6ced55a5.
Bonus: info qtree now shows the serial number.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
pxa2xx_lcd: add proper rotation support
Until now, pxa2xx_lcd only supported 90deg rotation, butsome machines (for example Zipit Z2) needs 270deg rotation.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
arm: Add const attribute to some arm_boot_info pointers
Parameter 'info' is const, so add the missing attribute.
v2:Add 'const' to the local variable info in do_cpu_reset() and tothe boot_info field in CPUARMState (suggested by Peter Maydell).
Cc: Andrzej Zaborowski <balrogg@gmail.com>...
esp: correctly fill bus id with requested lun
This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, andmay be seen only on operating systems not using DMA to give commandsto SCSI adapter.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
etraxfs-ser: Correct default value for RW_REC_CTRL
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Merge remote-tracking branch 'kraxel/usb.17' into staging
Merge remote-tracking branch 'amit/for-anthony' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
virtio-serial: Fix segfault on guest boot
If I start qemu with:
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix fallouts from Linux header inclusion
This is an all-in-one fix for the smaller and bigger mistakes of thebuild system changes for accompanied Linux headers: - only enable KVM and vhost on Linux hosts - fix powerpc asm header symlink - do not use Linux headers on non-Linux hosts...
Spell "unkown" correctly in error_report() arguments
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix comment typos in hw/armv7m.c
Fix a couple of typos in comments.
Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Strip trailing '\n' from error_report()'s first argument
error_report() prepends location, and appends a newline. The messageconstructed from the arguments should not contain a newline. Fix theobvious offenders.
usb: ignore USB_DT_DEBUG
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-storage: Turn drive serial into a qdev property usb-storage.serial
usb-bus: Don't allow speed mismatch while attaching devices
hw/usb-ohci.c: Fix handling of remote wakeup corner cases
Correct a number of minor errors in the OHCI wakeup implementation: * when the port is suspended but the controller is not, raise RHSC * when the controller is suspended but the port is not, raise RD...
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....
ehci: switch to nanoseconds
Make ehci use nanoseconds everywhere.Simplifies time calculations.
usb-bus: Don't allow attaching a device to a bus with no free ports
usb: Proper error propagation for usb_device_attach errors
usb: Add a speedmask to devices
This is used to indicate at which speed[s] the device can operate,so that this can be checked to match the ports capabilities when it getsattached to a bus.
Note that currently all usb1 emulated device claim to be fullspeed, this...
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...
PPC: move TLBs to their own arrays
Until now, we've created a union over multiple different TLB types andallocated that union. While it's a waste of memory (and cache) to allocateTLB information for a TLB type with much information when you only needlittle, it also inflicts another issue....
PPC: 440: Use 440 style MMU as default, so Qemu knows the MMU type
We have some KVM interaction code in Qemu that tries to be clever andignore some capabilities when running on BookE style MMUs. Unfortunately,the default CPU bamboo was defaulting to was not a BookE-style MMU,...
PPC: E500: Use MAS registers instead of internal TLB representation
The natural format for e500 cores to do TLB manipulation with are the MASregisters. Instead of converting them into some internal representationand back again when the guest reads them, we can just keep the data...
PPC: mpc8544ds: Add hypervisor node
When running a PPC guest with KVM that can do PV operations, we needto indicate the guest which instructions to use for a hypercall andthat it is running as KVM guest.
This logic was available on openbios based machines already. This patch...
PPC: calculate kernel,initrd,cmdline locations dynamically
During testing, I was generating a vmlinux binary that easily occupiedmore than 20MB of RAM. Since the current -kernel code loads the initrdat a fixed address behind the kernel, we were overwriting kernel data...
PPC: E500: Implement reboot controller
When Linux reboots an e500 VM, it writes to a magic register in the"global-utilities" device indicated by the device tree. We were notemulating that device so far, rendering the VM reboot-less.
This patch implements that device with only the reboot functionality...
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.
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.
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>