From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B7B1CD6E4A for ; Thu, 4 Jun 2026 11:33:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1327717.1592514 (Exim 4.92) (envelope-from ) id 1wV6KL-0002v0-ST; Thu, 04 Jun 2026 11:33:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1327717.1592514; Thu, 04 Jun 2026 11:33:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wV6KL-0002ut-Nu; Thu, 04 Jun 2026 11:33:33 +0000 Received: by outflank-mailman (input) for mailman id 1327717; Thu, 04 Jun 2026 11:33:32 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wV6KK-0002un-IS for xen-devel@lists.xenproject.org; Thu, 04 Jun 2026 11:33:32 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wV6KJ-006N34-Ow for xen-devel@lists.xenproject.org; Thu, 04 Jun 2026 13:33:31 +0200 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a216280-2eae-0a2a0a5409dd-0a2a450791e8-24 for ; Thu, 04 Jun 2026 13:33:31 +0200 Received: from [209.85.221.46] (helo=mail-wr1-f46.google.com) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a21628b-229c-0a2a45070019-d155dd2eb01b-3 for ; Thu, 04 Jun 2026 13:33:31 +0200 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-45ef4223be7so363246f8f.2 for ; Thu, 04 Jun 2026 04:33:31 -0700 (PDT) Received: from [192.168.1.6] (user-109-243-148-111.play-internet.pl. [109.243.148.111]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4602cda363bsm2868733f8f.31.2026.06.04.04.33.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jun 2026 04:33:30 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780572811; x=1781177611; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=N+gjztpdbDuEQYm6BPrE2/oYBRaj5w9nj3M75JaqAe0=; b=gvSe6INFY/Z7O9VfYkzKORrKypix2/zVvAFEVewef/E53QhBjiwmLEm0KFO7qDinY3 QQg2vFKdH0KenQR1XCW2Ilj1IUEcOApUbp/uojgahC9OXB4+U2wEbneU1uEz6i9BX8sK xPR56JzSzU9wOrFBUnOIQalzh3PIqTdxV/+3PcoRSDCdbTIWdtn3qQ5AjrMIBpyCZUuD 1AcliKtIX66WzY28GvQC5HQGV0FZGpmiOr+ngWMcgFDwcMzw7vl/Jyx3XOMWMMjkNn9l YZewTPEZaOkdYUbGyu8WbwMt6URe9fhbRieOPL8aV/pYwc4q+TktwYx0jJbkhMVT8m1Z 2Utg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780572811; x=1781177611; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N+gjztpdbDuEQYm6BPrE2/oYBRaj5w9nj3M75JaqAe0=; b=EGVLdhIkeC3RoVeULzxozlIwK3NkNSJXPoHqYP241NvIV2hy/xAXiuubNwOn/KVggu e1yVwYAeFSSN9oroXVk75Bl7b5cbYGpZHR0L8+tDljAatLlcfvCQOZVk7uIBFoASNtun /Sp7Xp6bTn/aH9kY3st07j0qSUUU0+vYzHkdRDUR3ZUo4wUW6eoxyDSAoKScG8x9vzaP 2JaDlbU+23iW785Bz5sYfd+EjwCLpiZkUrLpjbt+7B4NffgiNkdGCPEtV/5juNLj7Rk+ n76+myaY2M35Yqruu3ney6alxePwqvLF4/1Eps5qOnOtazBBHIrU6DgyNdJ2+K+pVGxx IiZw== X-Forwarded-Encrypted: i=1; AFNElJ8qCaO+7e4rBqd2318dtnBEgDqwJfIRZWXxIpGpmtTSnn3fmmEvQYXlQlrepbqklSbUloxKaGNZigc=@lists.xenproject.org X-Gm-Message-State: AOJu0Yw8gTp8eqgxIbCjGVFUKffbL9irhmJl53eHlSt1oYNsBNJAKlYX yWvHbBb87G1j/3R8co6/ZyXZBhQRwAxITg6ZK8QaCwbOW+aBHXRXnOKI X-Gm-Gg: Acq92OEaW4GKsS9SFkY6w0g6kcCFCdk2VJs8XCLIuJjuRLlP5gAbtoLH/xQQnGne0wu bO4zSeS3axA2aPnZd+8wqEZS9Hv8PHRtjTN6/l4NAVzqrLRIeo/7ax+ArfMaRwrjekKjqSSHHZP yOQgx2+fMWHx0XjUca5wrv+Ufh1wo1TQ8tuSLncdwCJcj/O4ZVXHzX++hbY1ULWrv2pcpK7hUd1 TnWbhzw0H8sSxTMLE4eej7plMEg492AR363kxJXtYyLJGk390h3BI4j3WHavrKI6KeLTRNXgt6m whNVS6W4UxDBXqgHmm9UL8hJrPe2r3ROszKFfQ3R1M41heaMwSi0mWXOCzmiDcuBeGwhPxJAOUD lc1SeQxByF5s40KXCil9Lgv1WMfOCaFj+kcWsspnHDnho4kvOqYe73I6vYrXkAuPE4h8eDgauwA 1U5/VCvG0aS4KUQteJ1cAE18Ig42kjpA+cCqj5+8jtrPnzLIvLPzb0gXryNxNcBoFdyhFQjdqDm +vLcku0gtNeTt9F X-Received: by 2002:adf:f104:0:b0:45e:edc8:d440 with SMTP id ffacd0b85a97d-46021782782mr8546681f8f.1.1780572810988; Thu, 04 Jun 2026 04:33:30 -0700 (PDT) Message-ID: <003f5317-7669-484f-8095-4e48eedc102d@gmail.com> Date: Thu, 4 Jun 2026 13:33:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 15/26] xen/riscv: introduce (de)initialization helpers for vINTC To: Jan Beulich Cc: Romain Caritey , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini , xen-devel@lists.xenproject.org References: Content-Language: en-US From: Oleksii Kurochko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-ID: tlsNG-ef75cf/1780572811-2976AC48-BF94D0D0/10/73395122804 X-purgate-type: spam X-purgate-size: 1960 On 6/3/26 5:00 PM, Jan Beulich wrote: > On 08.05.2026 16:43, Oleksii Kurochko wrote: >> --- a/xen/arch/riscv/intc.c >> +++ b/xen/arch/riscv/intc.c >> @@ -11,6 +11,7 @@ >> >> #include >> #include >> +#include >> >> static const struct intc_hw_operations *__ro_after_init intc_hw_ops; >> >> @@ -94,3 +95,38 @@ int __init make_intc_domU_node(struct kernel_info *kinfo) >> >> return -EOPNOTSUPP; >> } >> + >> +int domain_vintc_init(struct domain *d) >> +{ >> + int ret = -EOPNOTSUPP; >> + const enum intc_version ver = intc_hw_ops->info->hw_version; > > Again - why would what the underlying hardware has control what all domains > get? If host uses AIA (APLIC/IMSIC) compatible controller then guest should use virtual AIA compatible controller, shouldn't it? I don't think that it is a case when host uses PLIC interrupt controller but guests are going to use virtual APLIC. > >> + switch ( ver ) >> + { >> + case INTC_APLIC: >> + ret = domain_vaplic_init(d); >> + break; >> + >> + default: >> + printk("vintc (ver:%d) isn't implemented\n", ver); > > If we take this path for whatever reason, ... > >> + break; >> + } >> + >> + return ret; >> +} >> + >> +void domain_vintc_deinit(struct domain *d) >> +{ >> + const enum intc_version ver = intc_hw_ops->info->hw_version; >> + >> + switch ( ver ) >> + { >> + case INTC_APLIC: >> + domain_vaplic_deinit(d); >> + break; >> + >> + default: >> + printk("vintc (ver:%d) isn't implemented\n", ver); > > ... we're also going to take this path (very quickly afterwards), just to > get the same message twice without it being clear why it appears twice. I missed to add printk("%s: ...", __func__, ...). I will update correspondingly if we will follow this way. Thanks. ~ Oleksii