From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCFECC4346E for ; Tue, 29 Sep 2020 09:15:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6262F206E5 for ; Tue, 29 Sep 2020 09:15:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IErnP0ZN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbgI2JPa (ORCPT ); Tue, 29 Sep 2020 05:15:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43148 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727991AbgI2JP0 (ORCPT ); Tue, 29 Sep 2020 05:15:26 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601370925; 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=ypt8LgdMVSyUFDx2ajf/v0PrV4X2XJYzLdUlFmhUgvY=; b=IErnP0ZNfhDa8KU44aPKScYFZPDEsmX6LZTrTV5RssM5gRArlCvRp3/FQTlOkrNYvfHdLf 9VMQ6ADxzn7uswhrdvpy2aXmFXy2z31ON40gNlisrTShHlrGgBi4lb2dNasK1Y52IEu826 W2hxsPpbaYyaBNH3V7i7yHHP2/KcKBw= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-ejG1kumxNuSrQq8eWoOYNA-1; Tue, 29 Sep 2020 05:15:23 -0400 X-MC-Unique: ejG1kumxNuSrQq8eWoOYNA-1 Received: by mail-wr1-f71.google.com with SMTP id g6so1503418wrv.3 for ; Tue, 29 Sep 2020 02:15:23 -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=ypt8LgdMVSyUFDx2ajf/v0PrV4X2XJYzLdUlFmhUgvY=; b=iu6X8NXHKvgvO/c101O+r1yzT+XYhSQfYdYBGKO0B4Cls+SV//rD0/UEmeyU7K5sPe o0P9cJxlQlvQ9t8iseUCmvgFwxlAugFDMaokZqZTsvDVbRrQqQ5triZFqSTzaW//wMjh 4gJIUmC+XF/Is2fOiTIgXxiu9NcnthK/Fe3vAzwIpvXIvbUJ7jWgFq3VYIOEmwM6DbN4 Zu3n9bHwnBX5m0ws2LcD5232KHTh6uGfProPPxDdur/c989JpihyIpN8bLJ1oIH4Mh+Q 91PwyneZTZ32bsXUhKLJHjgHU4049sDtz9DOlcYG4OeaPCZTQMpmngsDGvIHNHxtIr5M MS1A== X-Gm-Message-State: AOAM533U7SvW1IOhKzfEwFrcjC0IqzIC9+HiVJ/Ca87mrC7+/upaY8nP gA9L86RVV8fyimkGC6xkDUyGdTVMnVifr/CiKqh3AC1EqyxiOdInqv8Yhm72C9uY7gHQ0pHfZrB 26f1sYbGz42Bc9bl0oyOqFd8b X-Received: by 2002:a1c:7912:: with SMTP id l18mr3442452wme.124.1601370922093; Tue, 29 Sep 2020 02:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxya0bZiu1x+swKFOywBEtJWuTSDjfs6yaSqAv5yo6ryU2YWrILMOly6HzXmYqAMyK+58cTgw== X-Received: by 2002:a1c:7912:: with SMTP id l18mr3442435wme.124.1601370921899; Tue, 29 Sep 2020 02:15:21 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:9dbe:2c91:3d1b:58c6? ([2001:b07:6468:f312:9dbe:2c91:3d1b:58c6]) by smtp.gmail.com with ESMTPSA id o15sm4501936wmh.29.2020.09.29.02.15.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 02:15:21 -0700 (PDT) Subject: Re: [RFC PATCH 3/3] KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM To: Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Huacai Chen , Aleksandar Markovic , linux-mips@vger.kernel.org, Paul Mackerras , kvm-ppc@vger.kernel.org, Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda References: <20200923224530.17735-1-sean.j.christopherson@intel.com> <20200923224530.17735-4-sean.j.christopherson@intel.com> <878scze4l5.fsf@vitty.brq.redhat.com> <20200924181134.GB9649@linux.intel.com> <87k0wichht.fsf@vitty.brq.redhat.com> <20200925171233.GC31528@linux.intel.com> <731dd323-8c66-77ff-cf15-4bbdea34bcf9@redhat.com> <20200929035257.GH31514@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Tue, 29 Sep 2020 11:15:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200929035257.GH31514@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/09/20 05:52, Sean Christopherson wrote: >> I think usage should be limited to dangerous cases, basically WARN_ON >> level. However I agree with Vitaly that KVM_GET_* should be allowed. > > On the topic of feedback from Vitaly, while dredging through my mailbox I > rediscovered his suggestion of kvm->kvm_internal_bug (or maybe just > kvm->internal_bug) instead of kvm->vm_bugged[*]. Also agrees with KVM_EXIT_INTERNAL_ERROR. >> The other question is whether to return -EIO or KVM_EXIT_INTERNAL_ERROR. >> The latter is more likely to be handled already by userspace. > > And probably less confusing for unsuspecting users. E.g. -EIO is most > likely to be interpreted as "I screwed up", whereas KVM_EXIT_INTERNAL_ERROR > will correctly be read as "KVM screwed up". All good points, seems like you have enough review material for the non-RFC version. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44074C4346E for ; Tue, 29 Sep 2020 10:32:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB385207C4 for ; Tue, 29 Sep 2020 10:32:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gvqbE2Fs"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IErnP0ZN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB385207C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dkW/Sj8tyHc/ithsMHXHe9WQoDetk5shAwNyzNTTFoM=; b=gvqbE2FsakD8hAqds0nG0vJFX tb2+SBtqWIGZgw3qaoD1Ye2Djwl070ytiMJYU/qAFMMOtd/a1YQ8tmA/tktxWq6BHRETI+XJoUozn KzYfo2ZIqiYXbmidUrdijbNpKlhgN27clYQl5wNjHjWATQNXtLMM4bM/obBDmhFL9XKzE2+vFhSpn NlZVXyHBoDAOlJJuKiTp10ARuU4g0zWJ3OJztKiLFYqw4qOC/8r7kJNEKTGwKu2Sdn0MHSJfmQ50k k0qILgpLXiSvC4FiCR7R2UaxvN3QdkGQM2UNavMuDG8WU4o/9Y9TrtyHhf2/ucCR7bNphcKUdhnzY 7iU0BFmtw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNCu8-0007wL-QP; Tue, 29 Sep 2020 10:30:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNBjK-0002Lq-Nc for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2020 09:15:28 +0000 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601370925; 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=ypt8LgdMVSyUFDx2ajf/v0PrV4X2XJYzLdUlFmhUgvY=; b=IErnP0ZNfhDa8KU44aPKScYFZPDEsmX6LZTrTV5RssM5gRArlCvRp3/FQTlOkrNYvfHdLf 9VMQ6ADxzn7uswhrdvpy2aXmFXy2z31ON40gNlisrTShHlrGgBi4lb2dNasK1Y52IEu826 W2hxsPpbaYyaBNH3V7i7yHHP2/KcKBw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-MTYVysXNNnCuByUxgnUXCg-1; Tue, 29 Sep 2020 05:15:23 -0400 X-MC-Unique: MTYVysXNNnCuByUxgnUXCg-1 Received: by mail-wm1-f69.google.com with SMTP id a7so1583740wmc.2 for ; Tue, 29 Sep 2020 02:15:23 -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=ypt8LgdMVSyUFDx2ajf/v0PrV4X2XJYzLdUlFmhUgvY=; b=WkNcXWfDAZ64MzLTH09quZCESwdKIgPr5YMrmPC0elQXIIGtUdLS5aP0dyUiHvDrvQ yRIJ66fN7OpYWLJY4ve8lm2g27lWTO3rkpRR8ASt8eRkOXwrdJCXYnGfShIMOq+rs3sZ +iCo5BrbHjyntgOA4n+kn790jm67LWweH437lY9B0dv+HD/ur0oF+xIGKPErzvWkxUTO kjiIS6UzBEVaLiZNLv1PqnCvo4IudViowgyt1b3ZhrToRRvLAYQ0jCBJE9WumMEE+FhH 0DZ7sYI+sIGNdQIN4Zt0Dg1zHxJZ6iPcZBJmvujm8/T4SM3E+mYNwtbaXATmClPlxzd2 aYhw== X-Gm-Message-State: AOAM530k8ZttQnktTHLoDNV6eAXIbxHK6YJkgnWwKtOjSwDDfktgc0/W mCja4beQff6kU7dQcFbEORGSzg3OQxOUEly5ylcyIBuA7m+LfuMiNFwc10r4LidS/3Fu2wruagr ZhILfhLzDUhjkM/XyC63zd/PrSPJnetNbxhk= X-Received: by 2002:a1c:7912:: with SMTP id l18mr3442450wme.124.1601370922093; Tue, 29 Sep 2020 02:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxya0bZiu1x+swKFOywBEtJWuTSDjfs6yaSqAv5yo6ryU2YWrILMOly6HzXmYqAMyK+58cTgw== X-Received: by 2002:a1c:7912:: with SMTP id l18mr3442435wme.124.1601370921899; Tue, 29 Sep 2020 02:15:21 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:9dbe:2c91:3d1b:58c6? ([2001:b07:6468:f312:9dbe:2c91:3d1b:58c6]) by smtp.gmail.com with ESMTPSA id o15sm4501936wmh.29.2020.09.29.02.15.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 02:15:21 -0700 (PDT) Subject: Re: [RFC PATCH 3/3] KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM To: Sean Christopherson References: <20200923224530.17735-1-sean.j.christopherson@intel.com> <20200923224530.17735-4-sean.j.christopherson@intel.com> <878scze4l5.fsf@vitty.brq.redhat.com> <20200924181134.GB9649@linux.intel.com> <87k0wichht.fsf@vitty.brq.redhat.com> <20200925171233.GC31528@linux.intel.com> <731dd323-8c66-77ff-cf15-4bbdea34bcf9@redhat.com> <20200929035257.GH31514@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Tue, 29 Sep 2020 11:15:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200929035257.GH31514@linux.intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_051526_965225_0E8B0E3C X-CRM114-Status: GOOD ( 13.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , Wanpeng Li , Janosch Frank , kvm@vger.kernel.org, Suzuki K Poulose , Marc Zyngier , Joerg Roedel , David Hildenbrand , linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-mips@vger.kernel.org, Paul Mackerras , Christian Borntraeger , Aleksandar Markovic , James Morse , linux-arm-kernel@lists.infradead.org, Huacai Chen , Vitaly Kuznetsov , Claudio Imbrenda , Julien Thierry , Jim Mattson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29/09/20 05:52, Sean Christopherson wrote: >> I think usage should be limited to dangerous cases, basically WARN_ON >> level. However I agree with Vitaly that KVM_GET_* should be allowed. > > On the topic of feedback from Vitaly, while dredging through my mailbox I > rediscovered his suggestion of kvm->kvm_internal_bug (or maybe just > kvm->internal_bug) instead of kvm->vm_bugged[*]. Also agrees with KVM_EXIT_INTERNAL_ERROR. >> The other question is whether to return -EIO or KVM_EXIT_INTERNAL_ERROR. >> The latter is more likely to be handled already by userspace. > > And probably less confusing for unsuspecting users. E.g. -EIO is most > likely to be interpreted as "I screwed up", whereas KVM_EXIT_INTERNAL_ERROR > will correctly be read as "KVM screwed up". All good points, seems like you have enough review material for the non-RFC version. Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Tue, 29 Sep 2020 09:15:19 +0000 Subject: Re: [RFC PATCH 3/3] KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM Message-Id: List-Id: References: <20200923224530.17735-1-sean.j.christopherson@intel.com> <20200923224530.17735-4-sean.j.christopherson@intel.com> <878scze4l5.fsf@vitty.brq.redhat.com> <20200924181134.GB9649@linux.intel.com> <87k0wichht.fsf@vitty.brq.redhat.com> <20200925171233.GC31528@linux.intel.com> <731dd323-8c66-77ff-cf15-4bbdea34bcf9@redhat.com> <20200929035257.GH31514@linux.intel.com> In-Reply-To: <20200929035257.GH31514@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Huacai Chen , Aleksandar Markovic , linux-mips@vger.kernel.org, Paul Mackerras , kvm-ppc@vger.kernel.org, Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda On 29/09/20 05:52, Sean Christopherson wrote: >> I think usage should be limited to dangerous cases, basically WARN_ON >> level. However I agree with Vitaly that KVM_GET_* should be allowed. > > On the topic of feedback from Vitaly, while dredging through my mailbox I > rediscovered his suggestion of kvm->kvm_internal_bug (or maybe just > kvm->internal_bug) instead of kvm->vm_bugged[*]. Also agrees with KVM_EXIT_INTERNAL_ERROR. >> The other question is whether to return -EIO or KVM_EXIT_INTERNAL_ERROR. >> The latter is more likely to be handled already by userspace. > > And probably less confusing for unsuspecting users. E.g. -EIO is most > likely to be interpreted as "I screwed up", whereas KVM_EXIT_INTERNAL_ERROR > will correctly be read as "KVM screwed up". All good points, seems like you have enough review material for the non-RFC version. Paolo