aboutsummaryrefslogtreecommitdiff
path: root/target/i386/hvf/hvf.c
diff options
context:
space:
mode:
authorDavid Edmondson <david.edmondson@oracle.com>2021-07-05 11:46:28 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-07-06 07:54:53 +0200
commitc0198c5f87b6db25712672292e01ab710d6ef631 (patch)
tree02d5f74c30df3fc21fd78d3a75875f7c99992305 /target/i386/hvf/hvf.c
parentfde74821006472f40fee9a094e6da86cd39b5623 (diff)
downloadqemu-c0198c5f87b6db25712672292e01ab710d6ef631.zip
qemu-c0198c5f87b6db25712672292e01ab710d6ef631.tar.gz
qemu-c0198c5f87b6db25712672292e01ab710d6ef631.tar.bz2
target/i386: Pass buffer and length to XSAVE helper
In preparation for removing assumptions about XSAVE area offsets, pass a buffer pointer and buffer length to the XSAVE helper functions. Signed-off-by: David Edmondson <david.edmondson@oracle.com> Message-Id: <20210705104632.2902400-5-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hvf/hvf.c')
-rw-r--r--target/i386/hvf/hvf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 346dbcc..e62e8df 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -267,7 +267,8 @@ int hvf_arch_init_vcpu(CPUState *cpu)
wvmcs(cpu->hvf->fd, VMCS_TPR_THRESHOLD, 0);
x86cpu = X86_CPU(cpu);
- x86cpu->env.xsave_buf = qemu_memalign(4096, 4096);
+ x86cpu->env.xsave_buf_len = 4096;
+ x86cpu->env.xsave_buf = qemu_memalign(4096, x86cpu->env.xsave_buf_len);
hv_vcpu_enable_native_msr(cpu->hvf->fd, MSR_STAR, 1);
hv_vcpu_enable_native_msr(cpu->hvf->fd, MSR_LSTAR, 1);