All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	Alistair Francis <alistair.francis@xilinx.com>,
	Beniamino Galvani <b.galvani@gmail.com>,
	qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
	Antony Pavlov <antonynpavlov@gmail.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/4] ppc: remove cannot_destroy_with_object_finalize_yet
Date: Fri, 21 Apr 2017 11:45:10 +1000	[thread overview]
Message-ID: <20170421014510.GA31355@umbus.fritz.box> (raw)
In-Reply-To: <20170418030950.GE12235@umbus.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]

On Tue, Apr 18, 2017 at 01:09:50PM +1000, David Gibson wrote:
> On Fri, Apr 14, 2017 at 10:37:15AM +0200, Laurent Vivier wrote:
> > This removes the assert(kvm_enabled()) from kvmppc_host_cpu_initfn()
> > 
> > This assert can never be triggered as the function is only registered
> > when KVM is available (see also 4c315c2
> > "qdev: Protect device-list-properties against broken devices").
> > 
> > So we can remove the cannot_destroy_with_object_finalize_yet from
> > kvmppc_host_cpu_class_init() without fear and beyond reproach.
> > (as it has already be done for i386 with 771a13e "i386: Unset
> > cannot_destroy_with_object_finalize_yet on "host" model" and
> > e435601 "target-i386: Remove assert(kvm_enabled()) from
> > host_x86_cpu_initfn()")
> > 
> > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> 
> Applied to ppc-for-2.10 (fixing a contextual conflict on the way).

Looks like this will go through Markus' tree instead, so:

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> 
> 
> > ---
> >  target/ppc/kvm.c | 10 ----------
> >  1 file changed, 10 deletions(-)
> > 
> > diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
> > index 9f1f132..64017ac 100644
> > --- a/target/ppc/kvm.c
> > +++ b/target/ppc/kvm.c
> > @@ -2245,14 +2245,8 @@ static void alter_insns(uint64_t *word, uint64_t flags, bool on)
> >      }
> >  }
> >  
> > -static void kvmppc_host_cpu_initfn(Object *obj)
> > -{
> > -    assert(kvm_enabled());
> > -}
> > -
> >  static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
> >  {
> > -    DeviceClass *dc = DEVICE_CLASS(oc);
> >      PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
> >      uint32_t vmx = kvmppc_get_vmx();
> >      uint32_t dfp = kvmppc_get_dfp();
> > @@ -2279,9 +2273,6 @@ static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
> >      if (icache_size != -1) {
> >          pcc->l1_icache_size = icache_size;
> >      }
> > -
> > -    /* Reason: kvmppc_host_cpu_initfn() dies when !kvm_enabled() */
> > -    dc->cannot_destroy_with_object_finalize_yet = true;
> >  }
> >  
> >  bool kvmppc_has_cap_epr(void)
> > @@ -2333,7 +2324,6 @@ static int kvm_ppc_register_host_cpu_type(void)
> >  {
> >      TypeInfo type_info = {
> >          .name = TYPE_HOST_POWERPC_CPU,
> > -        .instance_init = kvmppc_host_cpu_initfn,
> >          .class_init = kvmppc_host_cpu_class_init,
> >      };
> >      PowerPCCPUClass *pvr_pcc;
> 



-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-04-21  1:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14  8:37 [Qemu-devel] [PATCH v2 0/4] qdev: remove all remaining cannot_destroy_with_object_finalize_yet Laurent Vivier
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 1/4] arm: remove " Laurent Vivier
2017-04-14 20:55   ` Alistair Francis
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 2/4] ppc: remove cannot_destroy_with_object_finalize_yet Laurent Vivier
2017-04-18  3:09   ` David Gibson
2017-04-21  1:45     ` David Gibson [this message]
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 3/4] versatile: " Laurent Vivier
2017-04-18 13:25   ` Markus Armbruster
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 4/4] qdev: " Laurent Vivier
2017-04-18 13:26   ` Markus Armbruster
2017-04-20 13:02 ` [Qemu-devel] [PATCH v2 0/4] qdev: remove all remaining cannot_destroy_with_object_finalize_yet Peter Maydell
2017-04-20 15:59   ` Markus Armbruster
2017-04-21  1:45     ` David Gibson
2017-04-21  5:40 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170421014510.GA31355@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=alistair.francis@xilinx.com \
    --cc=antonynpavlov@gmail.com \
    --cc=armbru@redhat.com \
    --cc=b.galvani@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.