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

Re: [Xen-devel] [PATCH v2 08/16] SVM: use generic instruction decoding



On 29/09/16 20:24, Andrew Cooper wrote:
>
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -5200,3 +5214,89 @@ x86_emulate(
>>  #undef vex
>>  #undef override_seg
>>  #undef ea
>> +
>> +#ifdef __XEN__
>> +
>> +#include <xen/err.h>
>> +
>> +struct x86_emulate_state *
>> +x86_decode_insn(
>> +    struct x86_emulate_ctxt *ctxt,
>> +    int (*insn_fetch)(
>> +        enum x86_segment seg, unsigned long offset,
>> +        void *p_data, unsigned int bytes,
>> +        struct x86_emulate_ctxt *ctxt))
>> +{
>> +    static DEFINE_PER_CPU(struct x86_emulate_state, state);
>> +    struct x86_emulate_state *state = &this_cpu(state);
>> +    const struct x86_emulate_ops ops = {
> This can be static, to avoid having it reconstructed on the stack each
> function call.

On further consideration, it is clear that this can't be static.  Sorry
for the noise.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.