Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 06 Jul 2018 18:56:53 -0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fbVuV-0003GX-JD for speck@linutronix.de; Fri, 06 Jul 2018 20:56:52 +0200 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A864E40122D2 for ; Fri, 6 Jul 2018 18:56:45 +0000 (UTC) Received: from washington.bos.jonmasters.org (ovpn-124-78.rdu2.redhat.com [10.10.124.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6989D2026D68 for ; Fri, 6 Jul 2018 18:56:45 +0000 (UTC) Subject: [MODERATED] Re: Interrupts policy for SMT References: <20180705230732.GJ17013@tassilo.jf.intel.com> From: Jon Masters Message-ID: <7a1e2f79-7616-5542-6ccc-32dfcdfc981d@redhat.com> Date: Fri, 6 Jul 2018 14:56:44 -0400 MIME-Version: 1.0 In-Reply-To: <20180705230732.GJ17013@tassilo.jf.intel.com> Content-Type: multipart/mixed; boundary="QrWD8b6KpjDeDAmJGHXcSuokuMCD9FhpN"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --QrWD8b6KpjDeDAmJGHXcSuokuMCD9FhpN Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 07/05/2018 07:07 PM, speck for Andi Kleen wrote: > 2. Explicitly force the sibling to exit for interrupts >=20 > The basic idea is to maintain the "i am in a guest" and "i am in > an interrupt states in two cache lins. > The sibling always checks it before executing interrupts. If > is set it sends an IPI. KVM also needs to check and wait > for interrupts before entering the guest. So guest A receives an interrupt, notices that an IPI needs to be sent and interrupts sibling thread B. Then B waits until some later time before re-entering its guest at the same time as A? How do you do the lock-step entry? Do you send a second IPI or spin on some lock value that's in this shared cache line you talk about? Can you provide a worked example? Jon. --=20 Computer Architect | Sent from my Fedora powered laptop --QrWD8b6KpjDeDAmJGHXcSuokuMCD9FhpN--