From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: x86: avoid =?utf-8?Q?writ?= =?utf-8?Q?e-tearing_of=C2=A0TDP?= Date: Fri, 27 May 2016 18:34:37 +0200 Message-ID: <20160527163437.GA14163@potion> References: <1462979069-8275-1-git-send-email-nadav.amit@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: pbonzini@redhat.com, kvm@vger.kernel.org To: Nadav Amit Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60433 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754766AbcE0Qel (ORCPT ); Fri, 27 May 2016 12:34:41 -0400 Content-Disposition: inline In-Reply-To: <1462979069-8275-1-git-send-email-nadav.amit@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 2016-05-11 08:04-0700, Nadav Amit: > In theory, nothing prevents the compiler from write-tearing PTEs, or > split PTE writes. These partially-modified PTEs can be fetched by other > cores and cause mayhem. I have not really encountered such case in > real-life, but it does seem possible. > > For example, the compiler may try to do something creative for > kvm_set_pte_rmapp() and perform multiple writes to the PTE. > > Signed-off-by: Nadav Amit > --- We don't lose anything by preventing tearing even if it wasn't possible. Applied, Thanks.