ds1225y: use trace framework
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ds1225y: Remove protection stuff, which doesn't belong to this device
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
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.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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
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
Conflicts: hw/usb-uhci.c
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...