Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1396159pxb; Fri, 1 Oct 2021 09:44:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBBaCRJRFZZhOyFmC2Lk2zGUAQzAETpOgzKpCbFwWPXmqMXhEkLV3v87WQJcJj3S1jChSs X-Received: by 2002:a17:90b:4b49:: with SMTP id mi9mr21363446pjb.79.1633106684250; Fri, 01 Oct 2021 09:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633106684; cv=none; d=google.com; s=arc-20160816; b=BrOBNCgsorkwFZyWh0bwamuBBXdYqgiGA71t8p/2t83eadRd6ASF+ymhwYdNh3H7kt KSMw8vqn7FpXui0djmoNMrA9eUl477sLulbuhXdKGQVI3V4UhVU9EF62aAlkGeWCMv8t IGw8KDO6k+Av2AoiBtbBQr5PL1HCH+D8j4y37kp4cWpAIngnaE8LVBID68cHvQ4uuhZ5 PxipOjmpOU+zbL7xSh2SxWTuDEf/sVXAMftg+egllqJQ9a8VZvO00rIyGPYT7op5L1pw AvSDuEb7K5LZ671QHT8O7rY1gn45xJVfFcjaWBD36Cb4UuUpIyEyqN6NhH4QOqk7xHx9 dyXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=aQbL8pXIXocxX9H8b/2nNpVZyCyOOEJ+2eX3f4bQsb0=; b=lFVPWKi2ZvBjwLgSKDmYJ81YRmVMBaPd4TjNYIp5OjRPscgHk4TusN6089H/F6B9Vd yJaJbilgSqcwsdHJFJSj1G/qFd3bODMfmwCJ5Jm9QciDtSeatWf/w7CAVAj6OBE87q9D lFRHIBsO07km6uBCqXTxgmqJJ/lij8/hV1KAa9RdCSW2oWeQ7gdTrExZIumq3Wu1eeZC bpoH9TdHCilmteTmib7WiqtYiRWEFnjzFyZdp/e6A1mDtRwXO6aJbQ3BNkW6mcKrYofU thTdGFBt5+N9HhmmbWOCjq7g+ecRpdv2KWhGRU5kJt8eJEuOL5F2YMy7a5xg2UF0ZUUo ofCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wXbQCGjv; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si8996163plr.295.2021.10.01.09.44.29; Fri, 01 Oct 2021 09:44:44 -0700 (PDT) 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=@linaro.org header.s=google header.b=wXbQCGjv; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232112AbhJAQnt (ORCPT + 99 others); Fri, 1 Oct 2021 12:43:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbhJAQns (ORCPT ); Fri, 1 Oct 2021 12:43:48 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED050C06177F for ; Fri, 1 Oct 2021 09:42:03 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id c7so9757241qka.2 for ; Fri, 01 Oct 2021 09:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aQbL8pXIXocxX9H8b/2nNpVZyCyOOEJ+2eX3f4bQsb0=; b=wXbQCGjvp4GLHV24dvNcEoftO+b+jxKTmz0SX5x2HR0+WKCJvkioVyd5rDUb2pCsyj o4MwxX88vRap3XoIMPH26Rln/IMU3v7eS9oXh7nMXv+ICLXwXcGBr6pwdAR2E1rH+e9G KNiwnEpz/fBuGfOjg9/YJkFPWP0jIasbrHIi5xoe9Jmc2rwoK0LDzR/wU1wjZbeFmvdD YEhrospe7J6JtzCADzrRF55UOLO4nVmGg2KvlI4Zwe+SSleJ/yccWHSdHTqccQETU7z8 JuQIl058Sfvctk3JRr/BoFuVNjJ4FsVaTDrdfRW23LqaJ1v9W9MoKhc5ea1v1Qa+zBz4 WCMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aQbL8pXIXocxX9H8b/2nNpVZyCyOOEJ+2eX3f4bQsb0=; b=dGH5BpAdfjD85/+vcuF+QcsNCftpQP87h9rhKeSi2nh0u587FAd+UnnJggPdsc1lJE T2nKYBew52Ed4K7UgOT1g6mjuGTODbIsbDNJdKK4qtc9F+FWtCUlbeaZOABuyvD3I2QW mZ/JbsZux31lObfJlttiTg7Bg0xOHt4tDmbjQu8sNDz/62ch5et9unl5gxHhnF50gLcm rFaI7HpE0Wk6QfZCG/AuvSEP/TTs49o7ZcHo+K86U7cBC4Er0pojcQNQEVqeVM+xbB6d jCsybxbMA0GiDR/7RgyyqdGG1SW1nOBzgKu1UzHZotUjTe00mqPuq0EFDvwi18yGO/uc Wbpw== X-Gm-Message-State: AOAM5315KGCQ4M6+/ypV3kqHgVSduUQvmtu3fQFKfbHpmCuez6E3+BL/ PyFZ8//bYR9e1BT2/nrqbutQMQ== X-Received: by 2002:ae9:eb58:: with SMTP id b85mr10034928qkg.323.1633106522896; Fri, 01 Oct 2021 09:42:02 -0700 (PDT) Received: from [192.168.3.43] (c-67-174-166-185.hsd1.ga.comcast.net. [67.174.166.185]) by smtp.gmail.com with ESMTPSA id p12sm3298438qkj.54.2021.10.01.09.42.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Oct 2021 09:42:02 -0700 (PDT) Subject: Re: [RFC PATCH 00/13] x86 User Interrupts support To: Stefan Hajnoczi , Sohil Mehta , Peter Maydell , =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: Andy Lutomirski , the arch/x86 maintainers , Tony Luck , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Jens Axboe , Christian Brauner , "Peter Zijlstra (Intel)" , Shuah Khan , Arnd Bergmann , Jonathan Corbet , Raj Ashok , Jacob Pan , Gayatri Kammela , Zeng Guang , "Williams, Dan J" , Randy E Witt , "Shankar, Ravi V" , Ramesh Thomas , Linux API , linux-arch@vger.kernel.org, Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, qemu-devel@nongnu.org References: <20210913200132.3396598-1-sohil.mehta@intel.com> <456bf9cf-87b8-4c3d-ac0c-7e392bcf26de@www.fastmail.com> <778d40fe-ad8e-fd7c-4caa-499910bb0925@intel.com> From: Richard Henderson Message-ID: <3abdadab-9b7e-7cc0-5ec5-17fa385ce7d4@linaro.org> Date: Fri, 1 Oct 2021 12:41:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/1/21 12:35 PM, Stefan Hajnoczi wrote: > QEMU's TCG threads execute translated code. There are events that > require interrupting these threads. Today a check is performed at the > start of every translated block. Most of the time the check is false and > it's a waste of CPU. > > User interrupts can eliminate the need for checks by interrupting TCG > threads when events occur. We used to use interrupts, and stopped because we need to wait until the guest is in a stable state. The guest is always in a stable state at the beginning of each TB. See 378df4b2375. r~