Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-02 Thread Igor Mammedov
On Tue, 2 Jun 2015 16:42:31 +0100 Peter Maydell wrote: > On 2 June 2015 at 16:32, Igor Mammedov wrote: > > On Fri, 29 May 2015 16:41:01 +0300 > > Pavel Fedin wrote: > > > >> Hello! > >> > >> > Well KVM side should be fixed instead of driving us along wrong route. > >> > >> It can be fixed...

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-02 Thread Igor Mammedov
On Sun, 31 May 2015 11:03:53 + Shlomo Pongratz wrote: > Hi, > > See below. > > > -Original Message- > > From: Pavel Fedin [mailto:p.fe...@samsung.com] > > Sent: Friday, 29 May, 2015 9:45 AM > > To: Shlomo Pongratz; qemu-devel@nongnu.org > > Cc: peter.mayd...@linaro.org; 'Ashok Kumar

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-02 Thread Peter Maydell
On 2 June 2015 at 16:32, Igor Mammedov wrote: > On Fri, 29 May 2015 16:41:01 +0300 > Pavel Fedin wrote: > >> Hello! >> >> > Well KVM side should be fixed instead of driving us along wrong route. >> >> It can be fixed... Perhaps... If kernel developers acknowledge this is a >> problem, which >>

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-02 Thread Igor Mammedov
On Fri, 29 May 2015 16:41:01 +0300 Pavel Fedin wrote: > Hello! > > > Well KVM side should be fixed instead of driving us along wrong route. > > It can be fixed... Perhaps... If kernel developers acknowledge this is a > problem, which > might not happen. > But still we will have older kernel

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-01 Thread Pavel Fedin
Hi! > You mean that I put your patch https://lists.gnu.org/archive/html/qemu-devel/201505/msg04495.html Yes. You can of course further modify it, like changing #define to a variable which can be set from outside. > The first patch of my V3 patch series, with the sole exception of fixing the

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-01 Thread Shlomo Pongratz
Hi > -Original Message- > From: Pavel Fedin [mailto:p.fe...@samsung.com] > Sent: Monday, 01 June, 2015 12:04 PM > To: Shlomo Pongratz; qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; 'Ashok Kumar' > Subject: RE: [Qemu-devel] [PATCH] Use Aff1 with mp

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-06-01 Thread Pavel Fedin
Hi again! > I intend to release the V3 version during this week. One more note. I remember that i suggested to merge ITS_CONTROL and ITS_TRANSLATION into one region in virt memory map. I was wrong, don't do this and leave them as they are. There is in-kernel ITS implementation suggested on AR

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-31 Thread Pavel Fedin
Hi! > I think we should take Igor's comment into account. The CPUS_PER_CLUSTER > should not be a > constant, and maybe should be initialized in arm_cpu_initfn and aarch64_{a53|a57}_initfn, as > psci need to know it. Yes, of course. Just replace a #define with something like: int cpus_per_clu

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-31 Thread Shlomo Pongratz
Hi, See below. > -Original Message- > From: Pavel Fedin [mailto:p.fe...@samsung.com] > Sent: Friday, 29 May, 2015 9:45 AM > To: Shlomo Pongratz; qemu-devel@nongnu.org > Cc: peter.mayd...@linaro.org; 'Ashok Kumar' > Subject: RE: [PATCH] Use Aff1 with mpidr > > Hi! > > > I see that you a

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Shannon Zhao
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. >

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Pavel Fedin
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 could modify the kernel so that PSCI

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Pavel Fedin
Hello! > Well KVM side should be fixed instead of driving us along wrong route. It can be fixed... Perhaps... If kernel developers acknowledge this is a problem, which might not happen. But still we will have older kernels, and what? Don't you want 64-bit ARM KVM work on them? Kind regards,

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Igor Mammedov
On Fri, 29 May 2015 15:26:57 +0300 Pavel Fedin wrote: > Hello! > > > That's what I see as correct way to go > > and along the way teach KVM to not derive mpidr encoding from vcpuid > > and use QEMU provided mpidr value, that way mpidr would be consistent. > > Yes, and this would make modellin

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Pavel Fedin
Hello! > That's what I see as correct way to go > and along the way teach KVM to not derive mpidr encoding from vcpuid > and use QEMU provided mpidr value, that way mpidr would be consistent. Yes, and this would make modelling of real hardware working much better. However, unfortunately, i hav

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Igor Mammedov
On Fri, 29 May 2015 11:53:38 +0300 Pavel Fedin wrote: > Hello! > > > > +/* > > > + * When KVM is in use, psci is emulated in-kernel and not by qemu. > > > + * In order for it to work correctly we should use correct MPIDR > > > values, > > > + * which appear to be inherited from

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Pavel Fedin
Hello! > > +/* > > + * When KVM is in use, psci is emulated in-kernel and not by qemu. > > + * In order for it to work correctly we should use correct MPIDR > > values, > > + * which appear to be inherited from the host. > why it must be inherited from host? > Could you point out

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-29 Thread Igor Mammedov
On Fri, 22 May 2015 13:32:54 +0300 Pavel Fedin wrote: > This is an improved and KVM-aware alternative to > https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00942.html. Changes > are: > 1. MPIDR value (minus feature bits) is now directly stored in CPU instance. > 2. Default assignment is

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-28 Thread Pavel Fedin
Hi! > I see that you added mpidr to ARMCpu and initialized it in virt.c then you > use it in mpidr_read. > Thus you must fix all other virtual machines in hw/arm not just virt.c as it > is not initialized for > them. The only change in virt.c is: --- cut --- diff --git a/hw/arm/virt.c b/hw/ar

Re: [Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-28 Thread Shlomo Pongratz
Hi, I see that you added mpidr to ARMCpu and initialized it in virt.c then you use it in mpidr_read. Thus you must fix all other virtual machines in hw/arm not just virt.c as it is not initialized for them. I have no other comments. Best regards, S.P. > -Original Message- > From: Pa

[Qemu-devel] [PATCH] Use Aff1 with mpidr

2015-05-22 Thread Pavel Fedin
This is an improved and KVM-aware alternative to https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00942.html. Changes are: 1. MPIDR value (minus feature bits) is now directly stored in CPU instance. 2. Default assignment is based on original rule (8 CPUs per cluster). 3. If KVM is used, M