Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp940524pxb; Tue, 19 Oct 2021 16:44:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrKfAJxUjtwxkOfTRvGOCeL2v/lXEtMk66nqEHh/ODtq1L40qiwMDUR3Vm9/ILM1H247a3 X-Received: by 2002:a17:906:4d19:: with SMTP id r25mr40949544eju.264.1634687094449; Tue, 19 Oct 2021 16:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634687094; cv=none; d=google.com; s=arc-20160816; b=v7rtqOYut5s9XfAX1T5SdvfLNsLvg0+maaoZFujGh1/Hto3lFUTQVvdZaIpLHkVQDl 2InIvJKXPI37TLtZAqSRiAhJrbslEtO/Aw3sJLiyORic15JJnhQEBx5z3JRllcVJLMjQ soFODM1yawZheXOztsoeS8IBEVh76xzcRZTpv5PIIVyURFOPp53yhTLK8PSci1aSi6v0 jALV0DFGURkJi7OQr20agx4Ii2aH1epGdes6SgjqZ7k9/23UziN/+ncaMRZDhKPh33CG Q8iMaXc+NevKDNIDm8dWodQAjkGSzCb5KyKq8VatWUSbsaRTe4qcu6569HvHSq8E1um3 LnvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ayHhE+6XCVFF1QvZ1U7r9RCr+fUbo2x5fP4Eznimt8o=; b=fUYpnrSc47WCFDhjEDbKD1EeQI5go+QhMa5JyZpX2sBQW+Yt6IBkLKKWuGo34Vv/B5 ly4ww+tzUqNSFaQtlV9U90ZWPf2PivX6TFl8AoYn4OwtynF4FMZst6fASHoHWfhmOqP/ hvveubgIw75SQVQsi7nZ6NEouBM6BbLVWT7WLqP/9hcYLyltzm2YLX3Gur/1+tm1CYeM WTRdNykx+eZWRK+/j5HEaQfsVuHcF6nJFOzJu8AG+5QT86lW2jXoBR6UgO81rhm9zbRp kyEzW7RNKKgwjGV6vBcyv1UnkBIVhezOK8WnpTeHdTOZytbTZzWIhfqGBohrOK1HDJcE IU9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=H0LZl7Df; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hj17si553846ejb.731.2021.10.19.16.44.30; Tue, 19 Oct 2021 16:44:54 -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=@google.com header.s=20210112 header.b=H0LZl7Df; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbhJSXoV (ORCPT + 99 others); Tue, 19 Oct 2021 19:44:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbhJSXoU (ORCPT ); Tue, 19 Oct 2021 19:44:20 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30B2C061746 for ; Tue, 19 Oct 2021 16:42:06 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id i5so8586431pla.5 for ; Tue, 19 Oct 2021 16:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ayHhE+6XCVFF1QvZ1U7r9RCr+fUbo2x5fP4Eznimt8o=; b=H0LZl7Df4YfevTzGObWrE97eDMtWfb1FRyb6qMTlbiaq6YvdCL/dm+go6ySGHWwDJv qQkjCEsWF1OPgAlLMcFKKPdsz1SxEfwtTQdJAotcr3kxo3ALeN1DUoX8rMhXLLLvxsLS Nc3mFfu98KFJkMIk71LZ9LufxsB2Jt7sz9HtDpGjJyU+uSzRWyy0fSsrVj44LHLXUlqW gQLp/ab0LMFetX1K85OadIVOobanRJoH3CRfe6hsJ1D81mNpqLsZYbtJYP5l76NWRQX6 NZejJ+zy1rcLfOD8yQyIK+WDyi6BOw/M+EBUKgoA9xsgMZ9RD2+od4BJp5EJVGejPZqJ Fp6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ayHhE+6XCVFF1QvZ1U7r9RCr+fUbo2x5fP4Eznimt8o=; b=j5T+KyF/NxhtZ4cGuURNbp3jVWmmdtzdye2UkHaHf8BE1xjWDg5U9kyvX8eqiwEC4a bkA8HCFBB2OWdnpshA8Dne8ql0e3IwZDoDLqhJe5zE39n9QGau1nnXJEkFmvXEnL+Pwz oQE2kAckQu3DaKUBQmWva+dgf9JcNxqT6L6LXj7y0IOIFO6Zn3nZMHolPcVGyShSVaf+ cAc7n28qhdGdA8LldIUvL6tL2mCZfT4bPbL2PX3KPPEdZMyNtI1YuRnfPuDtXOrBM5sl xK8afEFUabrzK9Ikz2M/P6+sra1yTSf2e6Ps2A0nfJwOtjnyOhqRh4Uc7RM176ofiKAs YqOg== X-Gm-Message-State: AOAM532V0X8P/qDe7JCTl+F2tkztKoejb+KR91/RM2NGWDLzJivpCNM8 e0+A/FA6t4hAkoydaa69mg66eQ== X-Received: by 2002:a17:902:7781:b0:13d:c9fe:6184 with SMTP id o1-20020a170902778100b0013dc9fe6184mr36010239pll.25.1634686926078; Tue, 19 Oct 2021 16:42:06 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id pc18sm3434680pjb.0.2021.10.19.16.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 16:42:05 -0700 (PDT) Date: Tue, 19 Oct 2021 23:42:01 +0000 From: Sean Christopherson To: "Maciej S. Szmigiero" Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Igor Mammedov , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 06/13] KVM: Move WARN on invalid memslot index to update_memslots() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 20, 2021, Maciej S. Szmigiero wrote: > From: "Maciej S. Szmigiero" > > Since kvm_memslot_move_forward() can theoretically return a negative > memslot index even when kvm_memslot_move_backward() returned a positive one > (and so did not WARN) let's just move the warning to the common code. > > Signed-off-by: Maciej S. Szmigiero > Reviewed-by: Claudio Imbrenda > --- Reviewed-by: Sean Christopherson