From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 10BF620AF7B for ; Mon, 3 Feb 2025 19:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738612429; cv=none; b=PnSUPwpNuz8ie7yBl9zqOd5mDP5bdVtHCq8jsVeIbzXLUQr06VJqdkxTusbqAns+8JCLRZS2MwSm5tde8vcAnO1scFjlowzze6z7OO/j9jCHnNzMp45FQgtIk4S4hWn+bNkELd9DTeWZGSfm+DkZUJZnDKH69OtEB0GZHoxYJvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738612429; c=relaxed/simple; bh=hxr7jNuqUlPfc59GPh0os0w2bEp50OFtzoYI/kT4GTs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=RzieL2dIV0GnnFy/pRc0+vU/albAyHK0qebWtH0xD5IFAOUOteqJcOHmPjIf7FWXLIoTjBul6y8++lzi4OhXVwHwBVV2sD0GV97iZCcme9T0qn38iqNF990VDVtf6BddTihqCfQ2u6U/OXiHbalPvnG98I6mujk3kWcs4W53P5Q= 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=hll4qKW0; arc=none smtp.client-ip=209.85.214.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hll4qKW0" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2166f9f52fbso157241265ad.2 for ; Mon, 03 Feb 2025 11:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738612427; x=1739217227; 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=nCEyOu/LOSfPdvr+BVNdN/g0WxtTpzskRucY3ZD/ki0=; b=hll4qKW0/MDYaWgct95bovpDKbmfc/9xZPLQHSUmaBUKPEQQsfx8egcgJ8EGg/l/R6 A4kVGGLIml9y6/FSe476CAuGq/HZTjK7xsFH9t9tgjMpx9Sd7IjvXbpGK4KbzpSnhiLp eqU56cKKtrqyBAh4ZhnUhWTmRhghH4Lj4U6+t6xVDa93U6UVNsY9V5FOm2P64+BUCxNk gt6/dZS56lOelBMGEz0s1oDrtFnV+sSudxAZSfMuKoXVx4v9+080i4/XVxiteYqkDdI2 2pJGmIdWen0OGS4Jzt6dYuckNg1qkd1pwvGt+lwyjh69SfIfSRs3yQlQnXFHM/xvanVx CY+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738612427; x=1739217227; 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=nCEyOu/LOSfPdvr+BVNdN/g0WxtTpzskRucY3ZD/ki0=; b=mROjiZlJct+nVievy4LgGSada330OFQyNmfWYHX6zTJSebkNYHRhvc3vQN95vQnFX0 7zSl+MrO+GDKzFGf1UOfHrxO5GrAw5mnw+1CS6+Tg9MbGR5gcP0I9bux4No27fdJzdhr QNLVgknFbqlXzGgUOKw/9FnXN1lkEY6RS88ExwsSMFU9mZ1IjoHrQ/eCw5enAP80kBF4 /s/ok3XIukZDACw0QNn+A74lzJogQ5KkccPFeuGPTgc8laYQYjBOZQiN2OCbumkVZJmo PR4zbll4jVK9NYWQStTTn8GrNHSTQEiU92scHm7h3TD9lhGmzNGiRilfmj3oroRPYQ2m e1pA== X-Forwarded-Encrypted: i=1; AJvYcCWlf7hpYlCBLlP1QF8SjFhS7x9bRDRveF8fOcZM4TH3g8yI6r+7DBd84gF/yPexuMJGSd0BnP83aSEbIHNN9B4=@vger.kernel.org X-Gm-Message-State: AOJu0YxdhAjleZG2RE84J62GDL7yEEUex6uasZEJJ/xaWaAxMluthS1a 0AbxXWXk8eKs8p9dpPqnYygt9gAwN9Lc6ONAV1Td5n+HfCvnWPskttDgQjwGp+lmWtItY1iBzi+ 6PQ== X-Google-Smtp-Source: AGHT+IFc9rZmF1JjMiP844qma6jdZcJ9zwzx2lsRF7TrY+30VoDsiU9sWPM5lazcp0sTUpmilFfzJxD366U= X-Received: from pfblo6.prod.google.com ([2002:a05:6a00:3d06:b0:72d:26ac:7d0]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:140e:b0:725:eb85:f7f7 with SMTP id d2e1a72fcca58-72fd0bda642mr32932803b3a.5.1738612427344; Mon, 03 Feb 2025 11:53:47 -0800 (PST) Date: Mon, 3 Feb 2025 11:53:45 -0800 In-Reply-To: <93df442c-8ec3-43ee-aba1-e770a5b7588f@redhat.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <93df442c-8ec3-43ee-aba1-e770a5b7588f@redhat.com> Message-ID: Subject: Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls From: Sean Christopherson To: Paolo Bonzini Cc: Doug Covelli , Zack Rusin , kvm , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "the arch/x86 maintainers" , "H. Peter Anvin" , Shuah Khan , Namhyung Kim , Arnaldo Carvalho de Melo , Isaku Yamahata , Joel Stanley , Linux Doc Mailing List , linux-kernel@vger.kernel.org, linux-kselftest Content-Type: text/plain; charset="us-ascii" On Mon, Feb 03, 2025, Paolo Bonzini wrote: > On 2/3/25 20:41, Sean Christopherson wrote: > > -EFAULT isn't the problem, KVM not being able to return useful information in > > all situations is the issue. > > Yes, that's why I don't want it to be an automatically opted-in API. If > incremental improvements are possible, it may be useful to allow interested > userspace to enable it early. For example... > > > Specifically, "guest" accesses that are emulated > > by KVM are problematic, because the -EFAULT from e.g. __kvm_write_guest_page() > > is disconnected from the code that actually kicks out to userspace. In that > > case, userspace will get KVM_EXIT_MMIO, not -EFAULT. There are more problems > > beyond KVM_EXIT_MMIO vs. -EFAULT, e.g. instructions that perform multiple memory > > accesses, > > those are obviously synchronous and I expect VMware to handle them already. > > That said my preferred solution to just use userfaultfd, which is > synchronous by definition. Oh, right, userfaultfd would be far better than piggybacking write-tracking.