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

Re: [Xen-devel] [PATCH V4 07/13] x86/hvm: factor out and rename vm_event related functions



>>> On 09.02.15 at 19:53, <tamas.lengyel@xxxxxxxxxxxx> wrote:
> +static int hvm_event_traps(long parameters, vm_event_request_t *req)

Please apply more care: The original function's parameter type
changed in v4, so you shouldn't blindly drop this change here.

> +{
> +    int rc;
> +    struct vcpu *curr = current;
> +    struct domain *currd = curr->domain;
> +
> +    if ( !(parameters & HVMPME_MODE_MASK) )
> +        return 0;
> +
> +    rc = vm_event_claim_slot(currd, &currd->vm_event->monitor);
> +    switch ( rc )
> +    {
> +    case 0:
> +        break;
> +    case -ENOSYS:
> +        /*
> +         * If there was no ring to handle the event, then
> +         * simple continue executing normally.

simply

> +void hvm_event_msr(unsigned long msr, unsigned long value)

I realize you just move this, but I have a hard time seeing why either
parameter type would be unsigned long.

> +{
> +    struct vcpu *curr = current;
> +    vm_event_request_t req = {
> +        .reason = VM_EVENT_REASON_MOV_TO_MSR,
> +        .vcpu_id = curr->vcpu_id,
> +        .u.mov_to_msr.msr = msr,
> +        .u.mov_to_msr.value = value,
> +    };
> +    long params = current->domain->arch.hvm_domain
> +                    .params[HVM_PARAM_MEMORY_EVENT_MSR];

Again: long? (Please apply comments given to all instances.)

Jan


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


 


Rackspace

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