mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
Fix: write xmm registers correctly
The movdqu instruction moves unaligned double quadword (128 bit) contained in XMM registers. This patch uses pointers as input parameters of the function write_xmm_0_2() to get 128-bit value from 64-bit array for each XMM register. Tracked-On: #7380 Reviewed-by: Fei Li <fei1.li@intel.com> Signed-off-by: Jiang, Yanting <yanting.jiang@intel.com>
This commit is contained in:
committed by
acrnsi-robot
parent
1540d3479f
commit
599894e571
6
hypervisor/arch/x86/guest/vcpu.c
Normal file → Executable file
6
hypervisor/arch/x86/guest/vcpu.c
Normal file → Executable file
@@ -226,10 +226,10 @@ void load_iwkey(struct acrn_vcpu *vcpu)
|
||||
(get_cpu_var(whose_iwkey) != vcpu)) {
|
||||
/* Save/restore xmm0/xmm1/xmm2 during the process */
|
||||
read_xmm_0_2(&xmm_save[0], &xmm_save[2], &xmm_save[4]);
|
||||
write_xmm_0_2(vcpu->arch.IWKey.integrity_key[0], vcpu->arch.IWKey.encryption_key[0],
|
||||
vcpu->arch.IWKey.encryption_key[2]);
|
||||
write_xmm_0_2(&vcpu->arch.IWKey.integrity_key[0], &vcpu->arch.IWKey.encryption_key[0],
|
||||
&vcpu->arch.IWKey.encryption_key[2]);
|
||||
asm_loadiwkey(0);
|
||||
write_xmm_0_2(xmm_save[0], xmm_save[2], xmm_save[4]);
|
||||
write_xmm_0_2(&xmm_save[0], &xmm_save[2], &xmm_save[4]);
|
||||
get_cpu_var(whose_iwkey) = vcpu;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user