From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Pavel Fedin <p.fedin@samsung.com>, 'Igor Mammedov' <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
'Ashok Kumar' <ashoks@broadcom.com>,
'Shlomo Pongratz' <shlomo.pongratz@huawei.com>
Subject: Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr
Date: Sat, 30 May 2015 10:30:33 +0800 [thread overview]
Message-ID: <556920C9.4040703@huawei.com> (raw)
In-Reply-To: <024b01d09a36$1ba8c060$52fa4120$@samsung.com>
On 2015/5/30 1:37, Pavel Fedin wrote:
> Hi!
>
>> Well KVM side should be fixed instead of driving us along wrong route.
>
> I have studied the question a bit more, and i discovered that MPIDR access on ARM is not
> trapped by KVM. And guest would always get the same value as host would. Theoretically you
Yes, it doesn't trap but there is one register "vmpidr_el2" which is
used for virtualization. When guest reads mpidr, it will get the value
of vmpidr_el2. And when context switching, hyp will restore the value of
vmpidr_el2 and the value is got from MPIDR_EL1 which is set by
reset_mpidr().
hyp.s:
.macro restore_sysregs // x2: base address for cpu context
// x3: tmp register
add x3, x2, #CPU_SYSREG_OFFSET(MPIDR_EL1)
----cut----
msr vmpidr_el2, x4
----cut----
.endm
--
Shannon
prev parent reply other threads:[~2015-05-30 2:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 10:32 [Qemu-devel] [PATCH] Use Aff1 with mpidr Pavel Fedin
2015-05-28 14:57 ` Shlomo Pongratz
2015-05-29 6:45 ` Pavel Fedin
2015-05-31 11:03 ` Shlomo Pongratz
2015-06-01 6:34 ` Pavel Fedin
2015-06-01 9:03 ` Pavel Fedin
2015-06-01 14:26 ` Shlomo Pongratz
2015-06-02 6:29 ` Pavel Fedin
2015-06-02 15:37 ` Igor Mammedov
2015-05-29 8:36 ` Igor Mammedov
2015-05-29 8:53 ` Pavel Fedin
2015-05-29 9:18 ` Igor Mammedov
2015-05-29 12:26 ` Pavel Fedin
2015-05-29 13:03 ` Igor Mammedov
2015-05-29 13:41 ` Pavel Fedin
2015-06-02 15:32 ` Igor Mammedov
2015-06-02 15:42 ` Peter Maydell
2015-06-02 15:54 ` Igor Mammedov
2015-05-29 17:37 ` Pavel Fedin
2015-05-30 2:30 ` Shannon Zhao [this message]
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=556920C9.4040703@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=ashoks@broadcom.com \
--cc=imammedo@redhat.com \
--cc=p.fedin@samsung.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shlomo.pongratz@huawei.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.