ide: Turn properties any IDE device must have into bus properties
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Turn props any virtio-serial-bus device must have into bus props
usb-ccid: Drop unused CCIDCardInfo callback print()
virtio-serial: Clean up virtser_bus_dev_print() output
Old version looks like this in info qtree (last four lines):
dev: virtconsole, id "" dev-prop: is_console = 1 dev-prop: nr = 0 dev-prop: chardev = <null>...
vga: Fix type of lfb/map_addr/end.
These addresses have been passed through pci_to_cpu_addr,and thus need to be full target_phys_addr_t.
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Richard Henderson <rth@twiddle.net>Cc: Jan Kiszka <jan.kiszka@siemens.com>...
qemu-char: Print strerror message on failure
The only way for chardev drivers to communicate an error was to return a NULLpointer, which resulted in an error message that said that something wentwrong, but not why.
This patch changes the interface to return 0/-errno and updates...
report serial devices created with -device in the PIIX4 config space
Serial and parallel devices created with -device are not reported inthe PIIX4 configuration space, and are hence not picked up by the DSDT.This upsets Windows, which hides them altogether from the guest....
multiboot: Support commas in module parameters
Support commas in the parameter list of multiboot modules as well as for thekernel command line, by using double commas (via get_opt_value()).
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Reviewed-by: Kevin Wolf <kwolf@redhat.com>...
net: Consistently use qemu_macaddr_default_if_unset
Drop the open-coded MAC assignment from net_init_nic and replace it withstandard qemu_macaddr_default_if_unset which is also used by qdev. Thatavoid creating colliding MACs when instantiating NICs via different...
Merge remote-tracking branch 'spice/spice.v39' into staging
Merge remote-tracking branch 'kraxel/usb.21' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
usb-hid: fixup changed tracking.
Remove leftover calls to usb_hid_changed().
Take care to update the changed flag after delivering a event viaGET_REPORT like we do when sending events via interrupt endpoint.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-uhci: fix irq handling on error.
Spec on UHCI_STS_USBERR: "If the TD on which the error interruptoccurred also had its IOC bit set, both this bit and Bit 0 are set."
Make UHCI emulation do that.
ds1225y: convert to qdev device, and use it in MIPS Jazz emulation
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ds1225y: use trace framework
ds1225y: Remove protection stuff, which doesn't belong to this device
qxl: upon reset, if spice worker is stopped, the command rings can be not empty
Spice worker does no longer process commands when it is stopped.Otherwise, it might crash during migration when attempting to processcommands while the guest is not completely loaded....
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...
Merge remote-tracking branch 'agraf/xen-next' into staging
Merge remote-tracking branch 'kraxel/usb.19' into staging
Merge remote-tracking branch 'spice/spice.v38' into staging
Merge remote-tracking branch 'mst/for_anthony' into staging
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....
virtio-serial-bus: Fix trailing \n in error_report string
Markus fixed offenders in the file but one instance sneaked in viaanother patch. Fix it.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
virtio-console: Prevent abort()s in case of host chardev close
A host chardev could close just before the guest sends some data to bewritten. This will cause an -EPIPE error. This shouldn't be propagatedto virtio-serial-bus.
Ideally we should close the port once -EPIPE is received, but since the...
virtio-serial-bus: Add trace events
Add some trace events for messages passed between the guest and host.
virtio-console: Add some trace events
Add some trace events for messages passed between the char layer and thevirtio-serial bus.
pci_ids: tweak names to match linux/pci_ids.h
Sync xen names to ones used by linux. Addxen platform device id as well.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/piix_pci.c: Fix PIIX3-xen to initialize ids
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
xen: move to new pci initializers
move ids to pci info structure
virtio: fix indirect descriptor buffer overflow
We were previously allowing arbitrarily-long indirect descriptors, whichcould lead to a buffer overflow in qemu-kvm process.
CVE-2011-2212
vhost: fix double free on device stop
vhost dev stop failed to clear the log field.Typically not an issue as dev start overwrites this field,but if logging gets disabled before the following start,it doesn't so this causes a double free.
xen_console: fix memory leak
con_init leaks the string "type", fix it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: add vkbd support for PV on HVM guests
Register the vkbd backend even when running as device emulator for HVMguests: it is useful because it doesn't need a frequent timer like usb.
Check whether the XenInput DisplayState has been set in the initialise...
xen_disk: cope with missing xenstore "params" node
When disk is a cdrom and the drive is empty the "params" node inxenstore might be missing completely: cope with it instead ofsegfaulting.
Updated in v2:
- actually removed the strchr(blkdev->params, ':') that caused the...
xen_disk: treat "aio" as "raw"
Sometimes the toolstack uses "aio" without an additional formatidentifier, in such cases use "raw".
- fix code style.
xen_console: support the new extended xenstore protocol
Since CS 21994 on xen-unstable.hg and CS466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, fewchanges have been introduced to the PV console xenstore protocol, asdescribed by the document docs/misc/console.txt under xen-unstable.hg....
xen_console: fall back to qemu serial device
The new xen_console protocol changed the default xen_console output devicefrom whatever Qemu chose to whatever xenstore choses and "pty" as fallback.
This is not how Qemu works. It has its own serial redirection semantics. So...
xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XEN
Xen won't be enabled if there is no backend support available for thehost. And that also means the map cache will work. So drop the separateconfig switch and move the required stubs over to xen-stub.c.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
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
usb_register_port(): do not set port->opaque and port->index twice
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: fixup bluetooth descriptors
Commit 4696425cd05c7baa0a4b469d43ba4b8488bcfc0f changes someendpoints from isocrounous to interrupt by mistake. Fix it.
usb-hub: remove unused descriptor arrays
Somehow they where left over when converting the hubto the new usb descriptor infrastructure ...
usb-ohci: raise interrupt on attach
Got lost in commit 618c169b577db64ac6589ad48825d2e11760d1a6,add it back in. Also fix codestyle while we are at it.
usb: Move (initial) call of usb_port_location to usb_fill_port
Cleanup / preparation patch for companion controller support. Note thatas a "side-effect" this patch also fixes the milkymist-softusb controllernot having a port_location set for its ports....
usb: Add a register_companion USB bus op.
This is a preparation patch for adding support for USB companion controllers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: Make port wakeup and complete ops take a USBPort instead of a Device
This makes them consistent with the attach and detach ops, and in generalit makes sense to make portops take a port as argument. This also makesadding support for a companion controller easier / cleaner....
usb: Replace device_destroy bus op with a child_detach port op
Note this fixes 2 things in one go, first of all the device_destroy busop should be a device_detach bus op, as pending async packets from thedevice should be cancelled on detach not on destroy....
usb-ehci: drop unused num-ports state member
usb-ehci: Connect Status bit is read only, don't allow changing it by the guest
usb-ehci: cleanup port reset handling
Doing a usb_attach when dev is NULL will just result in theport detach op getting called even though nothing was connected inthe first place.
usb: assert on calling usb_attach(port, NULL) on a port without a dev
with the "usb-ehci: cleanup port reset handling" patch in place no callersare calling usb_attach(port, NULL) for a port where port->dev is NULL.
Doing that makes no sense as that causes the port detach op to get called...
usb-ehci: Fix handling of PED and PEDC port status bits
The PED bit should only be set for highspeed devices and the PEDC bitshould not be set on "normal" PED bit changes, only on io errors.
usb-ehci: Add support for registering companion controllers
usb-uhci: Add support for being a companion controller
To use as a companion controller set the masterbus property.
usb-ohci: Add support for being a companion controller
To use as a companion controller, use pci-ohci as device and set themasterbus and num-ports properties, ie:
-device usb-ehci,addr=0b.1,multifunction=on,id=ehci0-device pci-ohci,addr=0b.0,multifunction=on,masterbus=ehci0.0,num-ports=4...
pci: add ich9 usb controller ids
uhci: add ich9 controllers
Add ich9 controllers, Factor out properties to a separatestruct and reference it to reduce duplication.
ehci: fix port count.
The ICH4 EHCI controller which we emulate has six ports not four.
ehci: add ich9 controller.
hw/usb-musb.c: Don't misuse usb_packet_complete()
In musb_packet() handle final processing of non-asynchronousUSB packets by directly calling musb_schedule_cb() rather thangoing through usb_packet_complete(). The latter will triggeran assertion because the packet doesn't belong to a device....
usb: Add a usb_fill_port helper function
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>...
qxl: device id fixup
Move device ID to PCIDeviceInfo.Remove support for the unused unstable device ID.
qxl: interface_get_command: fix reported mode
report correct mode when in undefined mode.introduces qxl_mode_to_string(), and uses it in other places too.
qxl-logger: add timestamp to command log
qxl: add dev id to guest prints
qxl: make sure primary surface is saved on migration
qxl: put QXL_IO_UPDATE_IRQ into vgamode whitelist
qxl: allow QXL_IO_LOG also in vga
The driver may change us to vga mode and still issue a QXL_IO_LOG,which we can easily support.
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
usb-storage: Turn drive serial into a qdev property usb-storage.serial
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...