Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1285129pxb; Fri, 21 Jan 2022 14:21:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMLHFonzzJlNIUzHJ0vZOD03hkeRAzDGEIGe8ny+v8xddW+0BMeJTTp5HtjytpLQ31kgnD X-Received: by 2002:a17:90b:388d:: with SMTP id mu13mr2695167pjb.5.1642803680959; Fri, 21 Jan 2022 14:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642803680; cv=none; d=google.com; s=arc-20160816; b=sR5AlOkCvI5jD27dEAN0yDV38b9H7JMEJLDoy6+ntHaSq6r6AEuVb8UIw0VnEpja2u ui6UyF+dpp5ZGQO9wJXtTR0e4xYGKozvWK/zlwxup3+1xr3mVpV09u6w6rhl41Q67NNw b/xLn0LODjA+e/r5B0UJey34TSR0ihIGhX+6CHlLn2/8TW1j1LHQe1vSQUV7ORErT1yu XAy7kv6B594UhaFUyzuI7gYEDKyGD9X0OfBVrbtCAYM/CRTgXUAwCcsUr0O3hjDgAP6O UYNpPuAgfCl8vNIHILyE1kNztF7b4V+XPXUPPSKEke92W6N5hR++ANVubsYAH0H9xoUQ Vo8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xqWnKTt/gEa/Nz87akvx4FuCu4zl5HS2xistTt0Ny70=; b=QC3OeskBqQI4JIz3JuTNVyNI7B9U1yxnH3H+r51tX+gmZ4VX7vR63zhU3WgyHPW7ON R+mMmqGFlNwAaXX0L5yyiu88UQGIXPE+y22Ve0hdEUFyDheRvuOoN58dqTQrQL8n3JyU B12viiQlnBBA5Q2X0ZxvbWVTr0wHJsDCG6QzPGLoW4JQ5/tt1U8WBwkkI3tysu0qCHwH WF+3LFFufHRmnzx7XHlHup7mKxfGTktC2scTl6A+IkiOAI3mdqqj/q15kOhppI3G60SS 5bvArz3W/KXhigyCiBRBdMBAxt6Agwp4pTkHtrQAcnkGRmR6awKyA6zAcUCLSn8fDtpt v7TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="OP/v/tnq"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j37si7672675pgl.797.2022.01.21.14.21.05; Fri, 21 Jan 2022 14:21:20 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b="OP/v/tnq"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376540AbiATPP4 (ORCPT + 99 others); Thu, 20 Jan 2022 10:15:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36132 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231292AbiATPPy (ORCPT ); Thu, 20 Jan 2022 10:15:54 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20KEBRwB001421; Thu, 20 Jan 2022 15:14:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=xqWnKTt/gEa/Nz87akvx4FuCu4zl5HS2xistTt0Ny70=; b=OP/v/tnqFUc506mmgYzIPIzRZDlX1G+c881/JstnxCWNQUdk7knEKlyJCSACl1h7SbYS fqsepqnqqa7irMS8DpUOlrBKKD9kU3IM4POenYEEUDLGEAtE3NgTc119xyH4qtWrAi8q Rt5lCEXP9BHHlzrFR6WdFd+lfL/Xx0tajE78+w6wz94TExOl3kXSJ1IP1D7w26FR1fKd 9tjuNZlLSSonVDGW7vq4eANkAK7r3Bbtx8lUurTqtOZK8dxP8dbM1cHo0x9z+osP4YVp foG4CeseZqcTuSrag/CrhdE6JyOkcc0IzLC9U7dVvBqVtyfoalCTu4Py+Q/5HcHUWkq0 NQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dq60dx3kp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jan 2022 15:14:24 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20KEtYlF007869; Thu, 20 Jan 2022 15:14:22 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dq60dx3jm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jan 2022 15:14:22 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20KFC5vC029507; Thu, 20 Jan 2022 15:14:19 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 3dknw9ttab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jan 2022 15:14:19 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20KFEF7D39846164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jan 2022 15:14:15 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B18CE11C06C; Thu, 20 Jan 2022 15:14:15 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C758911C050; Thu, 20 Jan 2022 15:14:13 +0000 (GMT) Received: from [9.171.13.121] (unknown [9.171.13.121]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 20 Jan 2022 15:14:13 +0000 (GMT) Message-ID: Date: Thu, 20 Jan 2022 16:14:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v2 0/7] kvm: fix latent guest entry/exit bugs Content-Language: en-US To: Mark Rutland , Paolo Bonzini Cc: 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 References: <20220119105854.3160683-1-mark.rutland@arm.com> <20220119192217.GD43919@C02TD0UTHF1T.local> <2688b779-9cb8-b6ea-f8cc-93bc8ddf72f3@redhat.com> From: Christian Borntraeger In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Q0UZP0TDTJKVk9kCW5z43-RRjeOAOhY1 X-Proofpoint-GUID: _oC6Pqg9JmbASMFS9Pop1w8XM5troonf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-20_05,2022-01-20_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=724 malwarescore=0 priorityscore=1501 phishscore=0 spamscore=0 bulkscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201200080 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 20.01.22 um 13:03 schrieb Mark Rutland: > 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. That would not be trivial I guess. We do allow (and need) page faults on sie for guest demand paging and this piece of arch/s390/mm/fault.c case GMAP_FAULT: if (faulthandler_disabled() || !mm) goto out; break; } would no longer work since faulthandler_disabled checks for the preempt count.