qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Igor Mammedov <imammedo@redhat.com>
Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com,
	Don@CloudSwitch.com, mtosatti@redhat.com, qemu-devel@nongnu.org,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] target-i386: initialize APIC at CPU level
Date: Wed, 10 Oct 2012 14:53:11 +0200	[thread overview]
Message-ID: <50756FB7.10606@suse.de> (raw)
In-Reply-To: <20121010144939.2cee7566@nial.usersys.redhat.com>

Am 10.10.2012 14:49, schrieb Igor Mammedov:
> On Wed, 10 Oct 2012 12:01:29 +0200
> Andreas Färber <afaerber@suse.de> wrote:
> 
>> Am 09.10.2012 19:17, schrieb Igor Mammedov:
>>> (L)APIC is a part of cpu [1] so move APIC initialization inside of
>>> x86_cpu object. Since cpu_model and override flags currently specify
>>> whether APIC should be created or not, APIC creation&initialization is
>>> moved into x86_cpu_apic_init() which is called from x86_cpu_realize().
>>>
>>> [1] - all x86 cpus have integrated APIC if we overlook existence of i486,
>>> and it's more convenient to model after majority of them.
>>>
>>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>>
>> I am happy with this latest round of fixes to ad-hoc feedback from my
>> CPU remodeling perspective (as an interim solution), and I depend on
>> this for my APIC changes (code is being moved around here).
>>
>>> +    if (env->apic_state == NULL) {
>>> +        error_set(errp, QERR_DEVICE_INIT_FAILED, apic_type);
> This is equivalent to error_setg(errp, "Device '%s' could not be
> initialized",...). I'm not sure if repeating the same string in many places
> is a better than using an existing macro. 

I thought their intention was to have specialized rather than standard
messages, so maybe "An APIC of type '%s' could not be created." and "The
APIC of type '%s' could not be initialized."?

Andreas

> 
>>> +        return;
>>> +    }
>> [...]
>>> +    if (qdev_init(env->apic_state)) {
>>> +        error_set(errp, QERR_DEVICE_INIT_FAILED,u
>>> +                  object_get_typename(OBJECT(env->apic_state)));
>>> +        return;
>>> +    }
>>
>> Luiz, could you please take a look whether I can apply this to my
>> qom-cpu tree now or whether error_set() should be replaced by
>> error_setg() or something? Contents-wise these are error-checking
>> creation and initialization of a child (APIC) device/object.
> 
>>
>> Thanks,
>> 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:[~2012-10-10 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 17:17 [Qemu-devel] [PATCH v3] target-i386: initialize APIC at CPU level Igor Mammedov
2012-10-10 10:01 ` Andreas Färber
2012-10-10 12:49   ` Igor Mammedov
2012-10-10 12:53     ` Andreas Färber [this message]
2012-10-10 16:47   ` Luiz Capitulino

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=50756FB7.10606@suse.de \
    --to=afaerber@suse.de \
    --cc=Don@CloudSwitch.com \
    --cc=aliguori@us.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=lcapitulino@redhat.com \
    --cc=mtosatti@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).