From patchwork Wed Feb 28 21:10:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10249851 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 719F960211 for ; Wed, 28 Feb 2018 21:26:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F22728DBF for ; Wed, 28 Feb 2018 21:26:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53B7728DC2; Wed, 28 Feb 2018 21:26:31 +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 AC45E28DBF for ; Wed, 28 Feb 2018 21:26:30 +0000 (UTC) Received: from localhost ([::1]:47042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er9F7-0006Yq-SB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Feb 2018 16:26:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er90S-0001TG-Fa for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er90R-00063Z-3q for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:20 -0500 Received: from mail-dm3nam03on0621.outbound.protection.outlook.com ([2a01:111:f400:fe49::621]:54490 helo=NAM03-DM3-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 1er90Q-000625-Rw for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:19 -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=STF0PQQ84+YlW6RcTnIL1d8d/KE+32GpBhcJRuv5vGc=; b=HCWVF+Cf+aZomc0aTl75ZQDztNELBuuekX9hopGg24FdsmNoqQHLJkaihLjuuS2igS5SOhd5H6hWqGM5Bz+01kxK/WFkUpHoNEpGfP4lAnbXqARz4tO+lZmtP4gWHRcT8qiVgB1W7WXJZEtlPYvAeMV3+3E2d4zerfekVMcoO6g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Wed, 28 Feb 2018 21:11:16 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 15:10:24 -0600 Message-Id: <20180228211028.83970-25-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228211028.83970-1-brijesh.singh@amd.com> References: <20180228211028.83970-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR10CA0008.namprd10.prod.outlook.com (2603:10b6:4:2::18) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7f0711ac-4ee3-486a-9ed3-08d57eefce75 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:iW44dLQGI407QR4fRnodSM6TSHzPdkz2g2nn2bhLpSzbGwhusFNHVBxzMxTVf5HAPm0yBY/H0qe3IzhmwuxUpMIJ4p1rHYvEcC5HeVQos350kn5nVZe6e6z+BU9uBjDiRtE8z5CuDFfOd0CCp7s7MWU7q4/CH+27elYu/EHdSA8ECqqSVhYhwcyql4aEk3eEVU+FFUm+DhFcqtfYg5oHM4kmMNHeAyAb9x8lDcsG+G1Bilc6UFFjUYM8vSU7b/+8; 25:KXD6jymPEC5sT+hfZze4neE+/p5ZnUaT7l6G2sTgM189EniNRPdbd05cyWpMn66jKzlyMrrFdiHG4liKOibYCwOJi3blEk0RvhRmxDYdU/8bQuqEXf5GP2dYCN3ZQfcMVucpOEyTLZDuBA1R6RDnSkFLl+m2jRF3Iusaq3IJfHb0hhM12mvy72DzfuBhmU3fOZdhUuDuD2K9JoajDSxCtjoBVNsHpz5uY4Nx55TR254u2JepXudWOo8zTub8g2JIdwSLAAcYxPne96BhDLEKLWpHvp0bMhese9Yxs1Sk6hAygSSx9TQPyBE8Ptdri0MlHjJQW6pgimIkXZ1OUygPuw==; 31:sfuDiokTT1QGjg/W0waM4lMVbRjqLCOzJ9z+6huWzpC1d0ehVq/40mWFoCmbrRrv04J0wQtHWTXKnB5yFbijIm1r5XccUeP+Nr4GRcL8yIrrypoax1BC2FxXe8z4i0QS1dyVkqdiGFspZdWr3fhAv2IZX7ZCP5xmN2e4oMbrmizMAuFv6QMXUPvwZDNshvXhbFQScbMboZS5GLDWIxZfgqPFQeejMSGd9iXrWpCf8dk= X-MS-TrafficTypeDiagnostic: DM2PR12MB0155: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:88DZ0R9DqDLYxKqwgfRje/iYj5Gv31Xux7mwpb/ZQ/Sg9AE2/2t1cig8Q9WgwbkG9Y25f8LLoLYlOz/sg2dLaYEj9gSMX0cmFbrzpQwD6UFgkdT4OK7onAAMMseb+sMdGOHYHFlwyAtp0wzqfn2KEUBZRcIOoVsoB7tbImKP+QIgWUX+293NJTi6HgQg8t0BadlFM18aXekYuLyAbZi7lpfgXSt6vfNvYs5qlzVRwyPqCnqPEcLD0EYfUvVrUdb7zsN3i/WUhOM7Paly/2b+tVbGJcqkAzXwSODryxjegUNUR15qEF7NofgQqCOO+R3y6S8pKSTQmYT3A/0G5Ouf5ZiC2nbYcwBAZWo9Q5VaTTiK8XlnDmDw6VrI+SxVNVznQH17M5Ud/ngqDBH4qUXcFrWd+lLjPyvZ8ThYrcbifalVLNbKfDNlfbgcFtn+TOfstt3koR+Wo7F2wXdUs1IvcooBlmy2nIQO3LtjZI10uB0Rwvvwu0kt68GrfgLAIBKo; 4:T0D7asie0k5HJY+AVy6c7QucW4c6Dx6HpxZZ5naruzJROgQ7raVDoBEr/K+iTq8p3rX5aM+Mqd4x3ChEEwlDeiX+BuGm7EEtq0PD0zEARCxKzEjEKgt6CreHKzu1QNLEN6j2Tl7RGvERsYBDbeJ0Lrn8zoyRlkhpfhVF66rFZ06OAyV/G3i04zZB2Qi4A/zZ7bpYJ9LYy62YLgjYelSPrBP1Z2LHXP8hc6NeGvgtU4t9cJ/ixZs9DVyRV1+kds1k1oLGR44ObEAnw+biHIKHMM9AtbNeExEhVC9o3Qyh88TNxwmQW0hVNd6vclPy3oRC 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)(8121501046)(5005006)(3231220)(944501219)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0155; X-Forefront-PRVS: 0597911EE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39860400002)(39380400002)(396003)(346002)(366004)(376002)(189003)(199004)(6486002)(6116002)(1076002)(2351001)(36756003)(16526019)(16586007)(54906003)(53416004)(26005)(53936002)(66066001)(186003)(47776003)(2361001)(478600001)(8666007)(316002)(81166006)(50226002)(8676002)(8936002)(386003)(106356001)(97736004)(5660300001)(2950100002)(6666003)(305945005)(4326008)(76176011)(7736002)(39060400002)(8656006)(105586002)(68736007)(50466002)(7696005)(51416003)(25786009)(48376002)(52116002)(3846002)(2906002)(86362001)(81156014)(7416002)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:wsp141597wss.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM2PR12MB0155; 23:1zzdiAvY6cSC/IAMcofnWuMccYehGmnmMfhdNBlkC?= =?us-ascii?Q?gzFBQJoy6adKCrpa6g56445/josOSF+jO6uyvA3gtjQpl4cBwKNLg1PztXJ3?= =?us-ascii?Q?XHXfm65aKghgYqgqzgen3RSqw9cgwaR5wMbzbw1TupU7LcpaiE1RZupOe+93?= =?us-ascii?Q?SrvYhN7FqaYNQCS/WFjWCcuEpMZfqCjjP2GOBzLssc8+ncjuK6OP6vqBYrES?= =?us-ascii?Q?me7Zh3Q7tB1/d0vLA28r5wttPpXgQkj09TZ2WIMjV5j+O63yzqxqxR8gNrPH?= =?us-ascii?Q?ib7mCADS8vkymMRRBHpEZwSKxYr6V2Io1sr9J5ycYh1ocD8LJNC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iwYyN/WNiiPNW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:/Lrp7FK047Dp3AVJz9eqoa2bN3xLIf5T6QbGt9dIQW3BoJ8fu1tWTKJtAR+De9nkXWDv+jaTwzdrXxoIEvc8a3/65Tb7HhWbwERBjxtKgnKQth4QyW3GqQ8OzJXYf4Uxr03z4We+ohErW4gBq5ZI3J82ebHwTYKt0dQusT9hRdbGpGEwWtIY7zm0M3HsHFXB0mOY0yAFEGyf9PI5bmp15IOrNHN1sGjda70KFGX9AeehprM0IZamL4efFcdb2CNe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2018 21:11:16.1391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f0711ac-4ee3-486a-9ed3-08d57eefce75 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe49::621 Subject: [Qemu-devel] [PATCH v10 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 23c2b6183f33..ad94eeace1b0 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -19,12 +19,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[] = { "", @@ -577,6 +579,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); @@ -587,6 +590,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