El 18/09/15 a les 17.53, Anthony PERARD ha escrit:
> On Fri, Sep 04, 2015 at 02:08:48PM +0200, Roger Pau Monne wrote:
>> Now that we have all the code in place HVM domain building in libxl can be
>> switched to use the xc_dom_* family of functions, just like they are used in
>> order to build PV guests.
>>
>> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
>> Acked-by: Wei Liu <wei.l...@citrix.com>
>> Cc: Ian Jackson <ian.jack...@eu.citrix.com>
>> Cc: Stefano Stabellini <stefano.stabell...@eu.citrix.com>
>> Cc: Ian Campbell <ian.campb...@citrix.com>
>> Cc: Wei Liu <wei.l...@citrix.com>
>> ---
>> Changes since v4:
>>  - Add Wei Liu Acked-by.
>> ---
>>  tools/libxl/libxl_arch.h     |   2 +-
>>  tools/libxl/libxl_dm.c       |  18 ++--
>>  tools/libxl/libxl_dom.c      | 227 
>> +++++++++++++++++++++++++------------------
>>  tools/libxl/libxl_internal.h |   4 +-
>>  tools/libxl/libxl_vnuma.c    |  12 ++-
>>  tools/libxl/libxl_x86.c      |   8 +-
>>  6 files changed, 155 insertions(+), 116 deletions(-)
> 
> 
>> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
>> index 6101e5c..d2cf9e3 100644
>> --- a/tools/libxl/libxl_dom.c
>> +++ b/tools/libxl/libxl_dom.c
>> @@ -912,52 +935,62 @@ int libxl__build_hvm(libxl__gc *gc, uint32_t domid,
>>                libxl__domain_build_state *state)
>>  {
>>      libxl_ctx *ctx = libxl__gc_owner(gc);
>> -    struct xc_hvm_build_args args = {};
>> -    int ret, rc;
>> -    uint64_t mmio_start, lowmem_end, highmem_end;
>> +    int rc;
>> +    uint64_t mmio_start, lowmem_end, highmem_end, mem_size;
>>      libxl_domain_build_info *const info = &d_config->b_info;
>> +    struct xc_dom_image *dom = NULL;
>> +
>> +    xc_dom_loginit(ctx->xch);
>> +
>> +    dom = xc_dom_allocate(ctx->xch, NULL, NULL);
>> +    if (!dom) {
>> +        LOGE(ERROR, "xc_dom_allocate failed");
> 
> 'rc' is uninitialized at this point and is going to be used in out:.

Yes, I'm sorry, I have no idea how I missed it. Anyway, as you say this
is missing:

rc = ERROR_NOMEM;

before the goto.

Roger.


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

Reply via email to