From patchwork Wed Nov 22 12:18:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 16929 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1279534vqb; Wed, 22 Nov 2023 04:20:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEz1KyBPT6oG2R6daHalNwozq02bHsEkaTkM2m28Sbr+0hV+hGzNyzwgNGD+/uMhgMPQSEL X-Received: by 2002:a05:6a20:2590:b0:187:dd5f:93b6 with SMTP id k16-20020a056a20259000b00187dd5f93b6mr2232663pzd.43.1700655629742; Wed, 22 Nov 2023 04:20:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700655629; cv=none; d=google.com; s=arc-20160816; b=mbTuVh0DSn6WPhg1uXP2Qh+oDhTtrXMoeYV6fMVJAfH3np9NlHvuhoUzzIttEJUJOX 3bftyn5szSlYxElxHmozYrGx/97ECAgdQ6WKtt1+UH65UepTQeYwsK3bHRD9e2/bEA6B Z5KjMmGmV7H4NlWDkrlcXnacrTNrKcyiFK3oViD+YuFgDs3NjX6nHcBZF2Dz9MDEhmTO o+kwz69l0+iKqKKEnp1zHhSfbASHtObfJdrlGLGVyujmXBbKsA351qEWG3rKGAb0dbsk jexffqUFYC92tusrf6GSKFNeu+VK2+hcUr3GRBg5JmgVr5rawNSX4+Z3yJ4LUeE//lrL hC6Q== 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 :message-id:date:subject:to:from:dkim-signature; bh=O6hLRXK6yeKR3L6pdrCbc5lhM310DUyC48DzYfsWYvk=; fh=Cum1qOF0YrAzH/5yQjcCBfU63B+V0l01YtzsDBRUOAc=; b=tR3P1tZmu0mlualPLmpVShM0JL7tjEkRCpax6CFil+n0QLcGOxDNfLpSy/UEyk+Bpc DrZUwSHAsbVt1eBPc0X0fGp3qodvZ/fW3tBdlq0xoKqHLE8OyUGIl6BBPvgG7H3HcMF1 iuOZJJSGJIdYfN72lQRowKUFpkAXw6gz7HPLtRxX8UlMJHSnECVPMDu6OfvlupjiJNIZ bwshebfuKes+xsDhXnGvOfsuwTaeG6MUm7HdGHHclH+WeclcW5eTpKOVKjO25+QaIdGc H1Ue1foOFUTX1JzZWsqfW2C07b1zIx3TDTa68Kr2/lfwsDbrZzJ8AjjZsORx4VEW10++ QOiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=tZpORAkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id g15-20020a1709029f8f00b001cc54202425si12317154plq.409.2023.11.22.04.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:20:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=tZpORAkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id C3BA080B01FD; Wed, 22 Nov 2023 04:20:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344201AbjKVMUY (ORCPT + 99 others); Wed, 22 Nov 2023 07:20:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344112AbjKVMUF (ORCPT ); Wed, 22 Nov 2023 07:20:05 -0500 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0F13212C; Wed, 22 Nov 2023 04:19:02 -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:Message-Id:Date: Subject:To:From; bh=O6hLRXK6yeKR3L6pdrCbc5lhM310DUyC48DzYfsWYvk=; b=tZpORAkD1 lcnWLw/OnmyphFpsriRXatUnw457DwkIMeSpO9TOKgGUx2DJKDJ9q/8s3Wos8kTxEe5ZGTrL/WJ4W 5wRS6Y9gHPCxPcGegT9Vbd3yPxEswE543iuvQSxyG9mhx7yODKBehQ2+r08iMVefe6xHeW+oJ5uv2 sBGtTQ1A=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5mBn-0004vx-AU; Wed, 22 Nov 2023 12:18:43 +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 1r5mBn-0004y9-04; Wed, 22 Nov 2023 12:18:43 +0000 From: Paul Durrant To: David Woodhouse , Paul Durrant , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v9 00/15] KVM: xen: update shared_info and vcpu_info handling Date: Wed, 22 Nov 2023 12:18:07 +0000 Message-Id: <20231122121822.1042-1-paul@xen.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:20:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783266677488329323 X-GMAIL-MSGID: 1783266677488329323 From: Paul Durrant This is a minimal update to version 8 of the series [1]. The only material change is in "pfncache: allow a cache to be activated with a fixed (userspace) HVA". [1] https://lore.kernel.org/kvm/20231121180223.12484-1-paul@xen.org/ Paul Durrant (15): KVM: pfncache: Add a map helper function KVM: pfncache: remove unnecessary exports KVM: xen: mark guest pages dirty with the pfncache lock held KVM: pfncache: add a mark-dirty helper KVM: pfncache: remove KVM_GUEST_USES_PFN usage KVM: pfncache: stop open-coding offset_in_page() KVM: pfncache: include page offset in uhva and use it consistently KVM: pfncache: allow a cache to be activated with a fixed (userspace) HVA KVM: xen: allow shared_info to be mapped by fixed HVA KVM: xen: allow vcpu_info to be mapped by fixed HVA KVM: selftests / xen: map shared_info using HVA rather than GFN KVM: selftests / xen: re-map vcpu_info using HVA rather than GPA KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability KVM: xen: split up kvm_xen_set_evtchn_fast() KVM: xen: allow vcpu_info content to be 'safely' copied Documentation/virt/kvm/api.rst | 53 +++- arch/x86/kvm/x86.c | 7 +- arch/x86/kvm/xen.c | 260 +++++++++++------- include/linux/kvm_host.h | 38 ++- include/linux/kvm_types.h | 8 - include/uapi/linux/kvm.h | 9 +- .../selftests/kvm/x86_64/xen_shinfo_test.c | 59 +++- virt/kvm/pfncache.c | 169 ++++++------ 8 files changed, 370 insertions(+), 233 deletions(-) base-commit: 45b890f7689eb0aba454fc5831d2d79763781677