From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.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 B9C5838CFF8 for ; Fri, 22 May 2026 23:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779491448; cv=none; b=HCb0Q9j9Fump/Z3hl/uJU+fWqLHBLNjnfaPAZiGc5EIjd06uoC6WxNNq3H/G1SsZFwvTL23w7NLYPjqDWRKvOGYISsruwRJr1irvBaIN99SmJ6Euj2VaIwsqjDpXYOSOq0UkMS9vqt/2AewJUrPMPWx/rOXn04wVaGav4IpH17Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779491448; c=relaxed/simple; bh=Sr9XOyYGYH0nZyHOFB70YpQHij+Q9Bdp8f6jcW7cfNo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=nTH+GNKn16PeqHGQlKu6JcB+OIXmCtJNpBiKpAwFTeq14nE4of8jgHSOd2SvATMuZtyLR019vPjcrCck83P0mqB/y6ag9XZ1YB28wy/XOJYfgCjA6Ts/kMPdXinKdUJbg9uMagpvBMb7vXYzG00AeV4JfjOe/YydHE85fYfDgx8= 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=C8st0boL; arc=none smtp.client-ip=209.85.214.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="C8st0boL" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2b2ecc96a9aso86994495ad.1 for ; Fri, 22 May 2026 16:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1779491446; x=1780096246; 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=mpOdttCESEioEoKDO1qBEf4+FNRAFJIi5whlp2t234I=; b=C8st0boLeM7YDEA9Y+6K973YR6bRLGkaDXrl4zSb25R7G8FpgEFmiXgbLa4CnC178M PdIH/FVAuns1qmHKfhnJQGwEBOMsHcWnGOYCqMT7wCAbIJwcKCHV6haGlxonVDMuEiuT bEkdkZX7fCHyBfVqlmRqiOORry9zABxQv08hLzWJE8Ehv70V1xpFT5QpDNOuJ2727Vgs Nw1OtOhTu7nWB9OImbUfyFI7gqqiPTqn1wlmyx8tV+CVuAIYceVsgi9POLsDghh7cm/6 OUwmcNtHbNLpkw6ylcrQu6grto2QMIr9zNLal7Gcl0q7QxRavUKqtm58KJNNEvE33KJS CCFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779491446; x=1780096246; 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=mpOdttCESEioEoKDO1qBEf4+FNRAFJIi5whlp2t234I=; b=HbYffIQPSc88l3aK/mVngllrGk7v1XrLC9pcaqEqk0ZNbrpAABk+m6oRgBOW8cAKx+ btDe/0AkM+YXZ86ZcRtnWWEUo+N23m4CLmurO9Er+3Hx+xouE52sjRP5UBkSM8pDnK2H Q+nds+tZmfC5SJ3kECqxOoFofOEIgEP4hNql5FA52/CIPXaEVKUez0DL/MEgrMMzscbc 9nDGKpPNogrqREGXvt9ZTSwqsVaH1+aq008YKoWXU8eP3RNFtMAZn/kW2YMBMH4kz8Xq nXfplDASOJHKBE+9O8QP5A3zAmSJ7V0iGK9qt4ced60jQC26OWIy4Sok4SCGThpXWwrY Wtdg== X-Forwarded-Encrypted: i=1; AFNElJ/2AFpH/R5DmFj202nIIiMIUgoZ1ZqahDGQZm4wiXMhPXswpT8wgvbbNJ9Kt+dkOhbaTr9qY3QaweNRttU=@vger.kernel.org X-Gm-Message-State: AOJu0YyI+clSEYUlIAngj8D/D08WD6jpo9xMB05AfmyFphj/4kuxcrEA Oh4yzKZWFimss8WKRNyjvmsSeE2YGB9iXsSSKBdkJU0oBZ0dbp83ENyTVuO9FqfEnwHdjc6YP1t rP50eGw== X-Received: from pgr21.prod.google.com ([2002:a63:1155:0:b0:c79:81bb:79dd]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:486:b0:3aa:f9cb:d435 with SMTP id adf61e73a8af0-3b3290e7749mr5752743637.11.1779491445825; Fri, 22 May 2026 16:10:45 -0700 (PDT) Date: Fri, 22 May 2026 16:10:45 -0700 In-Reply-To: <20260506015733.1671124-2-yosry@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260506015733.1671124-1-yosry@kernel.org> <20260506015733.1671124-2-yosry@kernel.org> Message-ID: Subject: Re: [PATCH v6 01/16] KVM: nSVM: Stop leaking single-stepping on VMRUN into L2 From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , Jim Mattson , Dapeng Mi , Sandipan Das , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Wed, May 06, 2026, Yosry Ahmed wrote: > According to the APM, TF on VMRUN causes a #DB after VMRUN completes on > the _host_ side. However, KVM injects a #DB in L2 context instead (or > exits to userspace if KVM_GUESTDBG_SINGLESTEP is set) in > kvm_skip_emulated_instruction(). > > Introduce __kvm_skip_emulated_instruction(), Eh, just make svm_skip_emulated_instruction() visible via svm.h and call that directly. No need to bring SVM's mess into common KVM.