Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp537197rdb; Mon, 15 Jan 2024 05:40:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0oLw8SuVwu7RM1dyFeH0k7hzjOLS7QYFTNGERsAgaq08UKQQUSDxV75px/TaMa1FiZvyK X-Received: by 2002:a17:906:4704:b0:a2d:43a6:9431 with SMTP id y4-20020a170906470400b00a2d43a69431mr1670654ejq.10.1705326034035; Mon, 15 Jan 2024 05:40:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705326034; cv=none; d=google.com; s=arc-20160816; b=dWwJsniqw8rytI/26d9EBGqiPwDDy9uiSsWa4HX+dkBcLGPaba7xQqHu2O7/WvIAFN noTxwxhIuojR1yKe7Wi3rzUJkklNsee6GM9r8UlmByxD/+Zf2RTLTaq8jc+RWGj56QOT 50Xn1ZGIavsdBEQH/YEQC4Df+52BKGLnpPDWcNjAVFS7dGNWPeWo9KK6v/qfVL33L5vg 7NlY2fYTT8lv+4hbazvxn71np4DC5/xzhiuYqs7CgQ+D0KIujhMlLxszhOPdZyJqgEQy K8jO7g1hDq5Px3SA6hIyMZ0WY57X0MuCRk9XQPlb+aw8D8U8gwqovdvPv6/RclcYrNjM 2WzA== 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:message-id:date:subject:to:from :dkim-signature; bh=NGz8qcxOM7EVgEWKAbNKsPiLOwrCtQw4O+B/FkvZxzw=; fh=aAPqvXm40pY9772UiBOljEePwtz/3Q0zIOpw238tj3M=; b=Y1dE5NqkZj14BeGteb6BQ38w+yJ0SN3UnT4SbKq0vDMjopIWTpuoP9mqR8d0WkUoHR CE+FizwGK96wDJi8lJsA+yzOvuJsHzF02EFHcUJCYBpRKxT4/Q5mUVvPxPoGmXtsqtD+ 3GY2ph94LMqCWtOAj9GaGQtsJJxgaMkLved0qUi1TOeNMzI7YthICgc1/6eYkLH+Eubt BhxaJDHpwmgzHioTX2d0WlxkkLeEJxHUS/iG5YEOyVvqOxR/Gy6gxFbYozje1RdZXDXd ikklAlZmTyoMWH6zV2qD4gC/7M3Otl0Mbv8G0RsJirnISWU5FZw4YuhVPUHwYoFN9WAg hTTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=IsBcCu7B; spf=pass (google.com: domain of linux-kernel+bounces-26042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26042-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gh6-20020a170906e08600b00a2361a6dea8si3826836ejb.353.2024.01.15.05.40.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:40:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=IsBcCu7B; spf=pass (google.com: domain of linux-kernel+bounces-26042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26042-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id C34721F22365 for ; Mon, 15 Jan 2024 13:40:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DBF417C6C; Mon, 15 Jan 2024 13:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="IsBcCu7B" 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 6CDB717C63; Mon, 15 Jan 2024 13:38:29 +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:Message-Id:Date: Subject:To:From; bh=NGz8qcxOM7EVgEWKAbNKsPiLOwrCtQw4O+B/FkvZxzw=; b=IsBcCu7B0 NnP0YAOH73/jBV7BP7Iq9ILAZyrzh1DUpNSxneroBGPmzaZf6KqVAilaM0E3DFTaYvF23+WyGSPcB vTreYUWQskhl56HGD202ytYE3YrB/8cr4pkabFWqi9JQZXdgyAskNkj6bUs5OnOYp97waGek1X7sM oxoYtbIY=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rPMX0-0002iu-4U; Mon, 15 Jan 2024 12:57:34 +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 1rPMWz-0002kM-OK; Mon, 15 Jan 2024 12:57:33 +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 00/20] KVM: xen: update shared_info and vcpu_info handling Date: Mon, 15 Jan 2024 12:56:47 +0000 Message-Id: <20240115125707.1183-1-paul@xen.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Paul Durrant This series has one small fix to what was in v11 [1]: * KVM: xen: re-initialize shared_info if guest (32/64-bit) mode is set The v11 patch failed to set the return code of the ioctl if the mode was not actually changed, leading to a spurious failure. This version of the series also contains a new bug-fix to the pfncache code from David Woodhouse. [1] https://lore.kernel.org/kvm/20231219161109.1318-1-paul@xen.org/ David Woodhouse (1): KVM: pfncache: rework __kvm_gpc_refresh() to fix locking issues Paul Durrant (19): 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: separate initialization of shared_info cache and content KVM: xen: re-initialize shared_info if guest (32/64-bit) mode is set 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: don't block on pfncache locks in kvm_xen_set_evtchn_fast() KVM: pfncache: check the need for invalidation under read lock first 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 | 356 +++++++++++------- include/linux/kvm_host.h | 40 +- 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 | 340 +++++++++-------- 8 files changed, 535 insertions(+), 337 deletions(-) base-commit: 1c6d984f523f67ecfad1083bb04c55d91977bb15 -- 2.39.2