OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] [PATCH v3] Add virtio SCMI device specification


Hi,

apologies for my slow reply. Please find my answers below.

On 27.03.20 18:19, Alex BennÃe wrote:
> <snip>
>> +
>> +\subsubsection{Shared Memory Operation}
>> +
>> +Various SCMI protocols define statistics shared memory regions (for
>> +statistics and sensor values).
>> +
>> +\devicenormative{\paragraph}{Shared Memory Operation}{Device Types / SCMI Device / Device Operation / Shared Memory Operation}
>> +
>> +If VIRTIO_SCMI_F_SHARED_MEMORY was negotiated, the device MAY implement
>> +an SCMI statistics shared memory region using a virtio shared memory
>> +region.
> 
> AFAICT this is the first usage of shmid in the virtio spec so I have
> some questions. The spec says:

The File System Device, which has been added to the virtio-spec master
at least, also uses shared memory for the DAX Window already.[1]

> 
>   Memory consistency rules vary depending on the region and the device
>   and they will be specified as required by each device.
> 
> So what are the rules for memory consistency for these regions:
> 
>   - are they read-only w.r.t the guest? (maybe this is implicit?)

The Arm SCMI spec[2] (DEN0056B) only lists "statistics" shared memory
(SHM) fields which are read-only to the guest (SCMI agent), although
this is not stated explicitly. I think the virtio spec should not
specify more about this.

>   - how does the guest know when they have been updated?

SCMI provides notification messages for some events. DEN0056B does not
specify any generic SHM update detection mechanism or SHM access
synchronization mechanism, so I would again say the virtio spec
should not specify anything about this.

>   - how goes the guest know it hasn't read a value mid-update?

I would add the following requirements (paraphrased) to the next virtio
SCMI device spec patch:

- All SHM elements MUST be naturally aligned.
- Read and write accesses to scalar elements in the SHM MUST be atomic.

Apart from this, I think DEN0056B imposes no further memory consistency
rules which the virtio SCMI device spec needs to address.

Best regards,

Peter


[1]
https://github.com/oasis-tcs/virtio-spec/blob/0c0dd715152cbbdc1d87e8d193d4c56d2b0bb5fe/virtio-fs.tex#L182
[2]
https://static.docs.arm.com/den0056/b/DEN0056B_System_Control_and_Management_Interface_v2_0.pdf


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]