Message ID | 20180212153715.87555-29-brijesh.singh@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> 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 71E1560467 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 16:01:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD78290B3 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 16:01:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56FBC28D40; Mon, 12 Feb 2018 16:01:48 +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 C192B29655 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 12 Feb 2018 16:00:43 +0000 (UTC) Received: from localhost ([::1]:45836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1elGX4-0005cL-IM for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Feb 2018 11:00:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1elGC0-0003sD-8w for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brijesh.singh@amd.com>) id 1elGBw-0004nT-Sx for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:56 -0500 Received: from mail-by2nam01on0060.outbound.protection.outlook.com ([104.47.34.60]:31684 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 <brijesh.singh@amd.com>) id 1elGBw-0004m5-MI for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:52 -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=ve0onXlK/kSvKF+wbshr/znhapkuTIDVMQQzsLTld2A=; b=XF7C7CxhGzr//DVV/qD2BFGDp/dZpzZS+4Hdf2rHs4T/pu149aetuufYOjvzE9Q0YLuid5ETLsGnPAjanlzcE4vIzxYPhH6yneT0trUzwRac3SPcqNfa6R9tjxzsUl5KfV30xIxMfDa3yuzLYOZJRxyGvLkyifWwtlBlLkxZqvU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 15:38:49 +0000 From: Brijesh Singh <brijesh.singh@amd.com> To: qemu-devel@nongnu.org Date: Mon, 12 Feb 2018 09:37:15 -0600 Message-Id: <20180212153715.87555-29-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212153715.87555-1-brijesh.singh@amd.com> References: <20180212153715.87555-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0801CA0004.namprd08.prod.outlook.com (10.161.215.142) To BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b5eadc98-c5bf-4100-99c0-08d5722eb70e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 3:URuY7Dky8MkD1LWrXJmL6tXB6SKjvVRQh+b+4dN6uSFQ8psCL36XzxfgUIs2hWmjjhtIvTBcUJ6JVt78PEvkQP2Y6TRydInibQ0M7iX1IontZqpiHypAb+XaYdWGYfoKlYxyD7yWbgDPCE5l++gkotFLckBeO/LJOvncX+g+EuD8kkUmvIU/pOzEPHQdLUNY1LMVMiWy0GNaf8MSt/LPsyL6RCZMWSIMd7R4lk6rQg+ZrcG9juQVksoMyCzIyiQF; 25:g3Bpo1ErpPBc3vaFFtYd2OXWXVcsfmNaWx2FXW5mfJhLTJfUww1PUywvryapLOleU65UUyYEz6j5DDf96YKjMa61pY3uxMCTF5IoB1jkdFy65FXQCa46sFHmMpVfofsY9VJC7/k/QsG7DFBE5UgSGM9/WLjk8fA0dWu3y+c3/ZoxhQQQYYpk7wJdm5ppg1P7c8966D/TCtKVgdSQOKE1M5ADsUP5Bm3/haEh0fQgDrogBl+nYTwlnFDXWslm9q0wqT+u4MNjNfSMSBiI/jyhCiQQjOiBjDzruD4xcA2hSu8Du7jR4NZpLdhtFbHXfqkWOJr8X+rkARhfyjR3XIcINQ==; 31:PkG42TIxzn8v/epaOfPvNtkg+PlZJOMZbsyFE2IBsnkKdw+7NnnunnGdwKpcbqLS7RRFJNrFfcDAlxWZkLLMZ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460CF44F3D03475AEBAFD1E5F70@BY2PR12MB0146.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231101)(2400082)(944501161)(6055026)(6041288)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BY2PR12MB0146; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0146; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39380400002)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(25786009)(53416004)(66066001)(8676002)(7416002)(105586002)(81156014)(76176011)(81166006)(5660300001)(97736004)(186003)(16526019)(8936002)(106356001)(50226002)(2361001)(6116002)(3846002)(47776003)(305945005)(1076002)(86362001)(26005)(2351001)(7736002)(478600001)(51416003)(36756003)(4326008)(2906002)(53936002)(6666003)(2950100002)(8656006)(52116002)(6486002)(48376002)(39060400002)(68736007)(54906003)(16586007)(7696005)(386003)(316002)(6916009)(50466002)(8666007); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0146; 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; BY2PR12MB0146; 23:UgSURP4QC2oGbdGOXgXM7YJmGWOc+LYRyJ0COj1fp?= =?us-ascii?Q?LE/LQwnfPb+DDhoztUW6XIXPQe2JyhYVKpFwXEMnuf0MnN11WfGt/IluCC+s?= =?us-ascii?Q?trMo9ei5yBjz/YiJlET6bYk9sEW8m+7L5TKyzR8u29ERfoMhDnO4WZOpqApF?= =?us-ascii?Q?5VyBferlqkkpkFvDw4nGA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QJICoR4V9JGTNFHk+HBKQN137Do1gzGrUh6FIFnIO7x5DEELwyB2flsYYdAgJfnvoaZ2toIcQK+gdMaJFrzxeDmjBtmOCqTNStDIFgczuCr1/wZSWr4R+OOoZp8vnQr+++YtmZr77//tzlEEPGfh14oqjy7WcrnIbuNWyVzUB+xjs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:8XmcbYefC7mI1I3cQVb1dYg3KYisacrsI7/6aYmAbKRS9G5GJUDBudMZA+aqLVQs89+BsnycKdz8URg7aTA59t74h/qmGYyfEUxTeZ5aX3WzPwWzwNbvCCTSsUtunH5M8d27YGjpvbdaFpEOCQilHFRqKL7PQ9x6R5eYy3ypntRgpIX9Jyhc0spS6SRzA47kiElsuzcmkJKfC2KSqIZPS2zz5Q1IUjyp1sU7a4J/PaeUDLZMuu334PX5kah2WkEm X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 15:38:49.3982 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5eadc98-c5bf-4100-99c0-08d5722eb70e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.60 Subject: [Qemu-devel] [PATCH v8 28/28] sev/i386: add migration blocker X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Brijesh Singh <brijesh.singh@amd.com>, kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>, Stefan Hajnoczi <stefanha@gmail.com>, Alexander Graf <agraf@suse.de>, "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>, Markus Armbruster <armbru@redhat.com>, Bruce Rogers <brogers@suse.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Marcel Apfelbaum <marcel@redhat.com>, Borislav Petkov <bp@suse.de>, Thomas Lendacky <Thomas.Lendacky@amd.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Alistair Francis <alistair.francis@xilinx.com>, Cornelia Huck <cornelia.huck@de.ibm.com>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/sev.c b/target/i386/sev.c index 2713e3591d40..4029299ace6e 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 <sys/ioctl.h> #include <linux/psp-sev.h> @@ -33,6 +34,7 @@ static bool sev_active; static int sev_fd; static SEVState *sev_state; static MemoryRegionRAMReadWriteOps sev_ops; +static Error *sev_mig_blocker; #define SEV_FW_MAX_ERROR 0x17 @@ -603,6 +605,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); @@ -613,6 +616,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