mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
LoongArch: KVM: Disable updating of "num_cpu" and "feature"
Property "num_cpu" and "feature" are read-only once eiointc is created,
which are set with KVM_DEV_LOONGARCH_EXTIOI_GRP_CTRL attr group before
device creation.
Attr group KVM_DEV_LOONGARCH_EXTIOI_GRP_SW_STATUS is to update register
and software state for migration and reset usage, property "num_cpu" and
"feature" can not be update again if it is created already.
Here discard write operation with property "num_cpu" and "feature" in
attr group KVM_DEV_LOONGARCH_EXTIOI_GRP_CTRL.
Cc: stable@vger.kernel.org
Fixes: 1ad7efa552
("LoongArch: KVM: Add EIOINTC user mode read and write functions")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
cc8d5b209e
commit
955853cf83
1 changed files with 6 additions and 0 deletions
|
@ -926,9 +926,15 @@ static int kvm_eiointc_sw_status_access(struct kvm_device *dev,
|
|||
data = (void __user *)attr->addr;
|
||||
switch (addr) {
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_NUM_CPU:
|
||||
if (is_write)
|
||||
return ret;
|
||||
|
||||
p = &s->num_cpu;
|
||||
break;
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_FEATURE:
|
||||
if (is_write)
|
||||
return ret;
|
||||
|
||||
p = &s->features;
|
||||
break;
|
||||
case KVM_DEV_LOONGARCH_EXTIOI_SW_STATUS_STATE:
|
||||
|
|
Loading…
Add table
Reference in a new issue