So,ÂwhatÂareÂyouÂproposing?ÂBeingÂmoreÂspecificÂandÂstatingÂthatÂthe
scswÂisÂnotÂnecessarilyÂaÂrealÂscsw,ÂbutÂmerelyÂaÂvehicleÂforÂsendingÂa
command?ÂOrÂkeepingÂitÂasÂitÂisÂnowÂforÂssch,ÂandÂaddingÂaÂsecond
interfaceÂforÂhsch/cschÂ(andÂmaybeÂrsch,Âmsch,Â...)?
IÂsaidÂnoÂradicalÂsurgery,ÂbutÂafterÂthinkingÂmoreÂaboutÂit...
IÂamÂnotÂsure.
Let'sÂexplainÂthis:
I see 2 ways to proceed but my favorite is definitively to introduce versioning.
WayÂ1)
ThisÂwasÂtheÂwayÂIÂfirstÂthoughtÂabout.
WeÂkeepÂtheÂexistingÂIOÂRegionandÂstructures,ÂandÂareÂmore
specificÂbyÂstatingÂthatÂtheÂio_regionÂisÂaÂcommandÂregionÂduringÂwrite
entryÂandÂaÂstatusÂregionÂduringÂinterruptÂhandling:
ThisÂallowÂusÂtoÂuseÂtheÂ3ÂbitsÂofÂtheÂFCTLÂfieldÂofÂtheÂSCSWÂtoÂpass
commandsÂtoÂtheÂkernelÂandÂstayÂbackwardÂcompatible.
TheÂFCTLÂfieldÂhasÂ3ÂbitsÂ=>ÂweÂcanÂhaveÂ8Âcommands.
PRO:ÂsmallÂchange
CONTRA:ÂThisÂisÂstillÂconfusing,ÂweÂdoÂnotÂreallyÂsolveÂthis
ÂÂÂÂÂÂÂÂunclarityÂproblemÂsinceÂQEMUÂviewÂ/ÂdocumentationÂand
ÂÂÂÂÂÂÂÂLinuxÂviewÂ/ÂdocumentationÂdifferÂorÂweÂupdateÂQEMU.
ÂÂÂÂÂÂÂÂMoreoverÂthisÂdoesÂnotÂallowÂforÂlongÂtermÂextensions
ÂÂÂÂÂÂÂÂand/orÂre-design.
WayÂ2)
WeÂuseÂtheÂdeviceÂVFIOÂversioningÂusingÂtheÂcapabilityÂchainÂtoÂadvertise
aÂnewÂinterface.
ThisÂtheÂpreferredÂway,ÂitÂisÂsane,ÂallowsÂforÂtheÂuserlandÂbackward
compatibilityÂandÂallowsÂtoÂhaveÂaÂnewÂcommandÂinterface,Âextensible
forÂfutureÂuse.
InÂthisÂcaseÂweÂcanÂextendÂtheÂinterfaceÂtoÂbeÂanyÂkindÂweÂwant
inÂaÂnextÂversion,ÂpwriteÂwithÂnewÂio_region,ÂmmapÂonÂnew
IOÂregions,ÂstatusÂregion...
PRO:ÂExtensibleÂandÂalsoÂgoesÂinÂtheÂVFIOÂINFOÂextensionÂdirection
ÂÂÂÂÂproposedÂbyÂAlex
CONTRA:ÂIÂseeÂnoneÂouterÂmoreÂworkÂtoÂdoÂ(butÂisÂitÂaÂproblem?)The problem I see is that designing a good interface usually hard.
====================
ExtraÂargumentationÂforÂversioningÂsupport
SupposeÂaÂfutureÂimplementationÂwithÂ4ÂmappedÂregionsÂlike
theÂfollowing:
-ÂAÂStatusÂregionÂ(ROÂupdatedÂasÂresultÂofÂcommandÂandÂIRQ)
-ÂAÂcommandÂregionÂ(WOÂwhereÂtheÂuserÂsendÂitsÂcommands)
ÂÂuserlandÂwriteÂhereÂtoÂtriggerÂIOÂ(quiteÂasÂcurrently)
-ÂAÂCCWÂprogramÂregionÂ(RWÂwhereÂtheÂCCWÂchainÂisÂhandled)
ÂÂmostÂhandlingÂdoneÂfromÂuserspace,ÂlastÂtranslationsÂinÂkernel,
ÂÂdoubleÂbuffering...
-ÂAÂperformanceÂ/ÂmeasurementÂ/ÂstatisticsÂregionÂ(RO)
ÂÂThisÂisÂupdatedÂasynchronouslyÂbyÂhardwareÂand/orÂdriver
ThisÂisÂpurelyÂtheoreticalÂandÂweÂdoÂnotÂneedÂtoÂdoÂallÂatÂonce
butÂifÂweÂwantÂtoÂextendÂtheÂimplementationÂwithoutÂproblems
andÂcontinueÂbackwardÂcompatibilityÂtheÂversioningÂandÂcapability
handlingÂisÂaÂmust.