Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp56700rdh; Tue, 6 Feb 2024 19:20:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9phALxBm9zr0mXXgU9jf2AZKHNJvRLgzHsxd0XVLMliZdcxDsuzpCkNJUDx4dUMyQQ9/0WZKCWR4kjpQxC3cPygz1n+p7yppYtuouGw== X-Google-Smtp-Source: AGHT+IFU6qrhm4xwYkW8Q6Lv0jzIADv7nkfaFgSWWAwlsY/PQYMh+bNHp01lJdGHMMZA7NokImnL X-Received: by 2002:ac2:5211:0:b0:511:19b1:95b6 with SMTP id a17-20020ac25211000000b0051119b195b6mr2836571lfl.63.1707276057713; Tue, 06 Feb 2024 19:20:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707276057; cv=pass; d=google.com; s=arc-20160816; b=k76WJNn00fHETuiOLULFzVtxaogV9nZY4KMBEud84I6OZrhRW0nlpwIoax8lF7p2iw kM7504rRAevyaZcx798xJViaiPkCq4GcuMLc+5KtAjCO8f83G7PsGaFRf1EsNWA8bvfW YTJtqzrOsjpGbf3ObaEGn+nku9jqfBa9FiBgI+bwb+Qezxs4fgDfDihXath7DpgHE20J x8XHElzjgKm3cZqqLv2JuC7Q38CNWJflEBKRqd6iaYv+OvKrndnCKKHlLW8MnV0p1iME e1LQiBS/rxLCVfGSghzVndZMRyjQBx2ULrx2QClaxRH5N56h7sRg5A9xWT/UpusgVkqG Tv9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=ApcLgLGrxwLEuYf7+iIf/mNSaHhoA2l57UsnC6CxVWA=; fh=bxumE/QWcq6LHlowT2Ph5OhbUbkHZqY6ZglMZxt1L1U=; b=hCeuMhAI2E6dWLjJDAR+q3yLnWjwV3zAZdQdLLbWzRKDeUlC5hWfQ2NnRwncwvVlP3 NtNtMDJcluEEmJgU+QJqbeCQ5LOSz/JxObcLhlvmVeEKt3UoHFZLU7n+iOKdamfm/PO+ FP6SlcTo+y34SQc25uvT3ZQ95oEOnqoHc816HO8zAupqprMzKY1hXWB8C38z84oE8v8v nN+7YxvGxoivWwRbSMjEW6QWl8bIz0UmuDvH1Fg9W+d8h/cDP3J+oxjMGMf6key/4HAS pOkNzt1wdns2rFRRSp6IG4EqVtUW6N1sg0w2mXw20UpHnuCo0L/iE47pbxHDRvdGvJuS 0z4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RCbXwnM1; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-55886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCWFMjMdWMUioOf7VBWOF1KxpxZ0E7qcRHFt8tArzQvuHd1NE58qXyx1CWAGTTlm1KG1FZwSCTyl7jI3x+co3hU9akDKoiDDUX6cRE1KBg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k9-20020a170906578900b00a385325ff78si293029ejq.772.2024.02.06.19.20.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 19:20:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55886-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=@google.com header.s=20230601 header.b=RCbXwnM1; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-55886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 72BB21F269CB for ; Wed, 7 Feb 2024 03:20:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7ABAD101E6; Wed, 7 Feb 2024 03:20:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RCbXwnM1" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2987BF9F7 for ; Wed, 7 Feb 2024 03:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707276045; cv=none; b=SsrEH15Xv6kqFlsVQV90389yQhxt6nr+Txyc9HgiBzR+QNJEla3pJ0EGYdDWsaeOGuhCQsvCfqc21hSEthuihpnCJ9NJjVKOh7gIkbAYHxMmp3di4rxytrqwh1gOWbMmOc0XsVOXMVOCYFwm/ASIOzG6VKjSAxGOhA4Z0DVDSy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707276045; c=relaxed/simple; bh=VVWU1hTHdDiHcMV+44gh4MOWuxsDTk6kozGbwxsOEB4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=o/kSDUDMFKATMp9IMsw9MGXCDNtFRRZQjXBFek+4j+fSMzVpihVOxOpNB5z5XKr8DWeylG1fgWHkZWWNJXmZy8vHqJL82OVT2oSqg1YTk9/ya0J83zZh5Gj4BMCuqKkiG1Kt8y9yotR3NctibUkGKnkL3ebrf9eSMB5GWLUdqkY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RCbXwnM1; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60491e90830so1870097b3.2 for ; Tue, 06 Feb 2024 19:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707276043; x=1707880843; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=ApcLgLGrxwLEuYf7+iIf/mNSaHhoA2l57UsnC6CxVWA=; b=RCbXwnM1A83uV6GI9gS/PEnbZTtxDZzwUS7HK/1MRmcMfHkcocbpQhaIx7QobYZ/fE fnYs3FGnVDPk0Xx8R4nInEuE7MS34oeQIYr6elgdJIKsFb04Azd99GdCJsXzx2rY7S+R zW8Z3nRlpfYbsvoShBosLPD02BqulFozispCJrJ7+tqL1ZiUr57/UbtCIEg+pNzDKmrV 26xora0KFkBrk7NPixM2JVYIZLzv8++JY+GxjwhtENILsHowkUAf627Kq8JIfRg1jo80 0SmVwnLMsqt+PA329AX5hPCl2TTSRmyN/K9gQUh+bY1tiwzkef1HZUbsloMQFOTPrNXF irHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707276043; x=1707880843; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ApcLgLGrxwLEuYf7+iIf/mNSaHhoA2l57UsnC6CxVWA=; b=BWqhw9dgBe24st9EvdeywRXAhJrqpttT5CFrz1jXp/3QZAZqBbzU8uPjnb0BediBBM FWnWXJrDXRhhgEKrbQP67UZwaNrxzmZ+mS4jp+yJNKOHPLyRz5plFW3wji76lZbsT1pe 1ScdrrzZ40+37qPNndfsZAGBLTrIq0A0GXI0dY04cmHHcAvT03V4C2Mhcxu3lGtUf4O6 E5bHE2AeS/fz6ndFaJ0oXt9MOLyH41G8tNx+DXTcAGsv5ouxIXF/KpzinbIxdQicyuPo uSIBgnQodIEztP1jin7++3uprb4uXBKRZP+HRBuaVbJiBG5CYR4dLP+792z/bXGR2SVv prEQ== X-Forwarded-Encrypted: i=1; AJvYcCV+0Hs097XbjuvpVwT0X7BmQC+4eTxB9qM8jyZq6cA8PnBYJfXuGEA+rGSMC4+N5Pf3WC2KDUsFSVu3dYj+KvlyRMuYvGyG8r6lvF/m X-Gm-Message-State: AOJu0YzSQT0kJqVE83N1NnL85fIpz1dsFoolyqnSIFze5C7uXZXEzGrZ hCX93R/GjFheH2erd42v9r2HquK2Q2Jf2xqtzNN6xfo7z5dettgtnlcmutvqrcyGbwp45svq191 ccQ== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:10c:b0:5e8:bea4:4d3b with SMTP id bd12-20020a05690c010c00b005e8bea44d3bmr656047ywb.6.1707276043260; Tue, 06 Feb 2024 19:20:43 -0800 (PST) Date: Tue, 6 Feb 2024 19:20:41 -0800 In-Reply-To: <20240115125707.1183-5-paul@xen.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240115125707.1183-1-paul@xen.org> <20240115125707.1183-5-paul@xen.org> Message-ID: Subject: Re: [PATCH v12 04/20] KVM: pfncache: add a mark-dirty helper From: Sean Christopherson To: Paul Durrant Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , David Woodhouse , Shuah Khan , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Mon, Jan 15, 2024, Paul Durrant wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 7e7fd25b09b3..f3bb9e0a81fe 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1399,6 +1399,17 @@ int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, unsigned long len); > */ > void kvm_gpc_deactivate(struct gfn_to_pfn_cache *gpc); > > +/** > + * kvm_gpc_mark_dirty - mark a cached page as dirty. > + * > + * @gpc: struct gfn_to_pfn_cache object. > + */ > +static inline void kvm_gpc_mark_dirty(struct gfn_to_pfn_cache *gpc) Any objection to kvm_gpc_mark_dirty_in_slot()? I want to make it clear this only marks the gfn dirty in the memslot, i.e. that it doesn't mark the underlying page as dirty.