[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.5 7/8] s390x: Migrate guest storage keys (
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH for-2.5 7/8] s390x: Migrate guest storage keys (initial memory only) |
Date: |
Thu, 30 Jul 2015 17:12:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 |
On 30/07/15 17:00, Jason J. Herne wrote:
> On 07/21/2015 06:37 AM, David Hildenbrand wrote:
>>>
>>> So if I've got this code right, you send here a "header" that announces
>>> a packet with all pages ...
>>>
>>>> + while (handled_count < total_count) {
>>>> + cur_count = MIN(total_count - handled_count,
>>>> S390_SKEYS_BUFFER_SIZE);
>>>> +
>>>> + ret = skeyclass->get_skeys(ss, cur_gfn, cur_count, buf);
>>>> + if (ret < 0) {
>>>> + error_report("S390_GET_KEYS error %d\n", ret);
>>>> + break;
>>>
>>> ... but when an error occurs here, you suddenly stop in the middle of
>>> that "packet" with all pages ...
>>
>> Indeed, although that should never fail, we never know.
>> We don't want to overengineer the protocol but still abort migration
>> at least
>> on the loading side in that (theoretical) case.
>>
>
> I don't have a strong opinion on this either way. I think it is fine
> just the way
> it is (for the reasons David described above). However, if people are
> worried I
> can see about writing some code that sends fake keys to the destination as
> described below. Thoughts?
If David is right and the skeyclass->get_skeys() really never fails (I
did not check), then simply do an "assert (ret == 0)" afterwards - that
way you can be sure that it really never fails. And if it ever fails,
you notice it immediately - and that's certainly way much better than
debugging the currently-wrong error handling code.
Thomas
[Qemu-devel] [PATCH for-2.5 6/8] s390x: Info skeys sub-command, Cornelia Huck, 2015/07/20
[Qemu-devel] [PATCH for-2.5 8/8] s390x: Disable storage key migration on old machine type, Cornelia Huck, 2015/07/20
[Qemu-devel] [PATCH for-2.5 2/8] s390x: Create QOM device for s390 storage keys, Cornelia Huck, 2015/07/20
[Qemu-devel] [PATCH for-2.5 4/8] s390x: Dump storage keys qmp command, Cornelia Huck, 2015/07/20