Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp944340iob; Thu, 28 Apr 2022 14:32:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTloqwejLOmWMezzllWuaCGmUDpMPA+h1kU5RWFtFmAj8lEV3yrOjSjqfDR+uFgVmTGOxu X-Received: by 2002:a17:902:6ac9:b0:156:a6ae:8806 with SMTP id i9-20020a1709026ac900b00156a6ae8806mr35125942plt.148.1651181570363; Thu, 28 Apr 2022 14:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651181570; cv=none; d=google.com; s=arc-20160816; b=NfskgFmawF6gttzaaM+QWlhsp1oMDrWrIztddixf6/a6t31wGlXks55kKXJQyotu5p E0ecPGNgfu2aJ/GQznObkVDY3fQsTsvoQr5/kFPznHD+AdJ9LZtbRTrEQJ2a75Ta7rKI bnf0ZBX3H+aPAATNvCp3gX9VC7HcHIZTrXM7pq5IqfHrrgmPx5v0WHDJ5e5jWfzw67g3 +z7KiRa3C8esX4NZFzDG93USadubT/qijZD1T4TDYRZgyYx8SKhzePW8H/sAaCzVV3+p 98t6WzHOXIpLNDlnZ21Hl3dUkdpBspjNoynCHDLBTWX0gweQkemOC7er8OlspowMRszn 2AuA== 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; bh=26WGtg7CCLARCqvjl1/98SNTyn1bFRRNAixeeJsQK60=; b=t7hLIOR6DDiU6wabjSx8qde0O9S5iXjP+Bt7gOG6BYeQG7X6ChrWShYhLQA1AB8AuO hAsA+gozJRAaiqh+MgJFVg1GPR+rplmu+jl6WIpoBC8EdL8dMAqaxgYXM6lXsWZdKiaH F4/aHT1JyYRPfbTv4bPqyKHqrb347nOeaklLxs2RUO3j0mQ22LGEwWjxohnrM6ooAgTB ToeQcx3mKuQhQCr5YfxkQixxMAoObNnmIg1QRZEQbRZY+8/+XH7IJZmOj5UyTPZvbEbp ma0bKrzwQ2V/xrR4NxwRbsZiyq2ho33+AzinAIMUjcsIfYzAJD9jUxiHtRG4nXUVsNvk 3Y7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020aa79716000000b0050c92d897fbsi4672852pfg.340.2022.04.28.14.32.33; Thu, 28 Apr 2022 14:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347397AbiD1Nak (ORCPT + 99 others); Thu, 28 Apr 2022 09:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347383AbiD1Naf (ORCPT ); Thu, 28 Apr 2022 09:30:35 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BEBFB18A0; Thu, 28 Apr 2022 06:27:19 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nk4Al-0004RG-SE; Thu, 28 Apr 2022 15:27:07 +0200 Message-ID: <4baa5071-3fb6-64f3-bcd7-2ffc1181d811@maciej.szmigiero.name> Date: Thu, 28 Apr 2022 15:27:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v2 02/11] KVM: SVM: Don't BUG if userspace injects a soft interrupt with GIF=0 Content-Language: en-US To: Maxim Levitsky Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Paolo Bonzini References: <20220423021411.784383-1-seanjc@google.com> <20220423021411.784383-3-seanjc@google.com> <61ad22d6de1f6a51148d2538f992700cac5540d4.camel@redhat.com> From: "Maciej S. Szmigiero" In-Reply-To: <61ad22d6de1f6a51148d2538f992700cac5540d4.camel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.04.2022 09:35, Maxim Levitsky wrote: > On Sat, 2022-04-23 at 02:14 +0000, Sean Christopherson wrote: >> From: Maciej S. Szmigiero >> >> Don't BUG/WARN on interrupt injection due to GIF being cleared if the >> injected event is a soft interrupt, which are not actually IRQs and thus > > Are any injected events subject to GIF set? I think that EVENTINJ just injects > unconditionaly whatever hypervisor puts in it. That's right, EVENTINJ will pretty much always inject, even when the CPU is in a 'wrong' state (like for example, injecting a hardware interrupt or a NMI with GIF masked). But KVM as a L0 is not supposed to inject a hardware interrupt into guest with GIF unset since the guest is obviously not expecting it then. Hence this WARN_ON(). > Best regards, > Maxim Levitsky Thanks, Maciej