|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 2/7] x86/hvm: introduce hvm_copy_context_and_params
On 03.02.2020 17:12, Tamas K Lengyel wrote:
> @@ -4414,6 +4424,40 @@ static int hvm_allow_get_param(struct domain *d,
> return rc;
> }
>
> +static int hvm_get_param(struct domain *d, uint32_t index, uint64_t *value)
> +{
> + int rc;
> +
> + rc = hvm_allow_get_param(d, index);
> + if ( rc )
> + return rc;
> +
> + switch ( index )
> + {
> + case HVM_PARAM_ACPI_S_STATE:
> + *value = d->arch.hvm.is_s3_suspended ? 3 : 0;
> + break;
> +
> + case HVM_PARAM_VM86_TSS:
> + *value = (uint32_t)d->arch.hvm.params[HVM_PARAM_VM86_TSS_SIZED];
> + break;
> +
> + case HVM_PARAM_VM86_TSS_SIZED:
> + *value = d->arch.hvm.params[HVM_PARAM_VM86_TSS_SIZED] &
> + ~VM86_TSS_UPDATED;
Indentation got broken here.
> + break;
> +
> + case HVM_PARAM_X87_FIP_WIDTH:
> + *value = d->arch.x87_fip_width;
> + break;
> + default:
A blank line would have wanted introducing above here.
> @@ -5301,6 +5317,37 @@ void hvm_set_segment_register(struct vcpu *v, enum
> x86_segment seg,
> alternative_vcall(hvm_funcs.set_segment_register, v, seg, reg);
> }
>
> +int hvm_copy_context_and_params(struct domain *dst, struct domain *src)
> +{
> + int rc;
> + unsigned int i;
> + struct hvm_domain_context c = { };
> +
> + c.size = hvm_save_size(src);
As mentioned in an earlier version's review, this could be put in
the variable's initializer.
I'll take care of all of the above and add
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
while committing.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |