From patchwork Mon Sep 18 14:41:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 141516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp2878990vqi; Mon, 18 Sep 2023 11:51:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHApHzKeJhAYY0f7GHYWrMfv65ssRsqNE18y256XNZcKXpuLxs7TkXYK2Fr9urLatu10rv2 X-Received: by 2002:a17:90a:ca10:b0:26d:b12:8383 with SMTP id x16-20020a17090aca1000b0026d0b128383mr8080772pjt.8.1695063069057; Mon, 18 Sep 2023 11:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695063069; cv=none; d=google.com; s=arc-20160816; b=NnhemCZQyiy3olQH6/gvsVgYVqvaHOZFOjVhgUlHzZkQBjuKuqvipIKBm9Gva7GcXF zTPRhEtx3SHvB6mgdf7aWftVH/pW+GDnBOeP1LemDfbdCsfaIXTar2qJgW/YIISS7I/h 1FUtxMr21lYloD12CZtGP3p1PW8dBAHC7wHVA6cDmph8QwdSwSrmjUDd7MfO7NtgCJXM fkqUmLG4PWSItbuvTYpVQoE69UrrBKKi87qRY3wK5Q53mM6ijTz5MOLWLZhK2Ftz0Elw 0N5/KAxdhfqQHhjr0F1BwEy72gC1p5JkKpLbr+F/i0+5pNicACDt9VJlmqk4nvoQL2bV ly4w== 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:cc:to:from :dkim-signature; bh=AwPzUZ/Z6+s02+eLaJ3LQ0RcvLB4vo4D1x3Qrf158Cc=; fh=jcKAuV9sx5P88dpWYyXihS1UO5TLmUGd/2Iq3QREE4o=; b=ne+bnAZz6Skwu5mTn2VnytLstnkl1n3PBinn0NUImDeGt8vw659Pqf7qbbBIbbwsjm qccQ44RpsjW9DaCIQicE8WhXe6sisIftmUwAsReYjzpm6JCo4uBgArsZ0QMrsK4k/gwb 3VPBckGwMUYzf6H90rZugSK+hra6oMaHCRYJGyludvYHpy6TJu9Ya++alKOl3Gm7ZDAg 39neuFSuSUCN4sL+EY4DbrGNuvzgLRvkJE9bl8vAiVbg5jBHxfb+6SQUljq51tm0/WUe 3CJT6D/Kov/8yt3dyg7HonLRD7TsHCsvGftp+mZ4nzZILmYWguMQRbYIu3UCsVufgYYO +Nlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=0+ep+zWi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id y6-20020a17090aa40600b002768052ba42si1087845pjp.12.2023.09.18.11.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 11:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=0+ep+zWi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 2F2308148B95; Mon, 18 Sep 2023 08:44:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbjIRPoM (ORCPT + 25 others); Mon, 18 Sep 2023 11:44:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjIRPoF (ORCPT ); Mon, 18 Sep 2023 11:44:05 -0400 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5D2E52; Mon, 18 Sep 2023 08:41:14 -0700 (PDT) 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:Cc:To:From; bh=AwPzUZ/Z6+s02+eLaJ3LQ0RcvLB4vo4D1x3Qrf158Cc=; b=0+ep+zWiORzxA56Tnase0hTPvo P9/UCv0B6Gl+U68MFx4BK7WhNvNwjHWqaIjvdSUDswILcFS1oN6Q51zqaY5VA8dgk9wGOuc758odz TRfOuFr54FSmrJQnsrtvkdOT/C5zMgH9dpZYBvMGdTM6+wbef3h8YJZ3H99ZeBEvVta0=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qiFSh-0003UE-Ce; Mon, 18 Sep 2023 14:42:55 +0000 Received: from ec2-63-33-11-17.eu-west-1.compute.amazonaws.com ([63.33.11.17] 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 1qiFRM-0006IJ-Ho; Mon, 18 Sep 2023 14:41:32 +0000 From: Paul Durrant To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Durrant , David Woodhouse , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , David Woodhouse , x86@kernel.org Subject: [PATCH v3 13/13] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Mon, 18 Sep 2023 14:41:11 +0000 Message-Id: <20230918144111.641369-14-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230918144111.641369-1-paul@xen.org> References: <20230918144111.641369-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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 08:44:26 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777402452312286417 X-GMAIL-MSGID: 1777402452312286417 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 2d7d0ae18820..4cd577d01bc4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4527,7 +4527,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;