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

Re: [Xen-devel] [PATCH 4/4] kexec/xen: directly load images images into Xen



On 04/10/2013 22:33, Daniel Kiper wrote:
>
> +     xch = xc_interface_open(NULL, NULL, 0);
> +     if (!xch)
> +             return -1;
> +
> +     type = kexec_flags & KEXEC_TYPE_CRASH;
> Why? Could not we unload normal kexec images?

type is 0 for normal images and 1 for crash images.  This line does not
prevent unloading of normal images in the slightest.

>
>> +    ret = xc_kexec_unload(xch, type);
>> +
>> +    xc_interface_close(xch);
>> +
>> +    return ret;
>> +}
>> +
>> @@ -823,7 +830,10 @@ static int my_shutdown(void)
>>   */
>>  static int my_exec(void)
>>  {
>> -    reboot(LINUX_REBOOT_CMD_KEXEC);
>> +    if (xen_present())
>> +            xen_kexec_exec();
>> +    else
>> +            reboot(LINUX_REBOOT_CMD_KEXEC);
>>      /* I have failed if I make it here */
>>      fprintf(stderr, "kexec failed: %s\n",
>>              strerror(errno));
>> @@ -928,6 +938,10 @@ static int kexec_loaded(void)
>>      char *p;
>>      char line[3];
>>
>> +    /* No way to tell if an image is loaded under Xen, assume it is. */
>> +    if (xen_present())
>> +            return 1;
>> +
> Why? I think that we should have relevant machanism to do that.
>
> Please take into account Konrad's comments too
> (http://lists.xenproject.org/archives/html/xen-devel/2013-09/msg02364.html).
>
> Daniel

Here I would agree.  As we are redefining all the hypercalls, a
KEXEC_loaded_status hypercall (or equiv) would certainly not go amis.

~Andrew

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