qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: gengdongjiu <gengdongjiu@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>, Linuxarm <linuxarm@huawei.com>
Subject: Re: [Qemu-devel] [PATCH v6 2/2] target: arm: Add support for VCPU event states
Date: Fri, 24 Aug 2018 18:49:39 +0800	[thread overview]
Message-ID: <5028e5a5-ad82-fd9b-476c-4bf21f807772@huawei.com> (raw)
In-Reply-To: <CAFEAcA8e77FvPCEKGb0eNoWf_NnQqoyMz3P_-=hJCC-PW3+2vg@mail.gmail.com>



On 2018/8/24 18:38, Peter Maydell wrote:
> On 24 August 2018 at 11:28, gengdongjiu <gengdongjiu@huawei.com> wrote:
>> On 2018/8/24 0:52, Peter Maydell wrote:
>>> On 23 August 2018 at 16:45, Dongjiu Geng <gengdongjiu@huawei.com> 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
  I agree this suggestion that can pend the SError but without the ESR in the destination machine.

> 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	other threads:[~2018-08-24 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 15:44 [Qemu-devel] [PATCH v6 1/2] linux-headers: Update to kernel mainline commit 815f0ddb3 Dongjiu Geng
2018-08-23 15:45 ` [Qemu-devel] [PATCH v6 2/2] target: arm: Add support for VCPU event states Dongjiu Geng
2018-08-23 16:52   ` Peter Maydell
2018-08-24 10:28     ` gengdongjiu
2018-08-24 10:38       ` Peter Maydell
2018-08-24 10:49         ` gengdongjiu [this message]

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=5028e5a5-ad82-fd9b-476c-4bf21f807772@huawei.com \
    --to=gengdongjiu@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).