qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH v2 5/5] target/arm/cpu: Add the kvm-no-adjvtime CPU prope


From: Andrew Jones
Subject: Re: [RFC PATCH v2 5/5] target/arm/cpu: Add the kvm-no-adjvtime CPU property
Date: Fri, 7 Feb 2020 08:37:47 +0100

On Thu, Feb 06, 2020 at 11:46:49PM +0100, Philippe Mathieu-Daudé wrote:
> On 2/6/20 1:40 PM, Andrew Jones wrote:
> > On Thu, Feb 06, 2020 at 01:08:53PM +0100, Philippe Mathieu-Daudé wrote:
> > ...
> > > > +/* KVM VCPU properties should be prefixed with "kvm-". */
> > > > +void kvm_arm_add_vcpu_properties(Object *obj)
> > > > +{
> > > > +    if (!kvm_enabled()) {
> > > 
> > > This can't happen, right? Can we turn that into an assertion, or
> > > remove the check?
> > 
> > You're right. An assert would be more appropriate. Will you send a patch?
> 
> Apparently this can be called with KVM_CONFIG && !kvm_enabled():
> 
> See kvm_arm_set_cpu_features_from_host()
> {
>     if (!arm_host_cpu_features.dtb_compatible) {
>         if (!kvm_enabled() ||
>             !kvm_arm_get_host_cpu_features(&arm_host_cpu_features)) {
>             /* We can't report this error yet, so flag that we need to
>              * in arm_cpu_realizefn().
>              */
> 
> I won't modify your patch (until I have a better understanding of
> TYPE_ARM_HOST_CPU).
>

Just grepped around and talked to Igor. Indeed we need to be able
to do the host cpu init without erroring out (even if we know we
will in realize) and, as cpu instance_init should add the properties,
then I don't really see a cleaner way to do it than what we already
have.

Thanks,
drew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]