qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info


From: Shannon Zhao
Subject: Re: [Qemu-devel] [PATCH v4 12/20] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table
Date: Fri, 10 Apr 2015 14:04:24 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 2015/4/10 0:00, Peter Maydell wrote:
> On 9 April 2015 at 16:54, Alex Bennée <address@hidden> wrote:
>> >
>> > Shannon Zhao <address@hidden> writes:
>> >
>>> >> From: Shannon Zhao <address@hidden>
>>> >> +build_mcfg(GArray *table_data, GArray *linker, VirtGuestInfo 
>>> >> *guest_info)
>>> >> +{
>>> >> +    AcpiTableMcfg *mcfg;
>>> >> +    acpi_pcie_info *info = guest_info->pcie_info;
>>> >> +    int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]);
>> >
>> > Explicit bracketing around the maths please.
> This doesn't seem to make much sense anyway:
> if the addition was intended to take precedence
> then we're adding 1 to a size-of-a-struct, which is
> a bit weird. And if the multiplication was intended
> to take precedence then it's doing a pointless multiply
> by one. Please can you check that this is actually
> calculating the right value?

The 1 means here only a single allocation for use.

-- 
Thanks,
Shannon




reply via email to

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