On Thu, Jun 11, 2020 at 06:12:23PM +0100, Will Deacon wrote: > On Thu, Jun 11, 2020 at 03:46:35PM +0000, Achin Gupta wrote: > > > On 10 Jun 2020, at 08:43, Will Deacon <will@xxxxxxxxxx> wrote: > > > On Tue, Jun 09, 2020 at 04:35:51PM -0600, Rob Herring wrote: > > >> On Mon, Jun 01, 2020 at 10:45:10AM +0100, Sudeep Holla wrote: > > >>> Add devicetree bindings for a Arm PSA FF-A compliant non-secure partition > > >>> at virtual interface(VMs). > > >>> > > >>> Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx> > > >>> --- > > >>> .../devicetree/bindings/arm/arm,psa-ffa.txt | 47 +++++++++++++++++++ > > >>> 1 file changed, 47 insertions(+) > > >>> create mode 100644 Documentation/devicetree/bindings/arm/arm,psa-ffa.txt > > >> > > >> I'm hoping this goes away if the firmware is discoverable, but if not DT > > >> bindings are DT schema now. > > > > > > We'll need the binding for the kvm host side, because there are plenty > > > of partition properties that are not discoverable (e.g. number of vCPUs). > > > > Just trying to understand the req. a bit better… > > > > The FF-A driver in the host can use FFA_PARTITION_INFO_GET to determine > > the count of partitions and their vCPUs. > > > > Is this about a guest being able to find out how many vCPUs it has? > > This is about KVM finding out the information it needs in order to spawn > non-secure partitions. I don't see how it can do that with > FFA_PARTITION_INFO_GET -- who would respond? Right! FFA_PARTITION_INFO_GET is meant to help the FF-A driver in the kernel to determine partition properties. It assumes that EL2 SW has already read each partition's manifest and will reply to this ABI. IIUC, with protected KVM, this information will have to be a part of the manifest that the KVM host consumes. But then, can this be made discoverable (use a SMC for discovery) at all as Rob had originally suggested. Firmware (Secure world) has no clue and the bootloader is long gone. Separate topic, protected KVM does not get dibs on the manifest and it relies on the KVM host to specify the address ranges for each partition? Does this not mean that the KVM host can control the physical address space each partition sees. This seems contrary to the isolation guarantees that protected KVM must provide? > > But you're right that number of vCPUs was a bad example. We also need > information such as the entry point. Yes. From a spec perspective this should be specified in the partition manifest unless the base address of the loaded image can be assummed to be the entry point. cheers, Achin > > Will