Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3963544pxy; Tue, 4 May 2021 14:13:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc1xsonbwroTPfPv8umlaT8zankUK+oApkCJ4HUKmpj2f1wgSB6edRBrSwU4+jjGdGM4JX X-Received: by 2002:a17:906:c2cc:: with SMTP id ch12mr351428ejb.402.1620162816764; Tue, 04 May 2021 14:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620162816; cv=none; d=google.com; s=arc-20160816; b=Jb2xkQkUO3Vncy0vFgEaiV8+nqW1zpetkAxzwQUJMzWRWuuvMkJnsLydjR/ZZXjANT 0GyJFAts+/fkKCnOk/ZBRxW35wAlrFxmdpNAbSPAO/wj/RBubY0SSmsOUUEpWxZc9ioL mvhGBdC91Id+gmnOtEwbYnr62uK3DpFZpPTDNUls2bEYcAlaH0YhnoKd6RGQGRxKEoHq eK8wr+og/A9qfhFkNz+8see4j+vVWJGOOX1qOIbIumHTnGiVteN14mBJzBVq2SWONskx vqRAU7B7QCKgobJ85oIHffZXuN+s13aA3AMrKr2E+6zp4MWnv6YE58XqhkEEPXYR5L7X gzEw== 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=KHwgXcHWRd2lENvo0dCzHiD06sLJ4ursFftDNpNdpkQ=; b=Ib+DO/8YJDwM2d789o1+YAwYV1JjGg3YWi+uD7lIRj8xDVNZuEFayCIFFXa3to7FUe tZ/RM62N4gChGhvcC/OBHqEzfDqpgH80IcD3eCG5QJdtuS1GUM+x0HTQDHefXdwHpbUH yeZH3R+9JQbSS7evpgDhUMUTZgz2e2eNQveKR/wP9UDTEoU3fbtcQi7aZyw9IzB+MZHI eIHQSvU0h/rYFdEq4/hNzXGq1LIImH49PcOfdGk3MxiEG6oinmr3r2yyySTxKaoLRVk2 ROR96GscFn6VcxQZ11+DyFTSJ4Ewrqy8RO4gV4QR0bt86OeA8LrOeSjX0ZMlEDgoB41P gN8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M1JuK8kV; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si12935901eda.90.2021.05.04.14.13.12; Tue, 04 May 2021 14:13:36 -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=@redhat.com header.s=mimecast20190719 header.b=M1JuK8kV; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232768AbhEDVNO (ORCPT + 99 others); Tue, 4 May 2021 17:13:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36217 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbhEDVNN (ORCPT ); Tue, 4 May 2021 17:13:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620162738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KHwgXcHWRd2lENvo0dCzHiD06sLJ4ursFftDNpNdpkQ=; b=M1JuK8kVwSSktIaxyVp9rD20T8EYScyUWaS+l53DbD4gk+mLtBu97DmXeDSaaeSWT0Ae9T AM1FBJgRFzie8RAl9b1P61DmyosPIFZDVziv4YgSfdpdCynOLFdvS6uv1h74I7500hYj7u OA3dONAkLx4mbCQzsV8P0q1NySjtAtY= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-r3T5d7GdMJCQ1q__TlzYkA-1; Tue, 04 May 2021 17:12:16 -0400 X-MC-Unique: r3T5d7GdMJCQ1q__TlzYkA-1 Received: by mail-ed1-f69.google.com with SMTP id d8-20020a0564020008b0290387d38e3ce0so7036695edu.1 for ; Tue, 04 May 2021 14:12:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=KHwgXcHWRd2lENvo0dCzHiD06sLJ4ursFftDNpNdpkQ=; b=ZGpf1vwuF7YtvdpHO6Ar3EV/1YJaTeizCrexE7P4jDHz8tq8uVLgQbMupewu/njhxW ggrrq1oa6fxlIe5bflexRWPVqMMtCShmBcoFxsm4K0qkXaaD7RnXQnzGXxp4D2tja0M1 4Jb8LH7mxV5/JYHwZpSdnenaRPhPNItyxO9ATIYDHeATJqwESOl3ZaEo7o5qv55JBZes YMEzLJyE5pJTmKioSlEbxCetOULjvpmPryT7f0JoSXi1p6SURyHTfTm9r+GW0TjzEvpf g55mx6KG5KMBy9xUAClSUeMeRzW5bDav8ur7cmm+WwjO8/MGRoKwAdeukaS69TlglwZM kXpg== X-Gm-Message-State: AOAM532TJv6clVo4erxekyrzP94htD2zXSPlJHnP9/htLLgkFBxBr0tZ tk/0Vk6x64py0qhBPxqY49e/FUczOh2UTk0QbcdOowB0DxEcxoYwh6bi+/cj/wcwfYpbqp2hqIh HYHM5cpGhBIlsoge3+yvekuws X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr24227537ejc.326.1620162735041; Tue, 04 May 2021 14:12:15 -0700 (PDT) X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr24227513ejc.326.1620162734829; Tue, 04 May 2021 14:12:14 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id pw11sm1943513ejb.88.2021.05.04.14.12.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 14:12:14 -0700 (PDT) Subject: Re: [PATCH] KVM/VMX: Invoke NMI non-IST entry instead of IST entry To: Maxim Levitsky , Thomas Gleixner , Lai Jiangshan , linux-kernel@vger.kernel.org Cc: Lai Jiangshan , Sean Christopherson , Steven Rostedt , Andi Kleen , Andy Lutomirski , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Josh Poimboeuf , Uros Bizjak , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Alexandre Chartre , Juergen Gross , Joerg Roedel , Jian Cai References: <20210426230949.3561-1-jiangshanlai@gmail.com> <20210426230949.3561-3-jiangshanlai@gmail.com> <87bl9rk23k.ffs@nanos.tec.linutronix.de> <878s4vk1l9.ffs@nanos.tec.linutronix.de> <875yzzjxth.ffs@nanos.tec.linutronix.de> <87wnseis8v.ffs@nanos.tec.linutronix.de> <87r1imi8i1.ffs@nanos.tec.linutronix.de> <44e20d7cdbf0ffdb7d9dce7d480f86a6f14d16c1.camel@redhat.com> From: Paolo Bonzini Message-ID: Date: Tue, 4 May 2021 23:12:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <44e20d7cdbf0ffdb7d9dce7d480f86a6f14d16c1.camel@redhat.com> 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 04/05/21 23:05, Maxim Levitsky wrote: > Does this mean that we still rely on hardware NMI masking to be activated? No, the NMI code already handles reentrancy at both the assembly and C levels. > Or in other words, that is we still can't have an IRET between VM exit and > the entry to the NMI handler? No, because NMIs are not masked on VM exit. This in fact makes things potentially messy; unlike with AMD's CLGI/STGI, only MSRs and other things that Intel thought can be restored atomically with the VM exit. Paolo