qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [patch 13/18] qemu: warn if PCI region is not power of


From: Paul Brook
Subject: Re: [Qemu-devel] [patch 13/18] qemu: warn if PCI region is not power of two
Date: Wed, 4 Feb 2009 14:38:05 +0000
User-agent: KMail/1.9.9

On Wednesday 04 February 2009, Marcelo Tosatti wrote:
> Otherwise the PCI size for such regions can be calculated erroneously.
>
> Signed-off-by: Marcelo Tosatti <address@hidden>
>
> Index: trunk/hw/pci.c
> ===================================================================
> --- trunk.orig/hw/pci.c
> +++ trunk/hw/pci.c
> @@ -249,6 +249,11 @@ void pci_register_io_region(PCIDevice *p
>
>      if ((unsigned int)region_num >= PCI_NUM_REGIONS)
>          return;
> +
> +    if (size & (size-1))
> +        term_printf("WARNING: PCI region size must be pow2 "
> +                    "type=0x%x, size=0x%x\n", type, size);
> +

This should be an error. It is a requirement of the PCI spec, and not 
something that's user configurable. Any odd sizes indicate a fairly serious 
bug elsewhere in qemu.

Paul




reply via email to

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