From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] KVM: Remove arch specific components from the general code
Date: Thu, 26 Jul 2007 13:03:11 +0300 [thread overview]
Message-ID: <46A8715F.9010701@qumranet.com> (raw)
In-Reply-To: <20070726042948.5893.58975.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
Gregory Haskins wrote:
> This is a cleanup patch to "de-VMX" the general code. It was developed in the
> preempt-hooks branch, but it should apply elsewhere as well.
>
>
Many cooks on this patch...
> @@ -310,16 +301,13 @@ void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
> struct kvm_io_device *dev);
>
> struct kvm_vcpu {
> + int valid;
>
This is okay as a temporary measure, until the vcpu array is replaced by
a vcpu pointer array (when vcpu->valid can be replaced by vcpu != NULL).
> struct kvm *kvm;
> struct preempt_hook preempt_hook;
> int vcpu_id;
> - union {
> - struct vmcs *vmcs;
> - struct vcpu_svm *svm;
> - };
> + void *_priv;
>
The other cooks did this by embedding the one of the structures within
the other, which reduces indirections.
> @@ -1664,7 +1664,7 @@ void load_msrs(struct vmx_msr_entry *e, int n)
> }
> EXPORT_SYMBOL_GPL(load_msrs);
>
> -void save_msrs(struct vmx_msr_entry *e, int n)
> +void save_msrs(struct kvm_msr_entry *e, int n)
> {
> int i;
>
This isn't actually used in svm, so we can keep the name vmx_msr_entry
and just move the function. It need not be done in this patch.
> --- a/drivers/kvm/svm.c
> +++ b/drivers/kvm/svm.c
> @@ -49,6 +49,8 @@ MODULE_LICENSE("GPL");
> #define SVM_FEATURE_LBRV (1 << 1)
> #define SVM_DEATURE_SVML (1 << 2)
>
> +#define svm(vcpu) ((struct vcpu_svm*)vcpu->_priv)
> +
>
Inline function.
> };
> +
> +#define vmx(vcpu) ((struct vcpu_vmx*)vcpu->_priv)
> +
>
Inline function.
Patch looks good except for the extra indirection. But maybe a later
patch can do that. Paul? Rusty?
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-07-26 10:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 4:31 [PATCH] KVM: Remove arch specific components from the general code Gregory Haskins
[not found] ` <20070726042948.5893.58975.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-26 10:03 ` Avi Kivity [this message]
2007-07-26 10:37 ` Rusty Russell
[not found] ` <1185446238.4895.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-26 11:05 ` Avi Kivity
[not found] ` <46A87FDD.7060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-26 23:27 ` Rusty Russell
[not found] ` <1185492423.9484.9.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-27 4:41 ` Avi Kivity
[not found] ` <46A9776C.9010007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-27 5:23 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2007-07-26 12:20 Gregory Haskins
[not found] ` <46A8594E0200005A0002831D-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 12:33 ` Avi Kivity
2007-07-26 13:16 Gregory Haskins
2007-07-26 13:16 Gregory Haskins
[not found] ` <46A866860200005A00028332-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 13:37 ` Avi Kivity
2007-07-26 13:51 Gregory Haskins
[not found] ` <46A86E8A0200005A00028346-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 13:59 ` Avi Kivity
2007-07-26 23:50 Gregory Haskins
[not found] ` <46A8FB230200005A000283D9-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-27 1:11 ` Rusty Russell
[not found] ` <1185498672.12151.11.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-27 4:51 ` 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=46A8715F.9010701@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=ghaskins-Et1tbQHTxzrQT0dZR+AlfA@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