From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: Design doc of adding ACPI support for arm64 on Xen - version 2 Date: Tue, 11 Aug 2015 10:46:18 +0100 Message-ID: <55C9C46A.2010807@citrix.com> References: <55C413D5.7000709@huawei.com> <55C4896F.6050409@citrix.com> <55C95977.2070900@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55C95977.2070900@huawei.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Shannon Zhao , xen-devel , Jan Beulich , Stefano Stabellini , Ian Campbell , Parth Dixit , Christoffer Dall , Shannon Zhao Cc: Hangaohuai , "Huangpeng (Peter)" List-Id: xen-devel@lists.xenproject.org On 11/08/15 03:09, Shannon Zhao wrote: > Hi Julien, Hi Shannon, > On 2015/8/7 18:33, Julien Grall wrote: >> Hi Shannon, >> >> Just some clarification questions. >> >> On 07/08/15 03:11, Shannon Zhao wrote: >>> 3. Dom0 gets grant table and event channel irq information >>> ----------------------------------------------------------- >>> As said above, we assign the hypervisor_id be "XenVMM" to tell Dom0 that >>> it runs on Xen hypervisor. >>> >>> For grant table, add two new HVM_PARAMs: HVM_PARAM_GNTTAB_START_ADDRESS >>> and HVM_PARAM_GNTTAB_SIZE. >>> >>> For event channel irq, reuse HVM_PARAM_CALLBACK_IRQ and add a new >>> delivery type: >>> val[63:56] == 3: val[15:8] is flag: val[7:0] is a PPI (ARM and ARM64 >>> only) >> >> Can you describe the content of flag? >> > > This needs definition as well. I think it could use the definition of > xenv table. Bit 0 stands interrupt mode and bit 1 stands interrupt > polarity. And explain it in the comment of HVM_PARAM_CALLBACK_IRQ. That would be fine for me. >>> When constructing Dom0 in Xen, save these values. Then Dom0 could get >>> them through hypercall HVMOP_get_param. >>> >>> 4. Map MMIO regions >>> ------------------- >>> Register a bus_notifier for platform and amba bus in Linux. Add a new >>> XENMAPSPACE "XENMAPSPACE_dev_mmio". Within the register, check if the >>> device is newly added, then call hypercall XENMEM_add_to_physmap to map >>> the mmio regions. >>> >>> 5. Route device interrupts to Dom0 >>> ---------------------------------- >>> Route all the SPI interrupts to Dom0 before Dom0 booting. >> >> Not all the SPI will be routed to DOM0. Some are used by Xen and should >> never be used by any guest. I have in mind the UART and SMMU interrupts. >> >> You will have to find away to skip them nicely. Note that not all the >> IRQs used by Xen are properly registered when we build DOM0 (see the SMMU). >> > To uart, we can get the interrupt information from SPCR table and hide > it from Dom0. Can you clarify your meaning of "hide from DOM0"? Did you mean avoid to route the SPI to DOM0? > IIUC, currently Xen (as well as Linux) doesn't support use SMMU when > booting with ACPI. When it supports, it could read the interrupts > information from IORT table and Hide them from Dom0. Well for Xen we don't even have ACPI supported upstream ;). For Linux there is some on-going work. Anyway, this is not important right now. -- Julien Grall