Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1269337pxb; Fri, 21 Jan 2022 13:56:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/UhKjeGjSByHGqlXtnse8vdt+YGSc63lIR3NPKZuQ2Lf9vWGpPz87dEmS7WnryzQXVzbr X-Received: by 2002:a17:902:7c97:b0:14a:62ed:c296 with SMTP id y23-20020a1709027c9700b0014a62edc296mr5421664pll.42.1642802184306; Fri, 21 Jan 2022 13:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642802184; cv=none; d=google.com; s=arc-20160816; b=U4Rh5pLL+wAnGauhwo+7J4qGSpokAlIYioP5WpRr4m8PYv0IIRKu5LDkdECmmbsfQB 5Fry0yowNWOiEEvelv5n1W+6JxZlknY2WN9LJeD7NYiToqHJKhjOoAcoqPsnIzJ2yMW3 kcXQcO4R7CzgTQcMHngAkiHxX67IhPuj26Pp5MsQQGh6OwuRF+btD7Y8Oum+Ad2dTj0R TO91rEvD3lGoRNibh0kTx7OeZG+u1ZXB/xiCrOrC6jkKf6ff+NiTsCyGddS8N9TAPJA2 8RhW9NeDux3ev2K6ECZx/fBB8jr+tHuiCYUjKJkzTF9ddXqyl9L5DIHbUs0I+UVrBqSf xTWg== 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=yV8grKjJt9cJ1ARqI2SqT7pulQxEpCYoa/wK66esr38=; b=pOn8e03kHTGjHzT5akGXWlyKi8lax67nllXjKXbb1hKfMp6L0N+NIqDYZVBHlXhUeZ H1/SZbJCk6o4HaTwemIXNc335x3S80JH246n/djnf84wCrydyqI0IfAQp+v9XIMNStZ5 1mqVXsWHqz3Fzsa0zpT0Pxy505RGnAlwCORNDUjthRwzgnAPM96K5gr1axwOxCXhP5Ot /m9cRcDftNaU8o4VJtWlq0JM+QKzwIgzbk/0XKAKne21lrtnMMktpL6Onm1Y28sQ7SYH sv4dmJmjbOQs2UsKQn5sZzdOWgx35UbnLL49TyJHAaxQjIcqKylFId/sVNoATl28CYts lkJA== 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 q6si7276522pgp.405.2022.01.21.13.56.12; Fri, 21 Jan 2022 13:56:24 -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 S232676AbiATMDu (ORCPT + 99 others); Thu, 20 Jan 2022 07:03:50 -0500 Received: from foss.arm.com ([217.140.110.172]:35446 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbiATMDt (ORCPT ); Thu, 20 Jan 2022 07:03:49 -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 F1190ED1; Thu, 20 Jan 2022 04:03:48 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.11.183]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 412283F774; Thu, 20 Jan 2022 04:03:43 -0800 (PST) Date: Thu, 20 Jan 2022 12:03:40 +0000 From: Mark Rutland To: Paolo Bonzini Cc: Christian Borntraeger , linux-kernel@vger.kernel.org, Michael Ellerman , aleksandar.qemu.devel@gmail.com, alexandru.elisei@arm.com, anup.patel@wdc.com, aou@eecs.berkeley.edu, atish.patra@wdc.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, 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, Anup Patel , Atish Patra Subject: Re: [PATCH v2 0/7] kvm: fix latent guest entry/exit bugs Message-ID: References: <20220119105854.3160683-1-mark.rutland@arm.com> <20220119192217.GD43919@C02TD0UTHF1T.local> <2688b779-9cb8-b6ea-f8cc-93bc8ddf72f3@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2688b779-9cb8-b6ea-f8cc-93bc8ddf72f3@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 12:28:09PM +0100, Paolo Bonzini wrote: > On 1/19/22 20:22, Mark Rutland wrote: > > I wonder, is the s390 guest entry/exit*preemptible* ? > > > > If a timer IRQ can preempt in the middle of the EQS, we wouldn't balance > > things before a ctx-switch to the idle thread, which would then be able > > to hit this. > > > > I'll need to go audit the other architectures for similar. > > They don't enable interrupts in the entry/exit path so they should be okay. True. So it sounds like for s390 adding an explicit preempt_{disable,enable}() is the right thing to do. I'll add that and explanatory commentary. > RISC-V and x86 have an explicit preempt_disable/enable, while MIPS only has > local_irq_disable/enable. > > (MIPS is a mess of dead code, I have patches to clean it up). Sure; I haven't wrapped my head around ppc yet, but I assume they keep interrupts disabled as with the other simple cases. Thanks, Mark.