On 29.11.19 12:15, Janosch Frank wrote: > On 11/29/19 11:43 AM, David Hildenbrand wrote: >> On 29.11.19 10:48, Janosch Frank wrote: >>> SCLP for a protected guest is done over the SIDAD, so we need to use >>> the s390_cpu_virt_mem_* functions to access the SIDAD instead of guest >>> memory when reading/writing SCBs. >> >> ... Can you elaborate a bit more how that is going to be used? Did you >> hack in special memory access to something called "SIDAD" via >> s390_cpu_virt_mem_*? > > For secure guests we can't ever access virtual guest memory, since we > have no access to the guest translation tables. > > Hence we have the satellite block (SIDA) as a bounce buffer. SIE will > bounce referenced blocks of data (like the SCCB) over the SIDA. > > The virt_mem functions go through the KVM mem op API. A KVM patch > reroutes mem op access to the SIDA. The alternative would be to map the > SIDA into vcpu_run. >
I'd prefer *anything* over going via s390_cpu_virt_mem_*, because as you say "For secure guests we can't ever access virtual guest memory". Introduce a new interface or go via vcpu_run. IMHO that's much cleaner. -- Thanks, David / dhildenb