From patchwork Thu Dec 19 22:10:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 13915883 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A88C2189BB5 for ; Thu, 19 Dec 2024 22:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734646245; cv=none; b=KU1Ph9FgwHDQKyBg4crb6n4A/qEU4gJBIjtKl0lz+KawlpZEuoLjgvHdBgV8bcaGhLWVoJUEyKPC1n57FKyunHbtfBwMuLdoAgIWuJH5Wm9eepveVRyWyzi6N9ByN4iBVIGKMoSigVn7EN3Wnlutg4YgG1GxjGM/zcs5qUD8MTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734646245; c=relaxed/simple; bh=jpWDPO9NwvwwErsGWcXatgU2pgUi6oiYVut0uH2FurE=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=W4NbKkD1szFAiEdryCGzUF3MWvMeN2jRr/P4AmUn/oQuwwS31pFgo12L9H8D3CPQfHU9MxTYWyrtLzDSlIWzFdwGcGayCqdUpX89JKk/mVLtE1iWRI+6d5uTAMsKGlR5ZISkzwPBNWyjL/xeOxhDSEbHRAaOSwNMlpNrphIPQbk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gcaWbgAb; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gcaWbgAb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734646242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ohE6RUMNf4QE7Rf54SYP8XxM1LehvBUEy6S3w5kecBc=; b=gcaWbgAb5edstg/6fFzBex3wtadOxCX53oXTQqQlK+LIRmnYWj087CBj4HqJF/rlMbHLTO i8JfW+Qqet0s8m4qMqJ0DC0f6+L2FWGDH2gZKQbr7MlKsdZQ9Xfu5nyp5bdgfihLj7u8Uh 44wbGMO0uJYHlCmWg3TXZfQn4XWYu2w= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-680-DMrSCFtqMk2Ky6WWoN7NHw-1; Thu, 19 Dec 2024 17:10:39 -0500 X-MC-Unique: DMrSCFtqMk2Ky6WWoN7NHw-1 X-Mimecast-MFC-AGG-ID: DMrSCFtqMk2Ky6WWoN7NHw Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 30AEA1955DD9; Thu, 19 Dec 2024 22:10:37 +0000 (UTC) Received: from starship.lan (unknown [10.22.65.181]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B6D521953953; Thu, 19 Dec 2024 22:10:34 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Ingo Molnar , Paolo Bonzini , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, linux-kselftest@vger.kernel.org, Dave Hansen , Borislav Petkov , "H. Peter Anvin" , Sean Christopherson , Maxim Levitsky Subject: [PATCH v2 0/2] KVM: x86: read the PML log in the same order it was written Date: Thu, 19 Dec 2024 17:10:32 -0500 Message-Id: <20241219221034.903927-1-mlevitsk@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Reverse the order in which the PML log is read to align more closely to the hardware. It should not affect regular users of the dirty logging but it fixes a unit test specific assumption in the dirty_log_test dirty-ring mode. Best regards, Maxim Levitsky Maxim Levitsky (2): KVM: VMX: refactor PML terminology KVM: VMX: read the PML log in the same order as it was written arch/x86/kvm/vmx/main.c | 2 +- arch/x86/kvm/vmx/nested.c | 2 +- arch/x86/kvm/vmx/vmx.c | 32 ++++++++++++++++++++------------ arch/x86/kvm/vmx/vmx.h | 5 ++++- 4 files changed, 26 insertions(+), 15 deletions(-)