Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932127AbcCIK5J (ORCPT ); Wed, 9 Mar 2016 05:57:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47129 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbcCIK5D (ORCPT ); Wed, 9 Mar 2016 05:57:03 -0500 Subject: Re: [PART1 RFC v2 07/10] svm: Add VMEXIT handlers for AVIC To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1457124368-2025-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1457124368-2025-8-git-send-email-Suravee.Suthikulpanit@amd.com> <56DDA50B.7090609@redhat.com> <20160308220541.GA29455@potion.brq.redhat.com> Cc: Suravee Suthikulpanit , joro@8bytes.org, bp@alien8.de, gleb@kernel.org, alex.williamson@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, wei@redhat.com, sherry.hurwitz@amd.com From: Paolo Bonzini Message-ID: <56E0017A.2020201@redhat.com> Date: Wed, 9 Mar 2016 11:56:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160308220541.GA29455@potion.brq.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 31 On 08/03/2016 23:05, Radim Krčmář wrote: >>> >> + case AVIC_INCMP_IPI_ERR_INV_TARGET: >>> >> + pr_err("%s: Invalid IPI target (icr=%#08x:%08x, idx=%u)\n", >>> >> + __func__, icrh, icrl, index); >>> >> + BUG(); >>> >> + break; >>> >> + case AVIC_INCMP_IPI_ERR_INV_BK_PAGE: >>> >> + pr_err("%s: Invalid bk page (icr=%#08x:%08x, idx=%u)\n", >>> >> + __func__, icrh, icrl, index); >>> >> + BUG(); >>> >> + break; >> > >> > Please use WARN(1, "%s: Invalid bk page (icr=%#08x:%08x, idx=%u)\n", >> > __func__, icrh, icrl, index) (and likewise for invalid target) instead >> > of BUG(). > I think that if we hit one of these, then WARNs would just flood the > log. I'd prefer WARN_ONCE on AVIC_INCMP_IPI_ERR_INV_BK_PAGE. > (Btw. aren't icr and idx are pointless on this error? and the function > name should be printed by WARN.) Agreed. > Invalid target is triggerable by the guest (by sending IPI to a > non-existent LAPIC), so warning log level seems too severe. > pr_info_ratelimited() or nothing would be better. Definitely should be nothing. Paolo