[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/7] monitor: Fix coredump issue in non-x86 platform
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 6/7] monitor: Fix coredump issue in non-x86 platform |
Date: |
Wed, 8 Sep 2021 10:53:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 9/8/21 10:19 AM, Yang Zhong wrote:
> The monitor will coredump if we use 'info sgx' in the '-machine none' or
> other non-x86 platform, add the sgx_enabled bool variable to avoid this
> coredump issue.
But this code is only built for x86...
>
> ./qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -machine
> none,accel=kvm -monitor stdio
> QEMU 6.1.50 monitor - type 'help' for more information
> (qemu) info sgx
> /home/vmm/project/upstream/9-8/qemu/include/hw/i386/x86.h:93:X86_MACHINE:
> Object 0x5615d71a6fd0 is not an instance of type x86-machine
> Aborted (core dumped)
Paolo suggested on IRC to use object_class_dynamic_cast().
>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
> hw/i386/sgx.c | 32 +++++++++++++++++++-------------
> 1 file changed, 19 insertions(+), 13 deletions(-)
- Re: [PATCH 4/7] bitops: Support 32 and 64 bit mask macro, (continued)
[PATCH 7/7] pc: Cleanup the SGX definitions, Yang Zhong, 2021/09/08
[PATCH 6/7] monitor: Fix coredump issue in non-x86 platform, Yang Zhong, 2021/09/08