Re: [PATCH 2/3] qemu, pkeys: add pkeys support for qemu xsave state handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 09, 2015 at 07:55:33PM +0800, Huaitong Han wrote:
> This patch adds pkeys support for qemu xsave state handling.
> 
> Signed-off-by: Huaitong Han <huaitong.han@xxxxxxxxx>
[...]
> @@ -1145,6 +1146,7 @@ static int kvm_put_xsave(X86CPU *cpu)
>  #ifdef TARGET_X86_64
>      memcpy(&xsave->region[XSAVE_Hi16_ZMM], &env->xmm_regs[16],
>              16 * sizeof env->xmm_regs[16]);
> +    memcpy(&xsave->region[XSAVE_PKRU], &env->pkru, sizeof env->pkru);
>  #endif
>      r = kvm_vcpu_ioctl(CPU(cpu), KVM_SET_XSAVE, xsave);
>      return r;
> @@ -1516,6 +1518,7 @@ static int kvm_get_xsave(X86CPU *cpu)
>  #ifdef TARGET_X86_64
>      memcpy(&env->xmm_regs[16], &xsave->region[XSAVE_Hi16_ZMM],
>             16 * sizeof env->xmm_regs[16]);
> +    memcpy(&xsave->region[XSAVE_PKRU], &env->pkru, sizeof env->pkru);

Did you mean:
  memcpy(&env->pkru, &xsave->region[XSAVE_PKRU], sizeof env->pkru)

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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux