>>> On 09.11.16 at 15:28, <rcojoc...@bitdefender.com> wrote:
> On 11/09/2016 01:17 PM, Jan Beulich wrote:
>>>>> On 09.11.16 at 10:42, <rcojoc...@bitdefender.com> wrote:
>>> +static bool svm_get_pending_event(struct vcpu *v, struct hvm_trap *info)
>>> +{
>>> +    struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
>>> +
>>> +    if ( vmcb->eventinj.fields.v )
>>> +        return false;
>>> +
>>> +    info->vector = vmcb->eventinj.fields.vector;
>>> +    info->type = vmcb->eventinj.fields.type;
>>> +    info->error_code = vmcb->eventinj.fields.errorcode;
>>> +    info->cr2 = v->arch.hvm_vcpu.guest_cr[2];
>> 
>> I'd prefer for this last part to be put into generic code (i.e. the
>> wrapper).
> 
> Actually, doing this:
> 
> static inline bool hvm_get_pending_event(struct vcpu *v, struct hvm_trap 
> *info)
> {
>     info->cr2 = v->arch.hvm_vcpu.guest_cr[2];
>     return hvm_funcs.get_pending_event(v, info);
> }
> 
> leads to "error: dereferencing pointer to incomplete type" about v->, so
> to do this an additional #include will be necessary. Is that acceptable?

Better make it an out-of-line function in hvm.c.

Jan


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

Reply via email to