Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp20171lqt; Wed, 5 Jun 2024 15:45:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdniV+qcSRYY1vf1W2BuT4BLUbWKARmYqQ9rzwNeK/tp0QbxvZzCAQpT/M+D5BtZWnjaBMO/yMtKyFhB22dPu3xCZliha+SMadEwQ21g== X-Google-Smtp-Source: AGHT+IEI8BhxM2mOxNs3+OA1fERxw3jaA2AYA2I7DCK2VGs1149vrvNDm6lQDot8wHvRHSHvvJzs X-Received: by 2002:a17:90b:128e:b0:2c2:8d2c:8292 with SMTP id 98e67ed59e1d1-2c28d2c8317mr2196379a91.48.1717627545608; Wed, 05 Jun 2024 15:45:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717627545; cv=pass; d=google.com; s=arc-20160816; b=0S+8Ft85CqrvkWS85ueegBcjHFQKffuqsYe1T5vgyEeci/irVcXSZcGIVTEozPgoti ivjnAlIiXKzZ9oTThpK0St3YdQOyOPo8jY3DdGvkZH9gyd3RlMvXP9KI2JoFT2w9lNFh k6C3sWHCf1+QH+J4bmcbolWiexPorwSqvM9pu/cXRZ31sSmlnAmU+E1/TNbRTy43oiHQ Z9ESI2aAkhJvE8PpehlrajahmSyiJlVe0h/5asWiQ4zSkTkoUW+T8C/3kKwKPbQlnHYX aQx7J/LW3+FxpftFY0iOvldpOp+u2lpTBvWbaYt+RU9dRsuA2HWptNNn2J82mV9s5+kZ 5tRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:reply-to:dkim-signature; bh=jv42HdOcUKJtArSgUKGYW0zjR1yR4kizVdwWHo6frk4=; fh=wmKyj/9iFVM6d6pS3Yeqr0BxUJ96ZALBFAn2/jEHTtE=; b=n0/PLLlsShpwmlko42LwRoXmJ2b0abkZtbuMEhzIf13eDKY32i2iprr6f0QFyVVeCH VL2+8YJ0AVXdghcoPWCvX+7aGOv0wV2B+80HAst+ARWbKC5+TU1WC5BMvqm+E8JcqXbY Jy3GtMXKChcDYeKY1UzvE7z1QnKMsNLPgZ5vSCqX05iRoupi4hCxqFIi5IBgx/g8RhIE v5RLASbOwozZ7Te2DlL3/8MsOZuWkXj6mNix6XrVXNmqfjpLUx7bmPXBuij9oGdSSCU2 eC7280vy9XD3bt4JAB9KlNAzjCcqGEvJkMtDRyNzrldImPSA5pbj7UP85Ba152iBWxiG Wpig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="emHMLE2/"; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-203367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c37bc69si120715a91.100.2024.06.05.15.45.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 15:45:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="emHMLE2/"; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-203367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5B67D285A54 for ; Wed, 5 Jun 2024 22:45:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 869561607AD; Wed, 5 Jun 2024 22:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="emHMLE2/" Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.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 78BC5155395 for ; Wed, 5 Jun 2024 22:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717627534; cv=none; b=ZA/lTHHmXTIE1SHk8vOHDchFXP0Kd9KjXgXUmv6F7R0coO9yCjADUXTSdLiW0nwrWQ9W99G16vk9J4feiG5eNND/l4sMAIcctTBWk6RK9YF6Z6IMovIDGzqVy/By+LufDcs+ItpICkzDyt6X6bMlFof8/pO/IAgJ8jJZbXkJoBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717627534; c=relaxed/simple; bh=mf7aKJTKGggmAgNjvNLsXZpV2sd484SihQhDbyFc5FY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=kHAmpKA33qhMbVWmk9RwVxCC0hfhohEDw+3lWwyTcZ9doL/YBj9AxMkyF/OL79W7mCRo4dSM77T+WSitPV7jdBw4evHedFZU9xxVrOVpS6Yi7vYI0MvSRpSfvTZmkIUyu+48BVnth+/xFTspUpZaDuBRDebSE1OxN/gf/omNlUo= 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=emHMLE2/; arc=none smtp.client-ip=209.85.215.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 Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5e4df21f22dso185685a12.0 for ; Wed, 05 Jun 2024 15:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717627531; x=1718232331; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:reply-to:from:to:cc :subject:date:message-id:reply-to; bh=jv42HdOcUKJtArSgUKGYW0zjR1yR4kizVdwWHo6frk4=; b=emHMLE2/HrPAoAKq5Tvb57eqbg6gD3KiW5Xf1eEeUJNw6UKggIRoK4TfvrVVvPOGc0 4leiqV6sYUviugOIYy7z1PTE+abt67QIBf05MGH0wcuPn1yiOFe30fMW4oGtJIe0qASK ovNJh1umBSrYpUvr468ZyPvRR1DBMznvb50H8eEps71RX8uPk0MyU4yh7MH9MuyFZ2aX prNRaET/6ChKAYHUKat+Jfe1TPJv3FDsdlCgPVzCF7OyHv9/Pr+/U7JR8RQTxUpzNyrk YCONr5YLK38/aJiKRjV1yQBiHfR+961zzj7mWlbPOXfQMW6yHFfxoOXKddm/9jjdR5rx wkqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717627531; x=1718232331; h=cc:to:from:subject:message-id:mime-version:date:reply-to :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jv42HdOcUKJtArSgUKGYW0zjR1yR4kizVdwWHo6frk4=; b=SQVt37gyK6nrNL6Vc7W8vrFuWFG3GUY+cTDfji4uWR3anhtnAMUP6YykY9gDzkAC7N 8CchsQGQJIYeTcNj4D/HNIGx3Ad97SPt8X2aqIB7u9TA7fJy8qRVmlnvGa82JQBnZsCw H3TFlTYGDd3pIbSwyeK8WyiEUl03dHdeTYgi/XJydiEger/+6lpz/ecvpM7/h6B4yY/+ VGMMO8WTNWfuHW28zGbrIZ1gou+cBCWHmaugMwH5ABRmMU/ZvqDVkrM4PbxJT/L8d/0g 70o3PLllElYv7RtKZOVLSIYQQL648mT7pF4FGonvPiF5BsZVqKG3ywjPYSUrOpIvkSwG cHCg== X-Gm-Message-State: AOJu0YxSL7mhyEwXoOv1Cg9h4m0MCVME08ZagHnp7V4AUKImxuo8iSTh S2yPt3VmKlkB2/fUQ+NGvIcc8o+jQgQNJ4tuIXbOKgbwXH9IWS8kV0wBvW0dHJ7JhBS9AstYqW2 qiA== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:680f:b0:2b6:4220:159d with SMTP id 98e67ed59e1d1-2c2999ab0e0mr3719a91.3.1717627530167; Wed, 05 Jun 2024 15:45:30 -0700 (PDT) Reply-To: Sean Christopherson Date: Wed, 5 Jun 2024 15:45:25 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.45.1.467.gbab1589fc0-goog Message-ID: <20240605224527.2907272-1-seanjc@google.com> Subject: [PATCH 0/2] nVMX: Ensure host's PAT stays sane From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, Xiangfei Ma , Yan Zhao , Sean Christopherson Content-Type: text/plain; charset="UTF-8" Fix a bug(s) where test_load_host_pat clobbers PAT and causes all subsequent tests to effectively run with all memory mapped as UC. Xiangfei first noticed that this caused rdtsc_vmexit_diff_test to fail, but it can also lead to timeouts if more tests are added, i.e. if more stuff runs after test_load_host_pat. Sean Christopherson (2): nVMX: Ensure host's PAT is loaded at the end of all VMX tests nVMX: Verify KVM actually loads the value in HOST_PAT into the PAT MSR x86/vmx.c | 4 +++- x86/vmx_tests.c | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) base-commit: 765b349b6c4b1c06473dfea548a15f799e0fbc2b -- 2.45.1.467.gbab1589fc0-goog