Skip to content

Commit 611ac63

Browse files
committed
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.1-20200626' into staging
ppc patch queue 2020-06-26 Here's another pull request for qemu-5.1. Not very much in this one, just a handful of assorted minor fixes and cleanups. I'm about to go on holiday for a couple of weeks, so this will be my last PR before the freeze, and maybe the last for 5.1 at all. If there's some super important fix we need, Greg Kurz will handle it. # gpg: Signature made Fri 26 Jun 2020 07:36:59 BST # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <[email protected]>" [full] # gpg: aka "David Gibson (Red Hat) <[email protected]>" [full] # gpg: aka "David Gibson (ozlabs.org) <[email protected]>" [full] # gpg: aka "David Gibson (kernel.org) <[email protected]>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-5.1-20200626: target/ppc: Remove TIDR from POWER10 processor ppc/pnv: Silence missing BMC warning with qtest spapr: Fix typos in comments and macro indentation spapr: Simplify some warning printing paths in spapr_caps.c Signed-off-by: Peter Maydell <[email protected]>
2 parents 5acc270 + 737ef96 commit 611ac63

File tree

5 files changed

+16
-34
lines changed

5 files changed

+16
-34
lines changed

hw/ppc/pnv.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "qemu-common.h"
2222
#include "qemu/units.h"
2323
#include "qapi/error.h"
24+
#include "sysemu/qtest.h"
2425
#include "sysemu/sysemu.h"
2526
#include "sysemu/numa.h"
2627
#include "sysemu/reset.h"
@@ -587,9 +588,11 @@ static void pnv_reset(MachineState *machine)
587588
bmc = pnv_bmc_find(&error_fatal);
588589
if (!pnv->bmc) {
589590
if (!bmc) {
590-
warn_report("machine has no BMC device. Use '-device "
591-
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
592-
"to define one");
591+
if (!qtest_enabled()) {
592+
warn_report("machine has no BMC device. Use '-device "
593+
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
594+
"to define one");
595+
}
593596
} else {
594597
pnv_bmc_set_pnor(bmc, pnv->pnor);
595598
pnv->bmc = bmc;

hw/ppc/spapr_caps.c

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -248,23 +248,18 @@ SpaprCapPossible cap_cfpc_possible = {
248248
static void cap_safe_cache_apply(SpaprMachineState *spapr, uint8_t val,
249249
Error **errp)
250250
{
251-
Error *local_err = NULL;
252251
uint8_t kvm_val = kvmppc_get_cap_safe_cache();
253252

254253
if (tcg_enabled() && val) {
255254
/* TCG only supports broken, allow other values and print a warning */
256-
error_setg(&local_err,
257-
"TCG doesn't support requested feature, cap-cfpc=%s",
258-
cap_cfpc_possible.vals[val]);
255+
warn_report("TCG doesn't support requested feature, cap-cfpc=%s",
256+
cap_cfpc_possible.vals[val]);
259257
} else if (kvm_enabled() && (val > kvm_val)) {
260258
error_setg(errp,
261259
"Requested safe cache capability level not supported by kvm,"
262260
" try appending -machine cap-cfpc=%s",
263261
cap_cfpc_possible.vals[kvm_val]);
264262
}
265-
266-
if (local_err != NULL)
267-
warn_report_err(local_err);
268263
}
269264

270265
SpaprCapPossible cap_sbbc_possible = {
@@ -277,23 +272,18 @@ SpaprCapPossible cap_sbbc_possible = {
277272
static void cap_safe_bounds_check_apply(SpaprMachineState *spapr, uint8_t val,
278273
Error **errp)
279274
{
280-
Error *local_err = NULL;
281275
uint8_t kvm_val = kvmppc_get_cap_safe_bounds_check();
282276

283277
if (tcg_enabled() && val) {
284278
/* TCG only supports broken, allow other values and print a warning */
285-
error_setg(&local_err,
286-
"TCG doesn't support requested feature, cap-sbbc=%s",
287-
cap_sbbc_possible.vals[val]);
279+
warn_report("TCG doesn't support requested feature, cap-sbbc=%s",
280+
cap_sbbc_possible.vals[val]);
288281
} else if (kvm_enabled() && (val > kvm_val)) {
289282
error_setg(errp,
290283
"Requested safe bounds check capability level not supported by kvm,"
291284
" try appending -machine cap-sbbc=%s",
292285
cap_sbbc_possible.vals[kvm_val]);
293286
}
294-
295-
if (local_err != NULL)
296-
warn_report_err(local_err);
297287
}
298288

299289
SpaprCapPossible cap_ibs_possible = {
@@ -309,24 +299,18 @@ SpaprCapPossible cap_ibs_possible = {
309299
static void cap_safe_indirect_branch_apply(SpaprMachineState *spapr,
310300
uint8_t val, Error **errp)
311301
{
312-
Error *local_err = NULL;
313302
uint8_t kvm_val = kvmppc_get_cap_safe_indirect_branch();
314303

315304
if (tcg_enabled() && val) {
316305
/* TCG only supports broken, allow other values and print a warning */
317-
error_setg(&local_err,
318-
"TCG doesn't support requested feature, cap-ibs=%s",
319-
cap_ibs_possible.vals[val]);
306+
warn_report("TCG doesn't support requested feature, cap-ibs=%s",
307+
cap_ibs_possible.vals[val]);
320308
} else if (kvm_enabled() && (val > kvm_val)) {
321309
error_setg(errp,
322310
"Requested safe indirect branch capability level not supported by kvm,"
323311
" try appending -machine cap-ibs=%s",
324312
cap_ibs_possible.vals[kvm_val]);
325313
}
326-
327-
if (local_err != NULL) {
328-
warn_report_err(local_err);
329-
}
330314
}
331315

332316
#define VALUE_DESC_TRISTATE " (broken, workaround, fixed)"

hw/ppc/spapr_vio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static void spapr_vio_busdev_reset(DeviceState *qdev)
420420
}
421421

422422
/*
423-
* The register property of a VIO device is defined in livirt using
423+
* The register property of a VIO device is defined in libvirt using
424424
* 0x1000 as a base register number plus a 0x1000 increment. For the
425425
* VIO tty device, the base number is changed to 0x30000000. QEMU uses
426426
* a base register number of 0x71000000 and then a simple increment.
@@ -450,7 +450,7 @@ static inline uint32_t spapr_vio_reg_to_irq(uint32_t reg)
450450

451451
} else if (reg >= 0x30000000) {
452452
/*
453-
* VIO tty devices register values, when allocated by livirt,
453+
* VIO tty devices register values, when allocated by libvirt,
454454
* are mapped in range [0xf0 - 0xff], gives us a maximum of 16
455455
* vtys.
456456
*/
@@ -459,7 +459,7 @@ static inline uint32_t spapr_vio_reg_to_irq(uint32_t reg)
459459
} else {
460460
/*
461461
* Other VIO devices register values, when allocated by
462-
* livirt, should be mapped in range [0x00 - 0xef]. Conflicts
462+
* libvirt, should be mapped in range [0x00 - 0xef]. Conflicts
463463
* will be detected when IRQ is claimed.
464464
*/
465465
irq = (reg >> 12) & 0xff;

include/hw/ppc/xive_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
* QW word 2 contains the valid bit at the top and other fields
7272
* depending on the QW.
7373
*/
74-
#define TM_WORD2 0x8
74+
#define TM_WORD2 0x8
7575
#define TM_QW0W2_VU PPC_BIT32(0)
7676
#define TM_QW0W2_LOGIC_SERV PPC_BITMASK32(1, 31) /* XX 2,31 ? */
7777
#define TM_QW1W2_VO PPC_BIT32(0)

target/ppc/translate_init.inc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9086,11 +9086,6 @@ static void init_proc_POWER10(CPUPPCState *env)
90869086
gen_spr_power8_rpr(env);
90879087
gen_spr_power9_mmu(env);
90889088

9089-
/* POWER9 Specific registers */
9090-
spr_register_kvm(env, SPR_TIDR, "TIDR", NULL, NULL,
9091-
spr_read_generic, spr_write_generic,
9092-
KVM_REG_PPC_TIDR, 0);
9093-
90949089
/* FIXME: Filter fields properly based on privilege level */
90959090
spr_register_kvm_hv(env, SPR_PSSCR, "PSSCR", NULL, NULL, NULL, NULL,
90969091
spr_read_generic, spr_write_generic,

0 commit comments

Comments
 (0)