From nobody Fri Apr 26 03:39:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578951274; cv=none; d=zohomail.com; s=zohoarc; b=ArFWolqDKDDNF5jgL3EmtCbN4wAnHn6NjyQqK35u0VbKAu8eFcSotpculxxkHQ/2+P/70qY/E1yY4xC6fopHjRRe2MjeyxEYrm/MoMOBhmnuwBNQsatt3wE3Cc+rc6K5TCuK0sutjIlqukha0qxo5lSxovbWM9NB73M3TVHaONA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578951274; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CfjGubNRKil91Z0PdQdtf+XkrrzUsKlyNnLo0cSHsr4=; b=lH4vnn2BuBIEwKp7oUNXe6TM624Cw+hc6tXLUxfT4aADNhWwFaxyyR9979vZJYfqHMgCM6jg4Amdm9gZszz0BkwEf2kBS7xmrnvYLqx3uIgYMoxktMZS4p2bejtiyReLK6kcK1eXKbuFgvEH2Z9I4keF/YyusbddqLrygKT6WY0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578951274611924.3536399823522; Mon, 13 Jan 2020 13:34:34 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LU-0006bv-HB; Mon, 13 Jan 2020 21:34:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LT-0006bZ-Or for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 21:33:59 +0000 Received: from mail-wr1-f66.google.com (unknown [209.85.221.66]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 61750c18-364c-11ea-ac27-bc764e2007e4; Mon, 13 Jan 2020 21:33:47 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id j42so10136942wrj.12 for ; Mon, 13 Jan 2020 13:33:47 -0800 (PST) Received: from a483e7b01a66.ant.amazon.com (54-240-197-230.amazon.com. [54.240.197.230]) by smtp.gmail.com with ESMTPSA id i10sm16938652wru.16.2020.01.13.13.33.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2020 13:33:45 -0800 (PST) X-Inumbo-ID: 61750c18-364c-11ea-ac27-bc764e2007e4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tK+XWcqhdvm5uNAF7XfUhV11KCjVM6xTfRNGXWs/ga0=; b=WHSoB3fmzvaY+PsLSaaJQkyLQp3+wdYZv2bYM1kHbpBcY4YQoZjzAWDdAD6UPl7WZ4 CTv2LI9m4B7Wi1Wu94KGz4nrlekj/13VKA59+2ndxb6cOY3NlKnedW9Op1gg5TgMTXsh Vzkpx8cmwvMlyFADs9z2lHEwjiQ6EoYH5U6Ll12dgyvewnZILAJ8F8JqtMsiFrB1EVJv iv3spu9AxqQKbkOrl6VmuZyL3zBprDDRkXVfK7OBXUFJWXS2A+VeZh8jX92ipiUV87jT 5LRvSYqgB79zlf7h678JObkKZ8iIAXxu2WUM0/hPwijLT2nfGRdtwpYTz78WekPD5vBc mnIQ== X-Gm-Message-State: APjAAAWMkxIWBgMDgvru5QUHLHacN/sE7WDpEnTIJsphVdsu34jLBdL0 4Yd1M1Xwb0GdXKzbN15Anubo6akV4qqmCw== X-Google-Smtp-Source: APXvYqztx8nWca01Oz/OfKgBMaH419EBRwvAecQTe1sDIxt2HSBR5sX0boz0LCKmGGKlF4N1XZI1vQ== X-Received: by 2002:adf:ea05:: with SMTP id q5mr21087716wrm.48.1578951226439; Mon, 13 Jan 2020 13:33:46 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 13 Jan 2020 21:33:39 +0000 Message-Id: <20200113213342.8206-2-julien@xen.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200113213342.8206-1-julien@xen.org> References: <20200113213342.8206-1-julien@xen.org> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/4] xen/x86: Remove unused forward declaration in asm-x86/irq.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Julien Grall , Wei Liu , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Julien Grall None of the prototypes within the header asm-x86/irq.h actually requires the forward declaration of "struct pirq". So remove it. No functional changes intended. Signed-off-by: Julien Grall Acked-by: Jan Beulich --- xen/include/asm-x86/irq.h | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h index 7c825e9d9c..44aefc8f03 100644 --- a/xen/include/asm-x86/irq.h +++ b/xen/include/asm-x86/irq.h @@ -131,7 +131,6 @@ extern unsigned int io_apic_irqs; =20 DECLARE_PER_CPU(unsigned int, irq_count); =20 -struct pirq; struct arch_pirq { int irq; union { --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 26 03:39:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578951271; cv=none; d=zohomail.com; s=zohoarc; b=DmbcpUJLNvlQp+KTW7pN2vMTNamDrD6ctMtbv2QyMxfkewkUk6YL9Wu98niXS0053dom69MvspHUsyarn/gFqmVTicUYcfAkyK3I0GLp0jG4nxszUDFKWK3CRTts/rBbXwmN2BQg7fo3StUjA+i8FlnQgu1mP8iDs1wv/vaLsVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578951271; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u+xqHspEKVdS7WKvFPRt6L/W6XgwgbB/NrU1O8nVg7U=; b=hF3OJxzsq5NlkA3fiyRwNDmjpBs7UvvWcXXTYCRPZPIE9lhCw4PFDoq1VxdWu5GcVDizUi6uYD24X5FoC2BcR5ZdhNSTa9HIMjgXt7b0t+FISHn/+tP/wv3VEhiRywFId78BHw0olrE7jYztdkyZ0bRG9GXsWnj90wS9pg+EpWQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578951271695318.10358364301055; Mon, 13 Jan 2020 13:34:31 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LK-0006ZH-Dj; Mon, 13 Jan 2020 21:33:50 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LJ-0006ZC-8F for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 21:33:49 +0000 Received: from mail-wm1-f68.google.com (unknown [209.85.128.68]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 61f90389-364c-11ea-82e6-12813bfff9fa; Mon, 13 Jan 2020 21:33:48 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 20so11394538wmj.4 for ; Mon, 13 Jan 2020 13:33:48 -0800 (PST) Received: from a483e7b01a66.ant.amazon.com (54-240-197-230.amazon.com. [54.240.197.230]) by smtp.gmail.com with ESMTPSA id i10sm16938652wru.16.2020.01.13.13.33.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2020 13:33:47 -0800 (PST) X-Inumbo-ID: 61f90389-364c-11ea-82e6-12813bfff9fa X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ssk9nUjYLi/HI54y9EsHj7XeX4GByNczK0zfHrRrpc0=; b=lVyIT3UGPxdNrGeYuVsAMmM/4jvIV/Rx+b7jnLv0tHBh1ViQY7jbfFY0MZh5bHS9YH aNSAiPZULy6zNfsNFXy8/YH77HPUXsqM7vwa0NWYK+BSz3Sr2O92c+ccU4ltoZpCPacK zETiA3AsUVGJKMLUWvv54TH7+AnOButu7g0pPqHXKOmAVBdWSHVVt8PIohwFAQkM2Dmm kUe+2B2HqQ9qqDKy0EoGXZCusQF3VyV1vJIddM90Yh6IcdPKe4XgHUxCJNNijJ6zBgaI HNN6ujcJfJSPjEmr4tV2pFbdl7G5f/rUwCZZC17DUH2Jq4nkUG5/R1hLyUY+/0mjuKGW d6xA== X-Gm-Message-State: APjAAAUMuCXu3L1rvcRiT6Sau4qvomET3Uk2DSlISkFoewHZbmflZ42+ N9wW2BN2WLZPx7fDCPrZHjZT8mVN/vrLyQ== X-Google-Smtp-Source: APXvYqy2Ai4R+on4JU71bSlTHmq27xavJON+sYv9mL5Vgj9bqhJ9heLwFXKY/bEuJ0kC5AmJi4yGUw== X-Received: by 2002:a7b:cb97:: with SMTP id m23mr22152137wmi.37.1578951227711; Mon, 13 Jan 2020 13:33:47 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 13 Jan 2020 21:33:40 +0000 Message-Id: <20200113213342.8206-3-julien@xen.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200113213342.8206-1-julien@xen.org> References: <20200113213342.8206-1-julien@xen.org> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/4] xen/char: ehci: Directly include xen/timer.h rather rely on dependency X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Julien Grall , Ian Jackson , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Julien Grall The ehci char driver is using timers but relying on the header xen/timer.h to be included via asm-x86/hvm/irq.h which is not even directly included! Future rework will reduce the number of places where asm-x86/hvm/irq.h will be included. Include xen/timer.h directly to avoid any breakage. Signed-off-by: Julien Grall Acked-by: Jan Beulich --- xen/drivers/char/ehci-dbgp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index b6e155d17b..8124e0aad8 100644 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 26 03:39:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578951271; cv=none; d=zohomail.com; s=zohoarc; b=JzybqUeoqkh2J4ciZx4xR7pUecwwALicHo4NBK2sUPKvAsFUuBNAl1Fi0iKUWhhs1PJ7ph4kuRTOgitjwe+oNEJSi81fRaB/FUoy7sB3PhuOCT3Ff9DnRBeyZBUnqT0FtI5KVSWmQYVlaZPrEc18NOYHVMKF2VBmJ3TxW7tsCz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578951271; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Sv5Qb2IkUW7B6kareJdWwlj9FD00K6uOJPCplvkSeg0=; b=jq/llahPDjXXxUejrgi7BkSiIGGdfYwN3BDepngQjtYoojeboQmkuEH0fzk6H0VajMz1qGoaGRXALcKZRTl/tdk2G6XQ3boEafS+YvflTwmZEFbDg5Dgvm8TrSpbeViQKb2hfJPq8rAfLr7sRF24gbnDqcgcSHz3jl+Swvqc+oA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578951271011474.4602574840545; Mon, 13 Jan 2020 13:34:31 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LZ-0006eC-Rl; Mon, 13 Jan 2020 21:34:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LY-0006de-OR for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 21:34:04 +0000 Received: from mail-wr1-f68.google.com (unknown [209.85.221.68]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 62ea7bc8-364c-11ea-ac27-bc764e2007e4; Mon, 13 Jan 2020 21:33:49 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id d16so10166188wre.10 for ; Mon, 13 Jan 2020 13:33:49 -0800 (PST) Received: from a483e7b01a66.ant.amazon.com (54-240-197-230.amazon.com. [54.240.197.230]) by smtp.gmail.com with ESMTPSA id i10sm16938652wru.16.2020.01.13.13.33.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2020 13:33:48 -0800 (PST) X-Inumbo-ID: 62ea7bc8-364c-11ea-ac27-bc764e2007e4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T+ICfyiaxyl3mYQBkb773eny0WW4m/+Ovdm25iUJNXs=; b=koYGnnWbgpDWXJCN5InWLRP9FIAJhj1ke87hT/zjKn4jJTErB91oljS9ca36IJGCZR juppKIKmmAwT3u4lEzzTKp83syO4p1Ch9Vt0VvzW2cnDYitxDOo2QNoI5i7FSCfr99HH lSuqe4AUhGOt+EhhAeM7iPz4hL/0QYKLLNvFo4nCAUItIRjiAuQmW6bqYVqgAhDLgsAT YgFurxDe/YwTJZpr643Fh48Z+GkHjUVXgO/sB06tzGdKoMJ7K0rY8As02PDKRVcY11Zl FFrG3JJe4vNgqQ7WeCaKwLELysYVAKNir+fuzlUj0ul1IhFWPKcYI541E+mjfCAkmz9s T/Aw== X-Gm-Message-State: APjAAAX2rzUnCfpOmyc1h93vjaZWnxR+YMIRQWfYCeNUiB/5Jg/qKBy6 odUXDhXpIfk3onSwYbLk8JRUycvwGy8B+Q== X-Google-Smtp-Source: APXvYqyUa+MLB5POGRi+focv1/rXqV2rQqKEdHEkgXDkc5Ilnu3p+KiiR5t5oGxNTpAz4eFWLKq18g== X-Received: by 2002:a5d:4b4e:: with SMTP id w14mr20507436wrs.187.1578951228902; Mon, 13 Jan 2020 13:33:48 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 13 Jan 2020 21:33:41 +0000 Message-Id: <20200113213342.8206-4-julien@xen.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200113213342.8206-1-julien@xen.org> References: <20200113213342.8206-1-julien@xen.org> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 3/4] xen/domain: Remove #ifndef surrounding alloc_pirq_struct() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Julien Grall , Ian Jackson , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Julien Grall None of the supported architecture override alloc_pirq_struct() with a macro. So remove the #ifdef surrounding the prototype. Signed-off-by: Julien Grall --- xen/include/xen/domain.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 1cb205d977..89bf0a1721 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -41,9 +41,7 @@ struct vcpu *alloc_vcpu_struct(const struct domain *d); void free_vcpu_struct(struct vcpu *v); =20 /* Allocate/free a PIRQ structure. */ -#ifndef alloc_pirq_struct struct pirq *alloc_pirq_struct(struct domain *); -#endif void free_pirq_struct(void *); =20 /* --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 26 03:39:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1578951274; cv=none; d=zohomail.com; s=zohoarc; b=XamBvlTC8hJQ59teD015E7aBCSv9GpAarR1hoiNS0S3eMJYiOiDcfwtrLQ7lxj/knOzkZVXMzU8NuOsCq5TFkrWbij+A95Tvyvn9VDuCkwQEuhZFbMS6SE0iawHsz6n4qjRy0tGtYXnRwv/HUXYxEzp7rfAodo13X0jE3om5VV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578951274; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6zKZyXV3sdBotK72mX9YhEcbY71uvuHZVZWn/184MYk=; b=NaaAO8ujTIp6f6PAw3IWbiptvG16iuzKmbslzaz+OgaPk3ZgM09hdFAMdOutz5ewopKcYCoI+f4+YUZ3LIZSpz6ltDq+QwBjNVUXZw0sOqGGT60rlp5i/OZIktHFwtx+YRObD9VtTNgB8gMHkjXDHd5OIKLLYDNzILkNt2i0kcg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578951274228696.5226267137867; Mon, 13 Jan 2020 13:34:34 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LP-0006Zg-NM; Mon, 13 Jan 2020 21:33:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir7LO-0006ZR-4s for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 21:33:54 +0000 Received: from mail-wr1-f68.google.com (unknown [209.85.221.68]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 63d67546-364c-11ea-82e6-12813bfff9fa; Mon, 13 Jan 2020 21:33:51 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id c14so10172723wrn.7 for ; Mon, 13 Jan 2020 13:33:51 -0800 (PST) Received: from a483e7b01a66.ant.amazon.com (54-240-197-230.amazon.com. [54.240.197.230]) by smtp.gmail.com with ESMTPSA id i10sm16938652wru.16.2020.01.13.13.33.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2020 13:33:49 -0800 (PST) X-Inumbo-ID: 63d67546-364c-11ea-82e6-12813bfff9fa X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nGKvJF6eT0mDZtX41O0asvxAkfZ8//D5/WgZOr3je3E=; b=ehKqlu6kRjAcdCkCM9VO2v9QXK31o6ArmabW+/lqyCPh9koWgl3dISJfnKCHR9lsA0 jFsNBjfa+V3jEz+9O39tt9bdgFacAFugpBKFPXRxkXD8grJov2jOBiglvQcpXdYuYxOu sIFJcK9GqAQTFFfvB+lpstlnEN0dnAa7aMHaTKJRy/MD7ifEAk6+n9xW6I0S19KDOQrX HAOW/7Z27uFUSWfkv/a+WtvIt5rR+k7bvss6DO+jbZIgDLQZMnfNwyygP69Mz6w0M7Jm afteclzJpH/D10RHKpp/hvP+V4pgx87wDULJXHy3KCPlICuDVG6EhU1vRElFrQbSIzJc IWLw== X-Gm-Message-State: APjAAAVN5Vfyxg8lthNML19Nk33xSQtBG1gZNt4wxuJy9wge1ERd4OpV g7Z+qVvE30ToiAroiD2Lp/7LJ/0A/fyH3A== X-Google-Smtp-Source: APXvYqws7GCwqgp8+jE1b4P5tU3/Sdbbdup7y5dmzPMOCtd/RYTjAUdzE7Oeiu94SLWSwLX9gBEjNw== X-Received: by 2002:a5d:5345:: with SMTP id t5mr21789840wrv.0.1578951230237; Mon, 13 Jan 2020 13:33:50 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 13 Jan 2020 21:33:42 +0000 Message-Id: <20200113213342.8206-5-julien@xen.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200113213342.8206-1-julien@xen.org> References: <20200113213342.8206-1-julien@xen.org> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 4/4] xen/x86: Rework inclusion between struct pirq and struct hvm_pirq_dpci X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Julien Grall , Ian Jackson , Jan Beulich , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Julien Grall At the moment, alloc_pirq_struct() relies on the field 'arch' to be the last member of the structure. As this is used for computing the size of the structure, the value will be miscomputed if a new field is added afterwards. Such quirkiness makes quite difficult to understand how struct pirq works. Given that struct hvm_pirq_dpci is only used in combination of a struct pirq, we can inverse the inclusion. i.e pirq will now be contained in struct hvm_pirq_dpci. As the field pirq.arch.hvm.emuirq is as well HVM specific, this is now moved in struct hvm_pirq_dpci. There is a few side effects with this changes: - We now need to distinguish between PIRQ allocated for HVM and PV guests. This is to allow us to know what we are freeing. - container_of is not able to cater with const and non-const at the same time. So we need to introduce two macros (const and non-const). Lastly all the HVM specific pirq code can now be moved in hvm/irq.h allowing use to drop the include from irq.h. This is one less header included treewide. Signed-off-by: Julien Grall --- xen/arch/arm/irq.c | 5 +++++ xen/arch/x86/hvm/irq.c | 7 ++++--- xen/arch/x86/irq.c | 39 ++++++++++++++++++++++++----------- xen/common/domain.c | 7 +------ xen/drivers/passthrough/io.c | 1 + xen/include/asm-x86/hvm/irq.h | 19 +++++++++++++++++ xen/include/asm-x86/irq.h | 19 +++-------------- xen/include/xen/domain.h | 3 +++ 8 files changed, 63 insertions(+), 37 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 3877657a52..fd108ea3a5 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -582,6 +582,11 @@ struct pirq *alloc_pirq_struct(struct domain *d) return NULL; } =20 +void arch_free_pirq_struct(struct rcu_head *head) +{ + ASSERT_UNREACHABLE(); +} + /* * These are all unreachable given an alloc_pirq_struct * which returns NULL, all callers try to lookup struct pirq first diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index c684422b24..e0bb0a8b90 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -29,7 +29,8 @@ =20 bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq) { - return is_hvm_domain(d) && pirq && pirq->arch.hvm.emuirq !=3D IRQ_UNBO= UND; + return is_hvm_domain(d) && pirq && + const_pirq_dpci(pirq)->emuirq !=3D IRQ_UNBOUND; } =20 /* Must be called with hvm_domain->irq_lock hold */ @@ -396,7 +397,7 @@ int hvm_inject_msi(struct domain *d, uint64_t addr, uin= t32_t data) struct pirq *info =3D pirq_info(d, pirq); =20 /* if it is the first time, allocate the pirq */ - if ( !info || info->arch.hvm.emuirq =3D=3D IRQ_UNBOUND ) + if ( !info || pirq_dpci(info)->emuirq =3D=3D IRQ_UNBOUND ) { int rc; =20 @@ -409,7 +410,7 @@ int hvm_inject_msi(struct domain *d, uint64_t addr, uin= t32_t data) if ( !info ) return -EBUSY; } - else if ( info->arch.hvm.emuirq !=3D IRQ_MSI_EMU ) + else if ( pirq_dpci(info)->emuirq !=3D IRQ_MSI_EMU ) return -EINVAL; send_guest_pirq(d, info); return 0; diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 310ac00a60..3e01101f88 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1286,22 +1286,37 @@ void cleanup_domain_irq_mapping(struct domain *d) =20 struct pirq *alloc_pirq_struct(struct domain *d) { - size_t sz =3D is_hvm_domain(d) ? sizeof(struct pirq) : - offsetof(struct pirq, arch.hvm); - struct pirq *pirq =3D xzalloc_bytes(sz); + struct pirq *pirq; =20 - if ( pirq ) + if ( is_hvm_domain(d) ) { - if ( is_hvm_domain(d) ) + struct hvm_pirq_dpci *dpci =3D xzalloc(struct hvm_pirq_dpci); + + if ( dpci ) { - pirq->arch.hvm.emuirq =3D IRQ_UNBOUND; - pt_pirq_init(d, &pirq->arch.hvm.dpci); + pt_pirq_init(d, dpci); + pirq =3D dpci_pirq(dpci); + pirq->arch.hvm =3D true; } + else + pirq =3D NULL; } + else + pirq =3D xzalloc(struct pirq); =20 return pirq; } =20 +void arch_free_pirq_struct(struct rcu_head *head) +{ + struct pirq *pirq =3D container_of(head, struct pirq, rcu_head); + + if ( pirq->arch.hvm ) + xfree(pirq_dpci(pirq)); + else + xfree(pirq); +} + void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) { /* @@ -1315,9 +1330,9 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct d= omain *d) =20 if ( is_hvm_domain(d) ) { - if ( pirq->arch.hvm.emuirq !=3D IRQ_UNBOUND ) + if ( pirq_dpci(pirq)->emuirq !=3D IRQ_UNBOUND ) return; - if ( !pt_pirq_cleanup_check(&pirq->arch.hvm.dpci) ) + if ( !pt_pirq_cleanup_check(pirq_dpci(pirq)) ) return; } =20 @@ -2029,7 +2044,7 @@ static inline bool is_free_pirq(const struct domain *= d, const struct pirq *pirq) { return !pirq || (!pirq->arch.irq && (!is_hvm_domain(d) || - pirq->arch.hvm.emuirq =3D=3D IRQ_UNBOUND)); + const_pirq_dpci(pirq)->emuirq =3D=3D IRQ_UNBOUND)); } =20 int get_free_pirq(struct domain *d, int type) @@ -2724,7 +2739,7 @@ int map_domain_emuirq_pirq(struct domain *d, int pirq= , int emuirq) return err; } } - info->arch.hvm.emuirq =3D emuirq; + pirq_dpci(info)->emuirq =3D emuirq; =20 return 0; } @@ -2754,7 +2769,7 @@ int unmap_domain_pirq_emuirq(struct domain *d, int pi= rq) info =3D pirq_info(d, pirq); if ( info ) { - info->arch.hvm.emuirq =3D IRQ_UNBOUND; + pirq_dpci(info)->emuirq =3D IRQ_UNBOUND; pirq_cleanup_check(info, d); } if ( emuirq !=3D IRQ_PT ) diff --git a/xen/common/domain.c b/xen/common/domain.c index 0b1103fdb2..7f04da79e6 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1625,16 +1625,11 @@ struct pirq *pirq_get_info(struct domain *d, int pi= rq) return info; } =20 -static void _free_pirq_struct(struct rcu_head *head) -{ - xfree(container_of(head, struct pirq, rcu_head)); -} - void free_pirq_struct(void *ptr) { struct pirq *pirq =3D ptr; =20 - call_rcu(&pirq->rcu_head, _free_pirq_struct); + call_rcu(&pirq->rcu_head, arch_free_pirq_struct); } =20 struct migrate_info { diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index b292e79382..e7b288b4aa 100644 --- a/xen/drivers/passthrough/io.c +++ b/xen/drivers/passthrough/io.c @@ -769,6 +769,7 @@ int pt_irq_destroy_bind( =20 void pt_pirq_init(struct domain *d, struct hvm_pirq_dpci *dpci) { + dpci->emuirq =3D IRQ_UNBOUND; INIT_LIST_HEAD(&dpci->digl_list); dpci->gmsi.dest_vcpu_id =3D -1; } diff --git a/xen/include/asm-x86/hvm/irq.h b/xen/include/asm-x86/hvm/irq.h index 5b7e90c179..0ccfaad53b 100644 --- a/xen/include/asm-x86/hvm/irq.h +++ b/xen/include/asm-x86/hvm/irq.h @@ -21,6 +21,7 @@ #ifndef __ASM_X86_HVM_IRQ_H__ #define __ASM_X86_HVM_IRQ_H__ =20 +#include #include =20 #include @@ -171,8 +172,26 @@ struct hvm_pirq_dpci { struct hvm_gmsi_info gmsi; struct timer timer; struct list_head softirq_list; + int emuirq; + struct pirq pirq; }; =20 +#define pirq_dpci(p) \ + ((p) ? container_of(p, struct hvm_pirq_dpci, pirq) : NULL) +#define const_pirq_dpci(p) \ + ((p) ? container_of(p, const struct hvm_pirq_dpci, pirq) : NULL) + +#define dpci_pirq(pd) (&(pd)->pirq) + +#define domain_pirq_to_emuirq(d, p) ({ \ + struct pirq *__pi =3D pirq_info(d, p); \ + __pi ? pirq_dpci(__pi)->emuirq : IRQ_UNBOUND; \ +}) +#define domain_emuirq_to_pirq(d, emuirq) ({ \ + void *__ret =3D radix_tree_lookup(&(d)->arch.hvm.emuirq_pirq, emuirq);\ + __ret ? radix_tree_ptr_to_int(__ret) : IRQ_UNBOUND; \ +}) + void pt_pirq_init(struct domain *, struct hvm_pirq_dpci *); bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *); int pt_pirq_iterate(struct domain *d, diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h index 44aefc8f03..07a63bae04 100644 --- a/xen/include/asm-x86/irq.h +++ b/xen/include/asm-x86/irq.h @@ -8,7 +8,6 @@ #include #include #include -#include =20 extern unsigned int nr_irqs_gsi; extern unsigned int nr_irqs; @@ -133,17 +132,10 @@ DECLARE_PER_CPU(unsigned int, irq_count); =20 struct arch_pirq { int irq; - union { - struct hvm_pirq { - int emuirq; - struct hvm_pirq_dpci dpci; - } hvm; - }; + /* Is the PIRQ associated to an HVM domain? */ + bool hvm; }; =20 -#define pirq_dpci(pirq) ((pirq) ? &(pirq)->arch.hvm.dpci : NULL) -#define dpci_pirq(pd) container_of(pd, struct pirq, arch.hvm.dpci) - int pirq_shared(struct domain *d , int irq); =20 int map_domain_pirq(struct domain *d, int pirq, int irq, int type, @@ -198,12 +190,7 @@ void cleanup_domain_irq_mapping(struct domain *); __ret ? radix_tree_ptr_to_int(__ret) : 0; \ }) #define PIRQ_ALLOCATED -1 -#define domain_pirq_to_emuirq(d, pirq) pirq_field(d, pirq, \ - arch.hvm.emuirq, IRQ_UNBOUND) -#define domain_emuirq_to_pirq(d, emuirq) ({ \ - void *__ret =3D radix_tree_lookup(&(d)->arch.hvm.emuirq_pirq, emuirq);\ - __ret ? radix_tree_ptr_to_int(__ret) : IRQ_UNBOUND; \ -}) + #define IRQ_UNBOUND -1 #define IRQ_PT -2 #define IRQ_MSI_EMU -3 diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 89bf0a1721..99aea630d4 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -42,6 +42,9 @@ void free_vcpu_struct(struct vcpu *v); =20 /* Allocate/free a PIRQ structure. */ struct pirq *alloc_pirq_struct(struct domain *); + +/* Per-arch callback used by the RCU */ +void arch_free_pirq_struct(struct rcu_head *head); void free_pirq_struct(void *); =20 /* --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel