[pve-devel] [PATCH qemu-server 3/7] api: add endpoint for querying available cpu flags

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 6 19:17:28 CET 2025


Am 06.11.25 um 19:02 schrieb Thomas Lamprecht:
> Am 31.10.25 um 13:28 schrieb Fiona Ebner:

>> -my $cpu_flag_supported_re = qr/([+-])(@{[join('|', @supported_cpu_flags)]})/;
>> +our $supported_cpu_flags = [
> 
> I'd slightly prefer keeping this private to the module here and instead add a
> getter method. Doing so reduces the impact for side-effect when some usage side
> would modify this array-ref by accident.

Correction: only really true if we actually create a new array clone on
returning, but even if we - whyever - wouldn't want, a getter method is IMO
still slightly nicer.




More information about the pve-devel mailing list