From patchwork Thu Jun 4 06:42:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 11586977 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4BE3E159A for ; Thu, 4 Jun 2020 06:45:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2383B2065C for ; Thu, 4 Jun 2020 06:45:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="VhGOYhHg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2383B2065C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgjd4-0000wa-8e for patchwork-qemu-devel@patchwork.kernel.org; Thu, 04 Jun 2020 02:45:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgjaD-0004yN-R2 for qemu-devel@nongnu.org; Thu, 04 Jun 2020 02:42:33 -0400 Received: from ozlabs.org ([203.11.71.1]:45271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgjaB-0000ms-Q6 for qemu-devel@nongnu.org; Thu, 04 Jun 2020 02:42:33 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 49cx6C0C7Pz9sSg; Thu, 4 Jun 2020 16:42:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1591252947; bh=IUFMoEbkcs8o6aiX40egsNr2FfcrirDbeyetkgE7SVM=; h=From:To:Cc:Subject:Date:From; b=VhGOYhHgSI2buOMRy8gV2fCllPdg0yDXqCWtWQw9boI2+v2coQZVNMVXAafg9062Z z9i1ZTsX5eyy9mOBSQJBWpOPBPdeXW1240geDjpRLgSeHii7bMMrdxGryrM+XgxO9C uq8KKBGeYjjzsjBEOj8LUacA5kT7sC5hcAVRPul4= From: David Gibson To: rth@twiddle.net, pbonzini@redhat.com, ekabkost@redhat.com, qemu-devel@nongnu.org Subject: [PATCH 0/9] AMD SEV: Cleanup state handling Date: Thu, 4 Jun 2020 16:42:10 +1000 Message-Id: <20200604064219.436242-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/04 02:12:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, David Gibson , brijesh.singh@amd.com, dgilbert@redhat.com, Eduardo Habkost Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This series has an assortment of cleanups to the AMD SEV memory encryption code. Amongst other things it: * Removes the confusion between struct SEVState and enum SevState * Reduces use of global variables * Unifies some ad-hoc structures with an existing QOM object I made these changes along the way to building a framework for common handling of mechanisms for protecting guests from compromised hosts (such as AMD SEV, IBM's PEF and others). However, I think the changes make sense on their own, so I'm sending them for inclusion now, while finishing the polish on the rest of those patches. Please apply. David Gibson (9): target/i386: sev: Remove unused QSevGuestInfoClass target/i386: sev: Move local structure definitions into .c file target/i386: sev: Rename QSevGuestInfo target/i386: sev: Embed SEVState in SevGuestState target/i386: sev: Partial cleanup to sev_state global target/i386: sev: Remove redundant cbitpos and reduced_phys_bits fields target/i386: sev: Remove redundant policy field target/i386: sev: Remove redundant handle field target/i386: sev: Unify SEVState and SevGuestState target/i386/sev.c | 257 +++++++++++++++++++++++------------------ target/i386/sev_i386.h | 49 -------- 2 files changed, 143 insertions(+), 163 deletions(-)