From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause Date: Thu, 29 May 2014 12:36:09 +0200 Message-ID: <53870D99.3030900@redhat.com> References: <1401355005-20370-1-git-send-email-james.hogan@imgtec.com> <1401355005-20370-12-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Andreas Herrmann , Gleb Natapov , kvm@vger.kernel.org, Ralf Baechle , linux-mips@linux-mips.org, Sanjay Lal To: James Hogan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58214 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756931AbaE2Khd (ORCPT ); Thu, 29 May 2014 06:37:33 -0400 In-Reply-To: <1401355005-20370-12-git-send-email-james.hogan@imgtec.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 29/05/2014 11:16, James Hogan ha scritto: > Currently this is the only asynchronous modification of guest registers, > therefore it is fixed by adjusting the implementations of the > kvm_set_c0_guest_cause(), kvm_clear_c0_guest_cause(), and > kvm_change_c0_guest_cause() macros which are used for modifying the > guest CP0_Cause register to use ll/sc to ensure atomic modification. Shouldn't you have a loop too around the ll/sc? Paolo