qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, qemu-s390x@nongnu.org, cohuck@redhat.com
Subject: Re: [PATCH v8 03/15] s390x: protvirt: Add migration blocker
Date: Tue, 10 Mar 2020 16:02:47 +0100	[thread overview]
Message-ID: <be1990f6-c1a2-f657-0ab8-ec764ecb6a47@linux.ibm.com> (raw)
In-Reply-To: <984a38e2-f73c-dd68-b32d-ff419046c7ac@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1854 bytes --]

On 3/10/20 3:57 PM, David Hildenbrand wrote:
> On 10.03.20 14:39, Janosch Frank wrote:
>> Migration is not yet supported.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
>>  hw/s390x/s390-virtio-ccw.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>> index 455ad31718..1ceb42c0b5 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)
>>  {
>> @@ -323,15 +326,29 @@ static void s390_machine_unprotect(S390CcwMachineState *ms)
>>  
>>      s390_pv_vm_disable();
>>      ms->pv = false;
>> +    migrate_del_blocker(pv_mig_blocker);
>> +    error_free_or_abort(&pv_mig_blocker);
>>  }
>>  
>>  static int s390_machine_protect(S390CcwMachineState *ms)
>>  {
>> +    static Error *local_err;
> 
> You have to initialize it to NULL.

That's a static variable, am I missing something?

> 
>>      int rc;
>>  
>> +    error_setg(&pv_mig_blocker,
>> +               "protected VMs are currently not migrateable.");
>> +    rc = migrate_add_blocker(pv_mig_blocker, &local_err);
>> +    if (local_err) {
>> +        error_report_err(local_err);
>> +        error_free_or_abort(&pv_mig_blocker);
>> +        return rc;
>> +    }
>> +
>>      /* Create SE VM */
>>      rc = s390_pv_vm_enable();
>>      if (rc) {
>> +        error_report_err(local_err);
>> +        error_free_or_abort(&pv_mig_blocker);
> 
> Actually, migrate_del_blocker(pv_mig_blocker) as well, no?
> 

Ack

>>          return rc;
>>      }
>>  
>>
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-03-10 15:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 13:39 [PATCH v8 00/15] s390x: Protected Virtualization support Janosch Frank
2020-03-10 13:39 ` [PATCH v8 01/15] Sync pv Janosch Frank
2020-03-10 13:39 ` [PATCH v8 02/15] s390x: protvirt: Support unpack facility Janosch Frank
2020-03-10 15:26   ` David Hildenbrand
2020-03-10 15:49     ` Janosch Frank
2020-03-10 15:41   ` Christian Borntraeger
2020-03-10 16:01     ` Janosch Frank
2020-03-11 10:20     ` [PATCH v9] " Janosch Frank
2020-03-10 13:39 ` [PATCH v8 03/15] s390x: protvirt: Add migration blocker Janosch Frank
2020-03-10 14:57   ` David Hildenbrand
2020-03-10 15:02     ` Janosch Frank [this message]
2020-03-10 15:08       ` David Hildenbrand
2020-03-10 15:14         ` Janosch Frank
2020-03-10 15:24         ` [PATCH v9] " Janosch Frank
2020-03-10 15:26           ` David Hildenbrand
2020-03-10 13:39 ` [PATCH v8 04/15] s390x: protvirt: Inhibit balloon when switching to protected mode Janosch Frank
2020-03-10 13:39 ` [PATCH v8 05/15] s390x: protvirt: KVM intercept changes Janosch Frank
2020-03-10 15:20   ` Christian Borntraeger
2020-03-10 15:23     ` Janosch Frank
2020-03-10 13:39 ` [PATCH v8 06/15] s390x: Add SIDA memory ops Janosch Frank
2020-03-10 13:40 ` [PATCH v8 07/15] s390x: protvirt: Move STSI data over SIDAD Janosch Frank
2020-03-10 13:40 ` [PATCH v8 08/15] s390x: protvirt: SCLP interpretation Janosch Frank
2020-03-10 13:40 ` [PATCH v8 09/15] s390x: protvirt: Set guest IPL PSW Janosch Frank
2020-03-10 13:40 ` [PATCH v8 10/15] s390x: protvirt: Move diag 308 data over SIDA Janosch Frank
2020-03-10 15:00   ` David Hildenbrand
2020-03-10 13:40 ` [PATCH v8 11/15] s390x: protvirt: Disable address checks for PV guest IO emulation Janosch Frank
2020-03-10 13:40 ` [PATCH v8 12/15] s390x: protvirt: Move IO control structures over SIDA Janosch Frank
2020-03-10 13:40 ` [PATCH v8 13/15] s390x: protvirt: Handle SIGP store status correctly Janosch Frank
2020-03-10 13:40 ` [PATCH v8 14/15] docs: Add protvirt docs Janosch Frank
2020-03-10 13:40 ` [PATCH v8 15/15] s390x: Add unpack facility feature to GA1 Janosch Frank

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=be1990f6-c1a2-f657-0ab8-ec764ecb6a47@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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).