From patchwork Tue Sep 15 20:53:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 1364651 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Brb9j2W19z9sTs; Wed, 16 Sep 2020 06:56:09 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kIHze-0003f3-B2; Tue, 15 Sep 2020 20:56:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIHzc-0003eO-Rm for kernel-team@lists.ubuntu.com; Tue, 15 Sep 2020 20:56:00 +0000 Received: from mail-qt1-f200.google.com ([209.85.160.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIHzc-0001zp-Hf for kernel-team@lists.ubuntu.com; Tue, 15 Sep 2020 20:56:00 +0000 Received: by mail-qt1-f200.google.com with SMTP id f5so3938032qtk.11 for ; Tue, 15 Sep 2020 13:56:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OaJaZL31uxerFeXUM5QP0FtmuW/c/TGtsV+KhgYhhaY=; b=EdWFqVxi0cZXw2ZkuSXja8KaDAhgeQygM6njggzy2Z0xfswJovGLODN7aRoTgf5Ah0 wmJSQac5zA1MJ3iaLjrce8mqGgsoPHBzUtxqAV3gl5jvEy/Hudo5MwyqR7JZvPDC+ij6 1QZqllLOWkOx/6d/52CnemjazuUBFHCCwkf+A6yDtR2HMz6iPyrI62a9qaMrjybZb+pP ORRZ6bG9+3Byka61ybs6i+bdCcH2CfP52GQ06437j7FNuYqin8gDXRHPLAghEKq8cv6o prMfPZ9kPyAK1Qgh2kjd97LQRO6poB+/y3Mi3TdenB5fTvdWkOWdu5zL8EG0bhqZIJCJ Wfzg== X-Gm-Message-State: AOAM532hMLGrgYplbWSgJHYaQ0QikyMVjRKjgqsK5AjPWq9FDN+qAxV1 Cfv+6K6aRr9ZekEF19cwh4o446bx1wz+HWyppeg2OLhsX/hnfXF47NjWiBgzrKBCgaSlkZWHnPU Rk++t3wLIu51V4ZYzPkp0VDdmhX887fjc1JoSabLhWw== X-Received: by 2002:a37:a607:: with SMTP id p7mr19612396qke.118.1600203359467; Tue, 15 Sep 2020 13:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb/KdP7dxLyX+xov+dNHISMrDaqN4yZFrY4tuhzr6K3AZy498ZL22DTzMDhhsgZt6ThOtWwg== X-Received: by 2002:a37:a607:: with SMTP id p7mr19612386qke.118.1600203359261; Tue, 15 Sep 2020 13:55:59 -0700 (PDT) Received: from localhost.localdomain (072-189-064-225.res.spectrum.com. [72.189.64.225]) by smtp.gmail.com with ESMTPSA id o13sm16622832qtq.41.2020.09.15.13.55.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 13:55:58 -0700 (PDT) From: William Breathitt Gray To: kernel-team@lists.ubuntu.com Subject: [SRU][FOCAL][PATCH 1/1] kvm: svm: Update svm_xsaves_supported Date: Tue, 15 Sep 2020 16:53:48 -0400 Message-Id: <5497bdafa699ea1ac4d6ae4d3df5230445259d7f.1600200606.git.william.gray@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Aaron Lewis AMD CPUs now support XSAVES in a limited fashion (they require IA32_XSS to be zero). AMD has no equivalent of Intel's "Enable XSAVES/XRSTORS" VM-execution control. Instead, XSAVES is always available to the guest when supported on the host. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Change-Id: I40dc2c682eb0d38c2208d95d5eb7bbb6c47f6317 Signed-off-by: Paolo Bonzini BugLink: https://bugs.launchpad.net/bugs/1887490 (cherry-picked from commit 52297436199dde85be557ee6bc779f5b96082f74) Signed-off-by: William Breathitt Gray Acked-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 3243a80ea32c..027004daec56 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -6019,7 +6019,7 @@ static bool svm_mpx_supported(void) static bool svm_xsaves_supported(void) { - return false; + return boot_cpu_has(X86_FEATURE_XSAVES); } static bool svm_umip_emulated(void)