From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 23 Jul 2018 15:40:25 -0000 Received: from mga04.intel.com ([192.55.52.120]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fhcwi-0003yW-9C for speck@linutronix.de; Mon, 23 Jul 2018 17:40:24 +0200 Date: Mon, 23 Jul 2018 08:40:21 -0700 From: Andi Kleen Subject: [MODERATED] Re: [RFC PATCH 4/6] kvm: handle host mode irqs 4 Message-ID: <20180723154021.GE35943@tassilo.jf.intel.com> References: <6815cf025aa41954f911a1e76c2415035307b00f.1532339695.git.nstange@suse.de> MIME-Version: 1.0 In-Reply-To: <6815cf025aa41954f911a1e76c2415035307b00f.1532339695.git.nstange@suse.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: > +.macro TRACK_KERNEL_MODE_IRQ > +#ifdef CONFIG_X86_TRACK_KERNEL_MODE_IRQS > + /* > + * Increment the kernel mode irq generation count even if > + * coming from userspace -- nobody will care. > + */ > + incl PER_CPU_VAR(kernel_mode_irq_gen) > +#endif > +.endm You can put it into irq_enter/exit, no need to mess with assembler code. -Andi