summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * spapr: Don't allow memory hotplug to memory less nodesBharata B Rao2015-09-231-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently PowerPC kernel doesn't allow hot-adding memory to memory-less node, but instead will silently add the memory to the first node that has some memory. This causes two unexpected behaviours for the user. - Memory gets hotplugged to a different node than what the user specified. - Since pc-dimm subsystem in QEMU still thinks that memory belongs to memory-less node, a reboot will set things accordingly and the previously hotplugged memory now ends in the right node. This appears as if some memory moved from one node to another. So until kernel starts supporting memory hotplug to memory-less nodes, just prevent such attempts upfront in QEMU. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Memory hotplug supportBharata B Rao2015-09-232-3/+123
| | | | | | | | | | | | | | | | | | Make use of pc-dimm infrastructure to support memory hotplug for PowerPC. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Make hash table size a factor of maxram_sizeBharata B Rao2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The hash table size is dependent on ram_size, but since with hotplug the memory can grow till maxram_size. Hence make hash table size dependent on maxram_size. This allows to hotplug huge amounts of memory to the guest. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Support ibm,dynamic-reconfiguration-memoryBharata B Rao2015-09-234-50/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse ibm,architecture.vec table obtained from the guest and enable memory node configuration via ibm,dynamic-reconfiguration-memory if guest supports it. This is in preparation to support memory hotplug for sPAPR guests. This changes the way memory node configuration is done. Currently all memory nodes are built upfront. But after this patch, only memory@0 node for RMA is built upfront. Guest kernel boots with just that and rest of the memory nodes (via memory@XXX or ibm,dynamic-reconfiguration-memory) are built when guest does ibm,client-architecture-support call. Note: This patch needs a SLOF enhancement which is already part of SLOF binary in QEMU. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Add LMB DR connectorsDavid Gibson2015-09-232-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable memory hotplug for pseries 2.4 and add LMB DR connectors. With memory hotplug, enforce RAM size, NUMA node memory size and maxmem to be a multiple of SPAPR_MEMORY_BLOCK_SIZE (256M) since that's the granularity in which LMBs are represented and hot-added. LMB DR connectors will be used by the memory hotplug code. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> [spapr_drc_reset implementation] [since this missed the 2.4 cutoff, changing to only enable for 2.5] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Use QEMU limit for maximum CPUs numberAlexey Kardashevskiy2015-09-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sPAPR uses hard coded limit of maximum 255 supported CPUs which is exactly the same as QEMU-wide limit which is MAX_CPUMASK_BITS and also defined as 255. This makes use of a global CPU number limit for the "pseries" machine. In order to anticipate future increase of the MAX_CPUMASK_BITS (or to help debugging large systems), this also bumps the FDT_MAX_SIZE limit from 256K to 1M assuming that 1 CPU core needs roughly 512 bytes in the device tree so the new limit can cover up to 2048 CPU cores. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Don't use QOM [*] syntax for DR connectors.David Gibson2015-09-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamic reconfiguration (hotplug) code for the pseries machine type uses a "DR connector" QOM object for each resource it will be possible to hotplug. Each of these is added to its owner using object_property_add_child(owner, "dr-connector[*], ...); That works ok, mostly, but it means that the property indices are arbitrary, depending on the order in which the connectors are constructed. That might line up to something useful, but it doesn't have to. It will get worse once we add hotplug RAM support. That will add a DR connector object for every 256MB of potential memory. So if maxmem=2T, for example, there are 8192 objects under the same parent. The QOM interfaces aren't really designed for this. In particular object_property_add() with [*] has O(n^2) time complexity (in the number of existing children): first it has a linear search through array indices to find a free slot, each of which is attempted to a recursive call to object_property_add() with a specific [N]. Those calls are O(n) because there's a linear search through all properties to check for duplicates. By using a meaningful index value, which we already know is unique we can avoid the [*] special behaviour. That lets us reduce the total time for creating the DR objects from O(n^3) to O(n^2). O(n^2) is still kind of crappy, but it's enough to reduce the startup time of qemu (with in-progress memory hotplug support) with maxmem=2T from ~20 minutes to ~4 seconds. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Tested-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
| * spapr_drc: use RTAS return codes for methods called by RTASMichael Roth2015-09-233-43/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain methods in sPAPRDRConnector objects are only ever called by RTAS and in many cases are responsible for the logic that determines the RTAS return codes. Rather than having a level of indirection requiring RTAS code to re-interpret return values from such methods to determine the appropriate return code, just pass them through directly. This requires changing method return types to uint32_t to match the type of values currently passed to RTAS helpers. In the case of read accesses like drc->entity_sense() where we weren't previously reporting any errors, just the read value, we modify the function to return RTAS return code, and pass the read value back via reference. Suggested-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Suggested-by: David Gibson <david@gibson.dropbear.id.au> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Initialize hotplug memory address spaceBharata B Rao2015-09-233-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | Initialize a hotplug memory region under which all the hotplugged memory is accommodated. Also enable memory hotplug by setting CONFIG_MEM_HOTPLUG. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr_drc: don't allow 'empty' DRCs to be unisolated or allocatedMichael Roth2015-09-232-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logical resources start with allocation-state:UNUSABLE / isolation-state:ISOLATED. During hotplug, guests will transition them to allocation-state:USABLE, and then to isolation-state:UNISOLATED. For cases where we cannot transition to allocation-state:USABLE, in this case due to no device/resource being association with the logical DRC, we should return an error -3. For physical DRCs, we default to allocation-state:USABLE and stay there, so in this case we should report an error -3 when the guest attempts to make the isolation-state:ISOLATED transition for a DRC with no device associated. These are as documented in PAPR 2.7, 13.5.3.4. We also ensure allocation-state:USABLE when the guest attempts transition to isolation-state:UNISOLATED to deal with misbehaving guests attempting to bring online an unallocated logical resource. This is as documented in PAPR 2.7, 13.7. Currently we implement no such error logic. Fix this by handling these error cases as PAPR defines. Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr_pci: fix device tree props for MSI/MSI-XMichael Roth2015-09-231-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PAPR requires ibm,req#msi and ibm,req#msi-x to be present in the device node to define the number of msi/msi-x interrupts the device supports, respectively. Currently we have ibm,req#msi-x hardcoded to a non-sensical constant that happens to be 2, and are missing ibm,req#msi entirely. The result of that is that msi-x capable devices get limited to 2 msi-x interrupts (which can impact performance), and msi-only devices likely wouldn't work at all. Additionally, if devices expect a minimum that exceeds 2, the guest driver may fail to load entirely. SLOF still owns the generation of these properties at boot-time (although other device properties have since been offloaded to QEMU), but for hotplugged devices we rely on the values generated by QEMU and thus hit the limitations above. Fix this by generating these properties in QEMU as expected by guests. In the future it may make sense to modify SLOF to pass through these values directly as we do with other props since we're duplicating SLOF code. Cc: qemu-ppc@nongnu.org Cc: qemu-stable@nongnu.org Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Enable in-kernel H_SET_MODE handlingAlexey Kardashevskiy2015-09-233-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For setting debug watchpoints, sPAPR guests use H_SET_MODE hypercall. The existing QEMU H_SET_MODE handler does not support this but the KVM handler in HV KVM does. However it is not enabled. This enables the in-kernel H_SET_MODE handler which handles: - Completed Instruction Address Breakpoint Register - Watch point 0 registers. The rest is still handled in QEMU. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * pseries: Fix incorrect calculation of threads per socket for chip-idDavid Gibson2015-09-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device tree presented to pseries machine type guests includes an ibm,chip-id property which gives essentially the socket number of each vcpu core (individual vcpu threads don't get a node in the device tree). To calculate this, it uses a vcpus_per_socket variable computed as (smp_cpus / #sockets). This is correct for the usual case where smp_cpus == smp_threads * smp_cores * #sockets. However, you can start QEMU with the number of cores and threads mismatching the total number of vcpus (whether that _should_ be permitted is a topic for another day). It's a bit hard to say what the "real" number of vcpus per socket here is, but for most purposes (smp_threads * smp_cores) will more meaningfully match how QEMU behaves with respect to socket boundaries. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
| * pseries: Update SLOF firmware image to qemu-slof-20150813Alexey Kardashevskiy2015-09-233-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are: 1. GPT support; 2. Much faster VGA support. The full changelog is: > Add missing half word access case to _FASTRMOVE and _FASTMOVE > Remove unused RMOVE64 stub > fbuffer: Implement RFILL as an accelerated primitive > fbuffer: Implement MRMOVE as an accelerated primitive > fbuffer: Precalculate line length in bytes > terminal: Disable the terminal-write trace by default > boot: remove trailing ":" in the bootpath > ci: implement boot client interface > boot: bootpath should be complete device path > fbuffer: Use a smaller cursor > fbuffer: Improve invert-region helper > usb-hid: Caps is not always shift > cas: Increase FDT buffer size to accomodate larger ibm, cas node properties > README: Update with patch submittion note > disk-label: add support for booting from GPT FAT partition > disk-label: introduce helper to check fat filesystem > introduce 8-byte LE helpers > disk-label: simplify gpt-prep-partition? routine > fbuffer: introduce the invert-region-x helper > fbuffer: introduce the invert-region helper > fbuffer: simplify address computations in fb8-toggle-cursor Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * pseries: define coldplugged devices as "configured"Laurent Vivier2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device is hotplugged, attach() sets "configured" to false, waiting an action from the OS to configure it and then to call ibm,configure-connector. On ibm,configure-connector, the hypervisor sets "configured" to true. In case of coldplugged device, attach() sets "configured" to false, but firmware and OS never call the ibm,configure-connector in this case, so it remains set to false. It could be harmless, but when we unplug a device, hypervisor waits the device becomes configured because for it, a not configured device is a device being configured, so it waits the end of configuration to unplug it... and it never happens, so it is never unplugged. This patch set by default coldplugged device to "configured=true", hotplugged device to "configured=false". Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * sPAPR: Introduce rtas_ldq()Gavin Shan2015-09-232-10/+15
| | | | | | | | | | | | | | | | | | | | | | This introduces rtas_ldq() to load 64-bits parameter from continuous two 4-bytes memory chunk of RTAS parameter buffer, to simplify the code. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr_rtas: Prevent QEMU crash during hotplug without a prior device_addBharata B Rao2015-09-232-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If drmgr is used in the guest to hotplug a device before a device_add has been issued via the QEMU monitor, QEMU segfaults in configure_connector call. This occurs due to accessing of NULL FDT which otherwise would have been created and associated with the DRC during device_add command. Check for NULL FDT and return failure from configure_connector call. As per PAPR+, an error value of -9003 seems appropriate for this failure. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * ppc/spapr: Use qemu_log_mask() for hcall_dprintf()Thomas Huth2015-09-232-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To see the output of the hcall_dprintf statements, you currently have to enable the DEBUG_SPAPR_HCALLS macro in include/hw/ppc/spapr.h. This is ugly because a) not every user who wants to debug guest problems can or wants to recompile QEMU to be able to see such issues, and b) since this macro is disabled by default, the code in the hcall_dprintf() brackets tends to bitrot until somebody temporarily enables that macro again. Since the hcall_dprintf statements except one indicate guest problems, let's always use qemu_log_mask(LOG_GUEST_ERROR, ...) for this macro instead. One spot indicated an unimplemented host feature, so this is changed into qemu_log_mask(LOG_UNIMP, ...) instead. Now it's possible to see all those messages by simply adding the CLI parameter "-d guest_errors,unimp", without the need to re-compile the binary. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr_drc: Fix potential undefined behaviourDavid Gibson2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DRC_INDEX_ID_MASK macro does a left shift on ~0, which is a signed quantity, and therefore undefined behaviour according to the C spec. In particular this causes warnings from the clang sanitizer. This fixes it by calculating the same mask without using ~0 (I think the new method is a more common idiom for generating masks anyway). For good measure I also use 1ULL to force the expression's type to unsigned long long, which should be good for assigning to anything we're going to want to. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
| * spapr: add dumpdtb supportAndrew Jones2015-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dumpdtb (-machine dumpdtb=<file>) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows $QEMU_CMDLINE -machine dumpdtb=dtb dtc -I dtb -O dts dtb Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: SPLPAR CharacteristicsSam Bobroff2015-09-231-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the SPLPAR Characteristics information: Add MaxPlatProcs: set to max_cpus, the maximum CPUs that could be addded to the system. Add DesMem: set to the initial memory of the system. Add DesProcs: set to smp_cpus, the inital number of CPUs in the system. These tokens and values are specified by PAPR. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Make ibm, change-msi respect 3 return valuesSam Bobroff2015-09-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, rtas_ibm_change_msi() always returns four values even if less are specified. Correct this by only returning the fourth parameter if it was requested. This is specified by PAPR. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Add /rtas/ibm,change-msix-capableSam Bobroff2015-09-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | QEMU is MSI-X capable and makes it available via ibm,change-msi, so we should indicate this by adding /rtas/ibm,change-msix-capable to the device tree. This is specificed by PAPR. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Add /ibm,partition-nameSam Bobroff2015-09-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | QEMU has a notion of the guest name, so if it's present we might as well put that into the device tree as /ibm,partition-name. This is specificed by PAPR. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Create pseries-2.5 machineDavid Gibson2015-09-231-1/+18
| | | | | | | | | | | | | | | | | | Add pseries-2.5 machine version. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> [Altered to merge before memory hotplug -- dwg] [Altered to work with b9f072d01 -- dwg] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| * spapr: Provide an error message when migration fails due to htab_shift mismatchBharata B Rao2015-09-231-0/+2
|/ | | | | | | | | | | | | | | | | Include an error message when migration fails due to mismatch in htab_shift values at source and target. This should provide a bit more verbose message in addition to the current migration failure message that reads like: qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab' After this patch, the failure message will look like this: qemu-system-ppc64: htab_shift mismatch: source 29 target 24 qemu-system-ppc64: error while loading state for instance 0x0 of device 'spapr/htab' Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-ipxe-20150903-1' into ↵Peter Maydell2015-09-229-11/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging ipxe: update to 35c53797 to 4e03af8, build tweaks. # gpg: Signature made Thu 03 Sep 2015 13:52:01 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-ipxe-20150903-1: ipxe: update binaries ipxe: use upstream configuration ipxe: don't override GITVERSION ipxe: update from 35c53797 to 4e03af8 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ipxe: update binariesGerd Hoffmann2015-09-036-0/+0
| | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
| * ipxe: use upstream configurationGerd Hoffmann2015-09-032-11/+4
| | | | | | | | | | | | | | Upstream supports named configurations now and ships with settings for qemu. Use them, drop our config header copying. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * ipxe: don't override GITVERSIONGerd Hoffmann2015-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We had build problems due to the git version checking in the ipxe build system in the past. Don't remember the details, but the problem seems to be gone now, so lets remove the workaround. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> [ most likely ipxe commit 6153c09c41034250408f3596555fcaae715da46c: [build] Set GITVERSION only if there is a git repository ] Reviewed-by: Laszlo Ersek <lersek@redhat.com>
| * ipxe: update from 35c53797 to 4e03af8Gerd Hoffmann2015-09-031-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git shortlog ============ Alex Williamson (1): [dhcp] Extract timing parameters out to config/dhcp.h Bernd Wiebelt (1): [tg3] Add support for BCM57766 Christian Hesse (3): [intel] Add PCI device IDs for Intel I218-LM and I218-V [build] Add missing "const" qualifiers [ath9k] Remove confusing logic inversion in an ANI variable Christian Nilsson (1): [bios] Add ANSI blink attribute Daniel Pieczko (1): [prefix] Use correct register for KEEP_IT_REAL physical address conversion Ed Swierk (1): [intel] Update PCI device IDs for Intel 82599 and X540 10G NICs Fabrice Bacchella (2): [efi] Improve NII driver logging [efi] Work around bugs in Emulex NII driver Laszlo Ersek (1): [virtio] Downgrade per-iobuf debug messages to DBGC2 Michael Brown (284): [device] Provide a driver-private data field for root devices [iobuf] Add iob_split() to split an I/O buffer into portions [rndis] Add generic RNDIS device abstraction [hyperv] Add support for Hyper-V hypervisor [hyperv] Add support for VMBus devices [hyperv] Add support for NetVSC paravirtual network devices [rndis] Send RNDIS_INITIALISE_MSG [rndis] Send RNDIS_HALT_MSG [hyperv] Tear down NetVSC RX buffer GPADL after closing VMBus device [rndis] Clear receive filter when closing the device [hyperv] Receive all VMBus messages in a poll [hyperv] Increase TX ring size [hyperv] Assume that VMBus xfer page ranges correspond to RNDIS messages [rndis] Ignore start-of-day RNDIS_INDICATE_STATUS_MSG with status 0x40020006 [hyperv] Tidy up debug output [hyperv] Require support for VMBus version 3.0 or newer [build] Include Hyper-V driver in the all-drivers build [pci] Allow drivers to specify a PCI class [romprefix] Ensure UNDI loader can be included by all ROM types [usb] Add basic support for USB devices [usb] Add basic support for USB hubs [usb] Add support for xHCI host controllers [ncm] Add support for CDC-NCM USB Ethernet devices [usb] Report xHCI host controller events [ncm] Use large multi-packet buffers by default [tftp] Explicitly abort connection whenever parent interface is closed [uri] Allow tftp_uri() to construct a URI with a custom port [pxe] Use tftp_uri() to construct PXE TFTP URIs [pxe] Maintain a queue for received PXE UDP packets [ncm] Reserve headroom in received packets [usb] Try multiple USB device configurations [usb] Handle CDC union functional descriptors [usb] Parse endpoint descriptor bInterval field [usb] Allow usb_stream() to enforce a terminating short packet [ecm] Add support for CDC-ECM USB Ethernet devices [xhci] Delay after (possibly) forcing port link state to RxDetect [build] Move branding information to config/branding.h [build] Use PRODUCT_SHORT_NAME for end-user visible strings [build] Allow product URI to be customised via config/branding.h [build] Allow error message URI to be customised via config/branding.h [build] Allow command help text URI to be customised via config/branding.h [build] Allow setting help text URI to be customised via config/branding.h [build] Allow product tag line to be customised via config/branding.h [rndis] Add rndis_rx_err() [usb] Handle port status changes received after failing to find a driver [efi] Disallow R_X86_64_32 relocations [build] Apply the "-fno-PIE -nopie" workaround only to i386 builds [usb] Provide generic framework for refilling receive endpoints [usb] Use generic refill framework for USB hub interrupt endpoints [ecm] Use generic refill framework for bulk IN and interrupt endpoints [ncm] Use generic refill framework for bulk IN and interrupt endpoints [libc] Remove unused string functions [libc] Rewrite string functions [test] Add self-tests for more string functions [test] Add constant-length memset() self-tests [libc] Reduce size of memset() [usb] Add generic USB network device framework [ecm] Use generic USB network device framework [ncm] Use generic USB network device framework [timer] Rewrite the 8254 Programmable Interval Timer support [xhci] Leak memory if controller fails to disable slot [xhci] Abort commands on timeout [test] Add IPv4 self-tests [legal] Add missing copyright header to net/ipv4.c [ipv4] Rewrite inet_aton() [libc] Rewrite strtoul() [hyperv] Check for required features [prefix] Use .bss16 as temporary stack space for calls to install_block [zbin] Use LZMA compression [zbin] Perform extra normalisation after completing decompression [prefix] Call decompressor in flat real mode when DEBUG=libprefix is enabled [zbin] Allow decompressor to generate debug output via BIOS console [zbin] Fix check for existence of most recent output byte [zbin] Remove now-unused unnrv2b.S decompressor [legal] Update GPLv2 licence text [legal] Include full licence text for all GPL2_OR_LATER files [mucurses] Add missing FILE_LICENCE declarations [legal] Add support for the Unmodified Binary Distribution Licence [legal] Add UBDL relicensing tool [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [libc] Rewrite unrelicensable portions of stddef.h [libc] Rewrite unrelicensable portions of ctype.h [libc] Rewrite setjmp() and longjmp() [libc] Rewrite byte-swapping code [elf] Rewrite ELF header [list] Relicense list.h [iscsi] Rewrite unrelicensable portions of iscsi.c [pci] Remove outdated and mostly-unused pci_ids.h file [pci] Rewrite unrelicensable portions of pci.h [settings] Use list_first_entry() when unregistering child settings [settings] Rewrite unrelicensable portions of settings.c [menu] Abstract out the generic concept of a jump scroller [settings] Use generic jump scrolling abstraction [malloc] Move valgrind headers out of arch/x86 [malloc] Rewrite unrelicensable portions of malloc.c [build] Remove unused IMPORT_SYMBOL() and EXPORT_SYMBOL() macros [build] Remove unused __keepme macro [pxe] Remove obsolete references to pxeparent_dhcp [build] Remove obsolete and unused portions of config.c [build] Use REQUIRE_OBJECT() to drag in per-object configuration [build] Fix the REQUIRE_SYMBOL mechanism [i386] Move real_to_user() to realmode.h [linux] Rewrite headers included in all builds [retry] Rewrite unrelicensable portions of retry.c [retry] Colourise debug output [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [xhci] Enable USB3 ports on Intel PCH8/PCH9 controllers [xhci] Undo PCH-specific quirk fixes when removing device [xen] Set the "feature-rx-notify" flag for netfront devices [http] Abstract out HTTP Digest hash algorithm operations [http] Support MD5-sess Digest authentication [dm96xx] Add driver for Davicom DM96xx USB Ethernet NICs [legal] Relicense Davicom DM96xx drivers [mii] Add generic mii_check_link() function [smsc75xx] Add driver for SMSC/Microchip LAN75xx USB Ethernet NICs [legal] Relicense files under GPL2_OR_LATER_OR_UBDL [tcp] Implement support for TCP Selective Acknowledgements (SACK) [smsc75xx] Move RX FIFO overflow message to DBGLVL_EXTRA [tcpip] Fix dubious calculation of min_port [libc] Add ffs(), ffsl(), and ffsll() [usb] Add the concept of a USB bus maximum transfer size [ncm] Respect maximum transfer size of the bus [usb] Add functions for manual device address assignment [xhci] Forcibly disable SMIs if BIOS fails to release ownership [autoboot] Match against parent devices when matching by bus type and location [usb] Add config/usb.h for USB configuration options [xhci] Do not release ownership back to BIOS when booting an OS [ehci] Add support for EHCI host controllers [netdevice] Add missing bus types to netdev_fetch_bustype() [usb] Fix USB timeouts to match specification [libprefix] Fix building on 64-bit FreeBSD 8.4 [xhci] Ring doorbell as part of endpoint reset [usb] Reset endpoints without waiting for a new transfer to be enqueued [usb] Add clear_tt() hub method to clear transaction translator buffer [usb] Clear transaction translator buffers when applicable [ehci] Support USB1 devices attached via transaction translators [usb] Improve debug messages for failed control transactions [xhci] Support USB1 devices attached via transaction translators [libc] Fix typo in longjmp() [libc] Add x86_64 versions of setjmp() and longjmp() [test] Add setjmp()/longjmp() self-tests [test] Simplify digest algorithm self-tests [crypto] Add SHA-224 algorithm [crypto] Add SHA-512 algorithm [crypto] Add SHA-384 algorithm [crypto] Add SHA-512/256 algorithm [crypto] Add SHA-512/224 algorithm [efi] Ensure drivers are disconnected when ExitBootServices() is called [peerdist] Add support for decoding PeerDist Content Information [xhci] Always reset root hub ports [romprefix] Allow autoboot device filter to be disabled [util] Add ability to dump PCI device ID list [efi] Add EFI entropy source [efi] Add EFI time source [efi] Provide a dummy data block in nii_initialise() [efi] Poll media status only if advertised as supported [efi] Poll for TX completions only when there is an outstanding TX buffer [efi] Use the EFI_RNG_PROTOCOL as an entropy source if available [eepro100] Remove duplicate PCI_ROM() line [prism2] Remove duplicate PCI_ROM() lines [build] Allow building PCI ROMs with device ID lists [build] Fix compiler warning on OpenBSD 5.7 [build] Work around binutils quirk on OpenBSD 5.7 [build] Use a single call to parserom.pl to speed up building [intel] Report any unexpected interrupt causes [intel] Force RX polling on VMware emulated 82545em [realtek] Do not attempt to access EEPROM on RTL8169 chips [rtl818x] Obviate RTL_ROM() hack [build] Construct all-drivers list based on driver class [test] Include IPv6 support when performing settings self-tests [base16] Add buffer size parameter to base16_encode() and base16_decode() [base64] Add buffer size parameter to base64_encode() and base64_decode() [settings] Add "base64" setting type [vram] Add "vram" built-in setting to dump video RAM [usb] Include setup packet within I/O buffer for message transfers [pci] Provide PCI_CLASS() to calculate a scalar PCI class value [usb] Detect missed disconnections [usb] Maintain a list of all USB buses [usb] Maintain single lists of halted endpoints and changed ports [ehci] Poll child companion controllers after disowning port [usb] Add find_usb_bus_by_location() helper function [ehci] Allow UHCI/OHCI controllers to locate the EHCI companion controller [uhci] Add support for UHCI host controllers [usb] Provide usb_endpoint_name() for use by host controller drivers [xhci] Use meaningful device names in debug messages [ehci] Use meaningful device names in debug messages [uhci] Use meaningful device names in debug messages [ipv6] Disambiguate received ICMPv6 errors [usb] Add USB_INTERRUPT_OUT internal type [usb] Add generic USB human interface device (HID) framework [usb] Add basic support for USB keyboards [usb] Do not call usb_hotplug() when registering a new hub [usb] Always clear recorded disconnections after performing hotplug actions [intel] Expose intel_diag() for use by other Intel NIC drivers [intel] Allow for the use of advanced TX descriptors [intel] Add support for mailbox used by virtual functions [intel] Add intelxvf driver for Intel 10 GigE virtual function NICs [int13con] Add basic ability to log to a local disk via INT 13 [intel] Add intelxvf_stats() to dump packet statistics registers [intel] Fix operation when physical function has jumbo frames enabled [neighbour] Return success when deferring a packet [xhci] Fix length of allocated slot array [build] Fix .ids.o creation for drivers not in the all-drivers build [xhci] Fix comparison of signed and unsigned integers [ipoib] Fix REMAC cache discarder [xhci] Record device-specific quirks in xHCI device structure [xhci] Ignore invalid protocol speed ID values on Intel Skylake platforms [pci] Use flat real mode to call INT 1a,b101 [tcp] Do not shrink window when discarding received packets [mromprefix] Report a dummy size at offset 0x02 of .mrom payload [ethernet] Add minimal support for receiving LLC frames [netdevice] Add a generic concept of a "blocked link" [stp] Add support for detecting Spanning Tree Protocol non-forwarding ports [stp] Fix interpretaton of hello time [dhcp] Defer discovery if link is blocked [pxe] Always reconstruct packet for PXENV_GET_CACHED_INFO [serial] Add general abstraction of a 16550-compatible UART [gdb] Use new UART abstraction in GDB serial transport [serial] Use new UART abstraction in serial console driver [ipoib] Mark REMAC cache as expensive [ipoib] Attempt to generate ARPs as needed to repopulate REMAC cache [gdb] Allow gdbstub to be started on an arbitrary serial port [xen] Wait for and clear XenStore event before receiving data [tcp] Gracefully close connections during shutdown [ipoib] Transmit multicast packets as broadcasts [efi] Fix receive and transmit completion reporting [efi] Allow user experience to be downgraded [build] Add named configuration for qemu [tcp] Ensure FIN is actually sent if connection is closed while idle [fault] Generalise NETDEV_DISCARD_RATE fault injection mechanism [fault] Add inject_corruption() to randomly corrupt data [profile] Add profile_custom() for profiling with arbitrary time units [interface] Add intf_poke() helper [xfer] Use intf_poke() to implement xfer_window_changed() [xfer] Add xfer_check_order() utility function [xferbuf] Generalise to handle umalloc()-based buffers [xferbuf] Add xfer_buffer() to provide direct access to underlying buffer [downloader] Use generic data-transfer buffer mechanism [downloader] Provide direct access to the underlying data transfer buffer [build] Fix compiler warnings on some gcc versions [crypto] Add bit-rotation functions for 8-bit and 16-bit values [802.11] Use correct SHA1_DIGEST_SIZE constant name [crypto] Add ECB block cipher mode (for debug and self-tests only) [test] Generalise cipher tests and use okx() [test] Define shortcuts for frequently-used NIST AES test vectors [test] Add NIST self-tests for AES128 and AES256 in ECB mode [crypto] Replace AES implementation [test] Add NIST self-tests for AES192 in ECB and CBC modes [crypto] Remove AXTLS headers [build] Fix strict-aliasing warning on older gcc versions [ipv6] Treat a missing network device name as "netX" [netdevice] Avoid using zero as a network device index [ipv4] Redefine IP address constants to avoid unnecessary byte swapping [ipv4] Allow IPv4 socket addresses to include a scope ID [iscsi] Add missing "break" statements [netdevice] Allow network devices to disclaim IRQ support at runtime [peerdist] Include trimmed range within content information block [peerdist] Add support for constructing and decoding discovery messages [peerdist] Add support for constructing and decoding retrieval messages [pool] Add a generic concept of a pooled connection [linebuf] Support buffering of multiple lines [elf] Reject ELFBoot images requiring virtual addressing [comboot] Avoid dragging in serial console support unconditionally [serial] Check for UART existence in uart_select() [tls] Do not access beyond the end of a 24-bit integer [tls] Report supported signature algorithms in ClientHello [crypto] Support SHA-{224,384,512} in X.509 certificates [efi] Hold off watchdog timer while running [efi] Add missing "ULL" suffix on 64-bit constant [block] Add generic block device translator [http] Rewrite HTTP core to support content encodings [peerdist] Add segment discovery mechanism [peerdist] Add individual block download mechanism [peerdist] Add block download multiplexer [peerdist] Add support for PeerDist (aka BranchCache) HTTP content encoding [dhcp] Allow pseudo-DHCP servers to use pseudo-identifiers [dhcp] Ignore ProxyDHCPACKs without PXE options [pxe] Warn about PXE NBPs that may be EFI executables [test] Allow self-tests to report exit status when running under Linux [image] Detect image type when image is first registered [autoboot] Display image information as part of the default control flow Olaf Hering (1): [build] Sort objects in blib.a Robin Smidsrød (2): [vbox] Enable some more features now that we have LZMA compression [build] Rewrite parserom.pl to support multiple source files Thomas Miletich (1): [intel] Add PCI ID for I218-LM Tufan Karadere (1): [crypto] Add ASN.1 OIDs for sha{224,384,512}WithRsaEncryption Wissam Shoukair (2): [comboot] Implement INT22,0x000c [ipoib] Fix a race when chain-loading undionly.kpxe in IPoIB Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-09-22' ↵Peter Maydell2015-09-225-8/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Monitor patches # gpg: Signature made Tue 22 Sep 2015 10:33:34 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2015-09-22: hmp: Restore "info pci" monitor: allow device_del to accept QOM paths Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hmp: Restore "info pci"Paolo Bonzini2015-09-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dropped by commit da76ee76f78b9705e2a91e3c964aef28fecededb's transition to hmp-commands-info.hx. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1442589509-10806-1-git-send-email-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | monitor: allow device_del to accept QOM pathsDaniel P. Berrange2015-09-224-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently device_del requires that the client provide the device short ID. device_add allows devices to be created without giving an ID, at which point there is no way to delete them with device_del. The QOM object path, however, provides an alternative way to identify the devices. Allowing device_del to accept an object path ensures all devices are deletable regardless of whether they have an ID. (qemu) device_add usb-mouse (qemu) qom-list /machine/peripheral-anon device[0] (child<usb-mouse>) type (string) (qemu) device_del /machine/peripheral-anon/device[0] Devices are required to be marked as hotpluggable otherwise an error is raised (qemu) device_del /machine/unattached/device[4] Device 'PIIX3' does not support hotplugging Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1441974836-17476-1-git-send-email-berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message touched up, accidental white-space change dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* | | Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150921-1' into ↵Peter Maydell2015-09-221-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging spice: surface switch fast path requires same format too. # gpg: Signature made Mon 21 Sep 2015 10:05:54 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20150921-1: spice: surface switch fast path requires same format too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | spice: surface switch fast path requires same format too.Gerd Hoffmann2015-09-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit "555e72f spice: rework mirror allocation, add no-resize fast path" adds a fast path for surface switches which does't go through the full primary surface destroy and re-recreation in case the new surface is identical to the old one (page-flip). It checks the size only though, but the format must be identical too. This patch adds the format check. Commit "0002a51 ui/spice: Support shared surface for most pixman formats" increases the chance to actually trigger this. https://bugzilla.redhat.com/show_bug.cgi?id=1247479 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-09-21' into ↵Peter Maydell2015-09-2160-1180/+2609
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging qapi: QMP introspection # gpg: Signature made Mon 21 Sep 2015 08:59:17 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-qapi-2015-09-21: (26 commits) qapi-introspect: Hide type names qapi: New QMP command query-qmp-schema for QMP introspection qapi: Pseudo-type '**' is now unused, drop it qapi-schema: Fix up misleading specification of netdev_add qom: Don't use 'gen': false for qom-get, qom-set, object-add qapi: Introduce a first class 'any' type qapi: Make output visitor return qnull() instead of NULL qapi: Improve built-in type documentation qapi-commands: De-duplicate output marshaling functions qapi: De-duplicate parameter list generation qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO() qapi-commands: Rearrange code qapi-visit: Rearrange code a bit qapi: Clean up after recent conversions to QAPISchemaVisitor qapi: Replace dirty is_c_ptr() by method c_null() qapi-event: Convert to QAPISchemaVisitor, fixing data with base qapi-event: Eliminate global variable event_enum_value qapi: De-duplicate enum code generation qapi-commands: Convert to QAPISchemaVisitor qapi-visit: Convert to QAPISchemaVisitor, fixing bugs ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | qapi-introspect: Hide type namesMarkus Armbruster2015-09-213-33/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To eliminate the temptation for clients to look up types by name (which are not ABI), replace all type names by meaningless strings. Reduces output of query-schema by 13 out of 85KiB. As a debugging aid, provide option -u to suppress the hiding. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1442401589-24189-27-git-send-email-armbru@redhat.com>
| * | | qapi: New QMP command query-qmp-schema for QMP introspectionMarkus Armbruster2015-09-2127-11/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qapi/introspect.json defines the introspection schema. It's designed for QMP introspection, but should do for similar uses, such as QGA. The introspection schema does not reflect all the rules and restrictions that apply to QAPI schemata. A valid QAPI schema has an introspection value conforming to the introspection schema, but the converse is not true. Introspection lowers away a number of schema details, and makes implicit things explicit: * The built-in types are declared with their JSON type. All integer types are mapped to 'int', because how many bits we use internally is an implementation detail. It could be pressed into external interface service as very approximate range information, but that's a bad idea. If we need range information, we better do it properly. * Implicit type definitions are made explicit, and given auto-generated names: - Array types, named by appending "List" to the name of their element type, like in generated C. - The enumeration types implicitly defined by simple union types, named by appending "Kind" to the name of their simple union type, like in generated C. - Types that don't occur in generated C. Their names start with ':' so they don't clash with the user's names. * All type references are by name. * The struct and union types are generalized into an object type. * Base types are flattened. * Commands take a single argument and return a single result. Dictionary argument or list result is an implicit type definition. The empty object type is used when a command takes no arguments or produces no results. The argument is always of object type, but the introspection schema doesn't reflect that. The 'gen': false directive is omitted as implementation detail. The 'success-response' directive is omitted as well for now, even though it's not an implementation detail, because it's not used by QMP. * Events carry a single data value. Implicit type definition and empty object type use, just like for commands. The value is of object type, but the introspection schema doesn't reflect that. * Types not used by commands or events are omitted. Indirect use counts as use. * Optional members have a default, which can only be null right now Instead of a mandatory "optional" flag, we have an optional default. No default means mandatory, default null means optional without default value. Non-null is available for optional with default (possible future extension). * Clients should *not* look up types by name, because type names are not ABI. Look up the command or event you're interested in, then follow the references. TODO Should we hide the type names to eliminate the temptation? New generator scripts/qapi-introspect.py computes an introspection value for its input, and generates a C variable holding it. It can generate awfully long lines. Marked TODO. A new test-qmp-input-visitor test case feeds its result for both tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a QmpInputVisitor to verify it actually conforms to the schema. New QMP command query-qmp-schema takes its return value from that variable. Its reply is some 85KiBytes for me right now. If this turns out to be too much, we have a couple of options: * We can use shorter names in the JSON. Not the QMP style. * Optionally return the sub-schema for commands and events given as arguments. Right now qmp_query_schema() sends the string literal computed by qmp-introspect.py. To compute sub-schema at run time, we'd have to duplicate parts of qapi-introspect.py in C. Unattractive. * Let clients cache the output of query-qmp-schema. It changes only on QEMU upgrades, i.e. rarely. Provide a command query-qmp-schema-hash. Clients can have a cache indexed by hash, and re-query the schema only when they don't have it cached. Even simpler: put the hash in the QMP greeting. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * | | qapi: Pseudo-type '**' is now unused, drop itMarkus Armbruster2015-09-2111-40/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'gen': false needs to stay for now, because netdev_add is still using it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-25-git-send-email-armbru@redhat.com>
| * | | qapi-schema: Fix up misleading specification of netdev_addMarkus Armbruster2015-09-213-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't take a 'props' argument, let alone one in the format "NAME=VALUE,..." The bogus arguments specification doesn't matter due to 'gen': false. Clean it up to be incomplete rather than wrong, and document the incompleteness. While there, improve netdev_add usage example in the manual: add a device option to show how it's done. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-24-git-send-email-armbru@redhat.com>
| * | | qom: Don't use 'gen': false for qom-get, qom-set, object-addMarkus Armbruster2015-09-215-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous commit, the generated marshalers just work, and save us a bit of handwritten code. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-23-git-send-email-armbru@redhat.com>
| * | | qapi: Introduce a first class 'any' typeMarkus Armbruster2015-09-2125-10/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's first class, because unlike '**', it actually works, i.e. doesn't require 'gen': false. '**' will go away next. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
| * | | qapi: Make output visitor return qnull() instead of NULLMarkus Armbruster2015-09-212-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 1d10b44, it crashed. Since then, it returns NULL, with a FIXME comment. The FIXME is valid: code that assumes QObject * can't be null exists. I'm not aware of a way to feed this problematic return value to code that actually chokes on null in the current code, but the next few commits will create one, failing "make check". Commit 481b002 solved a very similar problem by introducing a special null QObject. Using this special null QObject is clearly the right way to resolve this FIXME, so do that, and update the test accordingly. However, the patch isn't quite right: it messes up the reference counting. After about SIZE_MAX visits, the reference counter overflows, failing the assertion in qnull_destroy_obj(). Because that's many orders of magnitude more visits of nulls than we expect, we take this patch despite its flaws, to get the QMP introspection stuff in without further delay. We'll want to fix it for real before the release. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-21-git-send-email-armbru@redhat.com>
| * | | qapi: Improve built-in type documentationMarkus Armbruster2015-09-211-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify how they map to JSON. Add how they map to C. Fix the reference to StringInputVisitor. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-20-git-send-email-armbru@redhat.com>
| * | | qapi-commands: De-duplicate output marshaling functionsMarkus Armbruster2015-09-212-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gen_marshal_output() uses its parameter name only for name of the generated function. Name it after the type being marshaled instead of its caller, and drop duplicates. Saves 7 copies of qmp_marshal_output_int() in qemu-ga, and one copy of qmp_marshal_output_str() in qemu-system-*. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-19-git-send-email-armbru@redhat.com>
| * | | qapi: De-duplicate parameter list generationMarkus Armbruster2015-09-213-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated qapi-event.[ch] lose line breaks. No change otherwise. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-18-git-send-email-armbru@redhat.com>
| * | | qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()Markus Armbruster2015-09-216-133/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions marshal both input and output. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-17-git-send-email-armbru@redhat.com>
| * | | qapi-commands: Rearrange codeMarkus Armbruster2015-09-211-48/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename gen_marshal_input() to gen_marshal(), because the generated function marshals both arguments and results. Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and move the other variable declarations there, too. Rename gen_visitor_input_block() to gen_marshal_input_visit(), and rearrange its code slightly. Rename gen_marshal_input_decl() to gen_marshal_proto(), because the result isn't a full declaration, unlike gen_command_decl()'s. New gen_marshal_decl() actually returns a full declaration. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-16-git-send-email-armbru@redhat.com>
| * | | qapi-visit: Rearrange code a bitMarkus Armbruster2015-09-211-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move gen_visit_decl() to a better place. Inline generate_visit_struct_body(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-15-git-send-email-armbru@redhat.com>
OpenPOWER on IntegriCloud