lkml.org 
[lkml]   [2023]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 01/24] LoongArch: KVM: Implement kvm module related interface
From
Date


在 2023年02月14日 17:58, Greg Kroah-Hartman 写道:
> On Tue, Feb 14, 2023 at 05:00:56PM +0800, Tianrui Zhao wrote:
>>>> +#define KVM_GET_CSRS _IOWR(KVMIO, 0xc5, struct kvm_csrs)
>>>> +#define KVM_SET_CSRS _IOW(KVMIO, 0xc6, struct kvm_csrs)
>>> Why does this arch need new ioctls?
>> We want to use this ioctl to access multiple csrs at one time. If without
>> this, we only access one csr.
> What is wrong with accessing only one csr at a time? Isn't this what
> other architectures do?

Generally, using KVM_GET_ONE_GET ioctl to get one reg, but we want a
more convenient interface to get serial regs at one time, so we add this
ioctl.
And in x86 platform, using KVM_GET_MSRS to access multiple registers. and
our functions reference this.

Thanks,
Tianrui Zhao

>
>> There is another function, can we use the KVM_GET/SET_MSRS to access our
>> csrs?
> I do not know, that's up to the KVM developers to answer.
>
> thanks,
>
> greg k-h

\
 
 \ /
  Last update: 2023-03-27 00:21    [W:0.209 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site