On 20/12/11 15:20, Alexander Graf wrote:
>> +Reads special registers from the vcpu which are not covered by sregs.
>> +
>> +/* s390x */
>> +struct kvm_sregs2 {
>> +    __u64 ckc;      /* clock comparator */
>> +    __u64 cputm;    /* cpu timer */
>> +    __u64 gbea;     /* guest breaking event address */
>> +    __u32 todpr;    /* tod programmable field */
>> +    __u32 prefix;   /* prefix register */
>> +};
> 
> Would it make sense to instead use the GET_ONE_REG and SET_ONE_REG interfaces?
> 
>   http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/80854

Still not sure if I like that interface or not, but it should work.
I have some questions, though

- how should userspace check if the kernel supports this specific register?
- How would a GET_MANY_REGS / SET_MANY_REGS look like?
- Is the interface limited to 56 registers? (see the ID)
- scalability and performance. I dont know about other platforms, but the 
  exit overhead on s390 is in the same order of magnitute as a system call
  overhead, so multiple ioctls on the exit path will make the exit overhead 
  noticably more expensive (probably can be solved by a MANY variant). This
  might be a micro optimization though.
  (actually the only register that bothers me regarding performance right now 
  is prefix. qemu will need the content if it has to write to the prefix page. 
  Would be good to have an interface to get that without doing another system
  call)

Christian

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to