summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* virtio-serial: switch to standard-headersMichael S. Tsirkin2015-02-261-0/+1
| | | | | | Drop duplicate code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio-scsi: use standard-headersMichael S. Tsirkin2015-02-261-0/+1
| | | | | | | Drop duplicated code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-blk: switch to standard-headersMichael S. Tsirkin2015-02-261-4/+4
| | | | | | | | Drop duplicated code. Minor codechanges were required as geometry is a sub-structure now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* virtio-9p: use standard headersMichael S. Tsirkin2015-02-261-16/+1
| | | | | | | | Drop code duplicated from standard headers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* virtio: use standard-headersMichael S. Tsirkin2015-02-262-18/+6
| | | | | | | | | Drop a bunch of code duplicated from virtio_config.h and virtio_ring.h. This makes us rename event index accessors which conflict, as reusing the ones from virtio_ring.h isn't trivial. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* virtio: use standard virtio_ring.hMichael S. Tsirkin2015-02-261-1/+1
| | | | | | Switch to virtio_ring.h from standard headers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi-build: simplify rsdp management for legacyMichael S. Tsirkin2015-02-261-4/+6
| | | | | | | | | | | | | | | | | | | For legacy machine types, rsdp is not in RAM, so we need a copy of rsdp for fw cfg. We previously used g_array_free with false parameter, but this seems to confuse people. This also wastes a bit of memory as the buffer is unused for new machine types. Let's just use plain g_memdup, and free original memory together with the array. TODO: rationalize tcpalog memory management, and get rid of the mfre parameter. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* acpi: has_immutable_rsdp->!rsdp_in_ramMichael S. Tsirkin2015-02-263-7/+7
| | | | | | | | | | As comment in acpi-build.c notes, RSDP is not really immutable. So it's really a question of whether it's in RAM, name the variable accordingly. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* acpi-build: fix ACPI RAM managementMichael S. Tsirkin2015-02-261-20/+23
| | | | | | | | | | | | | | | | | | | | | | This fixes multiple issues around ACPI RAM management: RSDP and linker RAM aren't currently marked dirty on update, so they won't be migrated correctly. Let's handle all tables in the same way: set correct size (assert if too big), update, mark RAM dirty. This also drops assert checking that table size didn't change: table size is fundamentally dynamic and depends on hw configuration, just set the correct size and use that (memory core asserts if size is too large). This also means we can drop tracking table size, memory core does this for us now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pc: acpi-build: migrate RSDP tableIgor Mammedov2015-02-263-9/+21
| | | | | | | | | | | | | | | | | | Makes sure that RSDP stays the same /i.e. matches ACPI tables blob in source/ if guest is migrated during RSDP reading or has been already shadowed by firmware. Fix applies only to new machine types starting from 2.3, so it won't break migration for old machine types. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
* pc: acpi-build: update linker on guest accessIgor Mammedov2015-02-261-1/+7
| | | | | | | | | | | | | | | | | Linker table is build only once, so if later during tables rebuild sizes of other ACPI tables change pointers will be patched incorrectly due to wrong offsets in linker. Resulting in guest not being able to find ACPI tables. Fix it by updating 'linker' table with the rest of tables when firmware reads it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
* acpi: update RSDP on guest accessMichael S. Tsirkin2015-02-261-6/+9
| | | | | | | | | | | | | | | | | | | RSDT offset can change across reboots and that makes immutable RSDP, which is build at startup, point to incorrect place in ACPI table blob. That results in BIOS corrupting tables and guest OS failing to find ACPI tables. We really should have put it in a ROM region, but we can't change that for old machine types, let's just set the callback and update it explicitly. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
* pc: memory: Validate alignment of maxram_size to page sizePeter Krempa2015-02-261-0/+7
| | | | | | | | | | | | | | | | | | | | If the maxram_size is not aligned and dimm devices were added on the command line qemu would terminate with a rather unhelpful message: ERROR:hw/mem/pc-dimm.c:150:pc_dimm_get_free_addr: assertion failed: (QEMU_ALIGN_UP(address_space_size, align) == address_space_size) In case no dimm device was originally added on the commandline qemu exits on the assertion failure. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* acpi, piix4: Add unplug cb for piix4.Tang Chen2015-02-261-0/+8
| | | | | | | | | | | | | | | | | | Memory and CPU hot unplug are both asynchronous procedures. When the unplug operation happens, unplug request cb is called first. And when guest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb to piix4, which memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi, ich9: Add unplug cb for ich9.Tang Chen2015-02-262-0/+16
| | | | | | | | | | | | | | | | | | Memory and CPU hot unplug are both asynchronous procedures. When the unplug operation happens, unplug request cb is called first. And when guest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb to ich9, which memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi, pc: Add unplug cb for pc machine.Tang Chen2015-02-261-0/+8
| | | | | | | | | | | | | | | | | | Memory and CPU hot unplug are both asynchronous procedures. When the unplug operation happens, unplug request cb is called first. And when guest OS finished handling unplug, unplug cb will be called to do the real removal of device. This patch adds hotunplug cb to pc machine, which memory and CPU hot unplug will use it. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi, ich9: Add hotunplug request cb for ich9.Tang Chen2015-02-262-2/+10
| | | | | | | | | | | | | | | | Memory and CPU hot unplug are both asynchronous procedures. They both need unplug request cb when the unplug operation happens. This patch adds hotunplug request cb for ich9, and memory and CPU hot unplug will share it. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi, pc: Add hotunplug request cb for pc machine.Tang Chen2015-02-261-0/+8
| | | | | | | | | | | | | | | | Memory and CPU hot unplug are both asynchronous procedures. They both need unplug request callback to initiate unplug operation. Add unplug handler to pc machine that will be used by following CPU and memory unplug patches. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* qdev: Don't exit when running into bad -globalMarkus Armbruster2015-02-262-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -global lets you set a nice booby-trap for yourself: $ qemu-system-x86_64 -nodefaults -S -display none -usb -monitor stdio -global usb-mouse.usb_version=l QEMU 2.1.94 monitor - type 'help' for more information (qemu) device_add usb-mouse Parameter 'usb_version' expects an int64 value or range $ echo $? 1 Not nice. Until commit 3196270 we even abort()ed. The same error triggers if you manage to screw up a machine type's compat_props. To demonstrate, change HW_COMPAT_2_1's entry to .driver = "usb-mouse",\ .property = "usb_version",\ .value = "1", \ Then run $ qemu-system-x86_64 -usb -M pc-i440fx-2.1 -device usb-mouse upstream-qemu: -device usb-mouse: Parameter 'usb_version' expects an int64 value or range $ echo $? 1 One of our creatively cruel error messages. Since this is actually a coding error, we *should* abort() here. Replace the error by an assertion failure in this case. But turn the fatal error into a mere warning when the faulty GlobalProperty comes from the user. Looks like this: $ qemu-system-x86_64 -nodefaults -S -display none -usb -monitor stdio -global usb-mouse.usb_version=l QEMU 2.1.94 monitor - type 'help' for more information (qemu) device_add usb-mouse Warning: global usb-mouse.usb_version=l ignored (Parameter 'usb_version' expects an int64 value or range) (qemu) This is consistent with how we handle similarly unusable -global in qdev_prop_check_globals(). You could argue that the error should make device_add fail. Would be harder, because we're running within TypeInfo's instance_post_init() method device_post_init(), which can't fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
* pci-assign: Convert to realizeMarkus Armbruster2015-02-261-6/+4
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* qxl: Convert to realizeMarkus Armbruster2015-02-261-19/+17
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* cirrus-vga: Convert to realizeMarkus Armbruster2015-02-261-6/+5
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* ide/ich: Convert to realizeMarkus Armbruster2015-02-261-7/+6
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* serial-pci: Convert to realizeMarkus Armbruster2015-02-261-13/+9
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* pcnet: Convert to realizeMarkus Armbruster2015-02-261-3/+2
| | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* pcnet: pcnet_common_init() always returns 0, change to voidMarkus Armbruster2015-02-264-6/+6
| | | | | | | | | | | | The next commit will exploit the fact it never fails. This one makes it obvious. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* pci: Trivial device model conversions to realizeMarkus Armbruster2015-02-2634-152/+87
| | | | | | | | | | | Convert the device models where initialization obviously can't fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* pci: Permit incremental conversion of device models to realizeMarkus Armbruster2015-02-261-5/+19
| | | | | | | | | | | | | | | Call the new PCIDeviceClass method realize(). Default it to pci_default_realize(), which calls old method init(). To convert a device model, make it implement realize() rather than init(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* pci: Convert core to realizeMarkus Armbruster2015-02-261-44/+49
| | | | | | | | | | | | | | | | | | Implement DeviceClass methods realize() and unrealize() instead of init() and exit(). The core's initialization errors now get propagated properly, and QMP sends them instead of an unspecific "Device initialization failed" error. Unrealize can't fail, so no change there. PCIDeviceClass is unchanged: it still provides init() and exit(). Therefore, device models' errors are still not propagated. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
* acpi: drop min-bytes in build_package()Igor Mammedov2015-02-262-17/+10
| | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi: add build_append_namestring() helperIgor Mammedov2015-02-262-29/+104
| | | | | | | | | | | | | | Use build_append_namestring() instead of build_append_nameseg() So user won't have to care whether name is NameSeg, NamePath or NameString. See for reference ACPI 5.0: 20.2.2 Name Objects Encoding Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi: move generic aml building helpers into dedictated fileIgor Mammedov2015-02-263-160/+190
| | | | | | | | | | | | | the will be later used for composing AML primitives and all that could be reused later for ARM machines as well. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* bios linker: validate pointer within tableMichael S. Tsirkin2015-02-261-1/+3
| | | | | | | | | buios linker assumes pointer parameter it gets is within table, validate this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* acpi-build: fix memory leak with bridge hp offMichael S. Tsirkin2015-02-261-0/+3
| | | | | | | | | | | When bridge hotplug is disabled for old machine types, we never free memory allocated for temporary tables. Fix this up. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20150218' into ↵Peter Maydell2015-02-267-89/+279
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Features for s390x/kvm 1. guest reIPL changes (Fan Zhang) Implements subcode 5 and 6 of diag 0x308. This allows to use /sys/firmware/[re]ipl/ccw/* and the chreipl and lsreipl tools in Linux. In addition to the normal "change the disk" this also allows to switch from booting an external kernel into rebooting from a disk. 2. Memory page table walking (Thomas Huth) Fix several page table walking functions, used in several places like gdb server and instruction handling. Also use these functions in several I/O related functions. # gpg: Signature made Wed Feb 18 09:13:22 2015 GMT using RSA key ID B5A61C7C # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>" * remotes/borntraeger/tags/s390x-20150218: (29 commits) s390x/helper: Remove s390_cpu_physical_memory_map s390x/pci: Rework memory access in zpci instruction s390x/ioinst: Rework memory access in TPI instruction s390x/ioinst: Rework memory access in CHSC instruction s390x/ioinst: Rework memory access in STCRW instruction s390x/ioinst: Rework memory access in TSCH instruction s390x/ioinst: Set condition code in ioinst_handle_tsch() handler s390x/ioinst: Rework memory access in STSCH instruction s390x/ioinst: Rework memory access in SSCH instruction s390x/ioinst: Rework memory access in MSCH instruction s390x/css: Make schib parameter of css_do_msch const s390x/mmu: Add function for accessing guest memory s390x/kvm: Add function for injecting pgm access exceptions s390x/mmu: Clean up mmu_translate_asc() s390x/mmu: Check bit 52 in page table entry s390x/mmu: Renaming related to the ASCE confusion s390x/mmu: Add support for read-only regions s390x/mmu: Fix the exception codes for illegal table entries s390x/mmu: Fix exception types when checking the ASCEs s390x/mmu: Fix translation exception code in lowcore ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * s390x/pci: Rework memory access in zpci instructionFrank Blaschka2015-02-181-9/+28
| | | | | | | | | | | | | | | | | | Change zpci instructions to use the new logical memory access functions. Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ioinst: Rework memory access in STCRW instructionThomas Huth2015-02-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the handler for STCRW to use the new logical memory access functions. Since STCRW is suppressed on protection/access exceptions, we also have to make sure to re-queue the CRW in case it could not be written to the memory. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ioinst: Rework memory access in TSCH instructionThomas Huth2015-02-181-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | Change the TSCH handler to use the new logical memory access functions. Since the channel should not be updated in case of a protection or access exception while writing to the guest memory, the css_do_tsch() has to be split up into two parts, one for retrieving the IRB and one for the update. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/css: Make schib parameter of css_do_msch constThomas Huth2015-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | The schib parameter of css_do_msch() can be declared as const to make it clear that it does not get modified by this function. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ipl: make s390x ipl device aware of migrationFan Zhang2015-02-131-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | We have to migrate the reipl parameters, so a reboot on the migrated machine will behave just like on the origin. Otherwise, the reipl parameters configured by the guest would be lost. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ipl: drop reipl parameters on resetsFan Zhang2015-02-132-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a reboot initiated by the guest is done, the reipl parameters should remain valid. The disk configured by the guest is to be used for ipl'ing. External reboot/reset request (e.g. via virsh reset guest) should completely reset the guest to the initial state, and therefore also reset the reipl parameters, resulting in an ipl behaviour of the initially configured guest. This could be an external kernel or a disk. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ipl: support diagnose 308 subcodes 5 and 6Fan Zhang2015-02-133-15/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support dynamically updating the IPL device from inside the KVM guest on the s390 platform, DIAG 308 instruction is intercepted in QEMU to handle the request. Subcode 5 allows to specify a new boot device, which is saved for later in the s390_ipl device. This also allows to switch from an external kernel to a boot device. Subcode 6 retrieves boot device configuration that has been previously set. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * s390x/ipl: always load the bios for ccw machineFan Zhang2015-02-134-50/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | We will need bios support in order to be able to support selecting a different boot device via diagnose 308 in the ccw machine, so let's make the bios mandatory for the ccw machine. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* | Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2015-02-18' ↵Peter Maydell2015-02-2619-55/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Clean up around error_get_pretty(), qerror_report_err() # gpg: Signature made Wed Feb 18 10:10:07 2015 GMT 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-error-2015-02-18: qemu-char: Avoid qerror_report_err() outside QMP command handlers qemu-img: Avoid qerror_report_err() outside QMP command handlers vl: Avoid qerror_report_err() outside QMP command handlers tpm: Avoid qerror_report_err() outside QMP command handlers numa: Avoid qerror_report_err() outside QMP command handlers net: Avoid qerror_report_err() outside QMP command handlers monitor: Avoid qerror_report_err() outside QMP command handlers monitor: Clean up around monitor_handle_fd_param() error: Use error_report_err() where appropriate error: New convenience function error_report_err() vhost-scsi: Improve error reporting for invalid vhostfd Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | monitor: Clean up around monitor_handle_fd_param()Markus Armbruster2015-02-182-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | monitor_handle_fd_param() is a wrapper around monitor_handle_fd_param2() that feeds errors to qerror_report_err() instead of returning them. qerror_report_err() is inappropriate in many contexts. monitor_handle_fd_param() looks simpler than monitor_handle_fd_param2(), which tempts use. Remove the temptation: drop the wrapper and open-code the (trivial) error handling instead. Replace the open-coded qerror_report_err() by error_report_err() in places that already use error_report(). Turns out that's everywhere. While there, rename monitor_handle_fd_param2() to monitor_fd_param(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * | error: Use error_report_err() where appropriateMarkus Armbruster2015-02-1818-50/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coccinelle semantic patch: @@ expression E; @@ - error_report("%s", error_get_pretty(E)); - error_free(E); + error_report_err(E); @@ expression E, S; @@ - error_report("%s", error_get_pretty(E)); + error_report_err(E); ( exit(S); | abort(); ) Trivial manual touch-ups in block/sheepdog.c. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * | vhost-scsi: Improve error reporting for invalid vhostfdMarkus Armbruster2015-02-181-2/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get two error messages: one from monitor_handle_fd_param2(), and another one from vhost_scsi_realize(). The second one gets suppressed in QMP context. That's because monitor_handle_fd_param() calls qerror_report_err(). Calling qerror_report_err() is always inappropriate in realize methods, because it doesn't return the Error object. It either reports the error to stderr or the human monitor, or it stores it in the QMP monitor, where it makes the QMP command fail even when the realize method ignores the error and succeeds. Fortunately, vhost_scsi_realize() doesn't do that. Fix by switching to monitor_handle_fd_param2(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-02-18' ↵Peter Maydell2015-02-2510-14/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging hmp: Normalize HMP command handler names # gpg: Signature made Wed Feb 18 10:59:44 2015 GMT 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-02-18: hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() hmp: Name HMP command handler functions hmp_COMMAND() hmp: Clean up declarations for long-gone info handlers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()Markus Armbruster2015-02-187-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are called do_info_SUBCOMMAND() (old ones, usually), some hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND pointlessly differs in spelling. Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the subcommand name with '-' replaced by '_'. Exceptions: * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(), sun4m_hmp_info_pic(). * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(), lm32_hmp_info_pic(). Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | hmp: Name HMP command handler functions hmp_COMMAND()Markus Armbruster2015-02-183-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(), and sometimes COMMAND pointlessly differs in spelling. Normalize to hmp_COMMAND(), where COMMAND is exactly the command name with '-' replaced by '_'. Exceptions: * do_device_add() and client_migrate_info() *not* renamed to hmp_device_add(), hmp_client_migrate_info(), because they're also QMP handlers. They still need to be converted to QAPI. * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(), do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(), hmp_i(), hmp_o(), because those names are too cryptic for my taste. * do_info_help() renamed to hmp_info_help() instead of hmp_info(), because it only covers help. Signed-off-by: Markus Armbruster <armbru@redhat.com>
OpenPOWER on IntegriCloud