All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE
@ 2020-02-07  9:00 Varad Gautam
  2020-02-07  9:24 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Varad Gautam @ 2020-02-07  9:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Varad Gautam, David Woodhouse

Do not -EINVAL on loading/execing an image if kexec type is
KEXEC_TYPE_LIVE_UPDATE.

Signed-off-by: Varad Gautam <vrd@amazon.de>
CC: David Woodhouse <dwmw@amazon.co.uk>
---
 xen/common/kimage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 86d2797..599aa74 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -421,6 +421,7 @@ struct page_info *kimage_alloc_control_page(struct kexec_image *image,
     switch ( image->type )
     {
     case KEXEC_TYPE_DEFAULT:
+    case KEXEC_TYPE_LIVE_UPDATE:
         pages = kimage_alloc_normal_control_page(image, memflags);
         break;
     case KEXEC_TYPE_CRASH:
@@ -775,6 +776,7 @@ static int kimage_load_segment(struct kexec_image *image, xen_kexec_segment_t *s
         switch ( image->type )
         {
         case KEXEC_TYPE_DEFAULT:
+        case KEXEC_TYPE_LIVE_UPDATE:
             result = kimage_load_normal_segment(image, segment);
             break;
         case KEXEC_TYPE_CRASH:
@@ -803,6 +805,7 @@ int kimage_alloc(struct kexec_image **rimage, uint8_t type, uint16_t arch,
     switch( type )
     {
     case KEXEC_TYPE_DEFAULT:
+    case KEXEC_TYPE_LIVE_UPDATE:
         result = kimage_normal_alloc(rimage, entry_maddr, nr_segments, segment);
         break;
     case KEXEC_TYPE_CRASH:
-- 
2.7.4




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE
  2020-02-07  9:00 [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE Varad Gautam
@ 2020-02-07  9:24 ` Jan Beulich
  2020-02-07 10:25   ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2020-02-07  9:24 UTC (permalink / raw)
  To: Varad Gautam; +Cc: xen-devel, David Woodhouse

On 07.02.2020 10:00, Varad Gautam wrote:
> Do not -EINVAL on loading/execing an image if kexec type is
> KEXEC_TYPE_LIVE_UPDATE.
> 
> Signed-off-by: Varad Gautam <vrd@amazon.de>
> CC: David Woodhouse <dwmw@amazon.co.uk>

Please Cc maintainers on patches.

> --- a/xen/common/kimage.c
> +++ b/xen/common/kimage.c
> @@ -421,6 +421,7 @@ struct page_info *kimage_alloc_control_page(struct kexec_image *image,
>      switch ( image->type )
>      {
>      case KEXEC_TYPE_DEFAULT:
> +    case KEXEC_TYPE_LIVE_UPDATE:
>          pages = kimage_alloc_normal_control_page(image, memflags);
>          break;
>      case KEXEC_TYPE_CRASH:
> @@ -775,6 +776,7 @@ static int kimage_load_segment(struct kexec_image *image, xen_kexec_segment_t *s
>          switch ( image->type )
>          {
>          case KEXEC_TYPE_DEFAULT:
> +        case KEXEC_TYPE_LIVE_UPDATE:
>              result = kimage_load_normal_segment(image, segment);
>              break;
>          case KEXEC_TYPE_CRASH:
> @@ -803,6 +805,7 @@ int kimage_alloc(struct kexec_image **rimage, uint8_t type, uint16_t arch,
>      switch( type )
>      {
>      case KEXEC_TYPE_DEFAULT:
> +    case KEXEC_TYPE_LIVE_UPDATE:
>          result = kimage_normal_alloc(rimage, entry_maddr, nr_segments, segment);
>          break;
>      case KEXEC_TYPE_CRASH:

You don't mention any prereq patches, and I can't see any
definition of KEXEC_TYPE_LIVE_UPDATE in the public headers.
IOW I can't see how this patch would be able to not break
the build on current staging. Please clarify.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE
  2020-02-07  9:24 ` Jan Beulich
@ 2020-02-07 10:25   ` David Woodhouse
  0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2020-02-07 10:25 UTC (permalink / raw)
  To: Jan Beulich, Varad Gautam; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1012 bytes --]

On Fri, 2020-02-07 at 10:24 +0100, Jan Beulich wrote:
> You don't mention any prereq patches, and I can't see any
> definition of KEXEC_TYPE_LIVE_UPDATE in the public headers.
> IOW I can't see how this patch would be able to not break
> the build on current staging. Please clarify.

I don't think this was meant to go to the list.

It's a fixup for the patch I posted in my RFC series at
https://lists.xenproject.org/archives/html/xen-devel/2020-01/msg02690.html

The original testing was just hard-coding addresses and using a
'normal' kexec load, and we were only testing KEXEC_TYPE_LIVE_UPDATE
for the actual kexec_exec.

Once Varad had implemented the automatic placement support in kexec
userspace tools, we spotted that the load operation wasn't working for
KEXEC_TYPE_LIVE_UPDATE, hence this fixup.

I merged it into the appropriate patch in my tree some time last week.
https://xenbits.xen.org/gitweb/?p=people/dwmw2/xen.git;a=commitdiff;h=0bf4204cdb5f4fb8d17ead8df3e4fda37cfd6a28

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-07 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07  9:00 [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE Varad Gautam
2020-02-07  9:24 ` Jan Beulich
2020-02-07 10:25   ` David Woodhouse

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.