[PATCH v2 0/1] spapr.c: set a 'kvm-type' default value instead of relying on NULL

Daniel Henrique Barboza posted 1 patch 3 years, 4 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201210130721.1521487-1-danielhb413@gmail.com
Maintainers: David Gibson <david@gibson.dropbear.id.au>
There is a newer version of this series
hw/ppc/spapr.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
[PATCH v2 0/1] spapr.c: set a 'kvm-type' default value instead of relying on NULL
Posted by Daniel Henrique Barboza 3 years, 4 months ago
changes from v1, all proposed by Greg:
* Removed comment at the start of spapr_get_kvm_type()
* Added a one liner return in spapr_get_kvm_type()
* use g_ascii_strcasecmp() in all str comparisons in spapr_kvm_type()
* Exposed the 'auto' default kvm-type mode in the docs
* changed HV and PR to lower-case in the docs
v1 link: https://lists.gnu.org/archive/html/qemu-devel/2020-12/msg01677.html


This patch addresses an issue that happens with the pseries machine after
testing Paolo's patch [1]:

$ sudo ./ppc64-softmmu/qemu-system-ppc64 -nographic -nodefaults -machine pseries --enable-kvm
qemu-system-ppc64: Unknown kvm-type specified '' 

The reason lies on how qemu_opt_get() and object_property_get_str() works
when there is no 'kvm-type' specified. We were conting on receiving NULL
for kvm-type, but the latter will use a blank string "". Instead on relying
on NULL, let's expose the already existing 'auto' kvm-type mode to the users
and use that as default.

[1] https://lists.gnu.org/archive/html/qemu-devel/2020-12/msg00471.html

Daniel Henrique Barboza (1):
  spapr.c: set a 'kvm-type' default value instead of relying on NULL

 hw/ppc/spapr.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

-- 
2.26.2