qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH for-9.2 v11 10/11] hw/pci: Use -1 as the default value for ro


From: Akihiko Odaki
Subject: Re: [PATCH for-9.2 v11 10/11] hw/pci: Use -1 as the default value for rombar
Date: Sun, 4 Aug 2024 15:27:04 +0900
User-agent: Mozilla Thunderbird

On 2024/08/02 19:54, Markus Armbruster wrote:
Akihiko Odaki <akihiko.odaki@daynix.com> writes:

vfio_pci_size_rom() distinguishes whether rombar is explicitly set to 1
by checking dev->opts, bypassing the QOM property infrastructure.

Use -1 as the default value for rombar to tell if the user explicitly
set it to 1. The property is also converted from unsigned to signed.
-1 is signed so it is safe to give it a new meaning. The values in
[2 ^ 31, 2 ^ 32) will be invalid, but nobody should have typed these
values by chance.

s/will be/become invalid/

I'll make this change in the next version.


Should we document the change somewhere?  I'm not sure.  Opinions?

I think it is fine whether it is documented or not. As the commit message says, I expect nobody will be impacted with this change. But documenting this change will hurt nobody either.

Regards,
Akihiko Odaki



reply via email to

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