From patchwork Mon Jan 15 12:57:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 188143 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1691973dyc; Mon, 15 Jan 2024 05:11:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWJnU5eGhYNjJ64F8JYVoceI2Wdrr/jKZOOBUOLAsA2mT3m32VbohmWmPGAwB9/kVbWxaC X-Received: by 2002:a05:6871:d281:b0:206:9ffd:b8d8 with SMTP id pl1-20020a056871d28100b002069ffdb8d8mr7935679oac.56.1705324294366; Mon, 15 Jan 2024 05:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705324294; cv=none; d=google.com; s=arc-20160816; b=viwsutMQFZDdwS7obUmlguYqvWKljKtJWkgEiKk6DtS3VoWHw95D61GVc3cwWXuHJV keACAI44bFjKI3LtTScHXmtb722N1DTjz8PukHEwmHYbyki0YbCvPA0knv5E22x3FX72 kIrEhSuEEyj+EfqRgWT0LJR/dUHH6IcDqwviHvYFV9n8Ber63uLcGd33rk3mNoKiQFyR mrVvTwDlr8aYJ3Unix5lb7fJno/s69Tma8vdJJay4rKyPT/KB1Laz0ahishkdSZUz8g1 cpHmU+TTqcoybQAG820FnsDRSU64kt6I5HOCt9JmewV05CjdI2VnOK2y9p+GchSHvXR8 vmkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=9nVZwpn0XPaPE+ciJu4eP0/Qex+j8YZICActwz6UTno=; fh=aAPqvXm40pY9772UiBOljEePwtz/3Q0zIOpw238tj3M=; b=zX73NMwzE/nm0D8U5VzZs43CdnJHmlRKtwwnEFraTv7qTDckl65TskF8fqn9DNmTDw 84tyjP8jCxO9quPhHii0UvbtoBfPguy3NEi90LfGZ0cLm49U3X7b0gs+Et9r9cF6xEXD 3iD7PBPINU9t1w7NpjKQAmiWke6dxsFZOMHnLTLUJB7lach6/GMI22vrqTo4dZAyjF6w 2GfK//gONCvxUA5twvz546DXTji0IrL/SVWjt9+qpyogsFd7hEuWRwACUwoEzB8LDqoV PBR5FBLsLPC3UAdBURvWUZk3SyQ9A3HHNsD1KCaMaTAiSJAca0Io7CjXPcfInPHM8cSA BvvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=JDQ0EIFd; spf=pass (google.com: domain of linux-kernel+bounces-26000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26000-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a63-20020a636642000000b005cd84983a5asi8845886pgc.721.2024.01.15.05.11.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=JDQ0EIFd; spf=pass (google.com: domain of linux-kernel+bounces-26000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26000-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B7464B219B0 for ; Mon, 15 Jan 2024 13:11:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 251711799F; Mon, 15 Jan 2024 13:09:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="JDQ0EIFd" Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBE501755F; Mon, 15 Jan 2024 13:09:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xen.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From; bh=9nVZwpn0XPaPE+ciJu4eP0/Qex+j8YZICActwz6UTno=; b=JDQ0EIFdxGlihB0695fmyQDdej 1j4UGjL9zbPONb9J35jYC+aLZe+ihRcFSLktlidRbvceErdPJ0uCL0rLjI2J0Uc/NidWaWpI+gVmK jKeLX3y3IfvBV/2NAzGdPcx4qHqFqIryksQEG7ei1uBfj2vUzL2g/Oz4BfNZTft7AB0I=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rPMiY-00035i-SZ; Mon, 15 Jan 2024 13:09:30 +0000 Received: from 54-240-197-231.amazon.com ([54.240.197.231] helo=REM-PW02S00X.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rPMXY-0002kM-Qg; Mon, 15 Jan 2024 12:58:09 +0000 From: Paul Durrant To: Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , David Woodhouse , Paul Durrant , Shuah Khan , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v12 15/20] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Mon, 15 Jan 2024 12:57:02 +0000 Message-Id: <20240115125707.1183-16-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240115125707.1183-1-paul@xen.org> References: <20240115125707.1183-1-paul@xen.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788162127539522289 X-GMAIL-MSGID: 1788162127539522289 From: Paul Durrant Now that all relevant kernel changes and selftests are in place, enable the new capability. Signed-off-by: Paul Durrant Reviewed-by: David Woodhouse --- Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: David Woodhouse Cc: x86@kernel.org v2: - New in this version. --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 19e6cc1dadfe..4864251dca41 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4678,7 +4678,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) KVM_XEN_HVM_CONFIG_SHARED_INFO | KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL | KVM_XEN_HVM_CONFIG_EVTCHN_SEND | - KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE; + KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE | + KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA; if (sched_info_on()) r |= KVM_XEN_HVM_CONFIG_RUNSTATE | KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG;