From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A4E8C11F67 for ; Thu, 1 Jul 2021 21:34:02 +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 C10AB6140E for ; Thu, 1 Jul 2021 21:34:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C10AB6140E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dme.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lz4Js-0005uf-Pn for qemu-devel@archiver.kernel.org; Thu, 01 Jul 2021 17:34:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lz4Ih-0004oo-Cm for qemu-devel@nongnu.org; Thu, 01 Jul 2021 17:32:47 -0400 Received: from forward3-smtp.messagingengine.com ([66.111.4.237]:58135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lz4If-0008Gt-Bx for qemu-devel@nongnu.org; Thu, 01 Jul 2021 17:32:46 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id 603AD1940612; Thu, 1 Jul 2021 17:32:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 01 Jul 2021 17:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=mWlQta zONJf20m+7LmPaIQjTDpN9ZKSOivB8Gnz9aQU=; b=CBxRH3+MKhjaLiPYU1WCya 0jrXt76EjE4MIUWl0n7iSc+OO3Z+86CVPw/wTM5Iqt/9yHQrrlfHgszJ1F2ctZsq gHmSxRL1t+Yl4Oq8e+/qciVZ1PJbK8XmIpEbXCCy/my97hZwphdnsJ43hl+En7SJ 8o5XvFuw0CINgeK658OPwx2uJ1t7nnqLB+LgvX3PzoYpW4aBWiS7RNtbDL2RBrSW zYYAKL+05LPLKcGVXh4fd7UFiOn0mixlRJKoWhSMkeoUjRthVR1dsKPbW/3i2LfA IrYD+EFbVkwnDWqhnn6Q7U4gHZq8b/UWzjM/YNZgi2PiZK+YZXcO6LQEe1l49kaw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeiiedgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefvufgjfhfhfffkgggtsehttdertddttddtnecuhfhrohhmpeffrghvihgu ucfgughmohhnughsohhnuceoughmvgesughmvgdrohhrgheqnecuggftrfgrthhtvghrnh ephfekgeeutddvgeffffetheejvdejieetgfefgfffudegffffgeduheegteegleeknecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmvgesug hmvgdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jul 2021 17:32:42 -0400 (EDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id c0eccd27; Thu, 1 Jul 2021 21:32:39 +0000 (UTC) To: Babu Moger , "qemu-devel@nongnu.org" Subject: Re: [RFC PATCH 0/7] Support protection keys in an AMD EPYC-Milan VM In-Reply-To: <31dce00c-71bf-6d30-a1d2-f0b6ce743db2@amd.com> References: <20210520145647.3483809-1-david.edmondson@oracle.com> <31dce00c-71bf-6d30-a1d2-f0b6ce743db2@amd.com> X-HGTTG: heart-of-gold From: David Edmondson Date: Thu, 01 Jul 2021 22:32:39 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: neutral client-ip=66.111.4.237; envelope-from=dme@dme.org; helo=forward3-smtp.messagingengine.com 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no 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: Paolo Bonzini , Marcelo Tosatti , Richard Henderson , Eduardo Habkost , "kvm@vger.kernel.org" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thursday, 2021-07-01 at 16:24:51 -05, Babu Moger wrote: > David, Are you still working on v2 of these series? I was going to test > and review. Thanks Yes. I have something that works, but it's messy in places. I hope to get it out in a couple of days. >> -----Original Message----- >> From: David Edmondson >> Sent: Tuesday, June 8, 2021 3:25 AM >> To: qemu-devel@nongnu.org >> Cc: kvm@vger.kernel.org; Eduardo Habkost ; Paolo >> Bonzini ; Marcelo Tosatti ; >> Richard Henderson ; Moger, Babu >> >> Subject: Re: [RFC PATCH 0/7] Support protection keys in an AMD EPYC-Milan >> VM >> >> On Thursday, 2021-05-20 at 15:56:40 +01, David Edmondson wrote: >> >> > AMD EPYC-Milan CPUs introduced support for protection keys, previously >> > available only with Intel CPUs. >> > >> > AMD chose to place the XSAVE state component for the protection keys >> > at a different offset in the XSAVE state area than that chosen by >> > Intel. >> > >> > To accommodate this, modify QEMU to behave appropriately on AMD >> > systems, allowing a VM to properly take advantage of the new feature. >> > >> > Further, avoid manipulating XSAVE state components that are not >> > present on AMD systems. >> > >> > The code in patch 6 that changes the CPUID 0x0d leaf is mostly dumped >> > somewhere that seemed to work - I'm not sure where it really belongs. >> >> Ping - any thoughts about this approach? >> >> > David Edmondson (7): >> > target/i386: Declare constants for XSAVE offsets >> > target/i386: Use constants for XSAVE offsets >> > target/i386: Clarify the padding requirements of X86XSaveArea >> > target/i386: Prepare for per-vendor X86XSaveArea layout >> > target/i386: Introduce AMD X86XSaveArea sub-union >> > target/i386: Adjust AMD XSAVE PKRU area offset in CPUID leaf 0xd >> > target/i386: Manipulate only AMD XSAVE state on AMD >> > >> > target/i386/cpu.c | 19 +++++---- >> > target/i386/cpu.h | 80 ++++++++++++++++++++++++++++-------- >> > target/i386/kvm/kvm.c | 57 +++++++++---------------- >> > target/i386/tcg/fpu_helper.c | 20 ++++++--- >> > target/i386/xsave_helper.c | 70 +++++++++++++++++++------------ >> > 5 files changed, 152 insertions(+), 94 deletions(-) >> > >> > -- >> > 2.30.2 >> >> dme. >> -- >> You know your green from your red. dme. -- When you were the brightest star, who were the shadows?