On 11.11.2024 12:20, Alejandro Vallejo wrote:
> On Wed Oct 30, 2024 at 11:31 AM GMT, Andrew Cooper wrote:
>> On 21/10/2024 4:45 pm, Alejandro Vallejo wrote:
>>> diff --git a/tools/firmware/hvmloader/config.h 
>>> b/tools/firmware/hvmloader/config.h
>>> index cd716bf39245..04cab1e59f08 100644
>>> --- a/tools/firmware/hvmloader/config.h
>>> +++ b/tools/firmware/hvmloader/config.h
>>> @@ -4,6 +4,8 @@
>>>  #include <stdint.h>
>>>  #include <stdbool.h>
>>>  
>>> +#include <xen/hvm/hvm_info_table.h>
>>> +
>>>  enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
>>>  extern enum virtual_vga virtual_vga;
>>>  
>>> @@ -48,8 +50,9 @@ extern uint8_t ioapic_version;
>>>  
>>>  #define IOAPIC_ID           0x01
>>>  
>>> +extern uint32_t cpu_to_x2apicid[HVM_MAX_VCPUS];
>>
>> Just cpu_to_apic_id[] please.   The distinction between x or x2 isn't
>> interesting here.
> 
> I disagree.
> 
> While "x" says nothing of interest "x2" does state the width. cpu_to_apic_id 
> is
> ambiguous and I've seen no shortage of code in which it's impossible to assess
> its correctness without going to check what the original author meant; and
> guesswork is bad for robustness. cpu_to_x2apicid has an unambiguous width at
> the meager cost of 2 chars. If you have very strong feelings about it I can
> change it, but my preference is to keep it as-is.

Just to mention it: I'm with Andrew here, and iirc I even had commented to this
effect on an earlier version as well.

Jan

Reply via email to