Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1052061rwn; Thu, 8 Sep 2022 12:36:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Cb4bZ6vMCR/BePH+eWG9P0N8VfQJIXNmRNuYLdtiCdo/LcW3doiAXDvQMOn1cv2AcuIMc X-Received: by 2002:a63:1b59:0:b0:434:883:b055 with SMTP id b25-20020a631b59000000b004340883b055mr9474211pgm.50.1662665765109; Thu, 08 Sep 2022 12:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662665765; cv=none; d=google.com; s=arc-20160816; b=k8DzEgCZdDloRl00GE+SkArp9HPK03SplIhgCT3txvZdGFB5ybQz7b+dIMQlvnOC14 2JY2UZSuWxOQb/sZLv5k896rE4V3ijVkvKfAem0RtkHoHDaqahYXWGfzME+0tG8j5+eB YmeLSeX5WVovIhiljbICca+lPw4/8nyOw0OdT0H6cTqMH7rnkhV7LU2+vSCrMbOMBVfq yx8tQyBqwvWH3debV81WoBZ7Gi7CgprRlBL2mhNb2T/An1aA49QlpkXQ5tXWO2UYBxhO bOQQ7UUD0C5x+OL5WhVPc4lQBf2BdHFAdmK9qijnJP9UdQtl6jyDGdIolqF9js47zUJe CoYA== 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=okUBJLXHbCVSBkroQZFDOrOTjmtVmUpB5jI9jfOC3/Y=; b=NPe86bJOj8MOcGcglLLFEi3WcA9eZYXW2keBRMLBB3dnHaoi/u4ILtVpQtR3OoKnNs Pq6vpLcaeMNuoGFZBRCjhLIoKZZw5iEgS7SeF9mlc+U88FiZItxlDL336c/PXVCVlQZi aecxzN4mhFN1dKmEWNHoRwHAKwuR1ipc8+/EYsO/HwnjclZnTj5+8jOU4wibA/L/lG7z c8yLrESeuPe7ygAm5xnTE1g2fVKl8ol+/RmS02D0ZRAO1ktdyerlLZH7+bU3XoGNEn+7 Okc6xY3WlpOwmQfnQFGmO6e4SpMvPj7zlNjAktOf3fdZIb9RxTcJCMXRDYFq06Sd2GwD 5gtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b7ih9pm4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a71-20020a63904a000000b0041a4118f5f5si1453593pge.109.2022.09.08.12.35.53; Thu, 08 Sep 2022 12:36:05 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b7ih9pm4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbiIHSV1 (ORCPT + 99 others); Thu, 8 Sep 2022 14:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiIHSVW (ORCPT ); Thu, 8 Sep 2022 14:21:22 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC487E6B84; Thu, 8 Sep 2022 11:21:21 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id b21so5811960plz.7; Thu, 08 Sep 2022 11:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=okUBJLXHbCVSBkroQZFDOrOTjmtVmUpB5jI9jfOC3/Y=; b=b7ih9pm4fO55T6Bv8NR5HfeUOZi+8KkI9j8EEUapjGNaX0raRmJyv8yKOBaMTJMqX/ nwLj9YFdh2ZDmJuHmvNjQLNhY8GErTArfX3iPbFO3XPxemxlVZ5SAT20+jZK7q3Ztr9I L4s3KPn8KDuq+laGNvPtKEgWKF2yDC105h22TtSqydVjWb0PfDHk6YKOuPznitGdqt9o GuN8YH+Nt286VHdbK/QvDWMUWOxrI0MnTRkAAyeM7cpF9W344w3qEH27Uvbb6weJfvUU wxWecM81VxPtsETlQEIgUeWfx9Uo77zdiG0R5VX8jGhAu3Ed0s5UlZRE/nB3EjNPojev AF8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=okUBJLXHbCVSBkroQZFDOrOTjmtVmUpB5jI9jfOC3/Y=; b=WdW8zVSr6zOoqTKehXoUWXVLApeqAo7mpEMfRsMrIPi05Fp28/b/BSfkpyxTDbMNvr H95ikigpUumTf554TiRO4gUViISaEj1oVz+ANsV9l9KUf/IB2XoA8si3lmDHTYsx0BGt u/7m/+G91SY4F5c1us0C0CLmnLDgWPXwEj8A5Kt2OUXw5uYmOHkqPU30vkBSwc14EMEi epJvnOeZ+s6Jc2/wX/3jzeMfvogtpilARwb/tEdRiGlRENHTeXM7oaB9U1g150R8bg5N 2zCRKfc/DX9NYlwwOdyd990iyXbr4/JHe5R5qNp4ZVKq17F0PY9X1f2s/WR3iBy0I7Q7 Tb7w== X-Gm-Message-State: ACgBeo3io0rb8z+cBG6uFZFgArjibPeQIokok9XYpgC0PrVrookla1/C Lf3rNsAgGue0tfQyf8xwfuo= X-Received: by 2002:a17:903:124f:b0:171:4c36:a6bf with SMTP id u15-20020a170903124f00b001714c36a6bfmr10144836plh.0.1662661281017; Thu, 08 Sep 2022 11:21:21 -0700 (PDT) Received: from localhost ([192.55.55.51]) by smtp.gmail.com with ESMTPSA id jc3-20020a17090325c300b00174abcb02d6sm10463866plb.235.2022.09.08.11.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 11:21:20 -0700 (PDT) Date: Thu, 8 Sep 2022 11:21:19 -0700 From: Isaku Yamahata To: Yuan Yao Cc: isaku.yamahata@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Thomas Gleixner , Marc Zyngier , Will Deacon , isaku.yamahata@gmail.com, Kai Huang , Chao Gao , Atish Patra , Shaokun Zhang , Qi Liu , John Garry , Daniel Lezcano , Huang Ying , Huacai Chen , Dave Hansen , Borislav Petkov Subject: Re: [PATCH v3 09/22] KVM: Do processor compatibility check on resume Message-ID: <20220908182119.GA470011@ls.amr.corp.intel.com> References: <20220905084014.uanoazei77i3xjjo@yy-desk-7060> <20220905092712.5mque5oajiaj7kuq@yy-desk-7060> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220905092712.5mque5oajiaj7kuq@yy-desk-7060> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Sep 05, 2022 at 05:27:12PM +0800, Yuan Yao wrote: > On Mon, Sep 05, 2022 at 04:40:14PM +0800, Yuan Yao wrote: > > On Thu, Sep 01, 2022 at 07:17:44PM -0700, isaku.yamahata@intel.com wrote: > > > From: Isaku Yamahata > > > > > > So far the processor compatibility check is not done on resume. It should > > > be done. > > > > The resume happens for resuming from S3/S4, so the compatibility > > checking is used to detecte CPU replacement, or resume from S4 on an > > different machine ? > > By did experiments, I found the resume is called once on CPU 0 before > other CPUs come UP, so yes it's necessary to check it. I've added the commit message. KVM: Do processor compatibility check on resume So far the processor compatibility check is not done on resume. It should be done. The resume is called for resuming from S3/S4. CPUs can be replaced or the kernel can resume from S4 on a different machine. So compatibility check is desirable. -- Isaku Yamahata