From patchwork Thu Mar 8 12:48:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10268005 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 9206560211 for ; Thu, 8 Mar 2018 13:01:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8354829905 for ; Thu, 8 Mar 2018 13:01:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776382990E; Thu, 8 Mar 2018 13:01:13 +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=BAD_ENC_HEADER,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 BFE5129905 for ; Thu, 8 Mar 2018 13:01:11 +0000 (UTC) Received: from localhost ([::1]:38525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etvAU-0007GU-GT for patchwork-qemu-devel@patchwork.kernel.org; Thu, 08 Mar 2018 08:01:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etv0C-0005ji-Rw for qemu-devel@nongnu.org; Thu, 08 Mar 2018 07:50:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etv08-0004M1-Kq for qemu-devel@nongnu.org; Thu, 08 Mar 2018 07:50:32 -0500 Received: from mail-cys01nam02on0067.outbound.protection.outlook.com ([104.47.37.67]:48305 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 1etv08-0004LY-9T for qemu-devel@nongnu.org; Thu, 08 Mar 2018 07:50:28 -0500 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=wxTmVRBvOF1Zwj+/2BDoiak9kN4Vu/bumSas/Jo+iNk=; b=MP+scmgPxrWgWRnZIg/rj+LusZypCF9wmWUYzDis/Q+FLLa7z9OelJOcF1SK6E6TvaXwp9foIk3PV1CsLYZKVvPOUgyyGoyCoyzslRAuBwLEysPQANmoAc0lL5xh918cLtfc7AdHGtbxvggoGWFMy1P7aFeAQq1MByIylpUFRhc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Thu, 8 Mar 2018 12:50:22 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Thu, 8 Mar 2018 06:48:57 -0600 Message-Id: <20180308124901.83533-25-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180308124901.83533-1-brijesh.singh@amd.com> References: <20180308124901.83533-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR14CA0031.namprd14.prod.outlook.com (2603:10b6:404:13f::17) To DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 92437149-65e6-415d-3672-08d584f3292a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM2PR12MB0156; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 3:uI969o3fsHTdN8mWsZkiLPeyGrYgbV9zntdUKT34qpuFygDPWdR7sDOgOt/sQVLfkQF3zovKEqJKtHFXsYNNO/kaFNT0K4DrD6e+mesEvycPLCgc1T+9XmOlxtn96wqOYA0LdcxcH2wxfsNJDIdpYOftDQ4ZqU8wBCtdNBeGNmyWMRXyyPWKDeTnjEFBWsSdQQ3WOL6ZF2Eh/J0IoQU4RolTH8Usej+Xx4b6rhQvlMkcgc/iBpj/x0tpFcgT+0ub; 25:HOOSxTNqaMChK2DL4p2U7CGWGZ25/42OIjrkRbcSpZBnGsQo5PtkRxZVHqSaA7OBkaFxtyWNi2Vky0924Fych3T9JVET4mPX9HVPX2hPZ2cI2XVzAR35rTbZmUfmSomKjtYCPy3cTBMQdT1q7YJA13UPH97Ifv7a7NiGFnkYBzfLYdU+rSX0hSy6do0aefZ07V8ftQTKR7i9Dldt/l+njouQReMUS4/KVgsSJZgF6vcTxVTIC9ngWQH9oFjYN2Bugc/RkKURo0C3+0HX12R4UP5GUlxbdg8pJTxbTyl410BDCwSvCqzQWE6y6xlvlvo9XHZselMWC4waOJNe3UKnsw==; 31:aBUGtBf4W86BFmUbTNv0Zx48ADvwS4NrqIfK6vnJ3D9P+K5K71xVdGkkeuX2L8vL1TfLI52zBlDqz9L9eA0h1x62v+N6K5/krIt4MrpbRwrY58saxIg9amQ/2jHEyYQ9ALSM3Rb9OCrvRCoouCgvtbkywPA8L3UeHCkT2Rl6IRZGCwisCtjbXtYvIYXjlpcc4yP/ngTas+CdO1GAiyZr1dNVxvrm8IzB5YBzIrQGL4I= X-MS-TrafficTypeDiagnostic: DM2PR12MB0156: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:k8qld9MdAHxEQrYzLqt1Kue7soeS5pFQZ3MojcdaTGbOJajJa/5KtAFeVyK4ZHH+3j4VbjPkC9hkbQoMFsqp9wLPt/X87G5GvNmk4+LPoFptv7z+XtgjkJIe1EzTLxDpy9o3lJi4rYuqZiuXGKcm/Id5VfaMtitoeCFYOVNBgoPVMQP05hqyacnPc+hDdlV19p1xqXxjAkdA7AO4/A5ktvdVJ9fPRGYdCrLmCug3sbyXpCwoveVYldZFGjC4c/iaB2B0u2c8eWwb7jseat9OQ0+BBrjHL/WnzkTaC0qWxUhCOoYO+OiN8xwQ8qenBrr78bCdLeNxi1UslbsX8ENtbWrYshpimqT7zv1F9HUq7hZayaTLwNikoCV253nh8/7113wdaSUZL3PN5hCk+Ee+9iALUAa4eVNEZHLEnTfjHTzPhi66pxquEVu1WCH5pS7xUGYFEZ2xJ7sE2QRcaKmbcy3m1B7HeHG/9VGCAY84WDJSLRdtSbXYfaOzmxaJ5zWd; 4:RHrHb7nYu/+Ft5YFZB50OqpDhos5Vfvjsbb6iRbqzzgYSlNEOC0dMIebCPK/9fYHC4RxYDysZoVhkBae3WoQrxhasU+Hy0prsaErUkgyy6fEVbBkYQ5nyjb93G892PGJTztti6sQ66MXachmx/z01hHNhSKF2vjAI1JTS5+TU71WhiGY2orQucWLNfwsYxFZc7YjvR/7pEXiSZGdvKjPw6IUnYoxwwlEO5Xx6/w55cmedeZmZWHxHTocUy5NbMY5HVmSiphsLa4PD7hRiRJ0un3gaqeIpicefRbTaRtsrxg91tsesXfPyEAKXjRyuTrk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DM2PR12MB0156; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0156; X-Forefront-PRVS: 060503E79B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39380400002)(39860400002)(376002)(396003)(346002)(366004)(199004)(189003)(50226002)(53936002)(2950100002)(6916009)(2906002)(2361001)(6666003)(2351001)(106356001)(81156014)(53416004)(8676002)(81166006)(7736002)(36756003)(305945005)(8936002)(105586002)(48376002)(50466002)(68736007)(97736004)(47776003)(66066001)(25786009)(4326008)(39060400002)(6486002)(7416002)(5660300001)(3846002)(478600001)(76176011)(51416003)(7696005)(52116002)(6116002)(16586007)(16526019)(186003)(26005)(1076002)(8656006)(386003)(54906003)(86362001)(316002)(8666007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0156; H:wsp141597wss.amd.com; 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: =?us-ascii?Q?1; DM2PR12MB0156; 23:WtrquhkHsHRMecsVOyx9EXnUFUywmwMJDeXWsLZQh?= =?us-ascii?Q?L2CVsqYdgzEqfVrm+MMgKmoauoqS0I/HA7HZM7LkuhWezWmw7nMknpCsMxUa?= =?us-ascii?Q?J+CccwKdnUOaxHDNs/EVZAPNBYE+73G65f4OfOS7Mf6lgtB1VoDxQnQY9p8U?= =?us-ascii?Q?vCRazlJFWyHGSyQJQpaMP2r69J0eKOmZWaX2PEzpJDDVv1ZkglhX9rQWyLrF?= =?us-ascii?Q?RbrBBdPmiwQn95yQjF2iL10RpVV9Ay7pOV5Ka5kgB9g7Up5ncyrjv8qZ8A26?= =?us-ascii?Q?DILNT949JJu3AvO9PjXBSosqSBD/rS3mKKxvYVtKs8or2f/6lIT1sqd7f2iu?= =?us-ascii?Q?dskJd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Q6ofC/ikHjctTZ8nuPS3ksrFsvNx+3XrmsASD3HRlSCRsb8bKJC4JJlt3l3p3Tbv6FZYMRbx9bMrGqQq1LdeHzB9sdMPytSRNpZaKVupcqmgGpEmMV2GQivgqmb7IrpnsKLZjsK0lq5jNv3cJhYliCDuFW/uEc2MPB4i0AfSyOoInGRsq+xe04+TSA/+tNfzZcEmi/6w SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:3dv6Tb3ghBkVl6AhfDYcfh38Cyw2e43X+2IFylfIUxhiDR1kagACWGNMs3No5Nr/tz7YMjZQspIST+7PIjJBmvcZyLmrveqnwWWuUl+syUuARoEgtnJR+B/HXn0c5J5i2O7ZbqcH48BXbmAx1t7o/JJrJxJ/ivHD4ExCBiz5TJiOq9QJG8uR8JDfwExKwNIZQIcDHGe34IRrEtdlGOoJNz7krdCisA/32bXNU3Vlq2a7jiQmUiw8SSD1PFJxftEm X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2018 12:50:22.5344 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92437149-65e6-415d-3672-08d584f3292a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0156 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.67 Subject: [Qemu-devel] [PATCH v12 24/28] sev/i386: add migration blocker 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: Peter Maydell , Brijesh Singh , kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , Alexander Graf , "Edgar E. Iglesias" , Markus Armbruster , Bruce Rogers , Christian Borntraeger , Marcel Apfelbaum , Borislav Petkov , Thomas Lendacky , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Alistair Francis , Cornelia Huck , Peter Crosthwaite , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 f687e9e40e32..b9bfce95246a 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -24,12 +24,14 @@ #include "sev_i386.h" #include "sysemu/sysemu.h" #include "trace.h" +#include "migration/blocker.h" #define DEFAULT_GUEST_POLICY 0x1 /* disable debug */ #define DEFAULT_SEV_DEVICE "/dev/sev" static SEVState *sev_state; static MemoryRegionRAMReadWriteOps sev_ops; +static Error *sev_mig_blocker; static const char *const sev_fw_errlist[] = { "", @@ -583,6 +585,7 @@ static void sev_launch_finish(SEVState *s) { int ret, error; + Error *local_err = NULL; trace_kvm_sev_launch_finish(); ret = sev_ioctl(sev_state->sev_fd, KVM_SEV_LAUNCH_FINISH, 0, &error); @@ -593,6 +596,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