[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 03/15] s390x: protvirt: Add migration blocker
From: |
David Hildenbrand |
Subject: |
Re: [PATCH v7 03/15] s390x: protvirt: Add migration blocker |
Date: |
Mon, 9 Mar 2020 15:15:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 09.03.20 14:51, Janosch Frank wrote:
> On 3/9/20 2:41 PM, David Hildenbrand wrote:
>> On 09.03.20 12:21, Janosch Frank wrote:
>>> Migration is not yet supported.
>>>
>>> Signed-off-by: Janosch Frank <address@hidden>
>>> ---
>>> hw/s390x/s390-virtio-ccw.c | 26 ++++++++++++++++++++++++--
>>> 1 file changed, 24 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>>> index f718cfc591..4bb38704ff 100644
>>> --- a/hw/s390x/s390-virtio-ccw.c
>>> +++ b/hw/s390x/s390-virtio-ccw.c
>>> @@ -43,6 +43,9 @@
>>> #include "sysemu/sysemu.h"
>>> #include "hw/s390x/pv.h"
>>> #include <linux/kvm.h>
>>> +#include "migration/blocker.h"
>>> +
>>> +static Error *pv_mig_blocker;
>>>
>>> S390CPU *s390_cpu_addr2state(uint16_t cpu_addr)
>>> {
>>> @@ -331,16 +334,33 @@ static void
>>> s390_machine_unprotect(S390CcwMachineState *ms)
>>> }
>>> ms->pv = false;
>>> }
>>> + migrate_del_blocker(pv_mig_blocker);
>>> + error_free(pv_mig_blocker);
>>> + pv_mig_blocker = NULL;
>>
>> Maybe use error_free_or_abort(&pv_mig_blocker);
>
> I dislike hiding setting the ptr to NULL with that function.
> The assert for NULL in error_setg has caused me a lot of headache initially.
>
> But if that's how it's done I'll fix it.
No strong feelings on my side. Seemed like a nice function to me :)
--
Thanks,
David / dhildenb
- [PATCH v7 00/15] s390x: Protected Virtualization support, Janosch Frank, 2020/03/09
- [PATCH v7 02/15] s390x: protvirt: Support unpack facility, Janosch Frank, 2020/03/09
- [PATCH v8 1/2] s390x: ipl: Consolidate iplb validity check into one function, Janosch Frank, 2020/03/10
- [PATCH v8 2/2] s390x: protvirt: Support unpack facility, Janosch Frank, 2020/03/10
- Re: [PATCH v8 2/2] s390x: protvirt: Support unpack facility, David Hildenbrand, 2020/03/10