From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.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 8733836A361 for ; Mon, 11 May 2026 23:56:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778543778; cv=none; b=PZUn6xpu1PLLP6vx60T0G0kGmRsWeaHx7BniNjZ+SIc47uPDqdlKnmimX8QTDXCxj80wB7kZgQG8Zt6LvwFDwZ4X9IDXlrspYaIvry3EGbN4xyuTA3jk7nh3E2osJw0QSdyzDVQRpQXxubEfeUKLX3hriJLFOeorrwm8O82d0ww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778543778; c=relaxed/simple; bh=uhJJu2sViOipR9a5Qsb1geMr6rsuIpzzaV4wu115wnc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VmzFPxH4P7NFnxPdR5R2POuphE7iCExd7LY7j0YNwR/5iuE6PT0Fwqc0dKSdCfctFDtVSRAjfnHsZo6CoMW26A/10aZYWQ1JFuFeQZxyxuBBYuBIDm0liDcgkvd7zW5dNnL8beDVXnkKl4vDCCftHHTunNt1qx1R33oM/GdZn+8= 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=mU/8CCvy; arc=none smtp.client-ip=209.85.210.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mU/8CCvy" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-82f85179263so5297484b3a.3 for ; Mon, 11 May 2026 16:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778543777; x=1779148577; 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=jY/CI1emJnWJUrMbY14/x8c4oyuxC6FFn11+TJQjNkI=; b=mU/8CCvy38iU3nHzXKrap4zaEyh74QVla1dcuX0skA1O5VYR80Rwrfqn4J62fuJhjI omoYa53f5dTF/byKG08rNf2CSh4oJjVdyiXdt8jK7FMHLL3iMuhwalzzG/NGomkLbvqj VjdT1RzFkhClI99Ax4FkWm/xJTv+YZyPKi0u6ga3HH/SyWaC0FNHfn89Hv3OtWguYt/Y WLt9IU8QwTTVEyHGlfmf9Hv3Y9TFg/EAmIULTqbO75ZzI2ZoUEo7eYWio1pwnsp+iwYK O4EVG3g3mBbiRWj/7c8aESnLEABSi9fjuljXDwLOl79orV+D3dI9qkKRjQQNTAQPPSDk MATw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778543777; x=1779148577; 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=jY/CI1emJnWJUrMbY14/x8c4oyuxC6FFn11+TJQjNkI=; b=VMAPUG9CHuAoZnADvYU9VKtKBdP6SP72JCK/kQu53Y1YE5NfE4Knl3C/dkZ+nytmzB EuM4ndrccdJjR1pRQw2MS03RL4wTnhbIeCZqsPasMhsRU+WRKrjc7uhK/GSXkSsIxb+R BGsLB0jU2uQBQ2j99vKhpuRQs41xkVMpu7+AsCMLSSphzaQo5/u9S1w9FqDBzC7tGbyF ZoI+hoNWBpy2XxSsmEm862Bt51ua5t5R43ANYBzNfn4awL93inJqDIwL3BRkn0iPyzaR EsviJenFo1nAc6St1pLumbsuaaAMwaXmA2J8Win7uB0AsLZAfaHZSz9uAN5bqOhW/hOY vpxQ== X-Forwarded-Encrypted: i=1; AFNElJ9IHbb+iA+OMBKHNTq8KwIKBBUDPjLtPSl0y4OjfURuX+POoWE+vqMiTlBzBMLmO0LijtRXfpdfNYTpGE0=@vger.kernel.org X-Gm-Message-State: AOJu0YzSGHKSmG29eh1z4XPmZyc/24rKMRhdIr1uqC3BKlE66Bw52UGe /KGa9LnVWPyFvgyLeX8yNT52yfFQxdtHrC6wnuSCwtkA8SPFrLdQMrYTGm0uLAg7xuI8XMTjBUo EqadRmA== X-Received: from pfbfj34.prod.google.com ([2002:a05:6a00:3a22:b0:82f:b709:3747]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:3014:b0:82a:65fa:cecf with SMTP id d2e1a72fcca58-83eeb9fe90fmr563040b3a.4.1778543776645; Mon, 11 May 2026 16:56:16 -0700 (PDT) Date: Mon, 11 May 2026 16:56:16 -0700 In-Reply-To: <20260102142429.896101-1-griffoul@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260102142429.896101-1-griffoul@gmail.com> Message-ID: Subject: Re: [PATCH v4 00/10] KVM: nVMX: Improve performance for unmanaged guest memory From: Sean Christopherson To: Fred Griffoul Cc: kvm@vger.kernel.org, pbonzini@redhat.com, vkuznets@redhat.com, shuah@kernel.org, dwmw@amazon.co.uk, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Fred Griffoul Content-Type: text/plain; charset="us-ascii" On Fri, Jan 02, 2026, Fred Griffoul wrote: > First, the current approach is missing proper invalidation handling in > critical scenarios. Enlightened VMCS (eVMCS) pages can become stale when > memslots are modified, as there is no mechanism to invalidate the cached > mappings. This is a non-issue. Modifying memslots while vCPUs are active will cause problems, period. There is no magic on earth that will prevent that. > Similarly, APIC access and virtual APIC pages can be migrated > by the host, but without proper notification through mmu_notifier > callbacks, the mappings become invalid and can lead to incorrect > behavior. No, they can't, at least not for unmanaged memory. For kernel-managed memory, KVM obtains a long-term pin, which prevents the host from migrating the page.