On Tue, 17 Oct 2017 10:47:40 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:
> On 16/10/2017 19:17, Eduardo Habkost wrote: > >> Should (or could) "-M none" be changed in a backwards-compatible way to > >> allow such preconfiguration? For example > >> > >> qemu -M none -monitor stdio > >> (qemu) machine-set-options pc,accel=kvm > >> (qemu) c > > Sounds like an interesting idea. It would require ensuring it's > > really safe to destroy current_machine/accel (and other global > > state) and replace them with another object on the fly (which is > > probably a nice goal by itself). > > It is but, alternatively, you could delay creating the "none" machine > until the last second. The important part, in my opinion, is having a > good command-line interface that we can freeze even if the > implementation below leaves something to be desired. I sort of don't get how '-M none' could be used to build usable machine (at least currently). Do we really need "-M none" for dynamic configuration? I'd imagine doing following instead: qemu -monitor stdio -dynconfig (qemu) query-machines ... (qemu) set-option machine pc,accel=kvm # machine object is created (qemu) set-option smp 1,maxcpus (qemu) info hotpluggable-cpus ... (qemu) set-option numa node (qemu) set-option numa cpu,node-id=0,socket=0 (qemu) set-option numa cpu,node-id=0,socket=1 (qemu) c I'd start to make it working from 'info hotpluggable-cpus' as it's close to my current project of making cpu-hotplug/numa working nice together and we can expand the same interface to work at earlier stages on top of that.