[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/domain: restrict context switch hooks for the idle domain


  • To: Roger Pau Monne <roger@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 1 Oct 2026 13:23:01 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=byujvlaxq/XJAD/4iY30AUAoGZuJg1GXVhswLT+FXfs=; b=Ke+xk6A/E66d6+ev/lYcp6aR0TQC5KK+EL+Ea0LpZthe6ZsA6oG9YWRRL6N5DHhQ6+w86fg8j7sg7g2UaeM8OM2wdFQiuM5lXZaNP7uzPSBxbmsKbLC6qtpoT+9Z/VluraIUNVQO9eS18rfgK72T5Dz+x1mQ0ZuYFDbOw1WPYNCOPf0HXrSzGE5vvIWN4R6iRHtl1rMD8VV2OmofPcKa1kM8kVuq6kudWFS5SL4apRDtDJsv1C45mpM+hzhhDvhkadRDUpC2Km72URX58qMFYexnvUkKBmwWjYAM6e8LD/cJHTfgWqiksMZ6CBSUWzCGO6ZG6Y27swXZcBjPSv9dnQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uGxO4J4BeAP+6ahVNK0dMHKA2PSHQ78M81I0RSTAQ8MbdK4iZFrSxgYOT3JkgFAg2uP4x4ruJevMAv+yF5/yaJxUYMWyTwcZpIiiFLjPv4vlPkQ/jrwHaTJwC6xfql80v32JPrBaHdHmG/kRTLwkjfVG/rNoQUI9XXSDdw8v9sIUlROhf1mnR7XA8yvK1IEpVd6jKqvMdLxN7CCHOMvbmR7hnuJUxzcU/5mifWcCvtWBABjxVVhuFZJRhWTTdWEMPa/XFUVTH5YilbhPos0MkBkW1wSs+K2kzBYNLmeWOpPBH5oUhlBtGJP/aAuthEUvpwTOXR5Jw45otqonqxrBZQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Thu, 01 Oct 2026 17:23:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-10-01 10:27, Roger Pau Monne wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

The arch_init_idle_domain() initializes struct arch_csw idle_csw as:

     static const struct arch_csw idle_csw = {
         .from = paravirt_ctxt_switch_from,
         .to   = paravirt_ctxt_switch_to,
         .tail = idle_loop,
     };

but only place where d->arch.ctxt_switch->{to,from}() are used is
__context_switch() where they are both guarded by !is_idle_domain(pd)
which makes the callbacks in idle_csw unreachable.

Drop to/from() callbacks initialization in idle_csw.

Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
Signed-off-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Thanks,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.