Re: [PATCH v2 2/5] hw/s390x/pv: Un-inline s390_pv_init()

2022-12-29 Thread Thomas Huth
On 17/12/2022 16.24, Philippe Mathieu-Daudé wrote: There is no point in having s390_pv_init() inlined. Directly call s390_pv_kvm_init() guarded by kvm_enabled() so the compiler can elide when CONFIG_KVM is not set. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/pv.c | 4 +++-

Re: [PATCH v2 2/5] hw/s390x/pv: Un-inline s390_pv_init()

2022-12-17 Thread Richard Henderson
On 12/17/22 07:24, Philippe Mathieu-Daudé wrote: @@ -251,7 +251,9 @@ struct S390PVGuestClass { int s390_pv_kvm_init(ConfidentialGuestSupport *cgs, Error **errp) { -if (!object_dynamic_cast(OBJECT(cgs), TYPE_S390_PV_GUEST)) { +assert(kvm_enabled()); + +if (!cgs || !object_dynam

[PATCH v2 2/5] hw/s390x/pv: Un-inline s390_pv_init()

2022-12-17 Thread Philippe Mathieu-Daudé
There is no point in having s390_pv_init() inlined. Directly call s390_pv_kvm_init() guarded by kvm_enabled() so the compiler can elide when CONFIG_KVM is not set. Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/pv.c | 4 +++- hw/s390x/s390-virtio-ccw.c | 6 -- include/hw/s