aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
AgeCommit message (Collapse)AuthorFilesLines
2016-01-30pseries: Clean up error reporting in htab migration functionsDavid Gibson1-6/+6
The functions for migrating the hash page table on pseries machine type (htab_save_setup() and htab_load()) can report some errors with an explicit fprintf() before returning an appropriate error code. Change some of these to use error_report() instead. htab_save_setup() is omitted for now to avoid conflicts with some other in-progress work. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error reporting in ppc_spapr_init()David Gibson1-11/+12
This function includes a number of explicit fprintf()s for errors. Change these to use error_report() instead. Also replace the single exit(EXIT_FAILURE) with an explicit exit(1), since the latter is the more usual idiom in qemu by a large margin. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error handling in xics_system_init()David Gibson1-3/+3
Use the error handling infrastructure to pass an error out from try_create_xics() instead of assuming &error_abort - the caller is in a better position to decide on error handling policy. Also change the error handling from an &error_abort to &error_fatal, since this occurs during the initial machine construction and could be triggered by bad configuration rather than a program error. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error handling in spapr_rtas_register()David Gibson1-9/+3
The errors detected in this function necessarily indicate bugs in the rest of the qemu code, rather than an external or configuration problem. So, a simple assert() is more appropriate than any more complex error reporting. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error handling in spapr_vga_init()David Gibson1-5/+5
Use error_setg() to return an error rather than an explicit exit(). Previously it was an exit(0) instead of a non-zero exit code, which was simply a bug. Also improve the error message. While we're at it change the type of spapr_vga_init() to bool since that's how we're using it anyway. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error handling in spapr_validate_node_memory()David Gibson1-15/+22
Use error_setg() and return an error, rather than using an explicit exit(). Also improve messages, and be more explicit about which constraint failed. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30pseries: Clean up error handling of spapr_cpu_init()David Gibson1-4/+11
Currently spapr_cpu_init() is hardcoded to handle any errors as fatal. That works for now, since it's only called from initial setup where an error here means we really can't proceed. However, we'll want to handle this more flexibly for cpu hotplug in future so generalize this using the error reporting infrastructure. While we're at it make a small cleanup in a related part of ppc_spapr_init() to use error_report() instead of an old-style explicit fprintf(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30ppc: Clean up error handling in ppc_set_compat()David Gibson2-8/+6
Current ppc_set_compat() returns -1 for errors, and also (unconditionally) reports an error message. The caller in h_client_architecture_support() may then report it again using an outdated fprintf(). Clean this up by using the modern error reporting mechanisms. Also add strerror(errno) to the error message. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-01-30spapr: Don't create ibm,dynamic-reconfiguration-memory w/o DR LMBsBharata B Rao1-1/+8
If guest doesn't have any dynamically reconfigurable (DR) logical memory blocks (LMB), then we shouldn't create ibm,dynamic-reconfiguration-memory device tree node. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-30spapr: Remove abuse of rtas_ld() in h_client_architecture_supportDavid Gibson1-7/+7
h_client_architecture_support() uses rtas_ld() for general purpose memory access, despite the fact that it's not an RTAS routine at all and rtas_ld makes things more awkward. Clean this up by replacing rtas_ld() calls with appropriate ldXX_phys() calls. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-30spapr: Remove rtas_st_buffer_direct()David Gibson1-7/+10
rtas_st_buffer_direct() is a not particularly useful wrapper around cpu_physical_memory_write(). All the callers are in rtas_ibm_configure_connector, where it's better handled by local helper. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-30spapr: Small fixes to rtas_ibm_get_system_parameter, remove rtas_st_bufferDavid Gibson1-4/+17
rtas_st_buffer() appears in spapr.h as though it were a widely used helper, but in fact it is only used for saving data in a format used by rtas_ibm_get_system_parameter(). This changes it to a local helper more specifically for that function. While we're there fix a couple of small defects in rtas_ibm_get_system_parameter: - For the string value SPLPAR_CHARACTERISTICS, it wasn't including the terminating \0 in the length which it should according to LoPAPR 7.3.16.1 - It now checks that the supplied buffer has at least enough space for the length of the returned data, and returns an error if it does not. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-30macio: use the existing IDEDMA aiocb to hold the active DMA aiocbMark Cave-Ayland1-1/+0
Currently the aiocb is held within MACIOIDEState, however the IDE core code assumes that the current actvie DMA aiocb is held in aiocb in a few places, e.g. ide_bus_reset() and ide_reset(). Switch over to using IDEDMA aiocb to store the aiocb for the current active DMA request so that bus resets and restarts are handled correctly. As a consequence we can now use ide_set_inactive() rather than handling its functionality ourselves. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-29ppc: Clean up includesPeter Maydell27-4/+27
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-6-git-send-email-peter.maydell@linaro.org
2016-01-22fpu: Replace uint32 typedef with uint32_tPeter Maydell1-2/+2
Replace the uint32 softfloat-specific typedef with uint32_t. This change was made with find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint32\b/uint32_t/g' together with manual removal of the typedef definition, manual undoing of various mis-hits, and another couple of fixes found via test compilation. All the uses in hw/ were using the wrong type by mistake. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Leon Alrae <leon.alrae@imgtec.com> Acked-by: James Hogan <james.hogan@imgtec.com> Message-id: 1452603315-27030-5-git-send-email-peter.maydell@linaro.org
2016-01-18qom: Change object property iterator API contractDaniel P. Berrange1-4/+3
Currently the ObjectProperty iterator API works as follows: ObjectPropertyIterator *iter; iter = object_property_iter_init(obj); while ((prop = object_property_iter_next(iter))) { ... } object_property_iter_free(iter); This has the benefit that the ObjectPropertyIterator struct can be opaque, but has the downside that callers need to explicitly call a free function. It is also not in keeping with iterator style used elsewhere in QEMU/GLib2. This patch changes the API to use stack allocation instead: ObjectPropertyIterator iter; object_property_iter_init(&iter, obj); while ((prop = object_property_iter_next(&iter))) { ... } Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [AF: Fused ObjectPropertyIterator struct with typedef] Signed-off-by: Andreas Färber <afaerber@suse.de>
2016-01-13error: Strip trailing '\n' from error string arguments (again)Markus Armbruster1-1/+2
Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they keep coming back. Tracked down with the Coccinelle semantic patch from commit 312fd5f. Cc: Fam Zheng <famz@redhat.com> Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com> Cc: Bharata B Rao <bharata@linux.vnet.ibm.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Cc: Jason J. Herne <jjherne@linux.vnet.ibm.com> Cc: Stefan Berger <stefanb@linux.vnet.ibm.com> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Changchun Ouyang <changchun.ouyang@intel.com> Cc: zhanghailiang <zhang.zhanghailiang@huawei.com> Cc: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Markus Armbruster <armbru@pond.sub.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Acked-by: Fam Zheng <famz@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-17-git-send-email-armbru@redhat.com>
2016-01-13spapr: Use error_reportf_err()Markus Armbruster1-3/+4
Not caught by Coccinelle, because we report the error only conditionally here. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-14-git-send-email-armbru@redhat.com>
2016-01-13error: Use error_reportf_err() where it makes obvious senseMarkus Armbruster1-2/+2
Done with this Coccinelle semantic patch @@ expression FMT, E, S; expression list ARGS; @@ - error_report(FMT, ARGS, error_get_pretty(E)); + error_reportf_err(E, FMT/*@@@*/, ARGS); ( - error_free(E); | exit(S); | abort(); ) followed by a replace of '%s"/*@@@*/' by '"' and some line rewrapping, because I can't figure out how to make Coccinelle transform strings. We now use the error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b00), but I can't see how the errors touched in this commit could come with hints. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1450452927-8346-12-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-01-13error: Use error_report_err() where appropriate (again)Markus Armbruster1-4/+2
Same Coccinelle semantic patch as in commit 565f65d. We now use the original error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b00), but I don't think the errors touched in this commit can come with hints. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1450452927-8346-3-git-send-email-armbru@redhat.com>
2016-01-13hw: Don't use hw_error() for machine initialization errorsMarkus Armbruster3-16/+22
Printing CPU registers is not helpful during machine initialization. Moreover, these are straightforward configuration or "can get resources" errors, so dumping core isn't appropriate either. Replace hw_error() by error_report(); exit(1). Matches how we report these errors in other machine initializations. Cc: Richard Henderson <rth@twiddle.net> Cc: qemu-arm@nongnu.org Cc: qemu-ppc@nongnu.org Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Markus Armbruster <armbru@pond.sub.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1450370121-5768-2-git-send-email-armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2016-01-13hw: Inline the qdev_prop_set_drive_nofail() wrapperMarkus Armbruster1-1/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1449764955-10741-3-git-send-email-armbru@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11hw/ppc/spapr: fix spapr->kvm_type leakDavid Gibson1-0/+8
Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> [fixed return type of spapr_machine_finalizefn()] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11spapr vio: fix to incomplete QOMifyCao jin1-7/+5
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11hw/ppc/spapr: Use XHCI as host controller for new spapr machinesThomas Huth1-1/+8
The OHCI has some bugs and performance issues, so for newer machines it's preferable to use XHCI instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11pseries: Add pseries-2.6 machine typeDavid Gibson1-2/+20
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Improve setting of default machine versionDavid Gibson1-10/+10
This tweaks the way the default machine version is controlled, so that there will be a bit less churn when each new version is introduced. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Restructure class_options functionsDavid Gibson1-4/+17
Currently each of the *_class_options() functions for the pseries-2.1 .. pseries-2.5 machine types are standalone. This will become harder to maintain as new versions are added. This patch restructures them similarly to x86 where each function calls the one from the next version, then overrides anything necessary for compatibility with the specific version and older. The default behaviour - that for the most recent machine are set up in the base class initializer spapr_machine_class_init(). Previously it had some things set up to default to older behaviour with the more recent machines overriding it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: DEFINE_SPAPR_MACHINEDavid Gibson1-70/+49
At the moment all the class_init functions and TypeInfo structures for the various versioned pseries machine types are open-coded. As more versions are created this is getting increasingly clumsy. This patch borrows the approach used in PC, using a DEFINE_SPAPR_MACHINE() macro to construct most of the boilerplate from simpler 'class_options' and 'instance_options' functions. This patch makes a small semantic change - the versioned machine types are now registered through machine_init() instead of type_init(). Since the new way is how PC already did it, I'm assuming that's correct. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Use SET_MACHINE_COMPATDavid Gibson1-20/+4
To make the spapr_machine_*_class_init() functions a little less bulky. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Remove versions from mc->descDavid Gibson1-5/+1
Currently, the versioned spapr machine types put the machine type version into the description string. PC does not do this, using just the name itself to distinguish. Doing the same lets us move setting the description into the common base class, simplifying the code slightly. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Remove redundant calls to spapr_machine_initfn()David Gibson1-3/+0
The instance_init() functions for several of the pseries-x.y versioned machine types explicitly call spapr_machine_initfn(). But that's the instance_init function for the common parent of all those machine types, so will already have been called beforehand by the QOM infrastructure. Remove the redundant calls. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Rearrange versioned machine type codeDavid Gibson1-82/+98
hw/ppc/spapr.c has a number of definitions related to the various versioned machine types ("pseries-2.1" .. "pseries-2.5") it defines. These are mostly arranged by type of function first, then machine version second, and it's not consistent about whether it goes in increasing or decreasing version order. This rearranges the code to keep all the definitions for a particular machine version together, and arrange then consistently in order most recent to least recent. This brings us closer to matching the way PC does things, and makes later cleanups easier to follow. Apart from adding some comments marking each section, this is a pure mechanical rearrangement with no semantic changes. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Remove redundant setting of mc->name for pseries-2.5 machineDavid Gibson1-1/+0
98cec76 "machine: Set MachineClass::name automatically" removed the setting of mc->name for the pseries machine types, since it can be derived automatically from the type names constructed with MACHINE_TYPE_NAME(). Unfortunately fb0fc8f "spapr: Create pseries-2.5 machine" went in later and brought one of them back. This removes it again. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11spapr: Add /system-idAlexey Kardashevskiy1-0/+3
Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be unique, it makes sense to use it as "system-id". This adds "system-id" property to the device tree root when not empty. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11hw/ppc/spapr_rtc: Remove bad class_size valueThomas Huth1-1/+0
class_size = sizeof(XICSStateClass) does not make much sense in the RTC code and likely was just a copy-n-paste error. Let's simply remove it. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-12-04spapr_drc: Change value of property "fdt" from null back to {}Markus Armbruster1-0/+5
prop_get_fdt() misuses the visitor API: when fdt is null, it doesn't visit anything. object_property_get_qobject() happily object_property_get_qobject(). Amazingly, the latter survives the misuse. Turns out we've papered over it long before prop_get_fdt() existed, in commit 1d10b44. However, commit 6c2f9a1 changed how we paper over it, and as a side effect changed qom-get's value from {} to null. Change it right back by fixing the visitor misuse. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-12-04spapr_drc: Make device "spapr-dr-connector" unavailable with -deviceMarkus Armbruster1-0/+4
It should only be created via spapr_dr_connector_new(). Attempting to create it with -device crashes. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-12-04spapr_drc: Handle visitor errors properlyMarkus Armbruster1-6/+26
Since prop_get_fdt() is only used with QmpOutputVisitor, errors shouldn't actually happen, so this is only a latent bug. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-30hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from ↵Peter Maydell1-44/+8
old_mmio The taihu_cpld_writel() function had an obvious typo that meant that if it was ever called it would go into an infinite recursion. Newer versions of clang will detect and warn about this: hw/ppc/ppc405_boards.c:481:1: warning: all paths through this function will call itself [-Winfinite-recursion] Fix this by converting taihu_cpld from the legacy old_mmio accessors to new-style ones, with an impl {} declaration to cause the core memory code to do the splitting of 16 bit and 32 bit accesses into multiple 8-bit accesses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-30hw/ppc/spapr: Remove duplicated "pseries" aliasThomas Huth1-2/+0
The "pseries" alias is currently set twice, one time for the pseries-2.4 machine and one time for the "pseries-2.5" machine. To avoid confusion with the alias, let's remove the one from the older machine class. And while we're at it, also remove the "is_default = 0" there since the is_default variable should be set to zero by default already. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-26Fix memory leak on errorStefano Dong (董兴水)1-0/+1
hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3d Signed-off-by: Stefano Dong (董兴水) <opensource.dxs@aliyun.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-18ppc: Convert spapr code to use object property iteratorsDaniel P. Berrange1-1/+4
Stop directly accessing the Object::properties field data structure and instead use the formal object property iterator APIs. This insulates the code from future data structure changes in the Object struct. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-12cuda.c: add delay to setting of SR_INT bitMark Cave-Ayland1-0/+3
MacOS 9 is racy when it comes to accessing the shift register. Fix this by introducing a small delay between data accesses and raising the SR_INT interrupt bit. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-12PPC: mac99: Always add USB controllerAlexander Graf1-1/+2
The mac99 machines always have a USB controller. Usually not having one around doesn't hurt quite as much, but Mac OS 9 really really wants one or it crashes on bootup. So always add OHCI to make it happy. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-11spapr: Handle failure of KVM_PPC_ALLOCATE_HTAB ioctlBharata B Rao1-4/+16
KVM_PPC_ALLOCATE_HTAB ioctl can return -ENOMEM for KVM guests and QEMU never handled this correctly. But this didn't cause any problems till now as KVM_PPC_ALLOCATE_HTAB ioctl returned with smaller than requested HTAB when enough contiguous memory wasn't available in the host. After the proposed kernel change: https://patchwork.ozlabs.org/patch/530501/, KVM_PPC_ALLOCATE_HTAB ioctl will not fallback to lower sized HTAB allocation and will fail if requested HTAB size can't be met. Check for such failures in QEMU and abort appropriately. This will prevent guest kernel from hanging/freezing during early boot by doing graceful exit when host is unable to allocate requested HTAB. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-11-10Rename save_live_complete to save_live_complete_precopyDr. David Alan Gilbert1-1/+1
In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-10-29ppc/spapr: add 2.4 compat propsCornelia Huck1-0/+9
HW_COMPAT_2_4 will become non-empty: prepare for it. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1444991154-79217-3-git-send-email-cornelia.huck@de.ibm.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-10-29Revert "memhp: extend address auto assignment to support gaps"Michael S. Tsirkin1-1/+1
This reverts commit df0acded19ec4b826aa095cfc19d341bd66fafd3. There's no point to it now that the only user has been reverted. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-10-23prep: do not use CPU_LOG_IOPORT, convert to tracepointsPaolo Bonzini1-27/+3
These messages are disabled by default; a perfect usecase for tracepoints. Convert them over. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>