All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: kexec@list.infradead.org, Simon Horman <horms@verge.net.au>,
	David Vrabel <david.vrabel@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 4/4] kexec/xen: directly load images images into Xen
Date: Sun, 6 Oct 2013 15:55:58 +0100	[thread overview]
Message-ID: <525179FE.9030202@citrix.com> (raw)
In-Reply-To: <20131004213341.GI3626@debian70-amd64.local.net-space.pl>

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

  reply	other threads:[~2013-10-06 14:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 13:16 [PATCHv5 0/4] kexec-tools: add support for Xen 4.4 David Vrabel
2013-09-20 13:16 ` [PATCH 1/4] kexec/xen: require libxc from " David Vrabel
2013-09-20 13:16 ` [PATCH 2/4] kexec/xen: use libxc to get location of crash notes David Vrabel
2013-09-20 13:16 ` [PATCH 3/4] kexec/xen: switch to use xc_kexec_get_range for get_xen_vmcoreinfo David Vrabel
2013-09-20 13:16 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-10-04 21:33   ` Daniel Kiper
2013-10-06 14:55     ` Andrew Cooper [this message]
2013-10-07  7:22       ` Daniel Kiper
2013-10-07  9:36     ` David Vrabel
2013-10-07 10:46       ` Daniel Kiper
  -- strict thread matches above, loose matches on Subject: below --
2013-11-06 14:55 [PATCHv7 0/4] kexec-tools: add support for Xen 4.4 David Vrabel
2013-11-06 14:55 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-11-07 20:36   ` Don Slutz
2013-11-19  1:20   ` Simon Horman
2013-11-19  1:20   ` Simon Horman
2013-11-19  8:28     ` Daniel Kiper
2013-11-19  8:28     ` Daniel Kiper
2013-11-19  9:19       ` Simon Horman
2013-11-19  9:19       ` Simon Horman
2013-11-06 14:55 ` David Vrabel
2013-10-08 16:59 [PATCHv6 0/4] kexec-tools: add support for Xen 4.4 David Vrabel
2013-10-08 16:59 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-10-08 16:59 ` David Vrabel
2013-09-20 13:18 [PATCHv5 0/4] kexec-tools: add support for Xen 4.4 David Vrabel
2013-09-20 13:18 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-09-20 13:18 ` David Vrabel
2013-02-21 17:57 [PATCH 0/4] kexec-tools: add support for Xen 4.3 David Vrabel
2013-02-21 17:57 ` [PATCH 4/4] kexec/xen: directly load images images into Xen David Vrabel
2013-03-12 11:29   ` Daniel Kiper
2013-03-12 11:29   ` Daniel Kiper
2013-02-21 17:57 ` David Vrabel

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=525179FE.9030202@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=horms@verge.net.au \
    --cc=kexec@list.infradead.org \
    --cc=xen-devel@lists.xen.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.