From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@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:26:50 +0300 [thread overview]
Message-ID: <469F204A.6080700@qumranet.com> (raw)
In-Reply-To: <469EAC5A.2070900-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
Anthony Liguori wrote:
> Paul Turner wrote:
>
>> From: Paul Turner <pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>
>> Since gcc can't handle [0]-sized arrays without type information we have
>> to use a generic type and then cast to remove arch dependencies from the
>> vcpu struct; this patch moves the structures (and the associated
>> include dependency) from kvm.h into svm/vmx.c as well as introducing
>> vmx/svm macros for accessing these fields where appt.
>>
>>
>
> Sorry, I'm jumping in pretty late in this thread, but this casting stuff
> seems pretty ugly to me. Perhaps we need to take the refactoring a
> little further and have kvm_vcpu be a member of kvm_vcpu_{vmx,svm} and
> then use the standard container_of() stuff to get at the pointer?
>
>
This is definitely the right way to do it.
--
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/
prev parent reply other threads:[~2007-07-19 8:26 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
2007-07-19 8:26 ` Avi Kivity [this message]
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=469F204A.6080700@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org \
--cc=avi-atKUWr5tajDk1uMJSBkQmQ@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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