From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 A9971232367 for ; Thu, 27 Feb 2025 14:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740666662; cv=none; b=nh/TcOgcJ49HWp1Nagh5jVjAytkUOy88cZSULBY5mTHGAnlbbIgZ13P4jaK9n5sECH6zzRy8iKK5OBegkb5XCRSKBEa1RhxEa387bEwzeeFfxlzH9WiYduQz9Ba7BP6kIKyLKQA0fKeEnCGnvy0TkcEPHuxunf2oTOmKGupgB6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740666662; c=relaxed/simple; bh=TcY8I0aBWWwbvIhRVEZCFrgBV1txXYPMWwRUkY95OSk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DYD5/KYjDeFGeGeRM/6NlwtHf2BAJjV+Kh/eWntwuvITvSzSceszgs2/U7d3YfXnGsGd3h8SlOOZ0/j2YBCwkQxhquu3dc6OvgOwMQv9AW5944F6YM6WuMLjAwr5RD05x0RG1ZJEE+MIv1JRbYZZUY/W+oJHyc4DV032Df0FZYU= 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=tlDrLlQP; arc=none smtp.client-ip=209.85.216.74 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="tlDrLlQP" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2fe86c01e2bso2242000a91.2 for ; Thu, 27 Feb 2025 06:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1740666660; x=1741271460; 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=/BYwe2IugO2DWfvdwgV6MhO4KxmKJ8dY5lREV+02bg0=; b=tlDrLlQPUVhxO08hEnSFOaGmTIc1oRY+iicheqSGCS7Njfy+zeR4KPvgUhw4N3XvCv PcE8h30crGcx85lsK/0ZvbLhhzmhuBrrz2xPbCmoeRqjN+PKg20LpkJSPEse/hiuw9vn +AiaM86Yw6xiL9gy+07bQq08rQDsxVkpmNgzFvxQmg8L8Rx9o4uJg4hnuBZaykr1xjCU qBsiY+m/cNg1LRGvnkXYL2Nm85wbXkvN2kwOjAjYcVnI1WxTwzD0H4PpmVP1d5dzIoSZ PecKoke0ZfPBQUqCXa7OF795WBMY8zhz+hThu0E0v4pRH+BVxhR3NaZ/bELTdso1/ddc 77sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740666660; x=1741271460; 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=/BYwe2IugO2DWfvdwgV6MhO4KxmKJ8dY5lREV+02bg0=; b=bDYOxJvYsZG6UHuF6wApvINdcCMQLNqt44BynOsKbwjEeVjMHgKpmz7vD+Wo86qmjf VpFcSuW9yppKn/0usQBkQsGZzDfim4NkSqFpCPzqfaJvzSvFnPeF260xjfA1kzAKEK8Q Ght9UgyIXfRcVdRwBIG/P4Vl3Q9zDnBOQIH6FasUlePnQM3qFpqjtNC5G2TKHtGsMj6e Txb2I7V0s+IfLoCn3HWTpXLpnXa70fuIu9ZlrX+DjwPVsO58SK6ARtud9+D6amjJPnpp 0jxuigxBaGm4ypSROv9xbuo0jqjDAfJbqV0oWwDW3WQIb2wEH04HkNbT1fOQzv6qTOdB GVdA== X-Forwarded-Encrypted: i=1; AJvYcCWvGIWpYJQfVNmKgDxhBMkf4oBtdXc7W3NQzJOjuNWYCnSaHX1EIzR7C7AfErl3PSuyo/U=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4wGktjyzA/HIHyDCTc1wrxvjLA28azkx7Uzboocf17IT+BoEi oezdjrJWeYKYASYJyZ4mX0RYUONmEGrshQ6vMHcFOjQjiwi+ZgC4zkMrg/GGJHP3MllFYkPyzD6 7Zg== X-Google-Smtp-Source: AGHT+IEHXMKLhKy4AekC0miRv9oCxzQ0iAUerHTQpPQKorolelo+UjobEgU72Wcwpwa0Yjm+cH9EclQbehw= X-Received: from pjbsg17.prod.google.com ([2002:a17:90b:5211:b0:2fa:2661:76ac]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:2d87:b0:2ee:f076:20fb with SMTP id 98e67ed59e1d1-2fce86cf0b7mr46370564a91.17.1740666660022; Thu, 27 Feb 2025 06:31:00 -0800 (PST) Date: Thu, 27 Feb 2025 06:30:58 -0800 In-Reply-To: <1fe17606-d696-43f3-b80d-253b6aa80da7@amd.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250227011321.3229622-1-seanjc@google.com> <20250227011321.3229622-4-seanjc@google.com> <095fe2d0-5ce4-4e0f-8f1b-6f7d14a20342@amd.com> <1fe17606-d696-43f3-b80d-253b6aa80da7@amd.com> Message-ID: Subject: Re: [PATCH v2 3/5] KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled From: Sean Christopherson To: Ravi Bangoria Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Xiaoyao Li , rangemachine@gmail.com, whanos@sergal.fun Content-Type: text/plain; charset="us-ascii" On Thu, Feb 27, 2025, Ravi Bangoria wrote: > > Somewhat related but independent: CPU automatically clears DEBUGCTL[BTF] > > on #DB exception. So, when DEBUGCTL is save/restored by KVM (i.e. when > > LBR virtualization is disabled), it's KVM's responsibility to clear > > DEBUGCTL[BTF]. > > Found this with below KUT test. > > (I wasn't sure whether I should send a separate series for kernel fix + KUT > patch, or you can squash kernel fix in your patch and I shall send only KUT > patch. So for now, sending it as a reply here.) Go ahead and send the KUT test. They two repositories evolve independently no matter the order, just put a Link to lore of the kernel fix/discussion. Thanks a ton for writing a test!