From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 6173214D29B for ; Fri, 9 Aug 2024 19:04:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723230277; cv=none; b=IbXA1PRlj9Elw/JrgSDwj2ly1Q3cux/9uxM6mwWXTaDnw5y/+lOwOjQixrugKf7bRcrPyDc0v7teLNC36dXCx2nMo+KOXRQSKMw+CFUMI4GpCYP+AZqcWFiSC4oKboUzLGSJ4rOCDmaMaPUNqlTJsTNaLVbb2gdooDVxBxBa3I8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723230277; c=relaxed/simple; bh=SBsyicGTG9gfAjD0K++NNapLlsd6aU+7cGu4LmewABI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RglsImruFH31ML/1qFVDpgFbCHFopQ5b/mP+uaYmnWSfgv1McjZKJqeBxKeR0K2hXrpH/BHeDJkdHuEPS+e1wb3AKul6B5yaH00BFTVLVd8IQ32uIGpHBCERa+3Fz82v4AfgONEsDIFIWqAzEZcaIuwX9XSRiSKpFtw2ixII4sI= 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=CFhY4uBj; arc=none smtp.client-ip=209.85.216.73 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CFhY4uBj" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2cb685d5987so3028226a91.2 for ; Fri, 09 Aug 2024 12:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1723230276; x=1723835076; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=1OP2TrkQAg4l9VmYgH+ppUrAs3PZd5BTHpl5JP294L8=; b=CFhY4uBjLHNhZcHYRHzsb0OKRfXdxFvToX0xcnKc0h0k10Y5bDULBkxyTeVv2hfNbD uPu+A0zytU3hQIdhVENJvLIHTygKzjRRNo6PdxQBy0coNqD0vIB89pNssdfAqT4/8BSO EvBsv38o6WG7fSE5CWn1UK6zGNtsnpfQc9kXL0uXNd2cqY/ousHFYgeLgrVCu9VL9WmX yBxz+/O4FAtxVKNsu5tqH+aiPlf9f6IpwloBx0XAi303d++yf6Pj3kxFn/H8RYWfSR2Z 3/282atP5Em3Wjj+nzcH6O4Qv3gAhNeW674C0t81DmX5lP+fZzmRnEYFEN3SzCONPDaz +HBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723230276; x=1723835076; h=content-transfer-encoding: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=1OP2TrkQAg4l9VmYgH+ppUrAs3PZd5BTHpl5JP294L8=; b=OioqB8tlq+isoeC3wgv4QEFPez/n+Q2tPFQLCxPpi4CxzftDyT6vgfThl6fHWMPqTQ TyIlM1fWeEd0sq62dw3NrqvagIPrXmmIHZ1erEAJaCjA7P4mutGHahNDNzpAd8eN73J7 oq/T2rwjLcURpHhNAqU8mXuJMczd65ETt2FFscEGJm6v5fc9KJbWghZZ1udbsJilHI6c tsMhfk6/9fKptzwVKdVq9mi+N+PlcUHme7SobGwkwqyKmj7vaoz5eidmVPZ8qjS+LDE8 uOcjJl1VspjORlZ0oicpAJgMukqANxtqOP9+qO5F2sCDZP+DWu1RUL9w/Tx1xtPGILk6 LYRQ== X-Forwarded-Encrypted: i=1; AJvYcCUXm19TffFtgdszf52XCWuc5e3DWT4f+RMzPihaBVse2Q0ggsK+TFu3xztar5XwPj8o9bX40Pm+UMmEEX0TcxdGRz/EkpttVM28MuBG X-Gm-Message-State: AOJu0YwCFTQRb3h5SuUfFisu1Z4szQ7hbhKozJrGrI/OTIrbhZ5RbD4G GnXpCwmJMy0DYzZ1CzjMVXSJUeQPOl7/nzctk78PbqR/monolgwLr9W8wNDibLppjJLAOav4k28 P1w== X-Google-Smtp-Source: AGHT+IHhyrWGwABBPnK3P+PXk3XqbI8YZLVeMIPiph5Olb+oYKw7B2dpfLQyExK13fUsFXUwAeZdgkDC2W8= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:60b:b0:2cd:57fc:1db6 with SMTP id 98e67ed59e1d1-2d1e7c5e18dmr25038a91.0.1723230275593; Fri, 09 Aug 2024 12:04:35 -0700 (PDT) Date: Fri, 9 Aug 2024 12:04:33 -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: <20240801224349.25325-1-seanjc@google.com> Message-ID: Subject: Re: [ANNOUNCE] PUCK Agenda - 2024.08.07 - KVM userfault (guest_memfd/HugeTLB postcopy) From: Sean Christopherson To: Wei W Wang Cc: James Houghton , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Peter Xu , Paolo Bonzini , Oliver Upton , Axel Rasmussen , David Matlack , Anish Moorthy Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 09, 2024, Wei W Wang wrote: > On Friday, August 9, 2024 3:05 AM, James Houghton wrote: > > On Thu, Aug 8, 2024 at 5:15=E2=80=AFAM Wang, Wei W wrote: > There also seems to be a race condition between KVM userfault and userfau= ltfd. > For example, guest access to a guest-shared page triggers KVM userfault t= o > userspace while vhost (or KVM) could access to the same page during the w= indow > that KVM userfault is handling the page, then there will be two simultane= ous faults > on the same page. > I'm thinking how would this case be handled? (leaving it to userspace to = detect and > handle such cases would be an complex) Userspace is going to have to handle racing "faults" no matter what, e.g. i= f multiple vCPUs hit the same fault and exit at the same time. I don't think= it'll be too complex to detect spurious/fixed faults and retry.