From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>, Andrew Jones <drjones@redhat.com>,
Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Julien Grall <julien.grall@linaro.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Olaf Hering <olaf@aepfle.de>, Tim Deegan <tim@xen.org>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xenproject.org,
Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v6 07/10] libxc: introduce soft reset for HVM domains
Date: Wed, 20 May 2015 17:20:19 +0200 [thread overview]
Message-ID: <87pp5v46oc.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <555CA3CC.2080003@citrix.com> (Julien Grall's message of "Wed, 20 May 2015 16:10:04 +0100")
Julien Grall <julien.grall@citrix.com> writes:
> 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.
Oh, thanks, I fixed xc_get_tot_pages() a while ago:
commit 5dcd0dcb85941bd92336e01ae3f8c44730099c96
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Tue Dec 2 16:18:08 2014 +0100
libxc: check in xc_get_tot_pages() that the proper domain is
reported
but I already managed to forget that xc_domain_getinfo() needs
additional check. Its interface is a bit misleading :-(
>
> Regards,
--
Vitaly
next prev parent reply other threads:[~2015-05-20 15:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 9:49 [PATCH v6 00/10] toolstack-based approach to pvhvm guest kexec Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 01/10] xen: introduce SHUTDOWN_soft_reset shutdown reason Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 02/10] libxl: support " Vitaly Kuznetsov
2015-05-20 9:44 ` Wei Liu
2015-05-13 9:49 ` [PATCH v6 03/10] xen: introduce DOMDYING_locked state Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 04/10] xen: Introduce XENMEM_soft_reset operation Vitaly Kuznetsov
2015-05-22 9:38 ` Jan Beulich
2015-05-22 15:36 ` Vitaly Kuznetsov
2015-05-22 16:26 ` Jan Beulich
2015-05-25 9:24 ` Tim Deegan
2015-05-25 10:06 ` Vitaly Kuznetsov
2015-05-25 16:13 ` Tim Deegan
2015-05-26 8:05 ` Vitaly Kuznetsov
2015-05-26 8:50 ` Jan Beulich
2015-05-13 9:49 ` [PATCH v6 05/10] xsm: add XENMEM_soft_reset support Vitaly Kuznetsov
2015-05-20 23:30 ` Daniel De Graaf
2015-05-21 9:49 ` Vitaly Kuznetsov
2015-05-21 14:25 ` Daniel De Graaf
2015-05-22 9:40 ` Jan Beulich
2015-05-22 14:58 ` Daniel De Graaf
2015-05-22 15:26 ` Jan Beulich
2015-05-22 14:59 ` Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 06/10] libxc: support XENMEM_soft_reset operation Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 07/10] libxc: introduce soft reset for HVM domains Vitaly Kuznetsov
2015-05-20 15:10 ` Julien Grall
2015-05-20 15:20 ` Vitaly Kuznetsov [this message]
2015-05-20 15:28 ` Julien Grall
2015-05-13 9:49 ` [PATCH v6 08/10] xl: introduce enum domain_restart_type Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 09/10] libxc: add XC_DEVICE_MODEL_SAVE_FILE Vitaly Kuznetsov
2015-05-13 9:49 ` [PATCH v6 10/10] (lib)xl: soft reset support Vitaly Kuznetsov
2015-05-22 14:55 ` Vitaly Kuznetsov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp5v46oc.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=andrew.cooper3@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=drjones@redhat.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=julien.grall@linaro.org \
--cc=keir@xen.org \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.