Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp669486lqt; Fri, 19 Apr 2024 07:12:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmyilDSfB4BqyjXsheTcr3B5y/h8TQIw4FyM7lBor4PYoNjSNPWgCqhpQNIw1eknBdGRf+VbfUJFTAdEspG03S4H0doxob82PFAJ+lrA== X-Google-Smtp-Source: AGHT+IH89m0Ehq4jbhesa7FEGcUqcnf1w3P3aMZnAjvye0urAhNDIZoIOBUmHZzYCREarfqZGz90 X-Received: by 2002:a05:6e02:1541:b0:36b:f8:e884 with SMTP id j1-20020a056e02154100b0036b00f8e884mr2716021ilu.20.1713535924968; Fri, 19 Apr 2024 07:12:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713535924; cv=pass; d=google.com; s=arc-20160816; b=ARTPsRZkUs6cKu2NYvB0ESfCwO8MuSpMg/q1bwnDAY7FwOG4lLWHTRoPr/0gwIklZp 9jZ8yqBguXd1/gcZHqRFzYq2Np706FiHYumB5p+C21SfG4poG2wDtOWyeAuiwxBNVfFc b/GQp+1i2PZuOecxDseo/XlHQywSLvz55Z7Bg7V2i40ZDHJTmMWkD+r8VojmOvkNoDa0 3J2ggOD2hWhPLRhBfi/JZrAchMvGIDWwrZDf2R/x4xVqbUUZp1s5NuKNtW6Ki8W3OVKW wJny+0Irb5WXn2o5PesTQFNIVg5+RberFYEmYvfmII81Phe+PfwrG5HQaYKHGH6ZLjxE mXKA== 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=33sdiDZDWg4/FZTAXVC794hL3/UVeYFyR3Xkr0YWvZ0=; fh=CRWYqjif9C2dCmZsmz0Fz3epazMCE5r+7nEl7+B312M=; b=UKZqx0roKJZz89LwyT9ARat2xGXAnl4Clle+JgIgJk7t/g0Xawu1YcgyvCPuGYCj1E tFw0tXPepMNCIv8JPLPoEgSmiKP2r0SKJhC8FfbFCS1tj3ZxNTgfTH0G0CMXNfwUImP8 uxSDA3rDumaXKNyrAzB18BehVbXM/ycENBKwYK+2EkHuAYRV6kF+a/ubr6IciJWcovwV oDUybqpueLDzWl11o869U0GgCqO6vzZTgyKGen9JzGwah5VRfgTY0jQZ6Kjp01Jhnao6 AXC05QSLgSmC66XFj0dOMuQcT21ENcIyazDcr1Ff78Wp/6ewWIu0mTAgZ7xIlVmaYWn+ JUAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2qwXxU69; 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-151551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151551-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c24-20020a631c58000000b005dc8b2148ccsi3162680pgm.836.2024.04.19.07.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 07:12:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2qwXxU69; 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-151551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151551-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D22CF285D9F for ; Fri, 19 Apr 2024 14:11:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 562EC12EBDF; Fri, 19 Apr 2024 14:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="2qwXxU69" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 347FF8562A for ; Fri, 19 Apr 2024 14:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713535736; cv=none; b=VEnBP/cFbi62VriOsV+FSf21XZPXm7M1dTlwufPKTeznHE5V03el6bXHAMXXyElaSGIwIvNmJMf12jvYkObTZZ2qBoeif+uKvuzDLIQZhynMhvKM6AK/BaYvlEmfIpxOzL7rrTIu2tNJWiEY4HtVe8bBwGH50MIlwrjn1oAx2g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713535736; c=relaxed/simple; bh=AfSvAfZ+PLfkq85Cm4kW2djWmgUs/Kj0iJYGdgszdE4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=oLoUsy3vhgylQri4PIoRxF9rme0hK4uL99atG7Slm/j2hXgKRayCyqCCp09SGW4PwJ8vC/F+bAJ7xXTWSM8NDvsxMIAQg7F3LqhuENWiZTNcdd4HgldMTCykdRgdD52ORUNXGa1Sqb7XMUrFqS3k6imgvUrtoe6wLHDnBhs9urQ= 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=2qwXxU69; arc=none smtp.client-ip=209.85.128.202 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-f202.google.com with SMTP id 00721157ae682-61b2abd30f9so28392077b3.0 for ; Fri, 19 Apr 2024 07:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713535734; x=1714140534; 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=33sdiDZDWg4/FZTAXVC794hL3/UVeYFyR3Xkr0YWvZ0=; b=2qwXxU69LJ2MMB4MZ/FDduh1HeesVYk5kwOP+71/R3KCITSog5zlUoYUZEi4Cl0JUn BHTXi8vtGEFhYXjKyk4ZdWqP8Zz7gCTf7XEm8ldqtzXt/AxKBwJgN4eztzyiKaEtGpwN Qg9hK+x43Wh5PLoklfMKqu+t1JajkYOwTzR940y27zEeckICZ5uLiR9MU2VLyne4Yicw SOkhFp/xYNZA/2e+hSatotfByCS4Hmk5SxMnxuGnKbXwTHsD42JZ67+rydNosqyEhJ5G GMQYmsyLyJDYZgD+fM0QRlg/7RBBnZRUkz1WJ9KwRMYwxJVqcvxcufjaROYD3UfaTC3v zJlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713535734; x=1714140534; 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=33sdiDZDWg4/FZTAXVC794hL3/UVeYFyR3Xkr0YWvZ0=; b=lFL9TlH0q+yRRukOWZBN0nS7W7UobazMCvlRMYJNUozWvwea94kSjFMjknjrcpzIBP mvxJYUcPCgi9SOt6XsHxhzFQz6xynlRH3uPFWufFDxj4ThNbIQLlRExwIPytgb+BVagi pw86/NboyfOyDJz4DtCMJV8g2D3x6tRE72g3LO2HSsfYL98ex6AjOjzP6Y/Hztm8JXs9 TFrhU72t2FoWKBS73ioZBuLp3rVymjoFgapa72OGAAp4goVbCP4ypyJejz6eLgN01mHW pwH2enRITprnGqDB7nDNMYPKGmoadXXtzUq/CuLe5TOFHjomjAQHuzmEF/w9+82bjXHA 73cw== X-Forwarded-Encrypted: i=1; AJvYcCVKmTSEMThEqu/F5svkatDPrbGQAzQFswQBIilUoGCEoIqys+Rq8QhVfR56D+XOuNbzSNOn4TAhpeq7YRcwuZ5y66BHbFjO3NZiISBD X-Gm-Message-State: AOJu0Yzd07D3cTq0f67V0c8NDvlSuX3lGFvsEVIOz5dpjmvH83vPNVhI DrsnwKALIvhAsq9ZRdBnKBr5AWgVIAtTP+kfmRdL6BIIPqBqrkR329SAubfimcNiS0ZjnUY46vj n8w== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:6b01:0:b0:ddd:7581:1234 with SMTP id g1-20020a256b01000000b00ddd75811234mr148387ybc.11.1713535734251; Fri, 19 Apr 2024 07:08:54 -0700 (PDT) Date: Fri, 19 Apr 2024 07:08:52 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240417153450.3608097-1-pbonzini@redhat.com> <20240417153450.3608097-3-pbonzini@redhat.com> <20240417193625.GJ3039520@ls.amr.corp.intel.com> Message-ID: Subject: Re: [PATCH 2/7] KVM: Add KVM_MAP_MEMORY vcpu ioctl to pre-populate guest memory From: Sean Christopherson To: Xu Yilun Cc: Isaku Yamahata , Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, xiaoyao.li@intel.com, binbin.wu@linux.intel.com, rick.p.edgecombe@intel.com, isaku.yamahata@linux.intel.com Content-Type: text/plain; charset="us-ascii" On Fri, Apr 19, 2024, Xu Yilun wrote: > > > +#ifdef CONFIG_KVM_GENERIC_MAP_MEMORY > > > + case KVM_CAP_MAP_MEMORY: > > > + if (!kvm) > > > + return 1; > > > + /* Leave per-VM implementation to kvm_vm_ioctl_check_extension(). */ > > > > nitpick: > > fallthough; > > A little tricky. 'break;' should be more straightforward. +1, though it's a moot point as Paolo dropped this code in v4.