mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-04 09:04:39 -07:00
ppc patch queue for 2016-06-17
Here's the current accumulated set of spapr, ppc and related patches.
* The big thing in here is CPU hotplug for spapr
- This includes a number of acked generic changes adding new
infrastructure for hotplugging cpu cores
* A number of TCG bug fixes are also included
* This adds a new testcase to make it harder to accidentally break
Macintosh (and other openbios) platforms
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJXY5oxAAoJEGw4ysog2bOSMu0QAN5e3H3qt2or5dnxS6/bC7QZ
9UrDfCFiJ1HppWfesj0lSAQvHlkEdkml8O7fxeG7bzHQDdaIwy4+q2RIvDiAgnOW
u1he5yhaN6PDLzr9zowtfUySWz6bixMyrBeY2I6/hOKgPKVeifryudmlRNJ5zc1R
edwiSI4saNBYT2+KlaaQW26g765Xk0CG0FjxAyTTPH62WsUvxB1haSKHd7QTn57c
ovdrCTHzfhXaQ0WmbDvIz2v0kY6lO71Re9DRFQmlZktVtGr6E07afr+2VzBTuYLb
r6iHyi/Ed7x+kncH/5F52K7HIddNEp0gbZJgWnfM0gUSIAnya65FP/Qgkc4RdGFd
yeR6V99s/i5dU5gxoFK0MKNn61/QLLUZJiS9l6XNs92mDZn5C03C/edINOv8tbRe
TG+/TghwoFfojodi3cEM+TrDZv7E73RgWjoLY/Eq29KOAuOQaWV0ctbPgnKOZApq
u2LwhPjzU8ae4LCA1c0sMZnMLnskplnNWhmz9sLyvsfy12Lau86/PnT43/rGZ2uu
lW1SEgrk1zpYkOdbyAB01ZOPw0bQVL8uHQpm7df4/RtiyJuWCG+nPBXJoWXq3hN2
VO5PEd33Ec8Cdln9modOwHOIkIgH5zMsG8yLcvHoAeDWccPUkr9Z1mv7vZ4ENQFO
JaOyIOC8JKJJgA/2DQA+
=AGZ4
-----END PGP SIGNATURE-----
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into staging
ppc patch queue for 2016-06-17
Here's the current accumulated set of spapr, ppc and related patches.
* The big thing in here is CPU hotplug for spapr
- This includes a number of acked generic changes adding new
infrastructure for hotplugging cpu cores
* A number of TCG bug fixes are also included
* This adds a new testcase to make it harder to accidentally break
Macintosh (and other openbios) platforms
# gpg: Signature made Fri 17 Jun 2016 07:35:29 BST
# gpg: using RSA key 0x6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392
* remotes/dgibson/tags/ppc-for-2.7-20160617:
spapr: implement query-hotpluggable-cpus callback
hmp: Add 'info hotpluggable-cpus' HMP command
QMP: Add query-hotpluggable-cpus
spapr: CPU hot unplug support
spapr: CPU hotplug support
spapr: convert boot CPUs into CPU core devices
spapr: Move spapr_cpu_init() to spapr_cpu_core.c
spapr: Abstract CPU core device and type specific core devices
qom: API to get instance_size of a type
spapr_drc: Prevent detach racing against attach for CPU DR
xics,xics_kvm: Handle CPU unplug correctly
cpu: Abstract CPU core type
qdev: hotplug: Introduce HotplugHandler.pre_plug() callback
target-ppc: Fix rlwimi, rlwinm, rlwnm
vfio: Fix broken EEH
target-ppc: Bug in BookE wait instruction
ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully
hw/ppc/spapr: Silence deprecation message in qtest mode
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4acc8fdfd3
33 changed files with 1170 additions and 91 deletions
|
|
@ -259,6 +259,11 @@ check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
|
|||
check-qtest-ppc64-y += tests/boot-order-test$(EXESUF)
|
||||
check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
|
||||
gcov-files-ppc64-y += ppc64-softmmu/hw/ppc/spapr_pci.c
|
||||
check-qtest-ppc-y = tests/prom-env-test$(EXESUF)
|
||||
check-qtest-ppc64-y = tests/prom-env-test$(EXESUF)
|
||||
check-qtest-sparc-y = tests/prom-env-test$(EXESUF)
|
||||
#Disabled for now, triggers a TCG bug on 32-bit hosts
|
||||
#check-qtest-sparc64-y = tests/prom-env-test$(EXESUF)
|
||||
check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
|
||||
check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
|
||||
|
||||
|
|
@ -550,6 +555,7 @@ tests/rtc-test$(EXESUF): tests/rtc-test.o
|
|||
tests/m48t59-test$(EXESUF): tests/m48t59-test.o
|
||||
tests/endianness-test$(EXESUF): tests/endianness-test.o
|
||||
tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
|
||||
tests/prom-env-test$(EXESUF): tests/prom-env-test.o $(libqos-obj-y)
|
||||
tests/fdc-test$(EXESUF): tests/fdc-test.o
|
||||
tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
|
||||
tests/ahci-test$(EXESUF): tests/ahci-test.o $(libqos-pc-obj-y)
|
||||
|
|
|
|||
90
tests/prom-env-test.c
Normal file
90
tests/prom-env-test.c
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Test OpenBIOS-based machines.
|
||||
*
|
||||
* Copyright (c) 2016 Red Hat Inc.
|
||||
*
|
||||
* Author:
|
||||
* Thomas Huth <thuth@redhat.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2
|
||||
* or later. See the COPYING file in the top-level directory.
|
||||
*
|
||||
* This test is used to check that some OpenBIOS machines can be started
|
||||
* successfully in TCG mode. To do this, we first put some Forth code into
|
||||
* the "boot-command" Open Firmware environment variable. This Forth code
|
||||
* writes a well-known magic value to a known location in memory. Then we
|
||||
* start the guest so that OpenBIOS can boot and finally run the Forth code.
|
||||
* The testing code here then can finally check whether the value has been
|
||||
* successfully written into the guest memory.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "libqtest.h"
|
||||
|
||||
#define MAGIC 0xcafec0de
|
||||
#define ADDRESS 0x4000
|
||||
|
||||
static void check_guest_memory(void)
|
||||
{
|
||||
uint32_t signature;
|
||||
int i;
|
||||
|
||||
/* Poll until code has run and modified memory. Wait at most 30 seconds */
|
||||
for (i = 0; i < 3000; ++i) {
|
||||
signature = readl(ADDRESS);
|
||||
if (signature == MAGIC) {
|
||||
break;
|
||||
}
|
||||
g_usleep(10000);
|
||||
}
|
||||
|
||||
g_assert_cmphex(signature, ==, MAGIC);
|
||||
}
|
||||
|
||||
static void test_machine(const void *machine)
|
||||
{
|
||||
char *args;
|
||||
|
||||
args = g_strdup_printf("-M %s,accel=tcg -prom-env 'boot-command=%x %x l!'",
|
||||
(const char *)machine, MAGIC, ADDRESS);
|
||||
|
||||
qtest_start(args);
|
||||
check_guest_memory();
|
||||
qtest_quit(global_qtest);
|
||||
|
||||
g_free(args);
|
||||
}
|
||||
|
||||
static void add_tests(const char *machines[])
|
||||
{
|
||||
int i;
|
||||
char *name;
|
||||
|
||||
for (i = 0; machines[i] != NULL; i++) {
|
||||
name = g_strdup_printf("prom-env/%s", machines[i]);
|
||||
qtest_add_data_func(name, machines[i], test_machine);
|
||||
g_free(name);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const char *sparc_machines[] = { "SPARCbook", "Voyager", "SS-20", NULL };
|
||||
const char *sparc64_machines[] = { "sun4u", "sun4v", NULL };
|
||||
const char *mac_machines[] = { "mac99", "g3beige", NULL };
|
||||
const char *arch = qtest_get_arch();
|
||||
|
||||
g_test_init(&argc, &argv, NULL);
|
||||
|
||||
if (!strcmp(arch, "ppc") || !strcmp(arch, "ppc64")) {
|
||||
add_tests(mac_machines);
|
||||
} else if (!strcmp(arch, "sparc")) {
|
||||
add_tests(sparc_machines);
|
||||
} else if (!strcmp(arch, "sparc64")) {
|
||||
add_tests(sparc64_machines);
|
||||
} else {
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue