qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: 赵小强 <zxq_yx_007@163.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Chen Fan <chen.fan.fnst@cn.fujitsu.com>,
	pbonzini@redhat.com, qemu-devel@nongnu.org, aliguori@amazon.com
Subject: Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus
Date: Fri, 29 Nov 2013 09:26:02 +0800	[thread overview]
Message-ID: <5297ED2A.700@163.com> (raw)
In-Reply-To: <528316FC.4090901@163.com>

于 11/13/2013 02:06 PM, 赵小强 写道:
> 于 11/12/2013 10:52 PM, Andreas Färber 写道:
>> Resending yesterday's message since it hasn't arrived on qemu-devel...
>>
>> Am 11.11.2013 04:58, schrieb 赵小强:
>>> 于 11/05/2013 04:51 PM, 赵小强 写道:
>>>> 于 2013年11月05日 16:25, Chen Fan 写道:
>>>>> On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote:
>> [...]
>>>>>> diff --git a/include/hw/cpu/icc_bus.h b/include/hw/cpu/icc_bus.h
>>>>>> index b550070..b32a549 100644
>>>>>> --- a/include/hw/cpu/icc_bus.h
>>>>>> +++ b/include/hw/cpu/icc_bus.h
>>>>>> @@ -66,7 +66,8 @@ typedef struct ICCDeviceClass {
>>>>>>        DeviceClass parent_class;
>>>>>>        /*< public >*/
>>>>>>    -    int (*init)(ICCDevice *dev); /* TODO replace with QOM 
>>>>>> realize */
>>>>>> +    /* QOM realize */
>>>>>> +    DeviceRealize realize;
>>>>> Maybe adding 'realize' in ICCDeviceClass is redundant, because parent
>>>>> class has included 'realize' field.
>>>>>
>>>>>>    } ICCDeviceClass;
>>>>>>      #define TYPE_ICC_DEVICE "icc-device"
>>>>>> diff --git a/include/hw/i386/apic_internal.h
>>>>>> b/include/hw/i386/apic_internal.h
>>>>>> index 1b0a7fb..bd3a5fc 100644
>>>>>> --- a/include/hw/i386/apic_internal.h
>>>>>> +++ b/include/hw/i386/apic_internal.h
>>>>>> @@ -79,8 +79,9 @@ typedef struct APICCommonState APICCommonState;
>>>>>>    typedef struct APICCommonClass
>>>>>>    {
>>>>>>        ICCDeviceClass parent_class;
>>>>>> -
>>>>>> -    void (*init)(APICCommonState *s);
>>>>>> +
>>>>>> +    /* QOM realize */
>>>>>> +    DeviceRealize realize;
>>>>> as above.
>>>>>
>>>>> Thanks,
>>>>> Chen
>>>>>>        void (*set_base)(APICCommonState *s, uint64_t val);
>>>>>>        void (*set_tpr)(APICCommonState *s, uint8_t val);
>>>>>>        uint8_t (*get_tpr)(APICCommonState *s);
>>>> Thanks for your review!!
>>> Hi, Chen Fan:
>>>
>>> In my understanding, If we use only one 'realize'(which in
>>> 'DeviceClass'), I think all the initialization work must be done in the
>>> leaf child.  if we add 'redundant' realize to each parent, then we can
>>> call the initialization chain from DeviceClass down to leaf child's
>>> parent, with each parent complete a bit further(of cause, a parent can
>>> do nothing and pass to it's child directly).
>>>
>>> What do you think?
>> Your analysis is correct. v2 is like I requested you to do it and v3
>> still does iirc, so let's stick with that for "consistency". Bad word in
>> this context, I know. ;)
>>
>> If you have some time, it would be nice if you could check whether these
>> devices (the non-KVM versions at least) are covered by make check. For
>> ICC bus I am certain that it is. In particular I'm wondering if we need
>> certain -cpu arguments to enable the *APIC devices and have the realize
>> functions actually exercised? (My assumption is no, but a confirmation
>> would save time.)
>>
>> Regards,
>> Andreas
>>
> I see. thanks for your reply!
   I have been busy with my work this days. I wish I could have some 
time soon. A few questions about your last reply.
> it would be nice if you could check whether these
> devices (the non-KVM versions at least) are covered by make check. For
> ICC bus I am certain that it is. 
   1. Does "make check" mean the build target in the Makefile ?  if it 
is, I can not find anything about "icc_bus" under "tests" directory.  Or 
you refer to something else?
   2. What does "enable the *APIC devices and have the realize functions 
actually exercised?" mean?

  reply	other threads:[~2013-11-29  1:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  7:55 [Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic xiaoqiang zhao
2013-11-05  7:55 ` [Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify xiaoqiang zhao
2013-11-05  7:55 ` [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus xiaoqiang zhao
2013-11-05  8:25   ` Chen Fan
2013-11-05  8:51     ` 赵小强
2013-11-11  3:58       ` 赵小强
2013-11-12  1:28         ` Chen Fan
2013-11-12  1:54           ` 赵小强
2013-11-12  3:02             ` Chen Fan
2013-11-12  3:11               ` 赵小强
2013-11-12 16:41               ` Andreas Färber
2013-11-13  8:47                 ` Chen Fan
2013-11-12 16:20           ` Andreas Färber
2013-11-12 14:52         ` Andreas Färber
2013-11-13  6:06           ` 赵小强
2013-11-29  1:26             ` 赵小强 [this message]
2013-11-29  3:48               ` Andreas Färber
2013-11-29  5:29                 ` 赵小强
2013-11-29  7:22                 ` 赵小强
2013-11-05  7:55 ` [Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify xiaoqiang zhao
2013-11-05  7:55 ` [Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic xiaoqiang zhao
  -- strict thread matches above, loose matches on Subject: below --
2013-11-05  8:16 [Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic xiaoqiang zhao
2013-11-05  8:16 ` [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus xiaoqiang zhao
2013-11-05  7:53 [Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic xiaoqiang zhao
2013-11-05  7:53 ` [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus xiaoqiang zhao

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=5297ED2A.700@163.com \
    --to=zxq_yx_007@163.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=chen.fan.fnst@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@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).