All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Amit Shah <amit.shah@redhat.com>,
	Isaku Yamahata <yamahata@valinux.co.jp>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups
Date: Mon, 28 Jun 2010 10:20:18 +0200	[thread overview]
Message-ID: <4C285B42.1030309@redhat.com> (raw)
In-Reply-To: <AANLkTilti0hkjw5ARxEpjGib1YZpzZiXE_DMafrbQVji@mail.gmail.com>

On 06/27/2010 09:32 PM, Blue Swirl wrote:
>  From just clean up or type safety point of view, this is good stuff.
> But from architectural point of view, we should make it more difficult
> to use CPUState in device code, not easier. This may still be fine as
> a temporary measure, before all CPUState references have been removed.

I don't see it at all as a temporary measure.  In theory, only devices 
compiled per-target would need access to CPUState, that's true. 
However, there are conflicting goals which make an opaque CPUState 
preferrable.

First, converting devices such as APIC to qdev requires knowledge of 
CPUState in qdev, unless you want to keep DEFINE_PROP_PTR (whose removal 
is much more interesting) or sweep it under the void* blanket.  PICs are 
likely to have CPUState members, e.g. hw/pxa2xx_pic.c (and BTW indirect 
access via functions to these fields is making emulation a little bit 
slower).

Also, for things compiled in libhw that are not part of device code, 
requiring knowledge of CPUState is absolutely not problematic and the 
only alternative loses type-safety and so it is inferior.

Paolo

  reply	other threads:[~2010-06-28  8:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 12:52 [Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups Paolo Bonzini
2010-06-25 12:52 ` [Qemu-devel] [PATCH 1/7] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix Paolo Bonzini
2010-06-25 12:52 ` [Qemu-devel] [PATCH 2/7] include qemu-common.h when needed by the next patches Paolo Bonzini
2010-06-25 12:52 ` [Qemu-devel] [PATCH 3/7] include stdio.h freely, remove dyngen-exec.h hacks Paolo Bonzini
2010-06-25 12:52 ` [Qemu-devel] [PATCH 4/7] provide opaque CPUState to files that are compiled once Paolo Bonzini
2010-06-27 19:17   ` Blue Swirl
2010-06-28  8:04     ` Paolo Bonzini
2010-06-28 14:21       ` Blue Swirl
2010-06-25 12:52 ` [Qemu-devel] [PATCH 5/7] add qdev property type "cpu" Paolo Bonzini
2010-06-26  7:46   ` Markus Armbruster
2010-06-27 12:48     ` [Qemu-devel] " Paolo Bonzini
2010-06-29 11:42       ` Markus Armbruster
2010-06-29 13:52         ` Paolo Bonzini
2010-06-27 18:45   ` [Qemu-devel] " Blue Swirl
2010-06-25 12:52 ` [Qemu-devel] [PATCH 6/7] replace void* uses with opaque CPUState* Paolo Bonzini
2010-06-26  7:49   ` Markus Armbruster
2010-06-25 12:52 ` [Qemu-devel] [PATCH 7/7] poison TARGET_xxx for compile once object Paolo Bonzini
2010-06-25 22:47 ` [Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups Richard Henderson
2010-06-27 12:39   ` [Qemu-devel] " Paolo Bonzini
2010-06-27 19:32 ` [Qemu-devel] " Blue Swirl
2010-06-28  8:20   ` Paolo Bonzini [this message]
2010-06-28 15:11     ` Blue Swirl
2010-06-28 16:21       ` Paolo Bonzini

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=4C285B42.1030309@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /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.