kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Rusty Russell <rusty.russell@linaro.org>
Cc: Christoffer Dall <c.dall@virtualopensystems.com>,
	Alexander Graf <agraf@suse.de>,
	Peter Maydell <peter.maydell@linaro.org>,
	kvmarm@lists.cs.columbia.edu, kvm-devel <kvm@vger.kernel.org>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [RFC 1/5] KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code.
Date: Sat, 01 Sep 2012 02:11:03 -0700	[thread overview]
Message-ID: <5041D127.4030103@redhat.com> (raw)
In-Reply-To: <871uiqa8d5.fsf@rustcorp.com.au>

On 08/28/2012 04:45 PM, Rusty Russell wrote:
> Avi has indicated that this is the future.  For now, make it dependent on
> KVM_HAVE_ONE_REG (and define that for PPC and S/390).

I want GET_MULTI, really.  But maybe iterating over ONE_REG isn't so bad
since we do it so rarely.:

Would all register IDs fit in 64 bits?  cpuid (read only) is addressed
using eax (32-bits), ecx (for some values of eax), and yields 4 32-bit
values.  That's 66 bits of addressing, independent of some way to
discriminate between register sets.

I guess we could special case the cases where ecx is needed, or only
allow 8 bits for ecx (always okay so far).

Other x86 state:
  GPRs - ok
  MSRs - ok
  FPU - one register per xmm/st(x)? the entire xsave area?
  APIC  - one register per apic register? the entire 4k page?
  Various non-register state (pending exceptions, run state,
blocked-by-sti/ss) - ok
  SVM/VMX state - ok
  Segments: one register per segment? one per component?
  Control registers: ok.  Should userspace be careful to set registers
in legal ways only? i.e. cannot set cr3[0:11] if cr4.pae=0, or vice
versa, so need three writes?
  IOAPIC/PIC/PIT - not vcpu state
  Debug registers - ok
  xcr - ok
 
Yuch, we have a lot of state in that thing.


-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2012-09-01  9:12 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 23:37 [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic Rusty Russell
2012-08-28 23:45 ` [RFC 1/5] KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code Rusty Russell
2012-09-01  9:11   ` Avi Kivity [this message]
2012-09-01 10:18     ` Peter Maydell
2012-09-01 10:44       ` Avi Kivity
2012-08-28 23:46 ` [RFC 2/5] KVM: ARM: use KVM_SET_ONE_REG/KVM_GET_ONE_REG Rusty Russell
2012-08-29 15:10   ` Christoffer Dall
2012-08-28 23:47 ` [RFC 3/5] KVM: Add KVM_VCPU_GET_REG_LIST Rusty Russell
2012-08-29 15:13   ` Christoffer Dall
2012-08-28 23:47 ` [RFC 4/5] KVM: ARM: Use KVM_VCPU_GET_REG_LIST Rusty Russell
2012-08-29 15:14   ` Christoffer Dall
2012-08-28 23:48 ` [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG Rusty Russell
2012-08-29 15:29   ` Christoffer Dall
2012-09-01  9:14     ` Avi Kivity
2012-08-29 15:36   ` Peter Maydell
2012-08-29 18:21     ` Rusty Russell
2012-09-01  9:16       ` Avi Kivity
2012-09-01 10:25         ` Peter Maydell
2012-09-01 19:40           ` Christoffer Dall
2012-09-04 13:09             ` Peter Maydell
2012-09-04 14:29               ` Christoffer Dall
2012-09-05  6:37                 ` Rusty Russell
2012-08-29 18:16   ` Rusty Russell
2012-08-29 16:30 ` [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic Peter Maydell
2012-08-29 18:39   ` Rusty Russell
2012-09-01  9:21     ` Avi Kivity
2012-09-01 12:35       ` Rusty Russell
2012-09-03  9:20         ` Avi Kivity
2012-09-03 12:33           ` Rusty Russell
2012-09-03 12:49             ` Peter Maydell
2012-09-04 11:48             ` Avi Kivity
2012-09-04 13:59               ` Alexander Graf
2012-09-06 14:44                 ` Avi Kivity
2012-09-05  6:43               ` Rusty Russell
2012-09-01 12:28 ` Rusty Russell
2012-09-01 12:37   ` Rusty Russell
2012-09-04 13:31   ` Peter Maydell
2012-09-05  3:15     ` Alexander Graf
2012-09-05  6:48     ` Rusty Russell
2012-09-05  8:52       ` Peter Maydell
2012-09-06  1:44         ` Rusty Russell
2012-09-06  7:37           ` Peter Maydell
2012-09-06 14:48       ` Avi Kivity
2012-09-06 15:08         ` Alexander Graf
2012-09-06 15:16           ` Avi Kivity
2012-09-06 15:23             ` Peter Maydell
2012-09-06 15:35               ` Avi Kivity
2012-09-06 23:00                 ` Rusty Russell

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=5041D127.4030103@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=c.dall@virtualopensystems.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=mtosatti@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=rusty.russell@linaro.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;
as well as URLs for NNTP newsgroup(s).