qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v6 2/2] target: arm: Add support for VCPU event st


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH v6 2/2] target: arm: Add support for VCPU event states
Date: Fri, 24 Aug 2018 11:38:38 +0100

On 24 August 2018 at 11:28, gengdongjiu <address@hidden> wrote:
> On 2018/8/24 0:52, Peter Maydell wrote:
>> On 23 August 2018 at 16:45, Dongjiu Geng <address@hidden> wrote:
>>> +static int kvm_put_vcpu_events(ARMCPU *cpu)
>>> +{
>>> +    CPUARMState *env = &cpu->env;
>>> +    struct kvm_vcpu_events events = {};
>>> +
>>> +    if (!kvm_has_vcpu_events()) {
>>> +        return 0;
>>> +    }
>>> +
>>> +    memset(&events, 0, sizeof(events));
>>> +    events.exception.serror_pending = env->serror.pending;
>>> +
>>> +    if (have_inject_serror_esr) {
>>> +        events.exception.serror_has_esr = env->serror.has_esr;
>>> +        events.exception.serror_esr = env->serror.esr;
>>> +    }
>>
>> I realised that the effect of this condition is that
>> if we migrate a VM from a machine which supports specifying the
>> SError ESR to one which does not, and at the point of migration
>> there is a pending SError with an ESR value, then we will
>> silently drop the specified ESR value. The other alternative
>> would be to fail the migration (by dropping the if() check,
>> and letting the host kernel fail the ioctl if that meant that
>> we asked it to set an SError ESR it couldn't manage.)
>>
>> I guess that's OK? It's all hypothetical currently since
>> we don't support migration between different host CPU types.
>
> Peter,
>    there are two status needed to migrate, one is serror_pending, another is 
> SError ESR value.
>
> If A migrates to B, A can set an SError ESR, but B does not support to set.
> when A is pending a SError and need to migrate to B, I think it should 
> support to migrate the serror_pending status without the ESR value(the ESR 
> value is 0).
> That is to say,  if A is pending a SError, when migrate to B, B should also 
> pend a SError.
>
> or do you think we should refused this migration?

I don't know, that's why I asked. If we have a pending
SError with an ESR, and we end up on a destination machine
where we can pend the SError but not the ESR, does that
make sense (ie will the guest still be able to usefully
continue), or have we thrown away information that the
guest requires to be able to usefully use the SError ?
Presumably the ESR is important, or we could just never
bother to set it when pending SErrors.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]