Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp962071imp; Wed, 20 Feb 2019 12:20:44 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib8kl7uPe0Lwkls9Z2CIZ1UhXnqB/xsDuo+69I65ugoWbEexClH7BhrqoqptuHyDLQ6Y5Ll X-Received: by 2002:a62:1c45:: with SMTP id c66mr36783046pfc.90.1550694044231; Wed, 20 Feb 2019 12:20:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550694044; cv=none; d=google.com; s=arc-20160816; b=G7tlP70P29CqfpU0pFUzU7D9B/nCJEQC4x5BLMIsnE9/Ov4YZU6kaFd5Ax333uAJrn cx79ItlXJuKryVgvI7audS2N7kDR8djZ4cgXbhYdzBO+bz2d6jdOnZWXu7Q8GfEjqnZD R3Wa1+ZM/+9D9pRwTXQiNR2adwzTvyfxZ+p9SJLzWDatC37C+aAexdyF3YMM7KvqRZYj JIWQ7HcIuYFA7Kp2P88gzcnvSunUgOnt50a4GeKPyU5fYa142VS2eKMOkWl78kPewHL5 rcqJ1eux6qIrScimvfwCuEnQes+C6T8LaKy31ejWVSRIaKknqNwUUpA4EteY+LWYM9ka hFcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sI+XoHhsjwJV0n1ws79+QJSD983LQFkAU2y/PjLPk54=; b=h7RSJaHNSKVEXkx4QPkE7Kwz6Sw309K5PpahbvAkwBfaciv98VdUlpr3eBapbXLxpq 5UYcUywFjq60SB1dsMKVVkl1v3pV3ciHnoMGefPbiONC+2LyTFA5CfNeQLTxucjLFD/Q tFE340tk8fZ2p9nkbmu0jBJmpldLEmlaItMhFLPyBj47X+W/I/ziOWyMLyYttn5eR7MD wwD7OI2cqLTHg2J59qEafop2dmTooTQNIUQ6nIrsSryJstMG9SI8GhtwDaMGoZuN0Yw7 /TbiNS/VCx8APSJVk9i1DqdO2ECsW4y3f1TwNGnT+PSY4iGI9aEUpxWUBbDf6YwraY6j gThg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=eLwhTvA4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z78si6307400pfi.51.2019.02.20.12.20.29; Wed, 20 Feb 2019 12:20:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=eLwhTvA4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728205AbfBTUTM (ORCPT + 99 others); Wed, 20 Feb 2019 15:19:12 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:53548 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727119AbfBTUTI (ORCPT ); Wed, 20 Feb 2019 15:19:08 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1KK8Uhd081679; Wed, 20 Feb 2019 20:17:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=sI+XoHhsjwJV0n1ws79+QJSD983LQFkAU2y/PjLPk54=; b=eLwhTvA43e+K0d0bPGEgP41YXPJQzaqcvn6fgjcmYtzoZjPU/Jq31SFsUnjnNQTgEk57 LKOqVxnhnuhsI3vz63C4fVzC5HY9sIEVb5P/3dzU+l6IQt48dDWBnX5wFoegnPprbPIt NnY1EieQX9sBJGIqJ3dGmFlp5mG0BZaJ7+XERbimD1MirCWA1Qef3YoWZfl1l5nNI6pa PucYr7X3xpx7JKU0HTO5M3rBBj6Z6JlX76XCxVgjvlx1XCtUsAyN29Zu+6KombBFZoIw ejxluXLvEvvR8b0zoaMRAkupHOV56iD0wItkkAQyhcNlDCDlExUgSl+5rlavefa+6cxb Xg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qp9xu3xhn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Feb 2019 20:17:49 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1KKHnb5026797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Feb 2019 20:17:49 GMT Received: from abhmp0022.oracle.com (abhmp0022.oracle.com [141.146.116.28]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1KKHmCQ015556; Wed, 20 Feb 2019 20:17:48 GMT Received: from paddy.lan (/94.61.137.133) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 20 Feb 2019 12:17:48 -0800 From: Joao Martins To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Cc: Ankur Arora , Boris Ostrovsky , Joao Martins , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Juergen Gross , Stefano Stabellini Subject: [PATCH RFC 17/39] x86/xen: export vcpu_info and shared_info Date: Wed, 20 Feb 2019 20:15:47 +0000 Message-Id: <20190220201609.28290-18-joao.m.martins@oracle.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190220201609.28290-1-joao.m.martins@oracle.com> References: <20190220201609.28290-1-joao.m.martins@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9173 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902200138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ankur Arora Also remove __init annotations from xen_evtchn_2l/fifo_init(). This allows us to support 2-level event channel ABI on xen_shim_domain(). Signed-off-by: Ankur Arora --- arch/x86/xen/enlighten.c | 3 +++ drivers/xen/events/events_2l.c | 2 +- drivers/xen/events/events_fifo.c | 2 +- include/xen/xen-ops.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 750f46ad018a..73b9736e89d2 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -50,6 +50,8 @@ DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); /* Linux <-> Xen vCPU id mapping */ DEFINE_PER_CPU(uint32_t, xen_vcpu_id); EXPORT_PER_CPU_SYMBOL(xen_vcpu_id); +EXPORT_PER_CPU_SYMBOL(xen_vcpu); +EXPORT_PER_CPU_SYMBOL(xen_vcpu_info); enum xen_domain_type xen_domain_type = XEN_NATIVE; EXPORT_SYMBOL_GPL(xen_domain_type); @@ -79,6 +81,7 @@ EXPORT_SYMBOL(xen_start_flags); * page as soon as fixmap is up and running. */ struct shared_info *HYPERVISOR_shared_info = &xen_dummy_shared_info; +EXPORT_SYMBOL_GPL(HYPERVISOR_shared_info); /* * Flag to determine whether vcpu info placement is available on all diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c index 8edef51c92e5..b5acf4b09971 100644 --- a/drivers/xen/events/events_2l.c +++ b/drivers/xen/events/events_2l.c @@ -369,7 +369,7 @@ static const struct evtchn_ops evtchn_ops_2l = { .resume = evtchn_2l_resume, }; -void __init xen_evtchn_2l_init(void) +void xen_evtchn_2l_init(void) { pr_info("Using 2-level ABI\n"); evtchn_ops = &evtchn_ops_2l; diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_fifo.c index 76b318e88382..453b4b05f238 100644 --- a/drivers/xen/events/events_fifo.c +++ b/drivers/xen/events/events_fifo.c @@ -430,7 +430,7 @@ static int xen_evtchn_cpu_dead(unsigned int cpu) return 0; } -int __init xen_evtchn_fifo_init(void) +int xen_evtchn_fifo_init(void) { int cpu = smp_processor_id(); int ret; diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h index 4969817124a8..92fc45075500 100644 --- a/include/xen/xen-ops.h +++ b/include/xen/xen-ops.h @@ -10,7 +10,7 @@ #include DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); - +DECLARE_PER_CPU(struct vcpu_info, xen_vcpu_info); DECLARE_PER_CPU(uint32_t, xen_vcpu_id); static inline uint32_t xen_vcpu_nr(int cpu) { -- 2.11.0