mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: gengdongjiu <gengdongjiu@huawei.com>
To: Shannon Zhao <zhaoshenglong@huawei.com>, <lersek@redhat.com>,
	<mst@redhat.com>, <imammedo@redhat.com>,
	<peter.maydell@linaro.org>, <pbonzini@redhat.com>,
	<qemu-devel@nongnu.org>, <qemu-arm@nongnu.org>,
	<kvm@vger.kernel.org>, <edk2-devel@lists.01.org>,
	<christoffer.dall@linaro.org>, <marc.zyngier@arm.com>,
	<will.deacon@arm.com>, <james.morse@arm.com>,
	<tbaicar@codeaurora.org>, <ard.biesheuvel@linaro.org>,
	<mingo@kernel.org>, <bp@suse.de>, <shiju.jose@huawei.com>,
	<zjzhang@codeaurora.org>, <linux-arm-kernel@lists.infradead.org>,
	<kvmarm@lists.cs.columbia.edu>, <linux-kernel@vger.kernel.org>,
	<linux-acpi@vger.kernel.org>, <devel@acpica.org>,
	<john.garry@huawei.com>, <jonathan.cameron@huawei.com>,
	<shameerali.kolothum.thodi@huawei.com>,
	<huangdaode@hisilicon.com>, <wangzhou1@hisilicon.com>
Cc: <huangshaoyu@huawei.com>, <wuquanming@huawei.com>,
	<linuxarm@huawei.com>, <zhengqiang10@huawei.com>
Subject: Re: [PATCH v11 2/6] ACPI: Add APEI GHES Table Generation support
Date: Sat, 26 Aug 2017 10:49:44 +0800	[thread overview]
Message-ID: <27894653-ff09-7839-a46d-b41b9ee8ae48@huawei.com> (raw)
In-Reply-To: <59A0C9FE.5010204@huawei.com>

Hi Shannon,

On 2017/8/26 9:08, Shannon Zhao wrote:
> 
> 
> On 2017/8/25 19:20, gengdongjiu wrote:
>>>> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
>>>>>> index 3d78ff6..def1ec1 100644
>>>>>> --- a/hw/arm/virt-acpi-build.c
>>>>>> +++ b/hw/arm/virt-acpi-build.c
>>>>>> @@ -45,6 +45,7 @@
>>>>>>  #include "hw/arm/virt.h"
>>>>>>  #include "sysemu/numa.h"
>>>>>>  #include "kvm_arm.h"
>>>>>> +#include "hw/acpi/hest_ghes.h"
>>>>>>  
>>>>>>  #define ARM_SPI_BASE 32
>>>>>>  #define ACPI_POWER_BUTTON_DEVICE "PWRB"
>>>>>> @@ -771,6 +772,9 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
>>>>>>      acpi_add_table(table_offsets, tables_blob);
>>>>>>      build_spcr(tables_blob, tables->linker, vms);
>>>>>>  
>>>>>> +    acpi_add_table(table_offsets, tables_blob);
>>>>>> +    ghes_build_acpi(tables_blob, tables->hardware_errors, tables->linker);
>>>>>> +
>>>> So we add this table unconditionally. Is there any bad impact if QEMU
>>>> runs on old kvm? Does it need to check whether KVM supports RAS?
>> this table is added before guest OS boot. so can not use KVM to check it.
> No, we can check the RAS capability when we create vcpus like you done
> in another patch ans can use that in table generation.
understand your meaning.

ARM James ever have below comments about the table generation.
----------------------------------------------------------------------------------
But you can use APEI in a guest on CPUs without the RAS extensions: the host may
signal memory errors to Qemu for any number of reasons, user-space shouldn't
care how it knows. Examples are PCI-AER, any APEI event notified by polling or
one of the flavours of irq.

I would expect Qemu to generate a HEST based on its abilities, i.e. if it
supports any mechanism of notifying the guest about errors. Choosing the
mechanism then depends on the type of error.

Ideally the Qemu code for HEST/GHES/CPER generation code using some of the irqs
and polling could be shared with x86, as these should be possible using common
KVM APIs.
-----------------------------------------------------------------------------------

He means we can use APEI on CPUs without RAS and may be share this code with x86,
if Qemu can support any mechanism of notifying the guest about errors, it should be
generate the table.
Now we depend on the macro KVM_HAVE_MCE_INJECTION to decide whether Qemu can support
notifying the guest.

what do you think which we should be dependent on to generate the table?

> 
>> if the old kvm does not support RAS, it does not have bad impact. only waste table memory.
>> May be we can make it as device? if this device is enabled in the qemu
>> boot parameters, then we will add this table?
>>
> 
> And you need to add a option to virt machine for (migration)
> compatibility. On new virt machine it's on by default while off for old
> ones.
ok.

> 
> Thanks,
> 

  reply	other threads:[~2017-08-26  2:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 14:23 [PATCH v11 0/6] Add RAS virtualization support for armv8 SEA and SEI Dongjiu Geng
2017-08-18 14:21 ` [Qemu-devel] " no-reply
2017-08-18 14:23 ` [PATCH v11 1/6] ACPI: add APEI/HEST/CPER structures and macros Dongjiu Geng
2017-08-24 12:33   ` Shannon Zhao
2017-08-25 10:37     ` gengdongjiu
2017-08-26  1:00       ` Shannon Zhao
2017-08-26  1:45         ` gengdongjiu
2017-08-18 14:23 ` [PATCH v11 2/6] ACPI: Add APEI GHES Table Generation support Dongjiu Geng
2017-08-24 13:03   ` Shannon Zhao
2017-08-25 11:20     ` gengdongjiu
2017-08-26  1:08       ` Shannon Zhao
2017-08-26  2:49         ` gengdongjiu [this message]
2017-08-29 10:20   ` [Qemu-devel] " Igor Mammedov
2017-08-29 11:15     ` gengdongjiu
2017-09-01  9:58     ` gengdongjiu
2017-09-01 11:51       ` Igor Mammedov
2017-08-18 14:23 ` [PATCH v11 3/6] ACPI: build and enable APEI GHES in the Makefile and configuration Dongjiu Geng
2017-08-24 13:04   ` Shannon Zhao
2017-08-25 11:20     ` gengdongjiu
2017-08-18 14:23 ` [PATCH v11 4/6] target-arm: kvm64: detect guest RAS EXTENSION feature Dongjiu Geng
2017-09-05 17:26   ` Peter Maydell
2017-09-06  9:35     ` gengdongjiu
2017-08-18 14:23 ` [PATCH v11 5/6] target-arm: kvm64: handle SIGBUS signal for synchronous External Abort Dongjiu Geng
2017-09-05 17:46   ` Peter Maydell
2017-08-18 14:23 ` [PATCH v11 6/6] target-arm: kvm64: Handle SError interrupt for the guest OS Dongjiu Geng
2017-09-05 17:50   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27894653-ff09-7839-a46d-b41b9ee8ae48@huawei.com \
    --to=gengdongjiu@huawei.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bp@suse.de \
    --cc=christoffer.dall@linaro.org \
    --cc=devel@acpica.org \
    --cc=edk2-devel@lists.01.org \
    --cc=huangdaode@hisilicon.com \
    --cc=huangshaoyu@huawei.com \
    --cc=imammedo@redhat.com \
    --cc=james.morse@arm.com \
    --cc=john.garry@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=lersek@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=mingo@kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shiju.jose@huawei.com \
    --cc=tbaicar@codeaurora.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=will.deacon@arm.com \
    --cc=wuquanming@huawei.com \
    --cc=zhaoshenglong@huawei.com \
    --cc=zhengqiang10@huawei.com \
    --cc=zjzhang@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®