[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr
From: |
Shannon Zhao |
Subject: |
Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr |
Date: |
Sat, 30 May 2015 10:30:33 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
- [Qemu-devel] [PATCH] Use Aff1 with mpidr, Pavel Fedin, 2015/05/22
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Shlomo Pongratz, 2015/05/28
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Igor Mammedov, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Pavel Fedin, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Igor Mammedov, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Pavel Fedin, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Igor Mammedov, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Pavel Fedin, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr, Pavel Fedin, 2015/05/29
- Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr,
Shannon Zhao <=