From patchwork Mon Jan 29 17:41:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10190311 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 E842B60388 for ; Mon, 29 Jan 2018 17:58:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D929028497 for ; Mon, 29 Jan 2018 17:58:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDC9A284CE; Mon, 29 Jan 2018 17:58:35 +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 3CFC528497 for ; Mon, 29 Jan 2018 17:58:35 +0000 (UTC) Received: from localhost ([::1]:53751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDhS-0002Zq-2J for patchwork-qemu-devel@patchwork.kernel.org; Mon, 29 Jan 2018 12:58:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egDRu-0005xt-2Y for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egDRp-0003mV-Um for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:30 -0500 Received: from mail-dm3nam03on0070.outbound.protection.outlook.com ([104.47.41.70]:22464 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 1egDRp-0003ko-Mb for qemu-devel@nongnu.org; Mon, 29 Jan 2018 12:42:25 -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=He3ye0BXxvloDA7WyWbg9sx0ZAKGHhTLETyFVYz+0B0=; b=cJm2nnahaOdB/GixuThsoFSfRsRhEo0vGQN2vYS1nyzdF3WejUz3A9DjqdJaXSoF310nXbWW5js6rU137mYre5lazSCgUOJGtwjH5Pk2b7Lhc+ACanosS7AEKUzQfzi9jMykV3loUVmGTXBDIIpku1aUHKz4lJrpVvOUyqipsOA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 17:42:22 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 11:41:32 -0600 Message-Id: <20180129174132.108925-24-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180129174132.108925-1-brijesh.singh@amd.com> References: <20180129174132.108925-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR17CA0018.namprd17.prod.outlook.com (2603:10b6:404:65::28) To DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: af733b55-f232-44c5-cc73-08d5673fa7de X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0154; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 3:IC/NdrxrgsK1x/jCIFbAJ20Q7cyFuAzAcKxbofMhj0Lfww/3oSsmfc1TCw1xSb7UiJ+3pruhboQetaGydoYQzjzpEBuAQJMHZY7xIo9sfhgtoeIKjj58UAl14J6I0eysml9Yupn5RZWcvJsJVDaC4qbGqP4wh8hOCa3IVaR+qsdYHFdIOu5PWoX7BDak7G+eLXxcdU8vJjFRo4xQPzoZbkIDmfkpcXzpPaUwV7Zu3rvsOUOGWujG7fj51xSwN58w; 25:fl7XHRvvGC7CLt2MBdh9Lob2Xm5aM1AVjOQZxYjs0xDJi1b4h4xxlgtU4XdPmHue9YT2jj3Wavs0bEWaXkf1QxwTTr4j5LtyibskQQs1DX+cCx89TyuSUwYFqQbzMO229QORq/KCu9bRAGzWFBwjo9bZG3RjjVNjUYUtu275njIWs2tZRpV4AdvqgwAOlsb9JooU0yZfqm+W7iOxxWzks8rfdg51jwkPKb9aHflTZ6b/s4kx2TfEW4WHQAh5xfti/VmCPU8I8H6TS2FQyYXF4w9+3ZV8BwEwi9o6XhvMYfVDTS1A/Sekjg6R/awNSNSvMDlu82U6Oh348Q2O/cajtg==; 31:v9rIQ6kGca+b12woDActjIozrAI/Q1XmcAVYyMebOURCjn862Og3+eTceomk62jtpsm1q5BJ7+hflUG82vJJmbq7fO56g2DvSfObfCtT7ku15Ma4HP4/ieGl9xQhrxwDqni/unZf+eQeQ2jwndkGzRRbfQBSDBIQ55H2Y5zTwEmJMwDrI3Ihu1V+jsh0dT3a8fxzatUPU4f3EtnG8AzQrm33AA66TsQPtmHZmSWexgs= X-MS-TrafficTypeDiagnostic: DM2PR12MB0154: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:CVixsQcsK6QAO4ujmgVIlIbABZhGeRfeJaxv8iDih35ddeWgizMZ/ucVrdzsNzCRa9kQdQHvSv40i4qgPtzi+jxQPiNMyaMzmWqVN86G594eraf2APy3k5FoOAN4dB6pn/9ixo63ws8F5elVrcTW1U3Muv7sCAha8l7ix2mZJlL7g0xpz+AD6zRaHI5okxlrCyFKJ1U3i4q581WbDwfIQVE7CZ55lTeaiPQlUnlPaiHJDGc9BwW4Rw+jjlHH6vzAvjhq2yROf2wLVm3/gAbP4njgwULIWiI3kriOYoeHdlz3Djp1AmAQ++nUGuUi9p0RlG1/3LUYSx3syCEQzhK3vli+yEu1lCL0VrnL329i+63VO5zlIU8ZR6okx7eLGVMS+8TxlhtoiTj3abauahlgL9i9hPLmxN5ihJzPFRSBUI6VGKWFVEHEmG5TBpAgpoibHRkaaijCK/rOpMKXhp8Mc6ygE0BbZWlyrCDEYWOKmgfx/iGcd+R87SAZzvngZ/52; 4:FThAXwJTmhzEucLHB/W2Crq8UGj7Qrfzjdr08inCiONJmV27UQtIUQ3uk5SWvupUfFYnO+YDMOeFbdeVZOtcQfnn9ZU2tvZN22ZdP85mjyFvGt5BCb+zCEHlxJjBgM39i/0k7hl6jWyK9J9uHWM9NEEgft2LmxIURrM8I4a1oC55ZZ1pZPrVdLwFENIrSs9XonoQKhQ20rtvtKToj0d/EDOLe/AgWxqlksEl1wNwHT0KlRO+9YvCXWlGDYloHdTff1kfM22VVFplYxWQADp/4pEvcooCtP4WQSbKjoYLiv6Jkt+ar8szD/qoePH+InwU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(944501161)(93006095)(93001095)(3002001)(6055026)(6041288)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:DM2PR12MB0154; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0154; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39860400002)(376002)(39380400002)(396003)(366004)(346002)(199004)(189003)(48376002)(8656006)(39060400002)(4326008)(6486002)(68736007)(36756003)(478600001)(26005)(97736004)(16526019)(53936002)(386003)(50466002)(86362001)(25786009)(8666007)(16586007)(54906003)(186003)(47776003)(316002)(7416002)(305945005)(7696005)(105586002)(106356001)(76176011)(51416003)(2906002)(81156014)(66066001)(81166006)(8676002)(2361001)(53416004)(3846002)(50226002)(52116002)(6116002)(2351001)(1076002)(8936002)(7736002)(6666003)(6916009)(5660300001)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0154; 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; DM2PR12MB0154; 23:xSshaP72R7CvrmVMR6tVtU1LyE75Hu9KTAasIO/4j?= =?us-ascii?Q?hXLyi6yMDcRxR5HUXGBQV70CFUhebZdyVY+kqnbkQNxkxGy8gxNkw2E62VJ1?= =?us-ascii?Q?nrbaje5bDbcXw0/9HbmMiVkta8qiF02HgqXZMabshRhY1ISlsvYrggRp7jFn?= =?us-ascii?Q?S9EvI89EzhIFwz4kTA1wBpgQ24PnIyotzf3irUB+XOM/OvijbdRDPZ1oCu1M?= =?us-ascii?Q?5YIef4BfV0B03DHAjUl1pRMxrr48T4W5dVnX1XyWj8+nwJRrz3lV2juFEBjs?= =?us-ascii?Q?Fv1SYXeoaoNngQioeZT/mrfbugmKsuz5YUKl30c24LOV91FDoZWdPclSQuEZ?= =?us-ascii?Q?4FtwkHoODpxmzOQLBzTMAdOnaKOhDJmS7fk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bcy8Gpy8a6Rhf3fXTQPUU6YWAjdhtkvVmp13udlQ3tLKek?= =?us-ascii?B?Zz09?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 6:7ikk/XmHPC6EJqH3avoKCwyLboa0GeFq2tnAeQddDRejUxpmge3py/WQHK4TuQv9sWRdQM5nn9es4EkW7hehqK9dfRA49ibivptOU34Upxa8DK0uggiKN12i833lk2PKSOGcwQIJsadVsHlZ77YGjJWsgnIbBsmyckxEgX486s8hNLVv7CRV5idGuE4T7r0xxlVtcdsfq+kINR0lmScvH/vcwdndeEZ5xv58CYbWrIVztAUbHFKwyT7QwZEpJ+0J54Kp2wrchf514CKV6c2pjsK8+nZg07uNLc77tO+8jt0UewgDz3LXOMv1H630dCUuoIQUtQ5LI7uTTVTE4xz8uxs959ocMTJb6VuG1FENO4k=; 5:rZtHvoEkue5ffhdWnrJndFB08DEcciOvtm0icViXUVTrm7x4F6KIBj+JUP32tLWQ34vIjqmSpGhffgl6SmBFDvDjKrF5ne/dz30AFh3K+DCXnTKK4kzezdtuBc59xcyhrC08Kcv7JL43mD0rk+KV3kbP+0nEost9cbuHzNdesoM=; 24:pfLvMLdc59WVL3Vb5mvMFZ5vdbB4fzUmQGTf1GW1oENW3Sh0ok7c/ZlyRht9HXTRk2aMo3FidNgiaJAJk1EsRpnH0jm2UHXouwuRjP9FBFU=; 7:0uD3hR8FDl50JMkeqJzDZb6xgG0AR6sARgqLrEN3GbNCFsV9T9XYLVx7cBmel9xsZdkWhuWuH2vIoAYLUThpOaSxrLnCtj9ebwlNRWUcYQrtxq4A7/S++JqUm8oWoLn9Ve1pTM7DVS51pp87qHiawJPgVoZQi4moSporuXM96qOQzOsbeKuVMi/79yIQ9YQRldSfVhpEb/ZrMMORz+mYNRPwDy5lZxjjWG5o3T3rxrlFsmAxYQend16aoThES/mb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:sBDo9zjBTtSWexrUYSTBsTu4YkU923dwIk4BBW684IgYZ9C9TO43+RJ6oqJnj1NzAJw46Jmu3BYc52LpybZC6m6jg0iDR9yI851NIvySbmIypuFB7+lOw3nt/qeJMFP9DrZ86U35CVX5nXszEHNGlh2O3kw0emKQn8ThW4bUQEDyknM6UsYMfetIvQqSvQwUFsi3wUVGPWOAJo/GW8BdSULesk6mFYyanWrXeu+taUrbGglwUb/fZcCdm2fNMcQG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 17:42:22.6977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af733b55-f232-44c5-cc73-08d5673fa7de X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0154 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.70 Subject: [Qemu-devel] [PATCH v6 23/23] sev: 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: "Edgar E. Iglesias" , Peter Maydell , Eduardo Habkost , kvm@vger.kernel.org, Tom Lendacky , Stefan Hajnoczi , "Michael S. Tsirkin" , Richard Henderson , "Dr. David Alan Gilbert" , Brijesh Singh , 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 --- accel/kvm/sev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/accel/kvm/sev.c b/accel/kvm/sev.c index 65d34c531ee5..6800e059f57c 100644 --- a/accel/kvm/sev.c +++ b/accel/kvm/sev.c @@ -20,6 +20,7 @@ #include "sysemu/sysemu.h" #include "trace.h" #include "qapi-event.h" +#include "migration/blocker.h" #define DEFAULT_GUEST_POLICY 0x1 /* disable debug */ #define DEFAULT_SEV_DEVICE "/dev/sev" @@ -28,6 +29,7 @@ static int sev_fd; static SEVState *sev_state; static MemoryRegionRAMReadWriteOps sev_ops; +static Error *sev_mig_blocker; #define SEV_FW_MAX_ERROR 0x17 @@ -479,6 +481,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); @@ -489,6 +492,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