[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 013/102] ppc/pnv.c: add a friendly warning when accel=kvm is used
From: |
Cédric Le Goater |
Subject: |
[PULL 013/102] ppc/pnv.c: add a friendly warning when accel=kvm is used |
Date: |
Wed, 15 Dec 2021 17:57:18 +0100 |
From: Daniel Henrique Barboza <danielhb413@gmail.com>
If one tries to use -machine powernv9,accel=kvm in a Power9 host, a
cryptic error will be shown:
qemu-system-ppc64: Register sync failed... If you're using kvm-hv.ko, only
"-cpu host" is possible
qemu-system-ppc64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid
argument
Appending '-cpu host' will throw another error:
qemu-system-ppc64: invalid chip model 'host' for powernv9 machine
The root cause is that in IBM PowerPC we have different specs for the bare-metal
and the guests. The bare-metal follows OPAL, the guests follow PAPR. The kernel
KVM modules presented in the ppc kernels implements PAPR. This means that we
can't use KVM accel when using the powernv machine, which is the emulation of
the bare-metal host.
All that said, let's give a more informative error in this case.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20211130133153.444601-2-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/pnv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 71e45515f136..e5b87e873095 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -742,6 +742,11 @@ static void pnv_init(MachineState *machine)
DriveInfo *pnor = drive_get(IF_MTD, 0, 0);
DeviceState *dev;
+ if (kvm_enabled()) {
+ error_report("The powernv machine does not work with KVM
acceleration");
+ exit(EXIT_FAILURE);
+ }
+
/* allocate RAM */
if (machine->ram_size < mc->default_ram_size) {
char *sz = size_to_str(mc->default_ram_size);
--
2.31.1
- [PULL 004/102] test/tcg/ppc64le: test mtfsf, (continued)
- [PULL 004/102] test/tcg/ppc64le: test mtfsf, Cédric Le Goater, 2021/12/15
- [PULL 001/102] pseries: Update SLOF firmware image, Cédric Le Goater, 2021/12/15
- [PULL 006/102] target/ppc: Implement Vector Expand Mask, Cédric Le Goater, 2021/12/15
- [PULL 005/102] target/ppc: ppc_store_fpscr doesn't update bits 0 to 28 and 52, Cédric Le Goater, 2021/12/15
- [PULL 007/102] target/ppc: Implement Vector Extract Mask, Cédric Le Goater, 2021/12/15
- [PULL 008/102] target/ppc: Implement Vector Mask Move insns, Cédric Le Goater, 2021/12/15
- [PULL 011/102] pci-host: Allow extended config space access for PowerNV PHB4 model, Cédric Le Goater, 2021/12/15
- [PULL 010/102] ivshmem-test.c: enable test_ivshmem_server for ppc64 arch, Cédric Le Goater, 2021/12/15
- [PULL 012/102] docs: Minor updates on the powernv documentation., Cédric Le Goater, 2021/12/15
- [PULL 003/102] target/ppc: Fixed call to deferred exception, Cédric Le Goater, 2021/12/15
- [PULL 013/102] ppc/pnv.c: add a friendly warning when accel=kvm is used,
Cédric Le Goater <=
- [PULL 009/102] ivshmem.c: change endianness to LITTLE_ENDIAN, Cédric Le Goater, 2021/12/15
- [PULL 013/102] ppc/pnv.c: add a friendly warning when accel=kvm is used, Cédric Le Goater, 2021/12/15
- [PULL 014/102] docs/system/ppc/powernv.rst: document KVM support status, Cédric Le Goater, 2021/12/15
- [PULL 018/102] docs: Rename ppc-spapr-hcalls.txt to ppc-spapr-hcalls.rst., Cédric Le Goater, 2021/12/15
- [PULL 019/102] Link new ppc-spapr-hcalls.rst file to pseries.rst., Cédric Le Goater, 2021/12/15
- [PULL 015/102] ppc/pnv.c: fix "system-id" FDT when -uuid is set, Cédric Le Goater, 2021/12/15
- [PULL 021/102] softfloat: Add flag specific to Inf - Inf, Cédric Le Goater, 2021/12/15
- [PULL 023/102] softfloat: Add flags specific to Inf / Inf and 0 / 0, Cédric Le Goater, 2021/12/15
- [PULL 026/102] softfloat: Add flag specific to signaling nans, Cédric Le Goater, 2021/12/15
- [PULL 027/102] target/ppc: Update float_invalid_op_addsub for new flags, Cédric Le Goater, 2021/12/15