From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: kvm-kmod and kernels 3.11.* Date: Fri, 13 Dec 2013 17:24:42 +0100 Message-ID: <52AB34CA.3020102@redhat.com> References: <20131212212713.GA14762@ERROL.INI.CMU.EDU> <52AA31A8.4010806@redhat.com> <52AB21F2.1030005@siemens.com> <52AB23DF.2000509@redhat.com> <52AB2967.8000207@siemens.com> <20131213161859.GB14762@ERROL.INI.CMU.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm@vger.kernel.org To: "Gabriel L. Somlo" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:24045 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849Ab3LMQYv (ORCPT ); Fri, 13 Dec 2013 11:24:51 -0500 In-Reply-To: <20131213161859.GB14762@ERROL.INI.CMU.EDU> Sender: kvm-owner@vger.kernel.org List-ID: Il 13/12/2013 17:19, Gabriel L. Somlo ha scritto: > So I tried to mimic the existing "sed" functionality of the "sync" > script, and was was left deciding between excising the call to smp_mb__after_srcu_read_unlock() from line 6009 of x86.c (since it's > defined as a no-op in the header), or sed-ing in the declaration from > the kvm srcu.h via the sync script. I think the latter is slightly less > cheesy, but I'm really curious what you think would have been the > "canonical" way to do this :) You can also do this: diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 34fb320..5fa075e 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -1408,3 +1408,7 @@ static inline void guest_exit(void) } #endif /* !CONFIG_CONTEXT_TRACKING */ #endif /* < 3.10 */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0) +#define smp_mb__after_srcu_read_unlock() smp_mb() +#endif Paolo