summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'agraf/ppc-for-upstream' into stagingAnthony Liguori2013-10-3125-112/+1234
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agraf/ppc-for-upstream: (29 commits) spapr: Use DeviceClass::fw_name for device tree CPU node target-ppc: Fill in OpenFirmware names for some PowerPCCPU families target-ppc: dump-guest-memory support dump-guest-memory: Check for the correct return value target-ppc: Use #define for max slb entries target-ppc: Check for error on address translation in memsave command target-ppc: Update slb array with correct index values. spapr-pci: enable irqfd for INTx xics-kvm: enable irqfd for MSI xics: Implement H_XIRR_X xics: Implement H_IPOLL xics-kvm: Support for in-kernel XICS interrupt controller xics: add cpu_setup callback xics: split to xics and xics-common xics: add missing const specifiers to TypeInfo xics: convert init() to realize() xics: add pre_save/post_load dispatchers xics: replace fprintf with error_report spapr: move cpu_setup after kvmppc_set_papr xics: move reset and cpu_setup ... Message-id: 1382736474-32128-1-git-send-email-agraf@suse.de Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * spapr: Use DeviceClass::fw_name for device tree CPU nodeAndreas Färber2013-10-253-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on cpu_model, obtain the device tree node label per CPU. Use DeviceClass::fw_name as source. Whenever DeviceClass::fw_name is unknown, default to "PowerPC,UNKNOWN". As a consequence, spapr_fixup_cpu_dt() can operate on each CPU's fw_name, obsoleting sPAPREnvironment::cpu_model, and spapr_create_fdt_skel() can drop its cpu_model argument. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Fill in OpenFirmware names for some PowerPCCPU familiesAndreas Färber2013-10-251-0/+3
| | | | | | | | | | | | | | | | | | Set the expected values for POWER7, POWER7+, POWER8 and POWER5+. Note that POWER5+ and POWER7+ are intentionally lacking the '+', so the lack of a POWER7P family constitutes no problem. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: dump-guest-memory supportAneesh Kumar K.V2013-10-255-2/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support for dumping guest memory using dump-guest-memory monitor command. Before patch: (qemu) dump-guest-memory testcrash this feature or command is not currently supported (qemu) After patch: (qemu) dump-guest-memory testcrash (qemu) crash was able to read the file crash> bt PID: 0 TASK: c000000000c0d0d0 CPU: 0 COMMAND: "swapper/0" R0: 0000000028000084 R1: c000000000cafa50 R2: c000000000cb05b0 R3: 0000000000000000 R4: c000000000bc4cb0 R5: 0000000000000000 R6: 001efe93b8000000 R7: 0000000000000000 R8: 0000000000000000 R9: b000000000001032 R10: 0000000000000001 R11: 0001eb2117e00d55 .... ... NOTE: Currently crash tools doesn't look at ELF notes in the dump on ppc64. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * dump-guest-memory: Check for the correct return valueAneesh Kumar K.V2013-10-251-2/+2
| | | | | | | | | | | | | | We should check for error with s->note_size Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Use #define for max slb entriesAneesh Kumar K.V2013-10-253-4/+5
| | | | | | | | | | | | | | | | Instead of opencoding 64 use MAX_SLB_ENTRIES. We don't update the kernel header here. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Check for error on address translation in memsave commandAneesh Kumar K.V2013-10-251-1/+4
| | | | | | | | | | | | | | When we translate the virtual address to physical check for error. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Update slb array with correct index values.Aneesh Kumar K.V2013-10-251-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, a value of rb=0 and rs=0 results in replacing the 0th index. This can be observed when using gdb remote debugging support. (gdb) x/10i do_fork 0xc000000000085330 <do_fork>: Cannot access memory at address 0xc000000000085330 (gdb) This is because when we do the slb sync via kvm_cpu_synchronize_state, we overwrite the slb entry (0th entry) for 0xc000000000085330 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr-pci: enable irqfd for INTxAlexey Kardashevskiy2013-10-251-0/+13
| | | | | | | | | | | | | | | | | | | | This enables IRQFD for LSI (level triggered INTx interrupts) by adding a spapr_route_intx_pin_to_irq() callback to the sPAPR PCI host bus. This callback is called to know the global interrupt number to link resampling fd with IRQFD's fd in KVM. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics-kvm: enable irqfd for MSIAlexey Kardashevskiy2013-10-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables IRQFD support for sPAPR. The feature decreases the latency of interrupt handling. To enable IRQFD for MSI, this sets kvm_gsi_direct_mapping to true which enables direct MSI mapping. To enable IRQFD for LSI (level triggered INTx interrupts), a PCI host bus callback is required. The patch for that is coming next. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: Implement H_XIRR_XBenjamin Herrenschmidt2013-10-252-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements H_XIRR_X hypercall in addition to H_XIRR as it is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. As the Partition Adjunct Option is not supported at the moment, the CPPR parameter of the hypercall is ignored. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: Implement H_IPOLLBenjamin Herrenschmidt2013-10-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for the H_IPOLL hypercall which the guest uses to poll for a pending interrupt. This hypercall is mandatory for PAPR+ and there is no way for the guest to detect whether it is supported or not so just add it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics-kvm: Support for in-kernel XICS interrupt controllerDavid Gibson2013-10-255-1/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent (host) kernels support emulating the PAPR defined "XICS" interrupt controller system within KVM. This patch allows qemu to initialize and configure the in-kernel XICS, and keep its state in sync with qemu's XICS state as necessary. This should give considerable performance improvements. e.g. on a simple IPI ping-pong test between hardware threads, using qemu XICS gives us around 5,000 irqs/second, whereas the in-kernel XICS gives us around 70,000 irqs/s on the same hardware configuration. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [Mike Qiu <qiudayu@linux.vnet.ibm.com>: fixed mistype which caused ics_set_kvm_state() to fail] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: add cpu_setup callbackAlexey Kardashevskiy2013-10-252-0/+6
| | | | | | | | | | | | | | | | This adds a cpu_setup callback to the XICS device class (as XICS-KVM will do it different), xics_cpu_setup() will call it if it is set. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: split to xics and xics-commonAlexey Kardashevskiy2013-10-253-21/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upcoming XICS-KVM support will use bits of emulated XICS code. So this introduces new level of hierarchy - "xics-common" class. Both emulated XICS and XICS-KVM will inherit from it and override class callbacks when required. The new "xics-common" class implements: 1. replaces static "nr_irqs" and "nr_servers" properties with the dynamic ones and adds callbacks to be executed when properties are set. 2. xics_cpu_setup() callback renamed to xics_common_cpu_setup() as it is a common part for both XICS'es 3. xics_reset() renamed to xics_common_reset() for the same reason. The emulated XICS changes: 1. the part of xics_realize() which creates ICPs is moved to the "nr_servers" property callback as realize() is too late to create/initialize devices and instance_init() is too early to create devices as the number of child devices comes via the "nr_servers" property. 2. added ics_initfn() which does a little part of what xics_realize() did. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: add missing const specifiers to TypeInfoAlexey Kardashevskiy2013-10-251-2/+2
| | | | | | | | | | | | | | | | This adds missing const specifiers to ICS and ICP TypeInfo's. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: convert init() to realize()Alexey Kardashevskiy2013-10-251-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | This fixes XICS according new QOM rules. This converts ICS's init() callbacks to realize(). This converts legacy qdev_init_nofail() to property_set(realized). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: add pre_save/post_load dispatchersAlexey Kardashevskiy2013-10-252-3/+79
| | | | | | | | | | | | | | | | The upcoming support of in-kernel XICS will redefine migration callbacks for both ICS and ICP so classes and callback pointers are added. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: replace fprintf with error_reportAlexey Kardashevskiy2013-10-251-2/+3
| | | | | | | | | | | | | | | | | | This replaces old-style fprintf with new style error_report. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr: move cpu_setup after kvmppc_set_paprAlexey Kardashevskiy2013-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | This moves the xics_cpu_setup() call after kvmppc_set_papr() in order to get VCPUs initialized as this is required by upcoming XICS-KVM. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * xics: move reset and cpu_setupAlexey Kardashevskiy2013-10-251-36/+36
| | | | | | | | | | | | | | | | This simple change makes following patches nicer. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKENDavid Gibson2013-10-252-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent PowerKVM allows the kernel to intercept some RTAS calls from the guest directly. This is used to implement the more efficient in-kernel XICS for example. qemu is still responsible for assigning the RTAS token numbers however, and needs to tell the kernel which RTAS function name is assigned to a given token value. This patch adds a convenience wrapper for the KVM_PPC_RTAS_DEFINE_TOKEN ioctl() which is used for this purpose. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr-rtas: fix h_rtas parameters readingAlexey Kardashevskiy2013-10-252-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | On the real hardware, RTAS is called in real mode and therefore top 4 bits of the address passed in the call are ignored. So does the patch. This converts h_rtas() to use existing rtas_ld() handlers. This fixed rtas_ld()/rtas_st() to ignore top 4 bits. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr: Add ibm, purr property on power7 and newerAlexey Kardashevskiy2013-10-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | PAPR+ says that no "ibm,purr" tells the guest that H_PURR is not supported. However some guests still try calling H_PURR on POWER7 unless the property is present and equal to 0. This adds the property for CPUs supporting the PURR special register. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr: increase temporary fdt buffer sizeAlexey Kardashevskiy2013-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment the size of the buffer is set to 64K which is enough for approximately 150 VCPUs which is not the limit. This increases the buffer up to 256K which allows having a tree for approximately 600 VCPUs which is way beyond the real number we need. As only the real size of the tree is copied to the guest, there will be no impact on existing configurations. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Fix L2CR write accessesAlexander Graf2013-10-251-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | Commit 2345f1c01 was supposed to render L2CR writes into noops. Instead, it made them illegal instruction traps which apparently didn't confuse XNU, but can easily confuse other OSs. Fix it up by actually doing nothing when we write to L2CR. Reported-by: Julio Guerra <guerr@julio.in> Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Julio Guerra <guerr@julio.in>
| * target-ppc: Little Endian Correction to Load/Store Vector ElementTom Musta2013-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Load Vector Element (lve*x) and Store Vector Element (stve*x) instructions not only byte-swap in Little Endian mode, they also invert the element that is accessed. For example, the RTL for lvehx contains this: eb <-- EA[60:63] if Big-Endian byte ordering then VRT[8*eb:8*eb+15] <-- MEM(EA,2) else VRT[112-(8*eb):127-(8*eb)] <-- MEM(EA,2) This patch adds the element inversion, as described in the last line of the RTL. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * ppc: Add CFAR, DAR and DSISR to the dictionary of printable registersTom Musta2013-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CFAR, DAR and DSISR registers are currently missing from the dictionary of registers that may be printed in the QEMU console. These are interesting registers when debugging. With this patch, the following commands work properly: (qemu) print $cfar (qemu) print $dar (qemu) print $dsisr Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries: Fix loading of little endian kernelsBenjamin Herrenschmidt2013-10-251-1/+12
| | | | | | | | | | | | | | | | Try loading the kernel as little endian if it fails big endian. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries: Update SLOF firmware imageAlexey Kardashevskiy2013-10-253-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has reworked USB OHCI and adds support of USB EHCI, VIRTIO-SCSI and various fixes (IBM VSCSI, VGA and more). The full list of fixes is: * usb-ohci: Convert td-phys every time to td-virt * usb-storage: Fix cbwflags field * Add -fno-strict-aliasing in global CFLAGS * usb: fix various issues found with js2x * Move hex64-{decode,encode}-unit to node.fs * usb: Use separate in-memory endian swap * usb-ohci: collect TDs from done list * js2x: more fixes * js2x: Fix build of takeover image * js2x: use new usb stack * usb-ohci: Use proper memory barriers always * usb: Fix a couple of warnings * Fix $cat-instance-unit * Cache phandle of /chosen * Use root.fs on qemu as well * usb-ehci: Add ehci handshake * usb: add mb for write accessors * usb-ohci: add missing memory barriers * usb-ohci: suspend the controller in exit code path * usb-ohci: Add a reset when closing the OHCI * usb: Use proper accessors for MMIO and separate in-memory endian swap * Use a global definition of sync() and mb() * net-snk: Remove exception handling * usb: unmap buffers * slof: call quiesce on closing of stdin * usb-kbd: accept "s" to drop to OF prompt * USB storage driver * usb-ohci: add Bulk transfer support * usb-ehci: Add bulk support * usb-core: add usb bulk support * USB generic hub device driver * usb-ehci: setup new device * usb-ehci: Check ehci ports * usb-ehci: initialize controller * USB keyboard driver * usb-core: setup new device * usb-core: create dev pool allocation * usb-ohci: implement ohci send control * usb-core: usb send control * usb-core: implement usb_{get,put}_pipe routines * usb-ohci: allocate pipe pool * usb-ohci: reset, init and check-ports * Add standard header stdbool.h * usb-slof: forth support routines for C * usb-ehci: Add USB EHCI skeleton * usb-core: Add register accessor functions * Use __builtin_bswap routines for endianness swapping * usb-core: hcd registration and query routines * usb-core: adding generic dev-hci.fs * usb-core: registration and makefiles * Add new USB code * Remove old usb code * vga: fix hcall-invert-screen and hcall-blink-screen * Enumerate disk/cdrom aliases for multiple disks or cdroms * scsi: unify scsi probing code * vscsi: generalizing probe code * virtio-scsi: iterate through targets * scsi: unify and use make-disk-alias * nvram: remove unnecessary prints * Add hack to client interface finddevice of "/memory" * scsi: Fix cdrom boot crash when no medium present * Look for /memory@0, not just /memory * Fix instance>qname crashing when displaying instance arguments * Fix js2x build * scsi-disk: Bound check read-blocks * Fix off by one error in scsi-disk get-capacity * scsi: fix report-luns handling * SLOF: virtio-scsi block driver code * scsi: Move bits of vio-vscsi.fs to a common helpers file * scsi: Move scsi-disk.fs to a generic place * SLOF: virtio-scsi helper routines * SLOF: virtio-scsi - add pci device file * iso9660: Don't constantly reallocate the read buffer * vscsi: Sanitize interface between scsi-disk.fs and vio-vscsi.fs * vio-vscsi: Rework vio-vscsi support * virtio: Add a virtio-set-qaddr helper * disk-label: Allocate 4096 bytes for 4k block devices * disk-label: Increase the max size of the PReP boot partition * Make load-base a real environment variable * vio-vscsi: Switch to using a wildcard "disk" node and make scsi-disk generic * Fix disk-label package to use proper instance path * Increase size of catpad * Fix instance>path to contain unit address for wildcard nodes * Fix handling of wildcard nodes in open-dev * vio-vscsi: Get CRQ on open and release on close Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge remote-tracking branch 'kraxel/audio.2' into stagingAnthony Liguori2013-10-311-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | * kraxel/audio.2: audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second Message-id: 1382622110-19460-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* secondHans de Goede2013-10-231-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to 4000 times / second. This still causes a host cpu load of 50 % for simply playing audio, where as with this patch git master is at 13%, so we should backport this to 1.5 and 1.6 too. Note this will not apply to 1.5 and 1.6 as is. Cc: qemu-stable@nongnu.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'kraxel/usb.91' into stagingAnthony Liguori2013-10-312-37/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/usb.91: usb-hcd-xhci: Update endpoint context dequeue pointer for streams too usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stop usb-hcd-xhci: Remove unused cancelled member from XHCITransfer usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext usb-host-libusb: Detach kernel drivers earlier usb-host-libusb: Configuration 0 may be a valid configuration usb-host-libusb: Fix reset handling Message-id: 1382620267-18065-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | usb-hcd-xhci: Update endpoint context dequeue pointer for streams tooHans de Goede2013-10-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With streams the endpoint context dequeue pointer should point to the dequeue value for the currently active stream. At least Linux guests expect it to point to value set by an set_ep_dequeue upon completion of the set_ep_dequeue (before kicking the ep). Otherwise the Linux kernel will complain (and things won't work): xhci_hcd 0000:00:05.0: Mismatch between completed Set TR Deq Ptr command & xHCI internal state. xhci_hcd 0000:00:05.0: ep deq seg = ffff8800366f0880, deq ptr = ffff8800366ec010 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stopHans de Goede2013-10-221-8/+18
| | | | | | | | | | | | | | | | | | | | | As we should per the XHCI spec "4.6.9 Stop Endpoint". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hcd-xhci: Remove unused cancelled member from XHCITransferHans de Goede2013-10-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since qemu's USB model is geared towards emulated devices cancellation is instanteneous, so no need to wait for cancellation to complete, as such there is no wait for cancellation code, and the cancelled bool as well as the bogus comment about it can be removed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContextHans de Goede2013-10-221-9/+0
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-host-libusb: Detach kernel drivers earlierHans de Goede2013-10-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the reset, dirtying the device state. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-host-libusb: Configuration 0 may be a valid configurationHans de Goede2013-10-221-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting from: linux/Documentation/ABI/stable/sysfs-bus-usb: Note that some devices, in violation of the USB spec, have a configuration with a value equal to 0. Writing 0 to bConfigurationValue for these devices will install that configuration, rather then unconfigure the device. So don't compare the configuration value against 0 to check for unconfigured devices, instead check for a LIBUSB_ERROR_NOT_FOUND return from libusb_get_active_config_descriptor(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-host-libusb: Fix reset handlingHans de Goede2013-10-221-6/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guest will issue an initial device reset when the device is attached, but since the current usb-host-libusb code only actually does the reset when udev->configuration != 0, and on attach the device is not yet configured, the reset gets ignored. This means that the device gets passed to the guest in an unknown state, which is not good. The udev->configuration check is there because of the release / claim interfaces done around the libusb_device_reset call, but these are not necessary. If interfaces are claimed when libusb_device_reset gets called libusb will release + reclaim them itself. The usb_host_ep_update call also is not necessary. If the reset succeeds the original config and interface alt settings will be restored. Last if the reset fails, that means the device has either disconnected or morphed into an another device and has been completely re-enumerated, so it is treated by the host as a new device and our handle is invalid, so on reset failure we need to call usb_host_nodev(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori2013-10-311-6/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | * luiz/queue/qmp: monitor: eliminate monitor_event_state_lock Message-id: 1382121003-5211-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | monitor: eliminate monitor_event_state_lockPaolo Bonzini2013-10-181-6/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This lock does not protect anything that the BQL does not already protect. Furthermore, with -nodefaults and no monitor, the mutex is not initialized but monitor_protocol_event_queue is called anyway, which causes a crash under mingw (and only works by luck. under Linux or other POSIX OSes). Reported-by: Orx Goshen <orx.goshen@intel.com> Cc: Daniel Berrange <berrange@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'kraxel/e820.1' into stagingAnthony Liguori2013-10-311-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | * kraxel/e820.1: e820: pass high memory too. Message-id: 1382008179-5968-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | e820: pass high memory too.Gerd Hoffmann2013-10-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a fw_cfg entry to pass e820 entries from qemu to the firmware. Today it's used to pass reservations only. This patch makes qemu pass entries for RAM too. This allows to pass RAM sizes larger than 1TB to the firmware and it will also allow to pass non-contignous memory ramges should we decide to implement that some day, say for our virtual numa nodes. Obviously this needs some extra care to not break existing firware. SeaBIOS loads the entries and happily adds them without looking at the type. Which is problematic for memory below 4g as this will overwrite reservations added for bios memory etc. For memory above 4g it works just fine, seabios will merge the entry derived from cmos with the one loaded from fw_cfg. OVMF doesn't look at the fw_cfg e820 table. coreboot doesn't look at the fw_cfg e820 table. Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-By: Igor Mammedov <imammedo@redhat.com>
* | | Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2013-10-3195-172/+16666
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pci, pc, acpi fixes, enhancements This includes some pretty big changes: - pci master abort support by Marcel - pci IRQ API rework by Marcel - acpi generation support by myself Everything has gone through several revisions, latest versions have been on list for a while without any more comments, tested by several people. Please pull for 1.7. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 15 Oct 2013 07:33:48 AM CEST using RSA key ID D28D5469 # gpg: Can't check signature: public key not found * mst/tags/for_anthony: (39 commits) ssdt-proc: update generated file ssdt: fix PBLK length i386: ACPI table generation code from seabios pc: use new api to add builtin tables acpi: add interface to access user-installed tables hpet: add API to find it pvpanic: add API to access io port ich9: APIs for pc guest info piix: APIs for pc guest info acpi/piix: add macros for acpi property names i386: define pc guest info loader: allow adding ROMs in done callbacks i386: add bios linker/loader loader: use file path size from fw_cfg.h acpi: ssdt pcihp: updat generated file acpi: pre-compiled ASL files acpi: add rules to compile ASL source i386: add ACPI table files from seabios q35: expose mmcfg size as a property q35: use macro for MCFG property name ... Message-id: 1381818560-18367-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | | ssdt-proc: update generated fileMichael S. Tsirkin2013-10-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update generated ssdt proc hex file (used for systems lacking IASL) after P_BLK length change. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | ssdt: fix PBLK lengthMichael S. Tsirkin2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really support CPU throttling, so supply 0 PBLK length. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | i386: ACPI table generation code from seabiosMichael S. Tsirkin2013-10-148-0/+1569
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds C code for generating ACPI tables at runtime, imported from seabios git tree commit 51684b7ced75fb76776e8ee84833fcfb6ecf12dd Although ACPI tables come from a system BIOS on real hw, it makes sense that the ACPI tables are coupled with the virtual machine, since they have to abstract the x86 machine to the OS's. This is widely desired as a way to avoid the churn and proliferation of QEMU-specific interfaces associated with ACPI tables in bios code. Notes: As BIOS can reprogram devices prior to loading ACPI tables, we pre-format ACPI tables but defer loading hardware configuration there until tables are loaded. The code structure was intentionally kept as close to the seabios original as possible, to simplify comparison and making sure we didn't lose anything in translation. Minor code duplication results, to help ensure there are no functional regressions, I think it's better to merge it like this and do more code changes in follow-up patches. Cross-version compatibility concerns have been addressed: ACPI tables are exposed to guest as FW_CFG entries. When running with -M 1.5 and older, this patch disables ACPI table generation, and doesn't expose ACPI tables to guest. As table content is likely to change over time, the following measures are taken to simplify cross-version migration: - All tables besides the RSDP are packed in a single FW CFG entry. This entry size is currently 23K. We round it up to 64K to avoid too much churn there. - Tables are placed in special ROM blob (not mapped into guest memory) which is automatically migrated together with the guest, same as BIOS code. - Offsets where hardware configuration is loaded in ACPI tables are also migrated, this is in case future ACPI changes make us rearrange the tables in memory. This patch reuses some code from SeaBIOS, which was originally under LGPLv2 and then relicensed to GPLv3 or LGPLv3, in QEMU under GPLv2+. This relicensing has been acked by all contributors that had contributed to the code since the v2->v3 relicense. ACKs approving the v2+ relicensing are listed below. The list might include ACKs from people not holding copyright on any parts of the reused code, but it's better to err on the side of caution and include them. Affected SeaBIOS files (GPLv2+ license headers added) <http://thread.gmane.org/gmane.comp.bios.coreboot.seabios/5949>: src/acpi-dsdt-cpu-hotplug.dsl src/acpi-dsdt-dbug.dsl src/acpi-dsdt-hpet.dsl src/acpi-dsdt-isa.dsl src/acpi-dsdt-pci-crs.dsl src/acpi.c src/acpi.h src/ssdt-misc.dsl src/ssdt-pcihp.dsl src/ssdt-proc.dsl tools/acpi_extract.py tools/acpi_extract_preprocess.py Each one of the listed people agreed to the following: > If you allow the use of your contribution in QEMU under the > terms of GPLv2 or later as proposed by this patch, > please respond to this mail including the line: > > Acked-by: Name <email address> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Jason Baron <jbaron@akamai.com> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Gleb Natapov <gleb@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Dave Frodin <dave.frodin@se-eng.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Kevin O'Connor <kevin@koconnor.net> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Magnus Christensson <magnus.christensson@intel.com> Acked-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: use new api to add builtin tablesMichael S. Tsirkin2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At this point the only builtin table we have is the DSDT used for Q35. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | acpi: add interface to access user-installed tablesMichael S. Tsirkin2013-10-142-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a new API to install builtin tables, so that we can distinguish between the two. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud