From: "Jan Beulich" Subject: [PATCH 2/4] x86: fix XCR0 handling Date: Tue, 04 Jun 2013 09:07:29 +0100 Message-ID: <51ADBC6202000078000DAEBA@nat28.tlf.novell.com> References: <51ADBA6102000078000DAEAA@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part65559451.3__=" Return-path: In-Reply-To: <51ADBA6102000078000DAEAA@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser , suravee.suthikulpanit@amd.com, George Dunlap , Eddie Dong , Jun Nakajima , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part65559451.3__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline - both VMX and SVM ignored the ECX input to XSETBV - both SVM and VMX used the full 64-bit RAX when calculating the input mask to XSETBV - faults on XSETBV did not get recovered from Also consolidate the handling for PV and HVM into a single function, and make the per-CPU variable "xcr0" static to xstate.c. Signed-off-by: Jan Beulich --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1347,8 +1347,9 @@ static void __context_switch(void) if ( !is_idle_vcpu(n) ) { memcpy(stack_regs, &n->arch.user_regs, CTXT_SWITCH_STACK_BYTES); - if ( xsave_enabled(n) && n->arch.xcr0 !=3D get_xcr0() ) - set_xcr0(n->arch.xcr0); + if ( xsave_enabled(n) && n->arch.xcr0 !=3D get_xcr0() && + !set_xcr0(n->arch.xcr0) ) + BUG(); vcpu_restore_fpu_eager(n); n->arch.ctxt_switch_to(n); } --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1502,25 +1502,17 @@ out: return rc; } =20 -int hvm_handle_xsetbv(u64 new_bv) +int hvm_handle_xsetbv(u32 index, u64 new_bv) { - struct vcpu *v =3D current; struct segment_register sreg; =20 - hvm_get_segment_register(v, x86_seg_ss, &sreg); + hvm_get_segment_register(current, x86_seg_ss, &sreg); if ( sreg.attr.fields.dpl !=3D 0 ) goto err; =20 - if ( ((new_bv ^ xfeature_mask) & ~xfeature_mask) || !(new_bv & 1) ) - goto err; - - if ( (xfeature_mask & XSTATE_YMM & new_bv) && !(new_bv & XSTATE_SSE) = ) + if ( handle_xsetbv(index, new_bv) ) goto err; =20 - v->arch.xcr0 =3D new_bv; - v->arch.xcr0_accum |=3D new_bv; - set_xcr0(new_bv); - return 0; err: hvm_inject_hw_exception(TRAP_gp_fault, 0); --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2367,7 +2367,8 @@ void svm_vmexit_handler(struct cpu_user_ case VMEXIT_XSETBV: if ( (inst_len =3D __get_instruction_length(current, INSTR_XSETBV)= )=3D=3D0 ) break; - if ( hvm_handle_xsetbv((((u64)regs->edx) << 32) | regs->eax) = =3D=3D 0 ) + if ( hvm_handle_xsetbv(regs->ecx, + (regs->rdx << 32) | regs->_eax) =3D=3D 0 ) __update_guest_eip(regs, inst_len); break; =20 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2827,12 +2827,10 @@ void vmx_vmexit_handler(struct cpu_user_ break; =20 case EXIT_REASON_XSETBV: - { - u64 new_bv =3D (((u64)regs->edx) << 32) | regs->eax; - if ( hvm_handle_xsetbv(new_bv) =3D=3D 0 ) + if ( hvm_handle_xsetbv(regs->ecx, + (regs->rdx << 32) | regs->_eax) =3D=3D 0 ) update_guest_eip(); /* Safe: XSETBV */ break; - } =20 case EXIT_REASON_APIC_WRITE: if ( vmx_handle_apic_write() ) --- a/xen/arch/x86/i387.c +++ b/xen/arch/x86/i387.c @@ -36,13 +36,17 @@ static void fpu_init(void) /* Restore x87 extended state */ static inline void fpu_xrstor(struct vcpu *v, uint64_t mask) { + bool_t ok; + /* * XCR0 normally represents what guest OS set. In case of Xen = itself,=20 * we set all supported feature mask before doing save/restore. */ - set_xcr0(v->arch.xcr0_accum); + ok =3D set_xcr0(v->arch.xcr0_accum); + ASSERT(ok); xrstor(v, mask); - set_xcr0(v->arch.xcr0); + ok =3D set_xcr0(v->arch.xcr0); + ASSERT(ok); } =20 /* Restor x87 FPU, MMX, SSE and SSE2 state */ @@ -118,12 +122,16 @@ static inline void fpu_frstor(struct vcp /* Save x87 extended state */ static inline void fpu_xsave(struct vcpu *v) { + bool_t ok; + /* XCR0 normally represents what guest OS set. In case of Xen itself, * we set all accumulated feature mask before doing save/restore. */ - set_xcr0(v->arch.xcr0_accum); + ok =3D set_xcr0(v->arch.xcr0_accum); + ASSERT(ok); xsave(v, v->arch.nonlazy_xstate_used ? XSTATE_ALL : XSTATE_LAZY); - set_xcr0(v->arch.xcr0); =20 + ok =3D set_xcr0(v->arch.xcr0); + ASSERT(ok); } =20 /* Save x87 FPU, MMX, SSE and SSE2 state */ --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -2198,25 +2198,9 @@ static int emulate_privileged_op(struct=20 if ( !guest_kernel_mode(v, regs) ) goto fail; =20 - switch ( (u32)regs->ecx ) - { - case XCR_XFEATURE_ENABLED_MASK: - /* bit 0 of XCR0 must be set and reserved bit must = not be set */ - if ( !(new_xfeature & XSTATE_FP) || (new_xfeature & = ~xfeature_mask) ) - goto fail; - - /* YMM state takes SSE state as prerequisite. */ - if ( (xfeature_mask & new_xfeature & XSTATE_YMM) && - !(new_xfeature & XSTATE_SSE) ) - goto fail; - - v->arch.xcr0 =3D new_xfeature; - v->arch.xcr0_accum |=3D new_xfeature; - set_xcr0(new_xfeature); - break; - default: - goto fail; - } + if ( handle_xsetbv(regs->ecx, new_xfeature) ) + goto fail; + break; } default: --- a/xen/arch/x86/xstate.c +++ b/xen/arch/x86/xstate.c @@ -5,7 +5,7 @@ * */ =20 -#include +#include #include #include #include @@ -27,24 +27,34 @@ u32 xsave_cntxt_size; u64 xfeature_mask; =20 /* Cached xcr0 for fast read */ -DEFINE_PER_CPU(uint64_t, xcr0); +static DEFINE_PER_CPU(uint64_t, xcr0); =20 /* Because XCR0 is cached for each CPU, xsetbv() is not exposed. Users = should=20 * use set_xcr0() instead. */ -static inline void xsetbv(u32 index, u64 xfeatures) +static inline bool_t xsetbv(u32 index, u64 xfeatures) { u32 hi =3D xfeatures >> 32; u32 lo =3D (u32)xfeatures; =20 - asm volatile (".byte 0x0f,0x01,0xd1" :: "c" (index), - "a" (lo), "d" (hi)); + asm volatile ( "1: .byte 0x0f,0x01,0xd1\n" + "3: \n" + ".section .fixup,\"ax\" \n" + "2: xor %0,%0 \n" + " jmp 3b \n" + ".previous \n" + _ASM_EXTABLE(1b, 2b) + : "+a" (lo) + : "c" (index), "d" (hi)); + return lo !=3D 0; } =20 -void set_xcr0(u64 xfeatures) +bool_t set_xcr0(u64 xfeatures) { + if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures) ) + return 0; this_cpu(xcr0) =3D xfeatures; - xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures); + return 1; } =20 uint64_t get_xcr0(void) @@ -236,7 +246,8 @@ void xstate_init(void) * Set CR4_OSXSAVE and run "cpuid" to get xsave_cntxt_size. */ set_in_cr4(X86_CR4_OSXSAVE); - set_xcr0((((u64)edx << 32) | eax) & XCNTXT_MASK); + if ( !set_xcr0((((u64)edx << 32) | eax) & XCNTXT_MASK) ) + BUG(); cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx); =20 if ( cpu =3D=3D 0 ) @@ -262,6 +273,28 @@ void xstate_init(void) } } =20 +int handle_xsetbv(u32 index, u64 new_bv) +{ + struct vcpu *curr =3D current; + + if ( index !=3D XCR_XFEATURE_ENABLED_MASK ) + return -EOPNOTSUPP; + + if ( (new_bv & ~xfeature_mask) || !(new_bv & XSTATE_FP) ) + return -EINVAL; + + if ( (new_bv & XSTATE_YMM) && !(new_bv & XSTATE_SSE) ) + return -EINVAL; + + if ( !set_xcr0(new_bv) ) + return -EFAULT; + + curr->arch.xcr0 =3D new_bv; + curr->arch.xcr0_accum |=3D new_bv; + + return 0; +} + /* * Local variables: * mode: C --- a/xen/include/asm-x86/hvm/support.h +++ b/xen/include/asm-x86/hvm/support.h @@ -128,7 +128,7 @@ void hvm_triple_fault(void); =20 void hvm_rdtsc_intercept(struct cpu_user_regs *regs); =20 -int hvm_handle_xsetbv(u64 new_bv); +int __must_check hvm_handle_xsetbv(u32 index, u64 new_bv); =20 /* These functions all return X86EMUL return codes. */ int hvm_set_efer(uint64_t value); --- a/xen/include/asm-x86/xstate.h +++ b/xen/include/asm-x86/xstate.h @@ -9,7 +9,6 @@ #define __ASM_XSTATE_H =20 #include -#include =20 #define FCW_DEFAULT 0x037f #define MXCSR_DEFAULT 0x1f80 @@ -34,9 +33,6 @@ #define XSTATE_NONLAZY (XSTATE_LWP) #define XSTATE_LAZY (XSTATE_ALL & ~XSTATE_NONLAZY) =20 -/* extended state variables */ -DECLARE_PER_CPU(uint64_t, xcr0); - extern unsigned int xsave_cntxt_size; extern u64 xfeature_mask; =20 @@ -75,11 +71,12 @@ struct xsave_struct } __attribute__ ((packed, aligned (64))); =20 /* extended state operations */ -void set_xcr0(u64 xfeatures); +bool_t __must_check set_xcr0(u64 xfeatures); uint64_t get_xcr0(void); void xsave(struct vcpu *v, uint64_t mask); void xrstor(struct vcpu *v, uint64_t mask); bool_t xsave_enabled(const struct vcpu *v); +int __must_check handle_xsetbv(u32 index, u64 new_bv); =20 /* extended state init and cleanup functions */ void xstate_free_save_area(struct vcpu *v); --=__Part65559451.3__= Content-Type: text/plain; name="x86-xcr0-handling.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-xcr0-handling.patch" x86: fix XCR0 handling=0A=0A- both VMX and SVM ignored the ECX input to = XSETBV=0A- both SVM and VMX used the full 64-bit RAX when calculating the = input=0A mask to XSETBV=0A- faults on XSETBV did not get recovered = from=0A=0AAlso consolidate the handling for PV and HVM into a single = function,=0Aand make the per-CPU variable "xcr0" static to xstate.c.=0A=0AS= igned-off-by: Jan Beulich =0A=0A--- a/xen/arch/x86/domai= n.c=0A+++ b/xen/arch/x86/domain.c=0A@@ -1347,8 +1347,9 @@ static void = __context_switch(void)=0A if ( !is_idle_vcpu(n) )=0A {=0A = memcpy(stack_regs, &n->arch.user_regs, CTXT_SWITCH_STACK_BYTES);=0A- = if ( xsave_enabled(n) && n->arch.xcr0 !=3D get_xcr0() )=0A- = set_xcr0(n->arch.xcr0);=0A+ if ( xsave_enabled(n) && n->arch.xcr0 = !=3D get_xcr0() &&=0A+ !set_xcr0(n->arch.xcr0) )=0A+ = BUG();=0A vcpu_restore_fpu_eager(n);=0A n->arch.ctxt_switc= h_to(n);=0A }=0A--- a/xen/arch/x86/hvm/hvm.c=0A+++ b/xen/arch/x86/hvm/h= vm.c=0A@@ -1502,25 +1502,17 @@ out:=0A return rc;=0A }=0A =0A-int = hvm_handle_xsetbv(u64 new_bv)=0A+int hvm_handle_xsetbv(u32 index, u64 = new_bv)=0A {=0A- struct vcpu *v =3D current;=0A struct segment_regis= ter sreg;=0A =0A- hvm_get_segment_register(v, x86_seg_ss, &sreg);=0A+ = hvm_get_segment_register(current, x86_seg_ss, &sreg);=0A if ( = sreg.attr.fields.dpl !=3D 0 )=0A goto err;=0A =0A- if ( = ((new_bv ^ xfeature_mask) & ~xfeature_mask) || !(new_bv & 1) )=0A- = goto err;=0A-=0A- if ( (xfeature_mask & XSTATE_YMM & new_bv) && = !(new_bv & XSTATE_SSE) )=0A+ if ( handle_xsetbv(index, new_bv) )=0A = goto err;=0A =0A- v->arch.xcr0 =3D new_bv;=0A- v->arch.xcr0_accum= |=3D new_bv;=0A- set_xcr0(new_bv);=0A-=0A return 0;=0A err:=0A = hvm_inject_hw_exception(TRAP_gp_fault, 0);=0A--- a/xen/arch/x86/hvm/svm/svm= .c=0A+++ b/xen/arch/x86/hvm/svm/svm.c=0A@@ -2367,7 +2367,8 @@ void = svm_vmexit_handler(struct cpu_user_=0A case VMEXIT_XSETBV:=0A = if ( (inst_len =3D __get_instruction_length(current, INSTR_XSETBV))=3D=3D0 = )=0A break;=0A- if ( hvm_handle_xsetbv((((u64)regs->edx)= << 32) | regs->eax) =3D=3D 0 )=0A+ if ( hvm_handle_xsetbv(regs->ecx= ,=0A+ (regs->rdx << 32) | regs->_eax) =3D=3D = 0 )=0A __update_guest_eip(regs, inst_len);=0A = break;=0A =0A--- a/xen/arch/x86/hvm/vmx/vmx.c=0A+++ b/xen/arch/x86/hvm/vmx/= vmx.c=0A@@ -2827,12 +2827,10 @@ void vmx_vmexit_handler(struct cpu_user_=0A= break;=0A =0A case EXIT_REASON_XSETBV:=0A- {=0A- = u64 new_bv =3D (((u64)regs->edx) << 32) | regs->eax;=0A- if ( = hvm_handle_xsetbv(new_bv) =3D=3D 0 )=0A+ if ( hvm_handle_xsetbv(regs= ->ecx,=0A+ (regs->rdx << 32) | regs->_eax) = =3D=3D 0 )=0A update_guest_eip(); /* Safe: XSETBV */=0A = break;=0A- }=0A =0A case EXIT_REASON_APIC_WRITE:=0A if ( = vmx_handle_apic_write() )=0A--- a/xen/arch/x86/i387.c=0A+++ b/xen/arch/x86/= i387.c=0A@@ -36,13 +36,17 @@ static void fpu_init(void)=0A /* Restore x87 = extended state */=0A static inline void fpu_xrstor(struct vcpu *v, = uint64_t mask)=0A {=0A+ bool_t ok;=0A+=0A /*=0A * XCR0 = normally represents what guest OS set. In case of Xen itself, =0A * = we set all supported feature mask before doing save/restore.=0A = */=0A- set_xcr0(v->arch.xcr0_accum);=0A+ ok =3D set_xcr0(v->arch.xcr0= _accum);=0A+ ASSERT(ok);=0A xrstor(v, mask);=0A- set_xcr0(v->arch= .xcr0);=0A+ ok =3D set_xcr0(v->arch.xcr0);=0A+ ASSERT(ok);=0A }=0A = =0A /* Restor x87 FPU, MMX, SSE and SSE2 state */=0A@@ -118,12 +122,16 @@ = static inline void fpu_frstor(struct vcp=0A /* Save x87 extended state = */=0A static inline void fpu_xsave(struct vcpu *v)=0A {=0A+ bool_t = ok;=0A+=0A /* XCR0 normally represents what guest OS set. In case of = Xen itself,=0A * we set all accumulated feature mask before doing = save/restore.=0A */=0A- set_xcr0(v->arch.xcr0_accum);=0A+ ok = =3D set_xcr0(v->arch.xcr0_accum);=0A+ ASSERT(ok);=0A xsave(v, = v->arch.nonlazy_xstate_used ? XSTATE_ALL : XSTATE_LAZY);=0A- set_xcr0(v-= >arch.xcr0); =0A+ ok =3D set_xcr0(v->arch.xcr0);=0A+ ASSERT(ok);= =0A }=0A =0A /* Save x87 FPU, MMX, SSE and SSE2 state */=0A--- a/xen/arch/x= 86/traps.c=0A+++ b/xen/arch/x86/traps.c=0A@@ -2198,25 +2198,9 @@ static = int emulate_privileged_op(struct =0A if ( !guest_kernel_mode(v,= regs) )=0A goto fail;=0A =0A- switch ( = (u32)regs->ecx )=0A- {=0A- case XCR_XFEATURE_ENAB= LED_MASK:=0A- /* bit 0 of XCR0 must be set and reserved = bit must not be set */=0A- if ( !(new_xfeature & = XSTATE_FP) || (new_xfeature & ~xfeature_mask) )=0A- = goto fail;=0A-=0A- /* YMM state takes SSE state as = prerequisite. */=0A- if ( (xfeature_mask & new_xfeature = & XSTATE_YMM) &&=0A- !(new_xfeature & XSTATE_SSE) = )=0A- goto fail;=0A-=0A- = v->arch.xcr0 =3D new_xfeature;=0A- v->arch.xcr0_accum = |=3D new_xfeature;=0A- set_xcr0(new_xfeature);=0A- = break;=0A- default:=0A- = goto fail;=0A- }=0A+ if ( handle_xsetbv(regs->ecx, = new_xfeature) )=0A+ goto fail;=0A+=0A break;=0A = }=0A default:=0A--- a/xen/arch/x86/xstate.c=0A+++ = b/xen/arch/x86/xstate.c=0A@@ -5,7 +5,7 @@=0A *=0A */=0A =0A-#include = =0A+#include =0A #include =0A = #include =0A #include =0A@@ -27,24 +27,34 = @@ u32 xsave_cntxt_size;=0A u64 xfeature_mask;=0A =0A /* Cached xcr0 for = fast read */=0A-DEFINE_PER_CPU(uint64_t, xcr0);=0A+static DEFINE_PER_CPU(ui= nt64_t, xcr0);=0A =0A /* Because XCR0 is cached for each CPU, xsetbv() is = not exposed. Users should =0A * use set_xcr0() instead.=0A */=0A-static = inline void xsetbv(u32 index, u64 xfeatures)=0A+static inline bool_t = xsetbv(u32 index, u64 xfeatures)=0A {=0A u32 hi =3D xfeatures >> = 32;=0A u32 lo =3D (u32)xfeatures;=0A =0A- asm volatile (".byte = 0x0f,0x01,0xd1" :: "c" (index),=0A- "a" (lo), "d" (hi));=0A+ = asm volatile ( "1: .byte 0x0f,0x01,0xd1\n"=0A+ "3: = \n"=0A+ ".section .fixup,\"ax\" \n"=0A+ = "2: xor %0,%0 \n"=0A+ " jmp = 3b \n"=0A+ ".previous \n"=0A+ = _ASM_EXTABLE(1b, 2b)=0A+ : "+a" = (lo)=0A+ : "c" (index), "d" (hi));=0A+ return lo !=3D = 0;=0A }=0A =0A-void set_xcr0(u64 xfeatures)=0A+bool_t set_xcr0(u64 = xfeatures)=0A {=0A+ if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures) = )=0A+ return 0;=0A this_cpu(xcr0) =3D xfeatures;=0A- = xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures);=0A+ return 1;=0A }=0A =0A = uint64_t get_xcr0(void)=0A@@ -236,7 +246,8 @@ void xstate_init(void)=0A = * Set CR4_OSXSAVE and run "cpuid" to get xsave_cntxt_size.=0A */=0A = set_in_cr4(X86_CR4_OSXSAVE);=0A- set_xcr0((((u64)edx << 32) | eax) = & XCNTXT_MASK);=0A+ if ( !set_xcr0((((u64)edx << 32) | eax) & XCNTXT_MAS= K) )=0A+ BUG();=0A cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, = &ecx, &edx);=0A =0A if ( cpu =3D=3D 0 )=0A@@ -262,6 +273,28 @@ void = xstate_init(void)=0A }=0A }=0A =0A+int handle_xsetbv(u32 index, u64 = new_bv)=0A+{=0A+ struct vcpu *curr =3D current;=0A+=0A+ if ( index = !=3D XCR_XFEATURE_ENABLED_MASK )=0A+ return -EOPNOTSUPP;=0A+=0A+ = if ( (new_bv & ~xfeature_mask) || !(new_bv & XSTATE_FP) )=0A+ = return -EINVAL;=0A+=0A+ if ( (new_bv & XSTATE_YMM) && !(new_bv & = XSTATE_SSE) )=0A+ return -EINVAL;=0A+=0A+ if ( !set_xcr0(new_bv) = )=0A+ return -EFAULT;=0A+=0A+ curr->arch.xcr0 =3D new_bv;=0A+ = curr->arch.xcr0_accum |=3D new_bv;=0A+=0A+ return 0;=0A+}=0A+=0A /*=0A = * Local variables:=0A * mode: C=0A--- a/xen/include/asm-x86/hvm/support.h= =0A+++ b/xen/include/asm-x86/hvm/support.h=0A@@ -128,7 +128,7 @@ void = hvm_triple_fault(void);=0A =0A void hvm_rdtsc_intercept(struct cpu_user_reg= s *regs);=0A =0A-int hvm_handle_xsetbv(u64 new_bv);=0A+int __must_check = hvm_handle_xsetbv(u32 index, u64 new_bv);=0A =0A /* These functions all = return X86EMUL return codes. */=0A int hvm_set_efer(uint64_t value);=0A--- = a/xen/include/asm-x86/xstate.h=0A+++ b/xen/include/asm-x86/xstate.h=0A@@ = -9,7 +9,6 @@=0A #define __ASM_XSTATE_H=0A =0A #include =0A-#in= clude =0A =0A #define FCW_DEFAULT 0x037f=0A = #define MXCSR_DEFAULT 0x1f80=0A@@ -34,9 +33,6 @@=0A #define = XSTATE_NONLAZY (XSTATE_LWP)=0A #define XSTATE_LAZY (XSTATE_ALL & = ~XSTATE_NONLAZY)=0A =0A-/* extended state variables */=0A-DECLARE_PER_CPU(u= int64_t, xcr0);=0A-=0A extern unsigned int xsave_cntxt_size;=0A extern u64 = xfeature_mask;=0A =0A@@ -75,11 +71,12 @@ struct xsave_struct=0A } = __attribute__ ((packed, aligned (64)));=0A =0A /* extended state operations= */=0A-void set_xcr0(u64 xfeatures);=0A+bool_t __must_check set_xcr0(u64 = xfeatures);=0A uint64_t get_xcr0(void);=0A void xsave(struct vcpu *v, = uint64_t mask);=0A void xrstor(struct vcpu *v, uint64_t mask);=0A bool_t = xsave_enabled(const struct vcpu *v);=0A+int __must_check handle_xsetbv(u32 = index, u64 new_bv);=0A =0A /* extended state init and cleanup functions = */=0A void xstate_free_save_area(struct vcpu *v);=0A --=__Part65559451.3__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part65559451.3__=--