From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [PATCH kvm-unit-tests] arm: fix crash when caches are off Date: Tue, 16 Sep 2014 08:48:34 -0400 (EDT) Message-ID: <1917491072.5027727.1410871714840.JavaMail.zimbra@redhat.com> References: <1410833175-25547-1-git-send-email-drjones@redhat.com> <5417F159.1050501@redhat.com> <198129286.4990140.1410869523048.JavaMail.zimbra@redhat.com> <54182D09.9000700@redhat.com> <1003075385.5021814.1410871383104.JavaMail.zimbra@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx6-phx2.redhat.com ([209.132.183.39]:59980 "EHLO mx6-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbaIPMsg (ORCPT ); Tue, 16 Sep 2014 08:48:36 -0400 In-Reply-To: <1003075385.5021814.1410871383104.JavaMail.zimbra@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: ----- Original Message ----- > > > ----- Original Message ----- > > Il 16/09/2014 14:12, Andrew Jones ha scritto: > > >> > Should it at least write 1 to the spinlock? > > > I thought about that. So on one hand we might get a somewhat functional > > > synchronization mechanism, which may be enough for some unit test that > > > doesn't enable caches, but still needs it. On the other hand, we know > > > its broken, so we don't really want any unit tests that need > > > synchronization > > > and don't enable caches. I chose to not write a 1 in the hope that if > > > a unit test introduces a race, that that race will be easier to expose > > > and fix. That said, I'm not strongly biased, as we'd still have a race, > > > which may or may not be easy to expose, either way. So if the majority > > > prefers a best effort approach, then I'll spin a v2. > > > > The case I was thinking about was something like > > > > spin_lock() > > enable caches > > start other processors > > spin_unlock() > > > > I'm not sure if it makes sense though. :) > > I don't think we need to worry about this case. AFAIU, enabling the > caches for a particular cpu shouldn't require any synchronization. > So we should be able to do > > enable caches > spin_lock > start other processors > spin_unlock > Oh drat. I just introduced an issue with enabling caches without working spin locks. This new boolean. This boolean will need to be per cpu. I'll send a v2. > drew > > > > > Paolo > > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm >