From: Paul Mackerras <paulus@ozlabs.org>
To: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, agraf@suse.com
Subject: Re: [PATCH RFC] powerpc: Implements MMIO emulation for lvx/stvx instructions
Date: Wed, 30 Aug 2017 19:45:17 +1000 [thread overview]
Message-ID: <20170830094517.GA12592@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1504045082-16178-1-git-send-email-joserz@linux.vnet.ibm.com>
On Tue, Aug 29, 2017 at 07:18:01PM -0300, Jose Ricardo Ziviani wrote:
> Hello!
>
> This patch implements MMIO emulation for two instructions: lvx and stvx. I started to implement other instructions but I'd like to have this reviewed beforehand because this is my first patch here and I'll certainly have some rework/fixes :-).
>
> Note: stvx is only storing 8 bytes, for some reason the code "vcpu->arch.paddr_accessed += run->mmio.len;", which adds the 8-byte offset after the first write is not making any difference (interesting that it works for load operations). I'm still investigating it but any idea about it will be appreciated.
The run structure is mmapped by userspace (i.e. QEMU) and can be
written by userspace between the first and the second exits to
userspace (you have to do two exits to userspace because you can only
transfer 8 bytes on each exit). It's possible that userspace might be
clearing run->mmio.len. In general it's better not to rely on
anything in *run (except of course the mmio_data for a MMIO read) when
we come in from userspace to the kernel.
Paul.
next prev parent reply other threads:[~2017-08-30 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 22:18 [PATCH RFC] powerpc: Implements MMIO emulation for lvx/stvx instructions Jose Ricardo Ziviani
2017-08-29 22:18 ` [PATCH RFC] KVM: PPC: Book3S: Add MMIO emulation for VMX instructions Jose Ricardo Ziviani
2017-09-01 10:38 ` Paul Mackerras
2017-08-30 9:45 ` Paul Mackerras [this message]
2017-08-30 23:53 ` [PATCH RFC] powerpc: Implements MMIO emulation for lvx/stvx instructions joserz
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=20170830094517.GA12592@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=agraf@suse.com \
--cc=joserz@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.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 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).