Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp280984pxb; Fri, 3 Sep 2021 01:51:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ1FCGRfPM6E1kgvm7EFppPUG2G3ABVwX6OqSVuAtFj8IHlKQuWuMW9ZAaSJgE69K9eTZY X-Received: by 2002:a05:6402:1249:: with SMTP id l9mr2896838edw.177.1630659087620; Fri, 03 Sep 2021 01:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630659087; cv=none; d=google.com; s=arc-20160816; b=hk3kLcsW6cJI7sWDt8pSGNvFjlanAXwiI0N98hKdP2e58Ea0lUb5QK2lAZKExSWZJG 5zFptucODGhYXXGpXnJ0HT5awYvM0mJA/iW8mI3+8hhUxp/l8K2oyJA+tXQqsjVr8pbQ +4VUHdRA35taGAZUQ064s15lhEwwO3bIQkjBNCFalhF/Ydayr4ssih5YXaPUY9JgiNP5 Lo3ZSwyyaRvvN5o564W93AHVFtIsMwUiCj5YAOOSSQWueLLSd7oCbeNyDk8Uuo//L1Je R7ZePehD132fIbciiMH9VuZ9DE4fQ40wdC6rN3GYppYJCdvoUXhnH9Ve6iBOfl3lON+2 fyUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Etfp5KRM0ihxlz1Fzg+3n+yV+gWrXCILk5YBRRiJ4ec=; b=DVgSPTQ7Xe8fQHJ1+nXKJQCB0RqcjFTrBa7QU7gPpmyG+qi+fu7flEaUzhQrruWNEa 2oeIJqQ84b/2S2/QWiQ2dRTaDGp78brw7+E4jJvNViJ8Z6vW0CmD0ghDMQJ91Z3rc39V lr2VhK9cAbqNblie57JXewK+aP60/Pcta2+sSTCT9DtVFjumGeCfsfYzFNyumEe2L5mw t9nNzNlx1kDRBEX52eniLBCrUGTAVwgABqgZ49Mq0aOl/tNWfmMAuVb7sCWcWLrMcLtp 1wfOYAYYMpzgrYx791rJRk3g2LxG2gKkqtxWd5aanEKF5Q1lNCl9v3Os+iewJ0rKyMwE M86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="g/xCu4uU"; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kl24si4944174ejc.190.2021.09.03.01.51.01; Fri, 03 Sep 2021 01:51:27 -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=@suse.com header.s=susede1 header.b="g/xCu4uU"; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348421AbhICIul (ORCPT + 99 others); Fri, 3 Sep 2021 04:50:41 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:39240 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348276AbhICIuk (ORCPT ); Fri, 3 Sep 2021 04:50:40 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0FD5122663; Fri, 3 Sep 2021 08:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1630658980; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Etfp5KRM0ihxlz1Fzg+3n+yV+gWrXCILk5YBRRiJ4ec=; b=g/xCu4uUEeLNVhfh4hdAtjtyZDkPPqU9rW19W5JYaL63cE3RPFwRsK8D5oSo5RKnUyhZef oRJKvg5r8mEK1qPZy47OOCWYT8N3Ja1dGzT5F+tieQLSPZ2csfGh8mApFEuhAiWEv2KpMv 5oLIfL7iry/5ho/b6+Y9oBZRKXdYVLY= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 6EBBF1374A; Fri, 3 Sep 2021 08:49:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id YQ4TGaPhMWFjdAAAGKfGzw (envelope-from ); Fri, 03 Sep 2021 08:49:39 +0000 From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , "Rafael J. Wysocki" , stable@vger.kernel.org, Boris Ostrovsky , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: [PATCH 0/2] xen: fix illegal rtc device usage of pv guests Date: Fri, 3 Sep 2021 10:49:35 +0200 Message-Id: <20210903084937.19392-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent change in mc146818_get_time() resulted in WARN splats when booting a Xen PV guest. The main reason is that there is a code path resulting in accessing a RTC device which is not present, which has been made obvious by a call of WARN() in this case. This small series is fixing this issue by: - avoiding the RTC device access from drivers/base/power/trace.c in cast there is no legacy RTC device available - resetting the availability flag of a legacy RTC device for Xen PV guests Juergen Gross (2): PM: base: power: don't try to use non-existing RTC for storing data xen: reset legacy rtc flag for PV domU arch/x86/xen/enlighten_pv.c | 7 +++++++ drivers/base/power/trace.c | 10 ++++++++++ 2 files changed, 17 insertions(+) -- 2.26.2