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

Re: [Xen-devel] [PATCH v6 07/10] libxc: introduce soft reset for HVM domains



Hi Vitaly,

On 13/05/15 10:49, Vitaly Kuznetsov wrote:
> +int xc_domain_soft_reset(xc_interface *xch, uint32_t source_dom,
> +                         uint32_t dest_dom, domid_t console_domid,
> +                         unsigned long *console_mfn, domid_t store_domid,
> +                         unsigned long *store_mfn)
> +{
> +    xc_dominfo_t old_info, new_info;
> +    int rc = 1;
> +
> +    uint32_t hvm_buf_size = 0;
> +    uint64_t nr_trans;
> +    uint8_t *hvm_buf = NULL;
> +    unsigned long console_pfn, store_pfn, io_pfn, buffio_pfn;
> +    uint64_t hvm_params[HVM_NR_PARAMS];
> +    xen_pfn_t sharedinfo_pfn;
> +
> +    DPRINTF("%s: soft reset domid %u -> %u", __func__, source_dom, dest_dom);
> +
> +    if ( xc_domain_getinfo(xch, source_dom, 1, &old_info) != 1 )
> +    {
> +        PERROR("Could not get old domain info");
> +        return 1;
> +    }
> +
> +    if ( xc_domain_getinfo(xch, dest_dom, 1, &new_info) != 1 )
> +    {
> +        PERROR("Could not get new domain info");
> +        return 1;
> +    }

xc_domain_getinfo returns the first domain ID used from dest_dom. If
dest_dom doesn't exist it may return another domain.

Therefore you have to check that the info correspond to the correct domain.

Regards,

-- 
Julien Grall

_______________________________________________
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®.