From patchwork Wed Feb 28 21:10:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10249877 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 ADB8660362 for ; Wed, 28 Feb 2018 21:37:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A99D28789 for ; Wed, 28 Feb 2018 21:37:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ED90288AD; Wed, 28 Feb 2018 21:37:22 +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=unavailable 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 0537328789 for ; Wed, 28 Feb 2018 21:37:22 +0000 (UTC) Received: from localhost ([::1]:47109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er9Pd-0006dy-9i for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Feb 2018 16:37:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er90P-0001Pg-3r for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er90L-0005tk-21 for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:17 -0500 Received: from mail-sn1nam02on0051.outbound.protection.outlook.com ([104.47.36.51]:43970 helo=NAM02-SN1-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 1er90K-0005sV-Lg for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:12 -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=h+92C2CsQj2vOTeXtSBGsM3oYsSZ9dOiDO4eufe1Cew=; b=BgaYGOz2UEU9DLCp+I+9dNSVHZHwpzFjjRsh+vyCLVRbrjlyIqETKYUmYFv6d/OmK5jZmbuS4Y18iGBXzD3nnIHqcdhc/LtlO8DxWH7wc8wLMCu2I1SGVYW88dp4Ej7SyXyKjumRdO4VvR/AgQNe3yPaSxcdxynbBXvL4ne62Hk= 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:09 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 15:10:18 -0600 Message-Id: <20180228211028.83970-19-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: ff9c7a6a-c5df-4496-dfe4-08d57eefcac7 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:SVowWnC0PumwZegoyHBW/UlELY6xoBsecm330DaWMBJaS4R+zHVINrPCnTidOd9eyDJgQ6TMHeEooI/dGfPGKoTrci3k6BjgAWPR2PG44kbaR0XYSrQ8+pKr051SXBuauEKaXPF9TGY95rU2jIaAiUc6d50sQ7uemOi0zY+GMBOBLkmKyBMFhFh4jrp/zCfRpJbvDdkv4m+6BoFBowo+mVQMRWoFzmFYtoAnEIyVFqrICbA5wrp4h/ukbsOacBCQ; 25:VgAEkCH2/Smwg2KgjGk4Q/cYon09bQA9za7rb0kLM+Qc6WN02RLRyA28ij36MeH4Cj1NOD3pyrqMyegJ5xkaS/FdtJn1QimSOWUCuBVWB7lzsqdAv2/MO2bMWlEqqCK31WK1XkGYP/0gYGHitqh2Kt9VJoPveOvf4lgJHE5wGJZkAiLpW95AqfVsYJLiZ2snobOSmUx46f18PmDH9KKO9i2Pvk7dLNYqGsPqV8Xv5ZoefDkDeJQmRsLSQ/0TQInRwuyZf/vlQzqgizeXaczHwrOsqWYskm+fpN3rUGNE2TMGdsnYv/oNR6eVT3Sng9CigLAUq5oLt3zU2YuNqsxHJw==; 31:v/DAqDVvdLs4NMLTGutryM+fi2MCrqydmtmPLS8EfVIr5G5Hmn+M2tGIgqstA50kApCbuCpOl8hAAO2YVbCF4wHqjrhLokDXL1VSoggAavPCSUcDOu3EdQHx4seCvJp3/M3t6Ii7pL1h1NN8O5JhZafSpusvZ/U7D17VwlgBNUL4I1xk+4kmvx68o0SWjRLq/KxBhuo93NaQt/C/NM4lsCz40VRQWHhGNVkfXiQvONQ= X-MS-TrafficTypeDiagnostic: DM2PR12MB0155: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:0xLKZep4O9eySSsX6XnLFL/ilI6Rb+Rk6hmLCBh9AivJO6qdSB7AyZg4YOYltGfINjB8MIfQ28rIC0gTmj/qhLxR3cs6NgVmlyHipeMt1otRx0IdWgrFOFk+PCWRHyO6VNYd6pB7W1GukwJWP/zTb7EJdJcO6i52R2a1o1msFYKaD8D6a04KdbXlH/6zfQN4F60fqXyIZJtolTB0yK9b4tEtBLnQL0nyWtdU8buV3XxjKT5ExUXtItA9tEiQra/8wqAvpoFpBZsgAJKcrilKQGBmwiOgfVelI9Z3+Dsg0Z4UbWwcvlazjabHdO13DdpTAS63dbDzMmighRLK06DFUrqaKqbTkovN4+b33ZzOLvHG/26KJkW5WLrrt/KUz+tNodRVbJkU4ed9XBkoNHPCvPz/O/Xidxow0sZCoU9tTxYaGbQvKHQerUzZguV4iCN8mRVJ0PqnwbTpDfZ3ZEhJ87+Bsmn4uTdgP8GSdgeh+YF/RoGCCgFdZ9Ec2u18O3JR; 4:DBQlJnNmuSaj01Vl8eQTLfKpQ5SylcUER0o9crzT49FM4IhaEGu/Y0iIh5piVYxjAFUyi9twlRN+PdP4JZ55nb0KILcs9T4gCwyMTolyomraW5Li5LjRlFGSq0HW9g2NLU7ct/+eWa/AsUHo+zBYwLqvKvXqaaetU03PKqZXBMdgnmSGaXG3x8Wbr75AljnKgF3A03sLHH2f/rb/nec+YQNXPAmpfrnTL9iSA6uCa5U79exSEyCU6uCxLuDOv+OqWUQiMWy8bDkwOyicNqhx+v4Mmt5VerCUk8AlywVQRiT3FIghOX2hGOBJpc8FSy7W 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)(59450400001)(2361001)(478600001)(8666007)(316002)(81166006)(50226002)(8676002)(8936002)(386003)(106356001)(97736004)(5660300001)(2950100002)(6666003)(305945005)(4326008)(76176011)(7736002)(39060400002)(8656006)(105586002)(68736007)(50466002)(575784001)(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:/DGnOoi/e+JCEb5LjUEurmkrVlN66yUISQWptQFme?= =?us-ascii?Q?SzTT0YPdDbfpP2N/UdzMcc1n6FDwJFJcbBVdaWFl911tn3tJsWa5l+pT6CVB?= =?us-ascii?Q?jzD185NKotFBRMER7O33PT6BPl7VJ1FN5HW7/Zx+PJxW64AJblPFm9tLVhG3?= =?us-ascii?Q?smpbHyBh/Dl0M5o3bEwD+ovntKoG0tRyi5laYxzaxJYwmzNQSHl0hL4gc4Uh?= =?us-ascii?Q?6J9PatzVKgeeGdQstVSJQFEVJl7gWM9uCJqm4m1B8GapK/Xe9dzMYqo4Cm0g?= =?us-ascii?Q?eWp60mf3V/NuHRMiJmkll9at5OqVOxQWGE0guC7PpyHTltoBM8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+EvOmxxEWiJsFhBR5KMdjTwi8ujqjUaGqxXz9a/LdNCIZMD2VCrmnUT9FB8Js/Y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:3mHuos/1wXEu1ivzqz/uhMnLAnS5jPrmgrGA91lR0hRpo8HRbefZKlryW6kt7KeOCdla16bDa6UzUku8863/zXOYYpCOUrLpp95Ar6KDYXSnJQG5+g1oKnwmh8km0t8TkU3TOh01H9xuowlL7utSTBG9g4z9psyz14e40gw/h/boM7U6Sqdne8He9j2OwnXZqb07Xx8nwoxghUH3PRs7IdDkwQWWQX/Df70cEcUTH1OYRg2uE14y1HhAZHbmUxsB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2018 21:11:09.9673 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff9c7a6a-c5df-4496-dfe4-08d57eefcac7 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: 104.47.36.51 Subject: [Qemu-devel] [PATCH v10 18/28] sev/i386: add support to LAUNCH_MEASURE command 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 , Richard Henderson , 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 During machine creation we encrypted the guest bios image, the LAUNCH_MEASURE command can be used to retrieve the measurement of the encrypted memory region. This measurement is a signature of the memory contents that can be sent to the guest owner as an attestation that the memory was encrypted correctly by the firmware. VM management tools like libvirt can query the measurement using query-sev-launch-measure QMP command. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- target/i386/sev-stub.c | 5 ++++ target/i386/sev.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ target/i386/sev_i386.h | 2 ++ target/i386/trace-events | 1 + 4 files changed, 71 insertions(+) diff --git a/target/i386/sev-stub.c b/target/i386/sev-stub.c index c86d8c139237..2f61c32ec975 100644 --- a/target/i386/sev-stub.c +++ b/target/i386/sev-stub.c @@ -39,3 +39,8 @@ uint32_t sev_get_reduced_phys_bits(void) { return 0; } + +char *sev_get_launch_measurement(void) +{ + return NULL; +} diff --git a/target/i386/sev.c b/target/i386/sev.c index a25722bdb934..a61c100ef47b 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -510,6 +510,68 @@ sev_launch_update_data(uint8_t *addr, uint64_t len) return ret; } +static void +sev_launch_get_measure(Notifier *notifier, void *unused) +{ + int ret, error; + guchar *data; + SEVState *s = sev_state; + struct kvm_sev_launch_measure *measurement; + + if (!sev_check_state(SEV_STATE_LUPDATE)) { + return; + } + + measurement = g_new0(struct kvm_sev_launch_measure, 1); + + /* query the measurement blob length */ + ret = sev_ioctl(sev_state->sev_fd, KVM_SEV_LAUNCH_MEASURE, + measurement, &error); + if (!measurement->len) { + error_report("%s: LAUNCH_MEASURE ret=%d fw_error=%d '%s'", + __func__, ret, error, fw_error_to_str(errno)); + goto free_measurement; + } + + data = g_new0(guchar, measurement->len); + measurement->uaddr = (unsigned long)data; + + /* get the measurement blob */ + ret = sev_ioctl(sev_state->sev_fd, KVM_SEV_LAUNCH_MEASURE, + measurement, &error); + if (ret) { + error_report("%s: LAUNCH_MEASURE ret=%d fw_error=%d '%s'", + __func__, ret, error, fw_error_to_str(errno)); + goto free_data; + } + + sev_set_guest_state(SEV_STATE_LSECRET); + + /* encode the measurement value and emit the event */ + s->measurement = g_base64_encode(data, measurement->len); + trace_kvm_sev_launch_measurement(s->measurement); + +free_data: + g_free(data); +free_measurement: + g_free(measurement); +} + +char * +sev_get_launch_measurement(void) +{ + if (sev_state && + sev_state->state >= SEV_STATE_LSECRET) { + return g_strdup(sev_state->measurement); + } + + return NULL; +} + +static Notifier sev_machine_done_notify = { + .notify = sev_launch_get_measure, +}; + void * sev_guest_init(const char *id) { @@ -590,6 +652,7 @@ sev_guest_init(const char *id) } ram_block_notifier_add(&sev_ram_notifier); + qemu_add_machine_init_done_notifier(&sev_machine_done_notify); return s; err: diff --git a/target/i386/sev_i386.h b/target/i386/sev_i386.h index 68019d6f39a5..2ecca66f6e64 100644 --- a/target/i386/sev_i386.h +++ b/target/i386/sev_i386.h @@ -42,6 +42,7 @@ extern uint64_t sev_get_me_mask(void); extern SevInfo *sev_get_info(void); extern uint32_t sev_get_cbit_position(void); extern uint32_t sev_get_reduced_phys_bits(void); +extern char *sev_get_launch_measurement(void); typedef struct QSevGuestInfo QSevGuestInfo; typedef struct QSevGuestInfoClass QSevGuestInfoClass; @@ -83,6 +84,7 @@ struct SEVState { uint32_t handle; int sev_fd; SevState state; + gchar *measurement; }; typedef struct SEVState SEVState; diff --git a/target/i386/trace-events b/target/i386/trace-events index c0cd8e93217f..f7a1a1e6b85c 100644 --- a/target/i386/trace-events +++ b/target/i386/trace-events @@ -13,3 +13,4 @@ kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%lu" kvm_sev_change_state(const char *old, const char *new) "%s -> %s" kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p" kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64 +kvm_sev_launch_measurement(const char *value) "data %s"