Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1551039pxb; Sat, 23 Apr 2022 09:41:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOGeLVt7MA9HhPbdmGpuhFofhdfCAO5HQoKRPf3iZcSt9IfmfHS1kVUCxXT45ToGYJIv6H X-Received: by 2002:a17:902:cf0b:b0:151:9d28:f46f with SMTP id i11-20020a170902cf0b00b001519d28f46fmr9851973plg.53.1650732061228; Sat, 23 Apr 2022 09:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650732061; cv=none; d=google.com; s=arc-20160816; b=fRGNuTsd3qKeQhU+ayI4K3keqlHazZm0EeJfJ0SrxgmkIk0gAPatBE4i5d8H4JcOay Ch87iqNqiayJh2cEbjyprzbgz1zb8m47R4UheOErrDOq3eLsySy7GIP1psrkT7Stxh7P T+g5N4PJn2DD63XyfVZrJPnTaDDbzjInuZ/BxnaEToWgyT+qFlnM+kc5/h1GM6+vtQ8D OzeJba0OZMfTZa3RDk3+a4GE29Wa2eP7znCycPoxw9OWxNT66gr0vEMgRM7dK7XVpdqk a1Ag9IPEGjfknVKadlXiHaW8u3DiP4WuickbniMp07gnyJ60Pi2hiSQ347PGjPnM9sjk 7T3w== 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=HUqkTX6cZs7OZuJSHaCts07mmEM8pvUZNpHIQVaAwR8=; b=C5AiqBJ/LiFWVEG3B+AhPgxifQr0RD5lUxwCiyLCZj9gZSQPAMUnQLeQvB4fAhxsAj z1bl1dD1UAQoYyQ2e+w1y1FnAG8wP0PXoGmAvm7lRjtFSiS5iz3heYtH1fb2YkuRoJdM dU3i0tDNNMZ51XRYzb38aN0trkmd53hGny/Ib0UqP7vv8BsrAHEGawEZ4UBWviOktROr KNMGUfMGZF648Ok7dhYsX046CDYkGGJ6uxur0K+UF5mNqfSZl9o4WQlq18KsKUNOShJw NWCh+vR0Ldy7xE71S2PdqZdK/x4glWNJhGj8bQhV1h7ATJhkn6yjiZche8QdFdn3ZnuE KPdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NQDFcpIz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk15-20020a17090b4a0f00b001d1ad44a667si17234754pjb.6.2022.04.23.09.40.44; Sat, 23 Apr 2022 09:41:01 -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=@google.com header.s=20210112 header.b=NQDFcpIz; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234331AbiDWJF2 (ORCPT + 99 others); Sat, 23 Apr 2022 05:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234186AbiDWJFZ (ORCPT ); Sat, 23 Apr 2022 05:05:25 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 759DB1108 for ; Sat, 23 Apr 2022 02:02:29 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id r187-20020a1c44c4000000b0038ccb70e239so9422283wma.3 for ; Sat, 23 Apr 2022 02:02:29 -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=HUqkTX6cZs7OZuJSHaCts07mmEM8pvUZNpHIQVaAwR8=; b=NQDFcpIzhAsEtIG2sxZvZHvinCiAHvhRt9Z47/gtGhOhkw9FSvzT61gDsfG2gtCscD v79gBOydHsplpg9pyerlxiXAgplPW8/X0GpTZrwERPK9jIkxc3ZIR3r1ZsvUolZiOJPc J6Z9o+KBYHb0MznSJL012cwNVKJtnZxl0w0tfzuQf0zSG5bmqd9cvv9SgALOy9s5V1E6 hYbEUgAtTUaNtMrfvwhOV4xRtW5SYICokTmr6eizXQM2ccHnBqe3Ajq8vir1IrNs5QX5 5elNLKcNjQRZglvRFYu3d53iQ1aRquE91JjBujDa7wf3GPNBAOw0UeoL6A2gidNowlDs 2rtA== 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=HUqkTX6cZs7OZuJSHaCts07mmEM8pvUZNpHIQVaAwR8=; b=6tBEs2sAH76f5TRANzp9UcAw8ksOyF4EEv1TmnPW9n4aE/Ic23/OFace1fX3b8O+fn F4y4AsZH34+RjQUIg1xv6LcrVfp9+3GyFp5HAPwvf1Zjn8PlL+Qh4QzLHoYMUD41gpZI CZMz8MxA6Hj5bnt2zEqqkuYoFcs1alcFJBOJ65Ntz23Y8CsIid2qmVd7/Ijr6oACDslY g8Ima96AhRkORBvqCHPmOFiGaS2moby+ViWULQVqJB/FB+58xjiCt38V4jLvBRSrYDbt a3nl9RmbBJSrdXkb7wqi5xxpgOQV58S3HTGUJFVrHRBh555dJY3wcUH16KHMMmVOktw0 MwUg== X-Gm-Message-State: AOAM531618FM3DmOS29oVCLuEFHzmVNeNWnIIrBGUVIBPFK6+ybBOsp7 O21iHPVUlhj0Rro54TTIQKjgKBYEKh9dZbPKvWw= X-Received: by 2002:a05:600c:3494:b0:390:8a95:1b95 with SMTP id a20-20020a05600c349400b003908a951b95mr16918483wmq.15.1650704547907; Sat, 23 Apr 2022 02:02:27 -0700 (PDT) Received: from google.com (203.75.199.104.bc.googleusercontent.com. [104.199.75.203]) by smtp.gmail.com with ESMTPSA id q16-20020a1ce910000000b0038eabd31749sm4306334wmc.32.2022.04.23.02.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 02:02:26 -0700 (PDT) Date: Sat, 23 Apr 2022 09:02:24 +0000 From: Sebastian Ene To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Rob Herring , devicetree@vger.kernel.org, qperret@google.com, will@kernel.org, maz@kernel.org Subject: Re: [PATCH v2 0/2] Detect stalls on guest vCPUS Message-ID: References: <20220422141949.3456505-1-sebastianene@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Sat, Apr 23, 2022 at 08:51:16AM +0200, Greg Kroah-Hartman wrote: > On Fri, Apr 22, 2022 at 02:19:48PM +0000, Sebastian Ene wrote: > > This adds a mechanism to detect stalls on the guest vCPUS by creating a > > per CPU hrtimer which periodically 'pets' the host backend driver. > > > > This device driver acts as a soft lockup detector by relying on the host > > backend driver to measure the elapesed time between subsequent 'pet' events. > > If the elapsed time doesn't match an expected value, the backend driver > > decides that the guest vCPU is locked and resets the guest. The host > > backend driver takes into account the time that the guest is not > > running. The communication with the backend driver is done through MMIO > > and the register layout of the virtual watchdog is described as part of > > the backend driver changes. > > > > The host backend driver is implemented as part of: > > https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3548817 > > > > Changelog v2: > > - move the driver to misc as this does not cope with watchdog core > > subsystem Hello Greg, > > Wait, why does it not cope with it? That's not documented anywhere in > your patch that adds the driver. In fact, most of the text here needs > to be in the changelog for the driver submission, not thrown away in the > 00/XX email that will never end up in the kernel tree. > > thanks, > > greg k-h From the previous feedback that I received on this patch it seems that watchdog core is not intended to be used for this type of driver. This watchdog device tracks the elapsed time on a per-cpu basis, since KVM schedules vCPUs independently. Watchdog core is not intended to detect CPU stalls and the drivers don't have a notion of CPU. Thanks, Sebastian