From patchwork Mon Dec 4 14:43:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 173431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2819747vqy; Mon, 4 Dec 2023 07:01:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpHRTfcOiYM2V1qnkM9l3A2eM9zqVo7ypeflq2ENhpUXI2txVuKJSc9a2oofdXZ3/Q61+W X-Received: by 2002:a05:6a20:8c08:b0:18f:97c:8269 with SMTP id j8-20020a056a208c0800b0018f097c8269mr1496623pzh.115.1701702106397; Mon, 04 Dec 2023 07:01:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701702106; cv=none; d=google.com; s=arc-20160816; b=tDIrqd8m57liax0lM6PAJi4ChE5+aW9HB6SGjX1MspsYSV+l/xJIf2SHKYnCcKalyw xnxuB83ufqX1t2HzY1ssZ7yT4BTKyBMMR94kOJBfJ5qVu+cZxIExovN4j0vjGBMJImPG 2+ec4s9Le/vqKDiwr7M40k8st8lIjzd1N0PNIGm+tr9qtQDbOzZD9Td6ElKq/6ryA3iY fRvTz49jXG8wWpdb6SdXu6XRCgoI9S6y7wftamdUKLHht/IEelot+S6JtGTRSuNyUvmX wGls9pDFoz8+kR++iZV933XacF/jq5yzjffIztoWOeVr8PxCtaFUDBdTxFH2wjXCGO93 mdGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=btQo2zPDw064xSTjz2Eq/eRv+OQ6oUKEBtLgT0+MLbo=; fh=aAPqvXm40pY9772UiBOljEePwtz/3Q0zIOpw238tj3M=; b=ji+ArmILWABkc0WHTyt0QyYskMA4MygT7tuSWIRcpy5X0hgh5NcJKpcQqqVRd27o3/ SbYceelH7hmS26UCEp1tQ74b1umoZpQA2vVuMWdChB3Nzr7JRV/hdIJnryfDppMXoaFZ fGnJK+XRNGBhKXh3qdbMegiS4B7vK3xxWS8pIkOQahAPCgE+MhFRu5GNEEo8+vInKk57 9FON7SIaJfObgBoowDTgS/O8eS3bSpyFXeJm4hOu/seneyfsZWDodNmemDWNyDvLGnuV KJt9QvAvrpRC2OqZ6tuGf2DZ40fpzfzrxpFCFDzgdHMNOPSYMRQjYpXkzC0cNKm5mMdG fE/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=IHBVGwe2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id t15-20020a63460f000000b005bd5a50b559si7746722pga.715.2023.12.04.07.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 07:01:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=IHBVGwe2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 151EC8058C5B; Mon, 4 Dec 2023 07:01:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233857AbjLDPBH (ORCPT + 99 others); Mon, 4 Dec 2023 10:01:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232627AbjLDPA0 (ORCPT ); Mon, 4 Dec 2023 10:00:26 -0500 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 837E8CA; Mon, 4 Dec 2023 07:00:32 -0800 (PST) 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=btQo2zPDw064xSTjz2Eq/eRv+OQ6oUKEBtLgT0+MLbo=; b=IHBVGwe21iEqCLiLvHeKue8g0r fJDcN2PNqZyJKM5BTMk7yOt+bW2bWxjZ9EDbLObtJDvuNcKDopw6KMwBLygh4FB+vIvetUGCJ2JHG 0MgZyoclWF/xvxF65aYwNcuzar63NuxNVSArvEpfn+BEf5rqYlcrje6Hv5xmMLJyJJ0o=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rAAQk-00043T-A5; Mon, 04 Dec 2023 15:00:18 +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 1rAABS-00088g-8o; Mon, 04 Dec 2023 14:44:30 +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 v10 15/19] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Mon, 4 Dec 2023 14:43:30 +0000 Message-Id: <20231204144334.910-16-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204144334.910-1-paul@xen.org> References: <20231204144334.910-1-paul@xen.org> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 04 Dec 2023 07:01:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784363988073506888 X-GMAIL-MSGID: 1784363988073506888 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 d2958b27872a..1280bea6399e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4649,7 +4649,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL | KVM_XEN_HVM_CONFIG_SHARED_INFO | KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL | - KVM_XEN_HVM_CONFIG_EVTCHN_SEND; + KVM_XEN_HVM_CONFIG_EVTCHN_SEND | + KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA; if (sched_info_on()) r |= KVM_XEN_HVM_CONFIG_RUNSTATE | KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG;