qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 03/21] pci: pci capability must be in PCI spa


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 03/21] pci: pci capability must be in PCI space
Date: Tue, 09 Oct 2012 09:36:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

Il 09/10/2012 05:30, Jason Baron ha scritto:
> From: Isaku Yamahata <address@hidden>
> 
> pci capability must be in PCI space.
> It can't lay in PCIe extended config space.
> 
> Signed-off-by: Isaku Yamahata <address@hidden>
> Signed-off-by: Jason Baron <address@hidden>
> ---
>  hw/pci.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/pci.c b/hw/pci.c
> index f855cf3..85ebef6 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -1626,12 +1626,11 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, 
> const char *name)
>      return pci_create_simple_multifunction(bus, devfn, false, name);
>  }
>  
> -static int pci_find_space(PCIDevice *pdev, uint8_t size)
> +static uint8_t pci_find_space(PCIDevice *pdev, uint8_t size)
>  {
> -    int config_size = pci_config_size(pdev);
>      int offset = PCI_CONFIG_HEADER_SIZE;
>      int i;
> -    for (i = PCI_CONFIG_HEADER_SIZE; i < config_size; ++i)
> +    for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i)
>          if (pdev->used[i])
>              offset = i + 1;
>          else if (i - offset + 1 == size)
> 

Reviewed-by: Paolo Bonzini <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]