aboutsummaryrefslogtreecommitdiffstats
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20ds1225y: convert to qdev device, and use it in MIPS Jazz emulationHervé Poussineau3-31/+82
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20ds1225y: use trace frameworkHervé Poussineau1-11/+5
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20ds1225y: Remove protection stuff, which doesn't belong to this deviceHervé Poussineau2-42/+1
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-19Merge remote-tracking branch 'agraf/xen-next' into stagingAnthony Liguori5-30/+73
2011-07-19Merge remote-tracking branch 'kraxel/usb.19' into stagingAnthony Liguori11-230/+458
2011-07-19Merge remote-tracking branch 'spice/spice.v38' into stagingAnthony Liguori2-17/+37
2011-07-19Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori5-9/+21
2011-07-18virtio-console: Prevent abort()s in case of host chardev closeAmit Shah1-1/+15
A host chardev could close just before the guest sends some data to be written. This will cause an -EPIPE error. This shouldn't be propagated to virtio-serial-bus. Ideally we should close the port once -EPIPE is received, but since the chardev interface doesn't return such meaningful values to its users, all we get is -1 for any kind of error. Just return 0 for now and wait for chardevs to return better error messages to act better on the return messages. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-serial-bus: Fix trailing \n in error_report stringAmit Shah1-1/+1
Markus fixed offenders in the file but one instance sneaked in via another patch. Fix it. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-console: Add some trace eventsAmit Shah1-1/+8
Add some trace events for messages passed between the char layer and the virtio-serial bus. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-serial-bus: Add trace eventsAmit Shah1-0/+7
Add some trace events for messages passed between the guest and host. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-17virtio: fix indirect descriptor buffer overflowMichael S. Tsirkin1-0/+8
We were previously allowing arbitrarily-long indirect descriptors, which could lead to a buffer overflow in qemu-kvm process. CVE-2011-2212 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17xen: move to new pci initializersMichael S. Tsirkin1-8/+7
move ids to pci info structure Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17hw/piix_pci.c: Fix PIIX3-xen to initialize idsAnthony PERARD1-0/+3
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17pci_ids: tweak names to match linux/pci_ids.hMichael S. Tsirkin2-5/+6
Sync xen names to ones used by linux. Add xen platform device id as well. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17vhost: fix double free on device stopMichael S. Tsirkin1-0/+1
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. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17xen_console: fall back to qemu serial deviceAlexander Graf1-4/+7
The new xen_console protocol changed the default xen_console output device from 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 it xenstore doesn't contain information on what to do, Qemu is the place to ask. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_console: support the new extended xenstore protocolStefano Stabellini3-6/+23
Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. From the Qemu point of view, very few modifications are needed to correctly support the protocol: read from xenstore the "output" node that tell us what the output of the PV console is going to be. In case the output is a tty, write to xenstore the device name. Changes in v2: - fix error paths: free malloc'ed strings and close the xenstore connection before returning; - remove useless snprintf in xenstore_store_pv_console_info if i == 0. Changes in v3: - replace xs_daemon_open/xs_daemon_close with xs_open/xs_close. Changes in v4: - add a compatibility implementation of xs_open/xs_close. Changes in v5: - fix code style. [agraf] fix build error due to missing stub Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_disk: treat "aio" as "raw"Stefano Stabellini1-0/+3
Sometimes the toolstack uses "aio" without an additional format identifier, in such cases use "raw". Updated in v2: - fix code style. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_disk: cope with missing xenstore "params" nodeStefano Stabellini1-7/+27
When disk is a cdrom and the drive is empty the "params" node in xenstore might be missing completely: cope with it instead of segfaulting. Updated in v2: - actually removed the strchr(blkdev->params, ':') that caused the segfault; - free all the allocated strings from xenstore before returning; Updated in v3: - set blkdev fields to NULL after free'ing them. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: add vkbd support for PV on HVM guestsStefano Stabellini1-7/+12
Register the vkbd backend even when running as device emulator for HVM guests: it is useful because it doesn't need a frequent timer like usb. Check whether the XenInput DisplayState has been set in the initialise state, rather than the input state. In case the DisplayState hasn't been set and there is no vfb for this domain, then set the XenInput DisplayState to the default one. Changed in v2: - use qemu_free instead of free; Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_console: fix memory leakStefano Stabellini1-2/+6
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>
2011-07-17xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XENJan Kiszka1-9/+0
Xen won't be enabled if there is no backend support available for the host. And that also means the map cache will work. So drop the separate config switch and move the required stubs over to xen-stub.c. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-12esp: cancel current request only if some request is in flightHervé Poussineau1-1/+1
This bug was introduced in 94d3f98a3f3caddd7875f9a11776daeb84962a7b: scsi_cancel_io was checking if some request was pending before trying to cancel it, while scsi_req_cancel always cancels the request. This may lead to a crash of Qemu due to dereferencing a NULL pointer, as exhibited by NetBSD 5.1 installer on MIPS Magnum emulation. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12spapr: use specific endian ld/st_physAlexander Graf2-8/+8
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12s390-virtio: use specific endian ld/st_physAlexander Graf2-8/+8
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12ppc405_uc: use specific endian ld/st_physAlexander Graf1-20/+23
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12pl080: use specific endian ld/st_physAlexander Graf1-4/+4
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12msix: use specific endian ld/st_physAlexander Graf1-1/+1
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12msi: use specific endian ld/st_physAlexander Graf1-1/+1
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12intel-hda: use specific endian ld/st_physAlexander Graf1-17/+4
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-12hpet: use specific endian ld/st_physAlexander Graf1-1/+1
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-08usb-ohci: raise interrupt on attachGerd Hoffmann1-1/+7
Got lost in commit 618c169b577db64ac6589ad48825d2e11760d1a6, add it back in. Also fix codestyle while we are at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-08usb-hub: remove unused descriptor arraysGerd Hoffmann1-68/+0
Somehow they where left over when converting the hub to the new usb descriptor infrastructure ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-08usb: fixup bluetooth descriptorsGerd Hoffmann1-12/+12
Commit 4696425cd05c7baa0a4b469d43ba4b8488bcfc0f changes some endpoints from isocrounous to interrupt by mistake. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-08usb_register_port(): do not set port->opaque and port->index twiceJes Sorensen1-2/+0
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05ehci: add ich9 controller.Gerd Hoffmann1-14/+29
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05ehci: fix port count.Gerd Hoffmann1-1/+1
The ICH4 EHCI controller which we emulate has six ports not four. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05uhci: add ich9 controllersGerd Hoffmann1-15/+39
Add ich9 controllers, Factor out properties to a separate struct and reference it to reduce duplication. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05pci: add ich9 usb controller idsGerd Hoffmann1-0/+8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ohci: Add support for being a companion controllerHans de Goede1-12/+40
To use as a companion controller, use pci-ohci as device and set the masterbus 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 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-uhci: Add support for being a companion controllerHans de Goede1-5/+36
To use as a companion controller set the masterbus property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ehci: Add support for registering companion controllersHans de Goede1-30/+144
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ehci: Fix handling of PED and PEDC port status bitsHans de Goede1-13/+11
The PED bit should only be set for highspeed devices and the PEDC bit should not be set on "normal" PED bit changes, only on io errors. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb: assert on calling usb_attach(port, NULL) on a port without a devHans de Goede1-5/+4
with the "usb-ehci: cleanup port reset handling" patch in place no callers are 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 for a port with nothing attached. Add an assert that port->dev != NULL when dev == NULL, and remove the check for not having a port->dev in the dev == NULL case. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ehci: cleanup port reset handlingHans de Goede1-6/+1
Doing a usb_attach when dev is NULL will just result in the port detach op getting called even though nothing was connected in the first place. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ehci: Connect Status bit is read only, don't allow changing it by the guestHans de Goede1-2/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb-ehci: drop unused num-ports state memberHans de Goede1-1/+0
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb: Replace device_destroy bus op with a child_detach port opHans de Goede8-29/+69
Note this fixes 2 things in one go, first of all the device_destroy bus op should be a device_detach bus op, as pending async packets from the device should be cancelled on detach not on destroy. Secondly having this as a bus op won't work with companion controllers, since then there will be 1 bus driven by the ehci controller and thus 1 set of bus ops, but the device being detached may be downstream of a handed over port. Making the detach of a downstream device a port op allows the ehci controller to forward this to the companion controller port for handed over ports. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-05usb: Make port wakeup and complete ops take a USBPort instead of a DeviceHans de Goede7-26/+28
This makes them consistent with the attach and detach ops, and in general it makes sense to make portops take a port as argument. This also makes adding support for a companion controller easier / cleaner. [ kraxel: fix usb-musb.c build ] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>