[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker |
Date: |
Thu, 20 Feb 2020 11:48:15 +0100 |
On Fri, 14 Feb 2020 10:16:25 -0500
Janosch Frank <address@hidden> wrote:
> Migration is not yet supported.
>
> Signed-off-by: Janosch Frank <address@hidden>
> ---
> hw/s390x/s390-virtio-ccw.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 5fa4372083..d64724af91 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -42,6 +42,9 @@
> #include "hw/s390x/tod.h"
> #include "sysemu/sysemu.h"
> #include "hw/s390x/pv.h"
> +#include "migration/blocker.h"
> +
> +static Error *pv_mig_blocker;
>
> S390CPU *s390_cpu_addr2state(uint16_t cpu_addr)
> {
> @@ -373,6 +376,7 @@ static void s390_machine_reset(MachineState *machine)
> CPUState *cs, *t;
> S390CPU *cpu;
> S390CcwMachineState *ms = S390_CCW_MACHINE(machine);
> + static Error *local_err;
>
> /* get the reset parameters, reset them once done */
> s390_ipl_get_reset_request(&cs, &reset_type);
> @@ -422,6 +426,17 @@ static void s390_machine_reset(MachineState *machine)
> }
> run_on_cpu(cs, s390_do_cpu_reset, RUN_ON_CPU_NULL);
>
> + if (!pv_mig_blocker) {
> + error_setg(&pv_mig_blocker,
> + "protected VMs are currently not migrateable.");
> + }
> + migrate_add_blocker(pv_mig_blocker, &local_err);
If I'm not lost in the context, that's during PV_RESET. I'm a bit
confused why you'd add the blocker here?
> + if (local_err) {
> + error_report_err(local_err);
> + error_free(pv_mig_blocker);
> + exit(1);
Why the exit()? Can't you fail the call?
> + }
> +
> if (s390_machine_pv_secure(ms)) {
> CPU_FOREACH(t) {
> s390_pv_vcpu_destroy(t);
> @@ -430,6 +445,7 @@ static void s390_machine_reset(MachineState *machine)
> ms->pv = false;
>
> s390_machine_inject_pv_error(cs);
> + migrate_del_blocker(pv_mig_blocker);
> s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu);
> return;
> }
- [PATCH v3 01/17] Header sync, (continued)
- [PATCH v3 01/17] Header sync, Janosch Frank, 2020/02/14
- [PATCH v3 04/17] s390x: protvirt: Add diag308 subcodes 8 - 10, Janosch Frank, 2020/02/14
- [PATCH v3 08/17] s390x: protvirt: KVM intercept changes, Janosch Frank, 2020/02/14
- [PATCH v3 05/17] s390x: protvirt: Support unpack facility, Janosch Frank, 2020/02/14
- [PATCH v3 07/17] s390x: protvirt: Handle diag 308 subcodes 0,1,3,4, Janosch Frank, 2020/02/14
- [PATCH v3 06/17] s390x: protvirt: Add migration blocker, Janosch Frank, 2020/02/14
- Re: [PATCH v3 06/17] s390x: protvirt: Add migration blocker,
Cornelia Huck <=
[PATCH v3 09/17] s390: protvirt: Move STSI data over SIDAD, Janosch Frank, 2020/02/14
[PATCH v3 10/17] s390x: Add SIDA memory ops, Janosch Frank, 2020/02/14
[PATCH v3 12/17] s390x: protvirt: Set guest IPL PSW, Janosch Frank, 2020/02/14
[PATCH v3 14/17] s390x: protvirt: Disable address checks for PV guest IO emulation, Janosch Frank, 2020/02/14
[PATCH v3 15/17] s390x: protvirt: Move IO control structures over SIDA, Janosch Frank, 2020/02/14