From patchwork Thu Feb 15 15:39:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10222211 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 A6A446055C for ; Thu, 15 Feb 2018 16:07:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9772628886 for ; Thu, 15 Feb 2018 16:07:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B955288E6; Thu, 15 Feb 2018 16:07:58 +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 13CCE288B4 for ; Thu, 15 Feb 2018 16:07:57 +0000 (UTC) Received: from localhost ([::1]:33622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emM4i-0006cy-9l for patchwork-qemu-devel@patchwork.kernel.org; Thu, 15 Feb 2018 11:07:56 -0500 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 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=xVs7OQqd3GWPhpfnXeVxCe5VOCYagBTGuyQ+U0Dp0NE=; b=HNlImODHQSVEfJRkzPyB2YpC1S3ZGo5t1wF1SZ1NxL1x4n6jkbehV7Ob769pqL7PNDl+r+rIsMC42b9QmBDV+q3JcL+S2N35ANz0sxhc/H2/IlPweTivBi9PgfDQhnJzHos9rR+OolvFyFMBx2143Bd3IzmtvXbIdHpwpEWqu2c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 15:41:15 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Thu, 15 Feb 2018 09:39:54 -0600 Message-Id: <20180215153955.3253-29-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180215153955.3253-1-brijesh.singh@amd.com> References: <20180215153955.3253-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0044.namprd04.prod.outlook.com (10.172.133.30) To SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e1b2921b-a20d-4fba-98ad-08d5748a8d5b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 3:Qpkg9/KBdZo96EoCFsRMppfwjB3AXonQWhFzNCVlWcdOX4Trj1nixZYLZxq4jJhLKEIpj2gK5yXB0JgkUFb4a0KwZwtkeYWH1HlSF1inDPeqVNVHO2Nr3meA+ltpxdqkMKSHdbNzaBENzeV/3Qpy6O58AVm/0EPMYOBPnsUvbO8hRcslZpHtWzfuSrtizUsH+MOPtuts+A9DQKzjsxwxcfglL+k99D1eo90JyBFILKOX2YF8YZwvsywlY8StWAPW; 25:oXQa3fsckLS32O8y3FBj2y0f2lRQUroMEU0DsT88mXSr8xNpfMKlwYmJY6/bM7wMs74GVJsrpEO6ocZEEVpUn5gifjEyfjZgUq887PqiTPNZ8LwyJ1Hd7jp1Z5Vlj/cvzWTQREAOjIUPyimZNRgRzbz2o4kM8734QEaxBrIJnh8A1GSW+mq3oIWPo+7WD8FsIQCfx6md3zF2Uhu1eAk6bG8NtFsSf3kZxouuXjwWa4IBn6+SBncGk2rb4s+3lxVPwo0dwi62crmkwexn0sBoTU7x50HuayMMBa0dAMKJnK4ukJECNBBQVfqUmx04wl5FohXmlav0NlAr9m9wKj+B1w==; 31:hUL3np1v7GowSwFfcI8HdRPy2GBxNoeNOy8l65AuJFoRiadDdFqP9y8OPrPUxvUAkz6bliSQ4io6cUzZJtPy+/fFAh52PNTqDOrUZpqAaxKvzE4mHVbt5sLAZw//a8apUBFpsMEj0TEyl3qfD2/B0IZZV1ENEF3S2dB+uEGxeiNCGKmdD2PNRjSFJI1VRVxbPLYmoL0b4MF1dwI4bB/2A0cATscjdDBSHBbMn5wLEhM= X-MS-TrafficTypeDiagnostic: SN1PR12MB0157: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:i1kKI/s/ncGrSlIsxyC8N1Qw5rM94FVVLBHldmEbbt+OW0rHVaNsJUZl95UcGAfRFWQtxKyvlXRoAWVizxPuqVVWNKleULMpnH4iXNrwKSvI15D0u7rEAG6yP8UQyx6C4qIBRQA3EwjM6T/g/uwqJv2wYbJYI2+FmgGoeCv5K3d9a91RGDzEsZ6zFloYe2NEXDZoVzGo1PaWyqq/0ca4dE6pjwTq7Z6ibxjzncyIcM++Ic6X0zzEQQJOZcnylkB0kvUPIqrhIyCcKPUpbS4gYyt2k+8wS5mdDIy5uqKlKhmYHHYdvvZpGxnG9F7nfcu/17c31qmCgIr0XLwPhI0YpMu4PZ7+NZUhUTJmQ5Ewwc8+q/10teILNKsD0Cr8m+g99WprDEScR1wDWV+ctksPVhprnJIsq8Mc8KbyEvSktqg+x3m0E/T6mIrDGhgeYXEo1dtO7Rbbo7hrDc4e6mXGeNcChQjTTK1ipNu1piJBaDO9NmiLnNMH+mK17fn4WIzz; 4:akIbMCzf9AlkDMpfZmi1ns2jHFj4jARLMJQn9rVn3I19+hbewGavGRKRE2kfJg0LUFty6FykElZjmilJE/YljHvX6xzLpMTyQjyWHvWD+zdrn4heCZ95fghof3gAfZTJXeNZFHf0rbxTamb7+4hzkMsPZHPqDqvhg3LIHhiNuzQm6b+YBy6wL9vlL9IWNxS6fzC70NUgO/7uSKDyMIBivocJeL2a7MkpJRK3wE5j1i6Qyq6Fq2NKkfXnxrJXCgTz1nULckKKkF/ODawXgegzcjmQAIEZptKxp+rhK4R+FiNimiOYbakkSqJFb1tHYo/x X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:SN1PR12MB0157; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0157; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(376002)(39380400002)(346002)(396003)(39860400002)(366004)(189003)(199004)(26005)(3846002)(386003)(8936002)(5660300001)(186003)(16526019)(316002)(6666003)(8666007)(1076002)(54906003)(6116002)(48376002)(50466002)(7416002)(478600001)(8676002)(68736007)(86362001)(16586007)(2906002)(50226002)(39060400002)(2351001)(6916009)(7736002)(106356001)(51416003)(8656006)(52116002)(25786009)(4326008)(97736004)(2950100002)(6486002)(2361001)(36756003)(76176011)(81166006)(53416004)(66066001)(53936002)(81156014)(47776003)(305945005)(105586002)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0157; 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; SN1PR12MB0157; 23:kcodtb3IqcDrEBVFQecxhkDxIJ552rGo/vb4oi1D5?= =?us-ascii?Q?yXGmgWF4EAgY+iHaRtAZYCt5gYMqLTrqx53kY8IBQ9t7ERdaJY+GCpgayYsx?= =?us-ascii?Q?urc6IIwJkcFKTYCX0JKnNpOL4NwWOB4jQtF2IbEBCcfGRDFClnV+fBopeFh7?= =?us-ascii?Q?gL342ieIiKZ7XYg3YyWPvpprGKjG46TUjfcL7LCzajX4YXJ0ZLXcphShreFA?= =?us-ascii?Q?kjgzs274P0SgtLfYLS6JXvth8UDPiNl5SbMWdXuVM6OP+8LaX6JpiDdc/3rZ?= =?us-ascii?Q?HCbPl/RU5cLenNS3KJBwpUVNoDO2ZgpfNXGOHPwe75P5L6SVdU+LRZEBolrq?= =?us-ascii?Q?G1gnfU7aXDKSnKmhPV/pxiV4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us-ascii?Q?woJJGGTAzv8/L5fR9CavOcYtz/d8tDNaw8RO8NzsQQU8M/R2gIGs2aHz6miu?= =?us-ascii?B?QT09?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 6:1l2HeKXews+MoylHCShXiPmd8eddyAcI9tCsc1p452b/XWQ9lEiPktoGWkhW9tPgupE5p+sK6DCimFzrFZ8FtFJa+aASar+bQTDyTRyz5wjlGzYzt+04ZN1X80CydY552TmrKPir5fprx05hKscTyKNB+vCnw+rR3tDHtP2VhSzURgt0MxVfiAs5pug0XlOtFjBVDS0MUdqo7XWiEMN2+52cKqmj009fggIIj7SCm1vplaecVI/BsQAbMWRpGkyACLzTUvKE1SkMxA2zkVisceCMjxV3j/PaSwzfgEgv/Is8vmYHMx/IbJoiuKL+eadPIteYMQuFw0ee44hk53Em2JBjDgNidrs2uGgeG0FwFg0=; 5:dHC212U5Tm9oULjKcnZm2275mdLnr+ZLqgIFOhtvB7UMaoZ5CoN1hdyy3zvjv09ekftjqxBJGX62HahPoaRbcDEi9EBrJCfvrBt7JjaJGeF0P+Xy/WZugmqNZRKQDN56ylMTbSuqzSN13CgRsE5hH+5/z3IUxDLPvahVSkFRCXM=; 24:pw0rkhbQFCmhJOVX4oF03MBwP4V5i2od1Khwni3zMFlOJHmNbM03wLbayMFQhp8QE1q6/WECoc3BlnBm+LlPapVvd+ThINzlCs9lVplsOHM=; 7:DZ0J+nOmcFE+QaedJWns8SVPPtD4UFCa1D73vmuYRo3Sn1JZVi838s88kzGywqTakmctay/yn6zdj32SGojfrZbWQARI/0WwdHz+bdt76Aehgg3AG2Z4TFR/d7p/t6y1ACKJf8/e/xD8TVrecy6oiYlYt2SbrUUtGjSYUnPB9zUzgqgf4iE5/vP9G8MsZhyvfWuCuSLeGMphdR20uIvqqDCDYOev3MW3sTrSG2q032svant1ZLmEwVPOIQXiFLJR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:vXpv7WEst5bhS4mRWA0bhF/glQW5p2INLIE20L+VwFXcuu2WoyK6lxIb6R4DJ4BRuKEvuMcn1uKVwQ4pOQOTpogEVwXw5zk7rAQ7r2xwLGt0uT3+5hN9IjFhBrm0tJkzRaSg0jS1/PxlNSt0C8QAKp2Ofz4WYHmWJ9srbAbxWotky+yhqDYxk7GaIO/E0Ootq1+9A8YMOStvq5I3e0dEmsVUaBWlx9OuKDGo1AybdpIuwzh83ik16r89jzx9jlgI X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 15:41:15.2598 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1b2921b-a20d-4fba-98ad-08d5748a8d5b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0157 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.75 Subject: [Qemu-devel] [PATCH v9 28/29] 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 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