From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emLf3-0004wQ-TP for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emLey-0003gk-1f for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:25 -0500 Received: from mail-cys01nam02on0075.outbound.protection.outlook.com ([104.47.37.75]:8179 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1emLex-0003gL-PT for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:19 -0500 From: Brijesh Singh Date: Thu, 15 Feb 2018 09:39:54 -0600 Message-Id: <20180215153955.3253-29-brijesh.singh@amd.com> In-Reply-To: <20180215153955.3253-1-brijesh.singh@amd.com> References: <20180215153955.3253-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v9 28/29] sev/i386: add migration blocker List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alistair Francis , Christian Borntraeger , Cornelia Huck , "Daniel P . Berrange" , "Dr. David Alan Gilbert" , "Michael S. Tsirkin" , "Edgar E. Iglesias" , Eduardo Habkost , Eric Blake , kvm@vger.kernel.org, Marcel Apfelbaum , Markus Armbruster , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Richard Henderson , Stefan Hajnoczi , Thomas Lendacky , Borislav Petkov , Alexander Graf , Bruce Rogers , Brijesh Singh SEV guest migration is not implemented yet. Signed-off-by: Brijesh Singh Reviewed-by: Dr. David Alan Gilbert --- target/i386/sev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index 559881084d50..a4f5a87e9b51 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -20,6 +20,7 @@ #include "sysemu/sysemu.h" #include "trace.h" #include "qapi-event.h" +#include "migration/blocker.h" #include #include @@ -35,6 +36,7 @@ static uint32_t x86_cbitpos; static uint32_t x86_reduced_phys_bits; static SEVState *sev_state; static MemoryRegionRAMReadWriteOps sev_ops; +static Error *sev_mig_blocker; static SevState current_sev_guest_state = SEV_STATE_UNINIT; @@ -622,6 +624,7 @@ static void sev_launch_finish(SEVState *s) { int ret, error; + Error *local_err = NULL; trace_kvm_sev_launch_finish(); ret = sev_ioctl(KVM_SEV_LAUNCH_FINISH, 0, &error); @@ -632,6 +635,16 @@ sev_launch_finish(SEVState *s) } sev_set_guest_state(SEV_STATE_RUNNING); + + /* add migration blocker */ + error_setg(&sev_mig_blocker, + "SEV: Migration is not implemented"); + ret = migrate_add_blocker(sev_mig_blocker, &local_err); + if (local_err) { + error_report_err(local_err); + error_free(sev_mig_blocker); + exit(1); + } } static void -- 2.14.3