Lines Matching refs:cpu_regs
112 struct acrn_vcpu_regs *cpu_regs; in acrn_dev_ioctl() local
181 cpu_regs = memdup_user((void __user *)ioctl_param, in acrn_dev_ioctl()
183 if (IS_ERR(cpu_regs)) in acrn_dev_ioctl()
184 return PTR_ERR(cpu_regs); in acrn_dev_ioctl()
186 for (i = 0; i < ARRAY_SIZE(cpu_regs->reserved); i++) in acrn_dev_ioctl()
187 if (cpu_regs->reserved[i]) { in acrn_dev_ioctl()
188 kfree(cpu_regs); in acrn_dev_ioctl()
192 for (i = 0; i < ARRAY_SIZE(cpu_regs->vcpu_regs.reserved_32); i++) in acrn_dev_ioctl()
193 if (cpu_regs->vcpu_regs.reserved_32[i]) { in acrn_dev_ioctl()
194 kfree(cpu_regs); in acrn_dev_ioctl()
198 for (i = 0; i < ARRAY_SIZE(cpu_regs->vcpu_regs.reserved_64); i++) in acrn_dev_ioctl()
199 if (cpu_regs->vcpu_regs.reserved_64[i]) { in acrn_dev_ioctl()
200 kfree(cpu_regs); in acrn_dev_ioctl()
204 for (i = 0; i < ARRAY_SIZE(cpu_regs->vcpu_regs.gdt.reserved); i++) in acrn_dev_ioctl()
205 if (cpu_regs->vcpu_regs.gdt.reserved[i] | in acrn_dev_ioctl()
206 cpu_regs->vcpu_regs.idt.reserved[i]) { in acrn_dev_ioctl()
207 kfree(cpu_regs); in acrn_dev_ioctl()
211 ret = hcall_set_vcpu_regs(vm->vmid, virt_to_phys(cpu_regs)); in acrn_dev_ioctl()
216 kfree(cpu_regs); in acrn_dev_ioctl()