From: Thomas Huth <thuth@redhat.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org,
Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs
Date: Tue, 4 Apr 2017 10:00:32 +0200 [thread overview]
Message-ID: <1267dbd0-0507-dc01-0b1c-96c1b2e80429@redhat.com> (raw)
In-Reply-To: <20170404062545.2ajhqhhyeiime5mp@oak.ozlabs.ibm.com>
On 04.04.2017 08:25, Paul Mackerras wrote:
> On Mon, Apr 03, 2017 at 01:23:15PM +0200, Thomas Huth wrote:
>> According to the PowerISA 2.07, mtspr and mfspr should not generate
>> an illegal instruction exception when being used with an undefined SPR,
>> but rather treat the instruction as a NOP, inject a privilege exception
>> or an emulation assistance exception - depending on the SPR number.
>
> The emulation assist interrupt is a hypervisor interrupt, so the guest
> would not be expecting to receive it. On a real machine, the
> hypervisor would synthesize an illegal instruction type program
> interrupt as described in the last programming note in section 6.5.9
> of Book III of Power ISA v2.07B. Since we are the hypervisor here, we
> should synthesize a program interrupt rather than an emulation assist
> interrupt.
Ah, right, we're doing this in other spots, too, so a PROGILL is indeed
more consistent here. I'll send a v2 ...
Thomas
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Huth <thuth@redhat.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org,
Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs
Date: Tue, 04 Apr 2017 08:00:32 +0000 [thread overview]
Message-ID: <1267dbd0-0507-dc01-0b1c-96c1b2e80429@redhat.com> (raw)
In-Reply-To: <20170404062545.2ajhqhhyeiime5mp@oak.ozlabs.ibm.com>
On 04.04.2017 08:25, Paul Mackerras wrote:
> On Mon, Apr 03, 2017 at 01:23:15PM +0200, Thomas Huth wrote:
>> According to the PowerISA 2.07, mtspr and mfspr should not generate
>> an illegal instruction exception when being used with an undefined SPR,
>> but rather treat the instruction as a NOP, inject a privilege exception
>> or an emulation assistance exception - depending on the SPR number.
>
> The emulation assist interrupt is a hypervisor interrupt, so the guest
> would not be expecting to receive it. On a real machine, the
> hypervisor would synthesize an illegal instruction type program
> interrupt as described in the last programming note in section 6.5.9
> of Book III of Power ISA v2.07B. Since we are the hypervisor here, we
> should synthesize a program interrupt rather than an emulation assist
> interrupt.
Ah, right, we're doing this in other spots, too, so a PROGILL is indeed
more consistent here. I'll send a v2 ...
Thomas
next prev parent reply other threads:[~2017-04-04 8:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 11:23 [PATCH] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs Thomas Huth
2017-04-03 11:23 ` Thomas Huth
2017-04-04 6:25 ` Paul Mackerras
2017-04-04 6:25 ` Paul Mackerras
2017-04-04 8:00 ` Thomas Huth [this message]
2017-04-04 8:00 ` Thomas Huth
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=1267dbd0-0507-dc01-0b1c-96c1b2e80429@redhat.com \
--to=thuth@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=paulus@ozlabs.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.