qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
	Paul Mackerras <paulus@samba.org>,
	qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller
Date: Tue, 06 Aug 2013 16:14:13 +0200	[thread overview]
Message-ID: <520104B5.8020600@suse.de> (raw)
In-Reply-To: <51F9D475.9060907@ozlabs.ru>

Am 01.08.2013 05:22, schrieb Alexey Kardashevskiy:
> On 08/01/2013 01:07 PM, Andreas Färber wrote:
>> Am 01.08.2013 04:08, schrieb Alexey Kardashevskiy:
>>> On 08/01/2013 11:29 AM, Andreas Färber wrote:
>>>> Am 01.08.2013 02:14, schrieb Alexey Kardashevskiy:
>>>>> On 08/01/2013 05:52 AM, Andreas Färber wrote:
>>>>>> Am 17.07.2013 08:37, schrieb Alexey Kardashevskiy:
>>>>>>> +/*
>>>>>>> + * XICS-KVM
>>>>>>> + */
>>>>>>> +static void xics_kvm_cpu_setup(XICSState *icp, PowerPCCPU *cpu)
>>>>>>> +{
>>>>>>> +    CPUState *cs;
>>>>>>> +    ICPState *ss;
>>>>>>> +    XICSStateKVM *icpkvm = (XICSStateKVM *) object_dynamic_cast(
>>>>>>> +            OBJECT(icp), TYPE_XICS_KVM);
>>>>>>> +    XICSStateClass *xics_info = XICS_CLASS(object_class_by_name(TYPE_XICS));
>>>>>>
>>>>>> Are you intentionally accessing that class by name rather than using
>>>>>> XICS_GET_CLASS(icp), which allows the KVM variant to overwrite things?
>>>>>
>>>>>
>>>>> This is KVM's CPU_setup(). I want to call non-KVM CPU_setup afterwards,
>>>>> i.e. "call parent method". XICS_GET_CLASS will return XICS_KVM class but
>>>>> not XICS, no?
>>>>
>>>> OK, then I'll CC you on my upcoming virtio v2 series that introduces a
>>>> more comprehensable macro for this purpose: I would/will recommend to
>>>> use a local macro KVM_XICS_GET_PARENT_CLASS(obj) - where you could move
>>>> your current inline implementation - to make more obvious that it's not
>>>> a mistake.
>>>
>>> Oh. So. This has to wait till that virtio thing gets to upstream. Correct?
>>
>> Not quite, there is no dependency on virtio.
>>
>> a) You could do
>> #define KVM_XICS_GET_PARENT_CLASS(obj) \
>>     object_class_by_name(TYPE_KVM_XICS)
> 
> TYPE_KVM_XICS or TYPE_XICS?

Sorry for late reply: When using object_class_by_name() directly, then
TYPE_XICS (or now TYPE_COMMON_XICS); when using object_get_parent() or
the wrapping OBJECT_GET_PARENT_CLASS() then TYPE_KVM_XICS, i.e. the QOM
type to which the C function belongs.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-08-06 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  6:37 [Qemu-devel] RFC: [PATCH 0/4] xics: in-kernel support Alexey Kardashevskiy
2013-07-17  6:37 ` [Qemu-devel] [PATCH 1/4] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN Alexey Kardashevskiy
2013-07-17  6:37 ` [Qemu-devel] [PATCH 2/4] xics: add pre_save/post_load/cpu_setup dispatchers Alexey Kardashevskiy
2013-07-17  6:37 ` [Qemu-devel] [PATCH 3/4] xics: rework initialization Alexey Kardashevskiy
2013-07-31 19:22   ` Andreas Färber
2013-07-17  6:37 ` [Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller Alexey Kardashevskiy
2013-07-31 18:05   ` Anthony Liguori
2013-07-31 19:52   ` Andreas Färber
2013-07-31 20:47     ` Peter Maydell
2013-08-01  0:14     ` Alexey Kardashevskiy
2013-08-01  1:29       ` Andreas Färber
2013-08-01  2:08         ` Alexey Kardashevskiy
2013-08-01  3:07           ` Andreas Färber
2013-08-01  3:22             ` Alexey Kardashevskiy
2013-08-06 14:14               ` Andreas Färber [this message]
2013-08-02 14:57         ` Alexey Kardashevskiy
2013-08-03  2:45           ` Alexey Kardashevskiy
2013-07-30  2:29 ` [Qemu-devel] RFC: [PATCH 0/4] xics: in-kernel support Alexey Kardashevskiy

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=520104B5.8020600@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=aliguori@us.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=paulus@samba.org \
    --cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).