From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF72EC7618E for ; Mon, 24 Apr 2023 20:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbjDXUfl (ORCPT ); Mon, 24 Apr 2023 16:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232565AbjDXUfj (ORCPT ); Mon, 24 Apr 2023 16:35:39 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C35D59D5 for ; Mon, 24 Apr 2023 13:35:38 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-b92309d84c1so23344016276.1 for ; Mon, 24 Apr 2023 13:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682368537; x=1684960537; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=l0MSB0945IeDbGQp04rwPUWUysYiVEFGxMNvNn3R9Dk=; b=qaA5kj5BLRufFr7HOEwoBj3xuBzT1MM3EqwX810KDK1PJXDmUfYJ4nLm6oNBrqzq5D kejv9Yn+BLxpQduLI7gZUWw5gg/LBJYf3iyGlCxVa9XwjUZ25tQcKo5XQXlK34L7VDCT e8a1tXQmghUZAYQ9+o8GJvHhq+yTaQ4YM0XuenE3DXhhq66Er3TLgg2gNW3i+21vEsNN Y7V8kMT8/uufww59U8/Jw4hwCThUoOVjtCfYbwbJT0IT92HGuHwvl5gdbMD9oZslPNIp hcbYSB3xiE3IY0nL4OfpglITPYjFC/j3293vJZ8dlb/JEUjXuPa3xYxVo+u2J/DS9N39 lCYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682368537; x=1684960537; 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=l0MSB0945IeDbGQp04rwPUWUysYiVEFGxMNvNn3R9Dk=; b=AQ68mMp9QVIuvYWAnxIA4QZ6vcnZSLCOA1HO4/i/+QV76bCVoonWwFR7oLQfJ6j4mM eCUBkgyF71FkfHumE5r0Pse/SCy8tfRMCJr52AFz18I8JRTNsTnFtVRi23tOiZq7Uwv3 rbPW0NiN3Kebuq3WyBOVmwuKz1JA5GvuMaYAmfv+jYTV2Tn4aorTzCCcDI6KBrHtFsLp q5rzmwZmWcbPGk6NHcown/bwDADFEQEtBcqkL1LNQN0yY/82tfk/DL6q8Hfa+5ICLcyK tBoLYSRGirwEbaN5L/CLOnvmKDqJ1CWr/tJAnsbxTqglNoxujZhBe2hwfrbK8HQ68RlW 5g7Q== X-Gm-Message-State: AAQBX9cbgvDKvXqDa88gfIi9CC6HIJR1UK2lnIMZlP4UzqeazCA22Mal YIlTz9Bd76P5WzO5FDLj+i9eGNtXKz0= X-Google-Smtp-Source: AKy350alWB2/sn7vnmKB09ekH2Ungj1lC+xvK8PVtElvPqniaZwd+kmU7CpSimCq0rTDwuANLLp2/iz809o= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:2b88:b0:54c:15ad:11e4 with SMTP id en8-20020a05690c2b8800b0054c15ad11e4mr8066797ywb.0.1682368537764; Mon, 24 Apr 2023 13:35:37 -0700 (PDT) Date: Mon, 24 Apr 2023 13:35:36 -0700 In-Reply-To: <84DD9212-31FB-4AF6-80DD-9BA5AEA0EC1A@gmail.com> Mime-Version: 1.0 References: <20230412213510.1220557-1-amoorthy@google.com> <46DD705B-3A3F-438E-A5B1-929C1E43D11F@gmail.com> <84DD9212-31FB-4AF6-80DD-9BA5AEA0EC1A@gmail.com> Message-ID: Subject: Re: [PATCH v3 00/22] Improve scalability of KVM + userfaultfd live migration via annotated memory faults. From: Sean Christopherson To: Nadav Amit Cc: Anish Moorthy , Peter Xu , Axel Rasmussen , Paolo Bonzini , maz@kernel.org, oliver.upton@linux.dev, James Houghton , bgardon@google.com, dmatlack@google.com, ricarkol@google.com, kvm , kvmarm@lists.linux.dev Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Apr 24, 2023, Nadav Amit wrote: > > > On Apr 24, 2023, at 10:54 AM, Anish Moorthy wrote: > > Sean did mention that he wanted KVM_CAP_MEMORY_FAULT_INFO in general, > > so I'm guessing (some version of) that will (eventually :) be merged > > in any case. > > It certainly not my call. But if you ask me, introducing a solution for > a concrete use-case that requires API changes/enhancements is not > guaranteed to be the best solution. It may be better first to fully > understand the existing overheads and agree that there is no alternative > cleaner and more general solution with similar performance. KVM already returns -EFAULT for these situations, the change I really want to land is to have KVM report detailed information about why the -EFAULT occurred. I'll be happy to carry the code in KVM even if userspace never does anything beyond dumping the extra information on failures. > Considering the mess that KVM async-PF introduced, I would be very careful > before introducing such API changes. I did not look too much on the details, > but some things anyhow look slightly strange (which might be since I am > out-of-touch with KVM). For instance, returning -EFAULT on from KVM_RUN? I > would have assumed -EAGAIN would be more appropriate since the invocation did > succeed. Yeah, returning -EFAULT is somewhat odd, but as above, that's pre-existing behavior that's been around for many years.