[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 10/40] Adding BAR0 for e500 PCI contr
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 10/40] Adding BAR0 for e500 PCI controller |
Date: |
Fri, 14 Dec 2012 14:49:52 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Am 14.12.2012 13:13, schrieb Alexander Graf:
> From: Bharat Bhushan <address@hidden>
>
> PCI Root complex have TYPE-1 configuration header while PCI endpoint
> have type-0 configuration header. The type-1 configuration header have
> a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci
> address space to CCSR address space. This can used for 2 purposes: 1)
> for MSI interrupt generation 2) Allow CCSR registers access when configured
> as PCI endpoint, which I am not sure is a use case with QEMU-KVM guest.
>
> What I observed is that when guest read the size of BAR0 of host controller
> configuration header (TYPE1 header) then it always reads it as 0. When
> looking into the QEMU hw/ppce500_pci.c, I do not find the PCI controller
> device registering BAR0. I do not find any other controller also doing so
> may they do not use BAR0.
>
> There are two issues when BAR0 is not there (which I can think of):
> 1) There should be BAR0 emulated for PCI Root complex (TYPE1 header) and
> when reading the size of BAR0, it should give size as per real h/w.
>
> 2) Do we need this BAR0 inbound address translation?
> When BAR0 is of non-zero size then it will be configured for PCI
> address space to local address(CCSR) space translation on inbound access.
> The primary use case is for MSI interrupt generation. The device is
> configured with an address offsets in PCI address space, which will be
> translated to MSI interrupt generation MPIC registers. Currently I do
> not understand the MSI interrupt generation mechanism in QEMU and also
> IIRC we do not use QEMU MSI interrupt mechanism on e500 guest machines.
> But this BAR0 will be used when using MSI on e500.
>
> I can see one more issue, There are ATMUs emulated in hw/ppce500_pci.c,
> but i do not see these being used for address translation.
> So far that works because pci address space and local address space are 1:1
> mapped. BAR0 inbound translation + ATMU translation will complete the address
> translation of inbound traffic.
>
> Signed-off-by: Bharat Bhushan <address@hidden>
> [agraf: fix double variable assignment w/o read]
> Signed-off-by: Alexander Graf <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-ppc] [PATCH 32/40] openpic: Accelerate pending irq search, (continued)
- [Qemu-ppc] [PATCH 32/40] openpic: Accelerate pending irq search, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 17/40] openpic: combine mpic and openpic irq raise functions, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 01/40] pseries: Fix incorrect initialization of interrupt controller, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 33/40] PPC: E500: PCI: Make first slot qdev settable, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 05/40] pseries: Add tracepoints to the XICS interrupt controller, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 25/40] openpic: convert to qdev, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 10/40] Adding BAR0 for e500 PCI controller, Alexander Graf, 2012/12/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 10/40] Adding BAR0 for e500 PCI controller,
Andreas Färber <=
- [Qemu-ppc] [PATCH 30/40] MSI-X: Fix endianness, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 09/40] e500: Adding CCSR memory region, Alexander Graf, 2012/12/14
- [Qemu-ppc] [PATCH 13/40] mpic: Unify numbering scheme, Alexander Graf, 2012/12/14
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/40] ppc patch queue 2012-12-14, Blue Swirl, 2012/12/15