From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Paul Turner <pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
avi-atKUWr5tajDk1uMJSBkQmQ@public.gmane.org
Subject: Re: [PATCH] move structures to svm/vmx.c, use untyped arch_data in independent code
Date: Thu, 19 Jul 2007 11:30:44 +0300 [thread overview]
Message-ID: <469F2134.2030505@qumranet.com> (raw)
In-Reply-To: <ed628a920707181849h603b5741nf5dfe2c5ea43e9a6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Paul Turner wrote:
> On 7/18/07, Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:
>
>> Paul Turner wrote:
>>
>>> I mentioned that as a possible solution in the other thread. The
>>> memorystructure gets a little uglier in that case since you have to
>>> hang the relevant vcpu off kvm_struct, in addition to throwing the
>>> container_of macro pretty much everywhere since the arch indep code
>>> can only obviously only pass kvm_vcpus, I don't really like the macro
>>> approach either I just don't see anything nicer right now..
>>>
>> Well, let me show you what I mean:
>>
>
> I considered this approach as well and am happy to refactor it in this
> form if that's what Avi wants; I still think it's nicer not to invert
> these structures but am relatively ambivalent :)
>
>
As this is the standard way of doing things, and as the
zero-length-array idea failed miserably, this is probably the best solution.
>>>>> struct vmcs *vmcs;
>>>>>
>> + struct kvm_vcpu vcpu;
>>
>>
>
> In this approach you might as well embed that at the start so that the
> arch independent code can still allocate/free, that or move the memory
> alloc/dealloc entirely to the arch specific code. Although that
> should probably be done anyway with this approach otherwise it's not
> clear exactly what is occurring from the arch independent code path's
> pov.
>
Yes, the arch independent stuff should be at the start.
[...]
People, trim your quotes!
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-07-19 8:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 0:04 [PATCH] move structures to svm/vmx.c, use untyped arch_data in independent code Paul Turner
[not found] ` <Pine.LNX.4.64.0707181656540.4769-hxTPNdr267xSzHKm+aFRNNkmqwFzkYv6@public.gmane.org>
2007-07-19 0:12 ` Anthony Liguori
[not found] ` <469EAC5A.2070900-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-19 0:17 ` Paul Turner
[not found] ` <ed628a920707181717t33f95f15v1919bbde0c656cd5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-19 0:18 ` Paul Turner
2007-07-19 1:15 ` Anthony Liguori
[not found] ` <469EBB26.5080106-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-19 1:49 ` Paul Turner
[not found] ` <ed628a920707181849h603b5741nf5dfe2c5ea43e9a6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-19 2:40 ` Anthony Liguori
[not found] ` <469ECF13.6050004-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-19 8:33 ` Avi Kivity
2007-07-19 8:30 ` Avi Kivity [this message]
2007-07-19 8:26 ` Avi Kivity
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=469F2134.2030505@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=avi-atKUWr5tajDk1uMJSBkQmQ@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.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