Igor Mammedov 55810e90cc ppc/spapr: cleanup -machine pseries,nvdimm=X handling
Since NVDIMM support was introduced on pseries machine,
it ignored machine's nvdimm=on|off option and effectively
was always enabled on machines that support NVDIMM.
Later on commit
  (28f5a716212 ppc/spapr_nvdimm: do not enable support with 'nvdimm=off')
makes QEMU error out in case user explicitly set 'nvdimm=off'
on CLI by peeking at machine_opts.

However that's a workaround and leaves 'nvdimms_state->is_enabled'
in inconsistent state (false) when it should be set true
by default.

Instead of using on machine_opts, set default to true for pseries
machine in initfn time. If user sets manually 'nvdimm=off'
it will overwrite default value to false and QEMU will error
as expected without need to peek into machine_opts.

That way pseries will have, nvdimm enabled by default and
will honor user provided 'nvdimm=on|off'.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201208164606.4109134-1-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-12-15 12:51:53 -05:00
..
2020-09-18 14:12:32 -04:00
2020-12-10 12:15:18 -05:00
2020-12-10 12:15:18 -05:00
2020-09-08 10:08:42 +10:00
2020-12-10 12:15:18 -05:00
2020-12-10 12:15:18 -05:00
2020-12-10 12:15:18 -05:00
2020-12-10 12:15:09 -05:00
2020-12-10 12:15:18 -05:00
2020-12-08 13:48:57 -05:00
2020-07-27 11:09:25 +10:00
2020-12-10 12:15:09 -05:00
2020-12-10 12:15:18 -05:00