From patchwork Tue Nov 1 15:54:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9407605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 77AE160585 for ; Tue, 1 Nov 2016 16:06:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 681462998E for ; Tue, 1 Nov 2016 16:06:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 580C529992; Tue, 1 Nov 2016 16:06:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F30512998E for ; Tue, 1 Nov 2016 16:06:44 +0000 (UTC) Received: from localhost ([::1]:48907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1baF-0007Rc-RV for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Nov 2016 12:06:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bP2-0006td-13 for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:55:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1bOx-0004Fa-5U for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:55:08 -0400 Received: from mail-by2nam01on0052.outbound.protection.outlook.com ([104.47.34.52]:12674 helo=NAM01-BY2-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 1c1bOw-0004FN-TF for qemu-devel@nongnu.org; Tue, 01 Nov 2016 11:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=k7Z7POh8DV8uuR8tR0mCHOIhIc26k77I3Xk3Vm746v0=; b=FMGo1I2SOLs3ZXgCa+JJ/uqdJvCjLHXDmyZ8PM00gjdz9KZZTTQBZFxifvO8sC6M92ix5Jpjwn2JomWRiaZeWCHlpU205UnwBIkNBgPI4mtdsr0gJ4ZpJFzRtw42dIOjQ2zVMLBtYVam1fOv30DP3rNMUav6UNV/0w9XGGrcUEw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by BY2PR12MB0661.namprd12.prod.outlook.com (10.163.113.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Tue, 1 Nov 2016 15:55:00 +0000 From: Brijesh Singh To: , , , , , , , , , Date: Tue, 1 Nov 2016 11:54:56 -0400 Message-ID: <147801569625.18237.10901113874318000512.stgit@brijesh-build-machine> In-Reply-To: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> References: <147801550845.18237.12915616525154608660.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR1001CA0068.namprd10.prod.outlook.com (10.164.163.36) To BY2PR12MB0661.namprd12.prod.outlook.com (10.163.113.150) X-MS-Office365-Filtering-Correlation-Id: d8405252-c78f-4880-0b5b-08d4026f7004 X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0661; 2:h8qXaelD1C6bNPzKC8PAQuF0o2ShtekNcGGxmgeRUikCOX1unF5h0TsqxpfLwAP9zSKUBj4AnwthRZdVMzwvVP9ntrnJe36oslHpg9svTI+0ZwaqIZC5GOSBVW81u1UWMaFhPiV2OvT5fSRyABNCllnWtqaY+/EUDJaryZwtom1GKDXYgfms21oNVX0oa7u+OZQZZyxUmqwG6ItVr7127Q==; 3:6qdBPlesmXTCCrO8fwjWNU/kQ0qjgTx1eVB2AvGJioAo5GUcPNd7Pr8EvVxcXg/80A0dL3JoB30L+Ue4hyyE+H3Vt5TqcbIIiy6ZZN+5TM4hKBY7tbogr+cerO1yTYONhPL9bBZzYxyisEGWKRaIUw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0661; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0661; 25:NFp9QfKmxH533N7Wl0vzigJr9AmO1ccfyJOxrPuu+pcA4i5Oh+vZp1G3y9GprbFrp78SkZCxseTKp7m56gKB/dmW4eXcW0qJ6wenVCPujX1sDfw2eexeUnwmIwKC55pygcoRLTTF7lI/IEty9UmyIDa3DGNxueduGye4PgZVmMwBUFirsWDDucOfGisD0iAFoktkW0fmUsg+UJk9u9Lz4xi+tWKZS8/Fh0aCkFUZoSMzl1as3aRxAHzEXxhrRZ2QDFrFHA5qdgjKSrnebLV+32wj4R0LRW+oskr/DqZ5f6D/Vfy/8FiyncJ2FoU+eXuyOV9Nmz1QeXYAHpdoL3lhOHjaQNnKCmpCG/SZUdVYi3SwgxqmqJO/fogID1Mzcsxq45yBuM7/SqDms7gRdwheneRx2vDZyXai01zl8DqrJ/2KQ8T9KmC5OqxwxhC8aO+PoDy3vvlXHY+B/n02pi4dGksVqrbvsxvNbqb/s1AOpzJjycwaN/WyDb0aZWvFdUHWwr9LSkTjUzrJa36XJinTSM8DXoCUcHWbSXcPNkF9U07Oti5H96DPFxhC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Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BY2PR12MB0661; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0661; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0661; 4:ce6uzLpjSvB7QV0Lh3mS5vP319WhkYwK/LcYTEuDu6IhCY6Cmn2dq0rmGxXTtzslRr/2V7xlpITw98MEdGe0lC4+YxIULD30LxGW3Rl7o8VPA9GkBcGcbji325kxMM5zcFQGOunzDYCIC/M0ma1vkRGg1XpdnS/HLrsNItVsQh5D9gLAVyH048V78U8yylEyM/5X+NZ5oVxxjblp5yyQ2a9ltGXpJoxhecToLaifQLblY2eE0Fv5R9aGttYDS5inr/92vMrhx/k6Lc5L73UrZ6HmoTmIavYRMIjnmC6WENOuqrMdC0Sx2UxWtRZ0lpziezXVFOSLohW8EUlkPVcGfqtLVAB+DUkNgU3LIb9y9FsnGHa/gSe+tBSSfY1L1LyKBSXWnW+V8iXD4WvZX25nwKBKF7ZtlduQ0Zn0NF4aRwJ6ZRCrnYs32ENOh73gn2Pe3SJaiuJvep77w40781qW0w== X-Forefront-PRVS: 01136D2D90 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(229853001)(86362001)(8676002)(2950100002)(19580405001)(19580395003)(5660300001)(81156014)(81166006)(97736004)(105586002)(76176999)(54356999)(33716001)(106356001)(5001770100001)(101416001)(9686002)(68736007)(586003)(3846002)(103116003)(6116002)(23676002)(6666003)(2906002)(4326007)(230700001)(7416002)(2201001)(305945005)(42186005)(7736002)(92566002)(50466002)(33646002)(189998001)(66066001)(47776003)(7846002)(4001350100001)(77096005)(50986999)(83506001)(921003)(1121003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0661; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjEyTUIwNjYxOzIzOjVBSnBDMXZyc3BmaUZ2NDZOVXIrZmt4UWh3?= =?utf-8?B?WDQyeDhtTWY5NVlsVkV3R0pPL1JVWDFSMStMWHhKVFlQUzNJUkJjODhvQ2Zh?= =?utf-8?B?VDdHaTJ2UmdINzlDYUUyNm9RUDltRXl4dGl0Z2thNnp0YnhaMEJybElYTXBs?= =?utf-8?B?WVF1WjBZNlF2czA2L1J4bTQyTVg0Zm9sTXlPVFkyampuUkR4SU5vZzRPNFJL?= =?utf-8?B?Yk5wZi9vUnJpaStxYkUzRnJBVlNTWXhldkM0bnlxRVdWcCtzbFA5ckUrQjR0?= =?utf-8?B?cTlqTzJmblZIZmlKV1F0NUJodVVEMUF4ODBtMWFLMjdHL01vNnB4dVJPY0NF?= =?utf-8?B?QkpPc2hITUNMMDlVSTNtbENaZFhaUUIrdzVzWG40M20vWXUzNWlPS1BlTjgv?= =?utf-8?B?UUNyRG01TnllMW9WS1hJNEFXbHZ3UmliRnhMWGlhTkVnYWRNNmJsU1QwWjE0?= =?utf-8?B?a3p0cnhIRTJtaVlGYzBQR21RQ05obUEzeUVpK3EwQUlnMTFPTDJ3SXo5VVFY?= =?utf-8?B?K3llYkE3Z3lTcEpRMmpTR25RSzJJeWZLaTNQRDI5RlYyaU1DY2J6SUFYN1dZ?= =?utf-8?B?TkU0Y29MZ1RPT2RvVnRQNHQzMW5UYWN1cG83aWdaR0lJVVY0U3l0KzJOYi91?= =?utf-8?B?TkljeDVsMU9nelB5d2tHUi94R0t4S0lqOGxnOWgzODh0aTJJYlJwZzdOMTFG?= =?utf-8?B?Y1FGcVdzbml3NVJXdkg2dnJ0TkhsWGh4ZjJQNVFvUU9ZZjI2azNCNkUvLzQ5?= =?utf-8?B?azBxMzJTamlvUlZyV3d2SU8yVjZwS2tPU0c2bUpGVDBoUFhCUGtkTGlYLzM1?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W5ar0qjH6zJ79ytwX8vt6VH0ZR2ObUuv40prgU8Udb5Z48/901EU3P5H+5so4ogni+5yrJAM/OuJ2IK9J6hc29R71TDzBxxbIl22d/yNY=; 20:BcE1bSS1JUTdfh/ongSoEU5G3+/UecTyzk64qGbdAEvGH31upFIMRo4fWkE3P1NNTlICg6ZIFBhZSbIZvuSAtUHlCBac5xfFicvPajzPWr8seFqHIX07RfGY/s3dAHdxpDRf5QjOun4eNhbAuIfRyBJ7th5yElyTHeCxBljokIayJy6bX1cUsUhtdIhcGE0J1Heoj+ys0Nezd/KwCVm3y+7XmwbFMU99o9NxVEuJ10QwGF2okNfI9jF5fwaia3gC X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2016 15:55:00.3425 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0661 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.52 Subject: [Qemu-devel] [RFC PATCH v3 18/18] migration: disable save/restore and migration on SEV guest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: brijesh.ksingh@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Snapshot, Restore and Migration is not implemented in first phase. Return error when user tries to perform any of these operations. Signed-off-by: Brijesh Singh --- migration/migration.c | 7 +++++++ migration/savevm.c | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index e331f28..676c94c 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -37,6 +37,7 @@ #include "io/channel-buffer.h" #include "io/channel-tls.h" #include "migration/colo.h" +#include "sysemu/sev.h" #define MAX_THROTTLE (32 << 20) /* Migration transfer speed throttling */ @@ -1150,6 +1151,12 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, error_setg(errp, QERR_MIGRATION_ACTIVE); return; } + + if (sev_enabled()) { + error_setg(errp, "Migration is not implemented on SEV guest\n"); + return; + } + if (runstate_check(RUN_STATE_INMIGRATE)) { error_setg(errp, "Guest is waiting for an incoming migration"); return; diff --git a/migration/savevm.c b/migration/savevm.c index 0363372..f125716 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -54,6 +54,7 @@ #include "qemu/cutils.h" #include "io/channel-buffer.h" #include "io/channel-file.h" +#include "sysemu/sev.h" #ifndef ETH_P_RARP #define ETH_P_RARP 0x8035 @@ -2027,6 +2028,11 @@ void hmp_savevm(Monitor *mon, const QDict *qdict) Error *local_err = NULL; AioContext *aio_context; + if (sev_enabled()) { + monitor_printf(mon, "savevm is not implemented on SEV guest\n"); + return; + } + if (!bdrv_all_can_snapshot(&bs)) { monitor_printf(mon, "Device '%s' is writable but does not " "support snapshots.\n", bdrv_get_device_name(bs)); @@ -2176,6 +2182,11 @@ int load_vmstate(const char *name) int ret; AioContext *aio_context; + if (sev_enabled()) { + error_report("loadvm is not implemented on SEV guest\n"); + return -ENOTSUP; + } + if (!bdrv_all_can_snapshot(&bs)) { error_report("Device '%s' is writable but does not support snapshots.", bdrv_get_device_name(bs));