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

Re: [Xen-devel] [PATCH v5 11/11] viridian: add implementation of the HvSendSyntheticClusterIpi hypercall



>>> On 11.03.19 at 14:41, <paul.durrant@xxxxxxxxxx> wrote:
> This patch adds an implementation of the hypercall as documented in the
> specification [1], section 10.5.2. This enlightenment, as with others, is
> advertised by CPUID leaf 0x40000004 and is under control of a new
> 'hcall_ipi' option in libxl.
> 
> If used, this enlightenment should mean the guest only takes a single VMEXIT
> to issue IPIs to multiple vCPUs rather than the multiple VMEXITs that would
> result from using the emulated local APIC.
> 
> [1] 
> https://github.com/MicrosoftDocs/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v5.0C.pdf
> 
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Hypervisor parts
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with one remark:

> @@ -642,6 +646,65 @@ int viridian_hypercall(struct cpu_user_regs *regs)
>          break;
>      }
>  
> +    case HvSendSyntheticClusterIpi:
> +    {
> +        struct vcpu *v;
> +        uint32_t vector;
> +        uint64_t vcpu_mask;
> +
> +        status = HV_STATUS_INVALID_PARAMETER;
> +
> +        /* Get input parameters. */
> +        if ( input.fast )
> +        {
> +            if ( input_params_gpa >> 32 )
> +                break;
> +
> +            vector = input_params_gpa;
> +            vcpu_mask = output_params_gpa;
> +        }
> +        else
> +        {
> +            struct {
> +                uint32_t vector;
> +                uint8_t target_vtl;
> +                uint8_t reserved_zero[3];
> +                uint64_t vcpu_mask;
> +            } input_params;
> +
> +            if ( hvm_copy_from_guest_phys(&input_params, input_params_gpa,
> +                                          sizeof(input_params)) !=
> +                 HVMTRANS_okay )
> +                break;
> +
> +            if ( input_params.target_vtl ||
> +                 input_params.reserved_zero[0] ||
> +                 input_params.reserved_zero[1] ||
> +                 input_params.reserved_zero[2] )
> +                break;
> +
> +            vector = input_params.vector;
> +            vcpu_mask = input_params.vcpu_mask;
> +        }
> +
> +        if ( vector < 0x10 || vector > 0xff )
> +            break;

Elsewhere you've been using decimal.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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