Message ID | 1364308875-26484-5-git-send-email-stefano.stabellini@eu.citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tuesday 26 March 2013, Stefano Stabellini wrote: > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > CC: rob.herring@calxeda.com > CC: will.deacon@arm.com > CC: marc.zyngier@arm.com > CC: arnd@arndb.de I wonder how this is supposed to work on real systems. Shouldn't the dt blob be filled out with the correct number of CPUs at the time you start the guest? This change looks like you just make all guests use a hardcoded set of two CPUs instead of just one, but you probably want to allow any number between 1 and the number of physically present cores. Arnd
On Tue, 26 Mar 2013, Arnd Bergmann wrote: > On Tuesday 26 March 2013, Stefano Stabellini wrote: > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > CC: rob.herring@calxeda.com > > CC: will.deacon@arm.com > > CC: marc.zyngier@arm.com > > CC: arnd@arndb.de > > I wonder how this is supposed to work on real systems. Shouldn't the dt > blob be filled out with the correct number of CPUs at the time you start > the guest? > This change looks like you just make all guests use a hardcoded > set of two CPUs instead of just one, but you probably want to allow any > number between 1 and the number of physically present cores. That's right, the DT passed on to the guests is generated by the hypervisor. This is just an example, adding a cpu and a psci node is just meant to make it clear that Xen supports multi-vcpu guests using PSCI to bootstrap secondary cpus.
diff --git a/arch/arm/boot/dts/xenvm-4.2.dts b/arch/arm/boot/dts/xenvm-4.2.dts index 7a2cf30..66efd22 100644 --- a/arch/arm/boot/dts/xenvm-4.2.dts +++ b/arch/arm/boot/dts/xenvm-4.2.dts @@ -29,6 +29,18 @@ compatible = "arm,cortex-a15"; reg = <0>; }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <1>; + }; + }; + + psci { + compatible = "arm,psci"; + method = "hvc"; + cpu_on = <2>; }; memory@80000000 {
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: rob.herring@calxeda.com CC: will.deacon@arm.com CC: marc.zyngier@arm.com CC: arnd@arndb.de --- arch/arm/boot/dts/xenvm-4.2.dts | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)