All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-ppc@vger.kernel.org, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls
Date: Wed, 16 Nov 2011 00:45:45 +0100	[thread overview]
Message-ID: <35750AAB-B919-4F7B-B60E-C4ADE9124048@suse.de> (raw)
In-Reply-To: <20111110173505.GA13747@amt.cnet>


On 10.11.2011, at 18:35, Marcelo Tosatti wrote:

> On Thu, Nov 10, 2011 at 05:49:42PM +0100, Alexander Graf wrote:
>>>> Documentation/virtual/kvm/api.txt |   47 ++++++++++++++++++++++++++++++++++
>>>> arch/powerpc/kvm/powerpc.c        |   51 +++++++++++++++++++++++++++++++++++++
>>>> include/linux/kvm.h               |   32 +++++++++++++++++++++++
>>>> 3 files changed, 130 insertions(+), 0 deletions(-)
>>> I don't see the benefit of this generalization, the current structure where
>>> context information is hardcoded in the data transmitted works well.
>> 
>> Well, unfortunately it doesn't work quite as well for us because we
>> are a much more evolving platform. Also, there are a lot of edges
>> and corners of the architecture that simply aren't implemented in
>> KVM as of now. I want to have something extensible enough so we
>> don't break the ABI along the way.
> 
> You still have to agree on format between userspace and kernel, right?
> If either party fails to conform to that, you're doomed.

Yes, but we can shove registers back and forth without allocating 8kb of ram each time. If all we need to do is poke one register, we poke one register. If we poke 10, we poke the 10 we need to touch.

> The problem with two interfaces is potential ambiguity: is
> register X implemented through KVM_GET_ONE_REG and also through
> KVM_GET_XYZ_REGISTER_SET ? If its accessible by two interfaces, what is
> the register writeback order? Is there a plan to convert, etc.

Why writeback order? Register modification operations should always happen from the same thread the vCPU would run on at the end of the day, no? Avi wanted to go as far as making this a syscall interface even.

> If you agree these concerns are valid, perhaps this interface can be PPC
> specific.

I can always make it PPC specific, but I believe it would make sense as a generic interface for everyone, similar to how ENABLE_CAP can make sense for any arch.


Alex

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-ppc@vger.kernel.org, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls
Date: Tue, 15 Nov 2011 23:45:45 +0000	[thread overview]
Message-ID: <35750AAB-B919-4F7B-B60E-C4ADE9124048@suse.de> (raw)
In-Reply-To: <20111110173505.GA13747@amt.cnet>


On 10.11.2011, at 18:35, Marcelo Tosatti wrote:

> On Thu, Nov 10, 2011 at 05:49:42PM +0100, Alexander Graf wrote:
>>>> Documentation/virtual/kvm/api.txt |   47 ++++++++++++++++++++++++++++++++++
>>>> arch/powerpc/kvm/powerpc.c        |   51 +++++++++++++++++++++++++++++++++++++
>>>> include/linux/kvm.h               |   32 +++++++++++++++++++++++
>>>> 3 files changed, 130 insertions(+), 0 deletions(-)
>>> I don't see the benefit of this generalization, the current structure where
>>> context information is hardcoded in the data transmitted works well.
>> 
>> Well, unfortunately it doesn't work quite as well for us because we
>> are a much more evolving platform. Also, there are a lot of edges
>> and corners of the architecture that simply aren't implemented in
>> KVM as of now. I want to have something extensible enough so we
>> don't break the ABI along the way.
> 
> You still have to agree on format between userspace and kernel, right?
> If either party fails to conform to that, you're doomed.

Yes, but we can shove registers back and forth without allocating 8kb of ram each time. If all we need to do is poke one register, we poke one register. If we poke 10, we poke the 10 we need to touch.

> The problem with two interfaces is potential ambiguity: is
> register X implemented through KVM_GET_ONE_REG and also through
> KVM_GET_XYZ_REGISTER_SET ? If its accessible by two interfaces, what is
> the register writeback order? Is there a plan to convert, etc.

Why writeback order? Register modification operations should always happen from the same thread the vCPU would run on at the end of the day, no? Avi wanted to go as far as making this a syscall interface even.

> If you agree these concerns are valid, perhaps this interface can be PPC
> specific.

I can always make it PPC specific, but I believe it would make sense as a generic interface for everyone, similar to how ENABLE_CAP can make sense for any arch.


Alex


  reply	other threads:[~2011-11-15 23:45 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31  7:53 [PULL 00/14] ppc patch queue 2011-10-31 Alexander Graf
2011-10-31  7:53 ` Alexander Graf
2011-10-31  7:53 ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with preemption disabled Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 12:50   ` Avi Kivity
2011-10-31 12:50     ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with Avi Kivity
2011-10-31 18:52     ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with preemption disabled Scott Wood
2011-10-31 18:52       ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with Scott Wood
2011-11-01  9:00       ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with preemption disabled Avi Kivity
2011-11-01  9:00         ` [PATCH 01/14] KVM: PPC: e500: don't translate gfn to pfn with Avi Kivity
2011-10-31  7:53 ` [PATCH 02/14] KVM: PPC: e500: Eliminate preempt_disable in local_sid_destroy_all Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 03/14] KVM: PPC: e500: clear up confusion between host and guest entries Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 04/14] KVM: PPC: e500: MMU API Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 13:24   ` Avi Kivity
2011-10-31 13:24     ` Avi Kivity
2011-10-31 20:12     ` Scott Wood
2011-10-31 20:12       ` Scott Wood
2011-11-01  8:58       ` Avi Kivity
2011-11-01  8:58         ` Avi Kivity
2011-11-01  9:55         ` Avi Kivity
2011-11-01  9:55           ` Avi Kivity
2011-11-01 16:16         ` Scott Wood
2011-11-01 16:16           ` Scott Wood
2011-11-02 10:33           ` Avi Kivity
2011-11-02 10:33             ` Avi Kivity
2011-11-10 14:20           ` Alexander Graf
2011-11-10 14:20             ` Alexander Graf
2011-11-10 14:16             ` Avi Kivity
2011-11-10 14:16               ` Avi Kivity
2011-10-31  7:53 ` [PATCH 05/14] KVM: PPC: e500: tlbsx: fix tlb0 esel Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 06/14] KVM: PPC: e500: Don't hardcode PIR=0 Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 13:27   ` Avi Kivity
2011-10-31 13:27     ` Avi Kivity
2011-10-31  7:53 ` [PATCH 07/14] KVM: PPC: Fix build failure with HV KVM and CBE Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 08/14] Revert "KVM: PPC: Add support for explicit HIOR setting" Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 13:30   ` Avi Kivity
2011-10-31 13:30     ` [PATCH 08/14] Revert "KVM: PPC: Add support for explicit HIOR Avi Kivity
2011-10-31 23:49     ` [PATCH 08/14] Revert "KVM: PPC: Add support for explicit HIOR setting" Alexander Graf
2011-10-31 23:49       ` Alexander Graf
2011-10-31  7:53 ` [PATCH 09/14] KVM: PPC: Add generic single register ioctls Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 13:36   ` Avi Kivity
2011-10-31 13:36     ` Avi Kivity
2011-10-31 17:26     ` Jan Kiszka
2011-10-31 17:26       ` Jan Kiszka
2011-11-10 14:22     ` Alexander Graf
2011-11-10 14:22       ` Alexander Graf
2011-11-10 16:05   ` Marcelo Tosatti
2011-11-10 16:05     ` Marcelo Tosatti
2011-11-10 16:49     ` Alexander Graf
2011-11-10 16:49       ` Alexander Graf
2011-11-10 17:35       ` Marcelo Tosatti
2011-11-10 17:35         ` Marcelo Tosatti
2011-11-15 23:45         ` Alexander Graf [this message]
2011-11-15 23:45           ` Alexander Graf
2011-11-23 12:47           ` Marcelo Tosatti
2011-11-23 12:47             ` Marcelo Tosatti
2011-12-19 12:58             ` Alexander Graf
2011-12-19 12:58               ` Alexander Graf
2011-12-19 17:29               ` Marcelo Tosatti
2011-12-19 17:29                 ` Marcelo Tosatti
2011-10-31  7:53 ` [PATCH 10/14] KVM: PPC: Add support for explicit HIOR setting Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 11/14] KVM: PPC: Whitespace fix for kvm.h Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 12/14] KVM: Fix whitespace in kvm_para.h Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31  7:53 ` [PATCH 13/14] KVM: PPC: E500: Support hugetlbfs Alexander Graf
2011-10-31  7:53   ` Alexander Graf
2011-10-31 13:38   ` Avi Kivity
2011-10-31 13:38     ` Avi Kivity
2011-11-10 14:24     ` Alexander Graf
2011-11-10 14:24       ` Alexander Graf
2011-10-31  7:53 ` [PATCH 14/14] PPC: Fix race in mtmsr paravirt implementation Alexander Graf
2011-10-31  7:53   ` Alexander Graf

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=35750AAB-B919-4F7B-B60E-C4ADE9124048@suse.de \
    --to=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.