Am 03.02.26 um 15:21 schrieb Dominik Csapak: > The CPUConfig module sets the local 'host_arch' on loading, so instead > to try to mock all subs that access this variable, provide a setter only > intended for tests (and warn when using this).
Would be nicer to get a local get_host_arch that just return's the PVE::Tools' method result, as we then could override the getter without having to worry about this method being misused in the future by accident. Moving the CPU model initialization into a sub, like suggested in my reply to Fiona's patches, and redoing that on a simulated switch of the host architecture would be also the slightly nicer interface IMO. > > Also, we have to override the 'get_host_arch' in the Helpers module too. The helper module has no such method? There is only get_vm_arch there and some usage of PVE::Tools' get_host_arch? Or is it because we import the one from PVE::Tools there?
