From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Avi Kivity <avi@redhat.com>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] KVM: PPC: Add SPR emulation exits
Date: Mon, 08 Oct 2012 20:45:55 +0000 [thread overview]
Message-ID: <1349729155.3721.6@snotra> (raw)
In-Reply-To: <40230564-51D2-482B-A316-5C84D0C9DEF4@suse.de> (from agraf@suse.de on Sun Oct 7 08:30:06 2012)
On 10/07/2012 08:30:06 AM, Alexander Graf wrote:
>
> On 07.10.2012, at 15:26, Avi Kivity wrote:
>
> > The downside of this generic approach is that it prepares suprises
> down
> > the road. The alternative approach, of adding a new KVM_EXIT_RESET,
> > avoids this minefield, but requires ABI changes every time we want
> to
> > emulate something in userspace. Can you provide a critique of this
> > alternate approach?
>
> Yeah, it doesn't scale as well. The SPR read/write give us all
> information we need to emulate other registers too, like the magical
> "read this SPR and automatically get the interrupt vector from the
> MPIC and ack the interrupt along the way" register we have on e500.
That's not actually how the register works in hardware (though it may
be a reasonable way to emulate it with a userspace mpic). The
interrupt is acknowledged when the core branches to the interrupt
vector. The register itself is just storage that gets filled when that
happens.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Avi Kivity <avi@redhat.com>, <kvm-ppc@vger.kernel.org>,
<kvm@vger.kernel.org>
Subject: Re: [PATCH 2/3] KVM: PPC: Add SPR emulation exits
Date: Mon, 8 Oct 2012 15:45:55 -0500 [thread overview]
Message-ID: <1349729155.3721.6@snotra> (raw)
In-Reply-To: <40230564-51D2-482B-A316-5C84D0C9DEF4@suse.de> (from agraf@suse.de on Sun Oct 7 08:30:06 2012)
On 10/07/2012 08:30:06 AM, Alexander Graf wrote:
>
> On 07.10.2012, at 15:26, Avi Kivity wrote:
>
> > The downside of this generic approach is that it prepares suprises
> down
> > the road. The alternative approach, of adding a new KVM_EXIT_RESET,
> > avoids this minefield, but requires ABI changes every time we want
> to
> > emulate something in userspace. Can you provide a critique of this
> > alternate approach?
>
> Yeah, it doesn't scale as well. The SPR read/write give us all
> information we need to emulate other registers too, like the magical
> "read this SPR and automatically get the interrupt vector from the
> MPIC and ack the interrupt along the way" register we have on e500.
That's not actually how the register works in hardware (though it may
be a reasonable way to emulate it with a userspace mpic). The
interrupt is acknowledged when the core branches to the interrupt
vector. The register itself is just storage that gets filled when that
happens.
-Scott
next prev parent reply other threads:[~2012-10-08 20:45 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-06 23:41 [PATCH 0/3] KVM: PPC: Enable user space handled SPRs Alexander Graf
2012-10-06 23:41 ` Alexander Graf
2012-10-06 23:41 ` [PATCH 1/3] KVM: PPC: Move mtspr/mfspr emulation into own functions Alexander Graf
2012-10-06 23:41 ` Alexander Graf
2012-10-06 23:41 ` [PATCH 2/3] KVM: PPC: Add SPR emulation exits Alexander Graf
2012-10-06 23:41 ` Alexander Graf
2012-10-07 13:13 ` Avi Kivity
2012-10-07 13:13 ` Avi Kivity
2012-10-07 13:19 ` Alexander Graf
2012-10-07 13:19 ` Alexander Graf
2012-10-07 13:26 ` Avi Kivity
2012-10-07 13:26 ` Avi Kivity
2012-10-07 13:30 ` Alexander Graf
2012-10-07 13:30 ` Alexander Graf
2012-10-07 13:34 ` Avi Kivity
2012-10-07 13:34 ` Avi Kivity
2012-10-07 13:37 ` Alexander Graf
2012-10-07 13:37 ` Alexander Graf
2012-10-08 20:45 ` Scott Wood [this message]
2012-10-08 20:45 ` Scott Wood
2012-10-08 21:01 ` Alexander Graf
2012-10-08 21:01 ` Alexander Graf
2012-10-08 21:07 ` Scott Wood
2012-10-08 21:07 ` Scott Wood
2012-10-07 13:26 ` Alexander Graf
2012-10-07 13:26 ` Alexander Graf
2012-10-07 13:30 ` Avi Kivity
2012-10-07 13:30 ` Avi Kivity
2012-10-07 13:33 ` Alexander Graf
2012-10-07 13:33 ` Alexander Graf
2012-10-06 23:41 ` [PATCH 3/3] KVM: PPC: BookE: Forward DBCR0 to user space Alexander Graf
2012-10-06 23:41 ` 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=1349729155.3721.6@snotra \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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 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.