From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Carsten Otte <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Cc: "kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Christian Borntraeger
<borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Subject: Re: [patch] cleanup struct kvm_vcpu control registers
Date: Wed, 08 Aug 2007 17:25:20 +0300 [thread overview]
Message-ID: <46B9D250.9020906@qumranet.com> (raw)
In-Reply-To: <1186575977.7019.11.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
Carsten Otte wrote:
> The patch below removes individual control register definitions from
> struct kvm_vcpu and replaces them with an array similar to general
> purpose registers.
> When splitting kvm_vcpu in architecture dependent and architecture
> independent parts, this will allow to keep the control registers in the
> architecture independent struct even if we have different control
> registers on different architectures.
> This is tested on svm, unfortunately I don't have a vmx capable machine
> at hand.
>
I don't think we should aim for keeping control registers in an arch
independent manner, since there is nothing common among the different
architectures in that area. For x86, keeping them in an array is not
helpful since the individual control registers have nothing to do with
each other. Also, for most things like the fpu and segment registers
this trick won't work.
I suggest keeping them in an arch dependent structure (struct
kvm_vcpu_arch) in <asm/kvm.h>. We can then access them through a member
as vcpu->arch.cr0, etc.
-------------------------------------------------------------------------
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-08-08 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 12:26 [patch] cleanup struct kvm_vcpu control registers Carsten Otte
[not found] ` <1186575977.7019.11.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
2007-08-08 14:25 ` Avi Kivity [this message]
[not found] ` <46B9D250.9020906-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-08 16:29 ` Carsten Otte
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=46B9D250.9020906@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=cotte-tA70FqPdS9bQT0dZR+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