[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH V4 3/5] hw/misc/pvpanic: Add the MMIO interface
From: |
peng.hao2 |
Subject: |
Re: [Qemu-arm] [PATCH V4 3/5] hw/misc/pvpanic: Add the MMIO interface |
Date: |
Thu, 25 Oct 2018 19:48:00 +0800 (CST) |
>> Signed-off-by: Peng Hao <address@hidden>
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>> hw/misc/pvpanic.c | 74
>> ++++++++++++++++++++++++++++++++++++++---------
>> include/hw/misc/pvpanic.h | 2 ++
>> 2 files changed, 62 insertions(+), 14 deletions(-)
>>
>> diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
>> index dd3aef2..b575e01 100644
>> --- a/hw/misc/pvpanic.c
>> +++ b/hw/misc/pvpanic.c
>> @@ -2,10 +2,12 @@
>> * QEMU simulated pvpanic device.
>> *
>> * Copyright Fujitsu, Corp. 2013
>> + * Copyright (c) 2018 ZTE Ltd.
>> *
>> * Authors:
>> * Wen Congyang <address@hidden>
>> * Hu Tao <address@hidden>
>> + * Peng Hao <address@hidden>
>> *
>> * This work is licensed under the terms of the GNU GPL, version 2 or
>> later.
>> * See the COPYING file in the top-level directory.
>> @@ -45,30 +47,48 @@ static void handle_event(int event)
>>
>> #include "hw/isa/isa.h"
>>
>> -typedef struct PVPanicState {
>> +typedef struct PVPanicCommonState {
>> + MemoryRegion mr;
>> +} PVPanicCommonState;
>
>Maybe we can drop this type now.
>
yeah, just keeping PVPanicISAState and PVPanicMMIOState is fine.
>> +
>> +typedef struct PVPanicISAState {
>> /* private */
>> ISADevice isadev;
>
>Here goes this comment:
>
>/* public */
>
>> + uint16_t ioport;
>> + /* public */
>> + PVPanicCommonState common;
>> +} PVPanicISAState;
>> +
>> +typedef struct PVPanicMMIOState {
>> + /* private */
>> + SysBusDevice busdev;
>>
[...]
>>
>
>Depending of the response to Peter's question [*]:
>
>I'd also like some confirmation from folks more familiar with the
>current state of the art in guest-to-management-layer communication
>that pvpanic is still the recommended way to achieve this goal,
>and hasn't been obsoleted by something else.
>
Because this pvpanic device is used when GUEST OS panics. At this point,
communication with QEMU can not rely on any driver,
and only the simplest IO or MMIO can be used.
>I might work a bit on this patch next week.
>
>[*] https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03861.html
- [Qemu-arm] [PATCH V4 0/5], Peng Hao, 2018/10/25
- [Qemu-arm] [PATCH V4 1/5] hw/misc/pvpanic: Build the pvpanic device in $(common-obj), Peng Hao, 2018/10/25
- [Qemu-arm] [PATCH V4 5/5] hw/arm/virt: add pvpanic device in virt acpi table, Peng Hao, 2018/10/25
- [Qemu-arm] [PATCH V4 3/5] hw/misc/pvpanic: Add the MMIO interface, Peng Hao, 2018/10/25
- [Qemu-arm] [PATCH V4 4/5] hw/arm/virt: Use the pvpanic device, Peng Hao, 2018/10/25
- [Qemu-arm] [PATCH V4 2/5] hw/misc/pvpanic: Cosmetic renaming, Peng Hao, 2018/10/25