Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1277576pxb; Fri, 21 Jan 2022 14:08:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdu0H3yc+tRjfvjGpguPpKKsOn6ghT2opDXW6Uesek1e6sTdohYyyDkV0/MyvVLiMbV7+g X-Received: by 2002:a63:774c:: with SMTP id s73mr4220435pgc.473.1642802930677; Fri, 21 Jan 2022 14:08:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642802930; cv=none; d=google.com; s=arc-20160816; b=cDcdlpA19QANARVv3EJSh+UeXSpBVWbR9UnZpAIPqYkSVuAC4pc5EPiJSdebLu5dAc f9prjjd5ZQ88Iz1I17WbNKIT39AZKlBXTFrbnWaBk9xFe8nWQIF9w2XModcc7lBqrN9V ZZuRTranVDu3wY3uPYCwUeH2qWkrWIGnxMi5CkqJLYXnZ4Bbi7LzZF4CHqikWrlmkmiT BC2fgaAhbpZQJdu5dat6o8zJXnVJ2lHN1eiiesgsTZhVg9om+98rbbrtJTQMq/Cc+lG4 8Sgv6DCrsoKKDddpnhSe8UAsUFvSl7O6is947KxpP3a4lgzi/ej0akm4T/Iks3Lfxung 3uqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=SAvelyBteOAPShoe9gqWutUT7jlEEe6reMCxikOUQU0=; b=AxFUPD75OESXmOJlkUyGNjTFB8j6tzC70iNMC3SVkuP1qc+osEs+qt3bmNMnttotEQ HudThW/Dk43r3ZQ5WALHPU8egtIkHfvmu4I6xskMkBwqSsrKn4qKZvgNjgrHxjKE42iM M1T+Qr2Hkrp42XVn091labxv2IL7bm8MTKPBcFhTF7QDAEOH4iJ3If7SP2Qn5udoUVqk oRsWlJOGS/xWeQjZtIpNi1azZGPiSHymLoyxHrWp3ZxHgYKGZ1olXmnsYVOwAJ2rbYw5 V9+CRmch/5RA1D9yxxf+2sWuRiltt3hn+1p7WVRfVe7vBNO9col+La368RjVlyoMsDgv ugqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si4041613plr.178.2022.01.21.14.08.37; Fri, 21 Jan 2022 14:08:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235404AbiATNds (ORCPT + 99 others); Thu, 20 Jan 2022 08:33:48 -0500 Received: from foss.arm.com ([217.140.110.172]:38304 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232587AbiATNdr (ORCPT ); Thu, 20 Jan 2022 08:33:47 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2391B1FB; Thu, 20 Jan 2022 05:33:47 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B4B873F774; Thu, 20 Jan 2022 05:33:41 -0800 (PST) Date: Thu, 20 Jan 2022 13:33:22 +0000 From: Mark Rutland To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, aleksandar.qemu.devel@gmail.com, alexandru.elisei@arm.com, anup.patel@wdc.com, aou@eecs.berkeley.edu, atish.patra@wdc.com, borntraeger@linux.ibm.com, bp@alien8.de, catalin.marinas@arm.com, chenhuacai@kernel.org, dave.hansen@linux.intel.com, frankja@linux.ibm.com, frederic@kernel.org, gor@linux.ibm.com, hca@linux.ibm.com, james.morse@arm.com, jmattson@google.com, joro@8bytes.org, luto@kernel.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, nsaenzju@redhat.com, palmer@dabbelt.com, paulmck@kernel.org, paul.walmsley@sifive.com, peterz@infradead.org, seanjc@google.com, suzuki.poulose@arm.com, svens@linux.ibm.com, tglx@linutronix.de, tsbogend@alpha.franken.de, vkuznets@redhat.com, wanpengli@tencent.com, will@kernel.org Subject: Re: [PATCH v2 4/7] kvm/mips: rework guest entry logic Message-ID: <20220120133322.GA13904@C02TD0UTHF1T.local> References: <20220119105854.3160683-1-mark.rutland@arm.com> <20220119105854.3160683-5-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 12:10:22PM +0100, Paolo Bonzini wrote: > On 1/19/22 11:58, Mark Rutland wrote: > > + * TODO: is there a barrier which ensures that pending interrupts are > > + * recognised? Currently this just hopes that the CPU takes any pending > > + * interrupts between the enable and disable. > > + */ > > + local_irq_enable(); > > + local_irq_disable(); > > It's okay, there is irq_enable_hazard() but it's automatically included in > arch_local_irq_enable(). As with the riscv case, I'm not sure whether that ensures that a pending IRQ is actually recognized and taken. Since there's also an irq_disable_hazard() it looks like that's there to ensure the IRQ mask is updated in program order, rather than guaranteeing that a pending IRQ is necessarily taken while IRQs are unmasked. In practice, I suspect it probably does, but it'd be good if someone from the MIPS side could say something either way. Thanks, Mark.