[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close
From: |
Gavin Shan |
Subject: |
Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct |
Date: |
Tue, 11 Aug 2015 10:57:14 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Aug 10, 2015 at 10:24:56PM +1000, David Gibson wrote:
>On Fri, Aug 07, 2015 at 01:33:32PM +1000, Gavin Shan wrote:
>> The patch supports RTAS calls "ibm,{open,close}-errinjct" to
>> manupliate the token, which is passed to RTAS call "ibm,errinjct"
>> to indicate the valid context for error injection. Each VM is
>> permitted to have only one token at once and we simply have one
>> random number for that.
>>
>> Signed-off-by: Gavin Shan <address@hidden>
>> ---
>> hw/ppc/spapr.c | 5 ++++
>> hw/ppc/spapr_rtas.c | 66
>> ++++++++++++++++++++++++++++++++++++++++++++++++++
>> include/hw/ppc/spapr.h | 10 +++++++-
>> 3 files changed, 80 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index dfd808f..1ebd0b2 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -1225,6 +1225,11 @@ static const VMStateDescription vmstate_spapr = {
>> VMSTATE_UINT64_TEST(rtc_offset, sPAPRMachineState,
>> version_before_3),
>>
>> VMSTATE_PPC_TIMEBASE_V(tb, sPAPRMachineState, 2),
>> +
>> + /* Error injection token */
>> + VMSTATE_BOOL(is_errinjct_opened, sPAPRMachineState),
>> + VMSTATE_UINT32(errinjct_next_token, sPAPRMachineState),
>
>Because you're adding fields to the vmstate you'll need to define a
>new version number and make these fields only considered in the new
>version.
>
Agree, do we have an example for me to refer to?
>Technically you only need to transfer whether the token is open, and
>*if* it is open the current token value. Not sure if it's worth
>restricting to that though.
>
It would be fine to transfer the token even it's closed, I think.
Thanks,
Gavin
- [Qemu-ppc] [PATCH v3 0/3] sPAPR: Support EEH Error Injection, Gavin Shan, 2015/08/06
- [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct, Gavin Shan, 2015/08/06
- Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct, Alexey Kardashevskiy, 2015/08/07
- Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct, David Gibson, 2015/08/10
- Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct,
Gavin Shan <=
- Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct, Alexey Kardashevskiy, 2015/08/10
- Re: [Qemu-ppc] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct, Gavin Shan, 2015/08/12
[Qemu-ppc] [PATCH v3 1/3] linux-headers: Add eeh.h, Gavin Shan, 2015/08/06
[Qemu-ppc] [PATCH v3 3/3] sPAPR: Support RTAS call ibm,errinjct, Gavin Shan, 2015/08/06