sparc64 ldomctl(8) fix

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sparc64 ldomctl(8) fix

Mark Kettenis
The diff below fixes interction between ldomctl(8) and the firmware on
a SPARC T4 system that I have access to.  To make sure that this
doesn't break other machines it would be good if people could test
this on a few more ldoms-capable sparc64 machines.  To test just build
ldomctl with this patch, install it and run "ldomctl list":

# cd /usr/src/usr.sbin/ldomctl
# make obj
# make
# make install
# ldomctl list

Cheers,

Mark


Index: usr.sbin/ldomctl/mdstore.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/mdstore.c,v
retrieving revision 1.8
diff -u -p -r1.8 mdstore.c
--- usr.sbin/ldomctl/mdstore.c 15 Sep 2018 13:20:16 -0000 1.8
+++ usr.sbin/ldomctl/mdstore.c 5 Jul 2019 22:54:01 -0000
@@ -55,6 +55,7 @@ struct mdstore_msg {
  uint64_t svc_handle;
  uint64_t reqnum;
  uint16_t command;
+ uint8_t reserved[6];
 } __packed;
 
 struct mdstore_begin_end_req {
@@ -104,7 +105,7 @@ struct mdstore_sel_del_req {
  uint64_t svc_handle;
  uint64_t reqnum;
  uint16_t command;
- uint16_t reserved;
+ uint8_t reserved[2];
  uint32_t namelen;
  char name[1];
 } __packed;

Reply | Threaded
Open this post in threaded view
|

Re: sparc64 ldomctl(8) fix

Klemens Nanni-2
Still lists all domains on my T5240 with this change.

Reply | Threaded
Open this post in threaded view
|

Re: sparc64 ldomctl(8) fix

Mark Kettenis
> Date: Sat, 6 Jul 2019 01:15:59 +0200
> From: Klemens Nanni <[hidden email]>
>
> Still lists all domains on my T5240 with this change.

I hope you mean all ldom configurations here ;).

Reply | Threaded
Open this post in threaded view
|

Re: sparc64 ldomctl(8) fix

Klemens Nanni-2
On Sat, Jul 06, 2019 at 01:23:40AM +0200, Mark Kettenis wrote:
> > Date: Sat, 6 Jul 2019 01:15:59 +0200
> > From: Klemens Nanni <[hidden email]>
> >
> > Still lists all domains on my T5240 with this change.
>
> I hope you mean all ldom configurations here ;).
He, yes :)

        # ldomctl list
        factory-default
        openbsd [current]

Reply | Threaded
Open this post in threaded view
|

Re: sparc64 ldomctl(8) fix

Jan Klemkow
In reply to this post by Mark Kettenis
On Sat, Jul 06, 2019 at 12:59:55AM +0200, Mark Kettenis wrote:

> The diff below fixes interction between ldomctl(8) and the firmware on
> a SPARC T4 system that I have access to.  To make sure that this
> doesn't break other machines it would be good if people could test
> this on a few more ldoms-capable sparc64 machines.  To test just build
> ldomctl with this patch, install it and run "ldomctl list":
>
> # cd /usr/src/usr.sbin/ldomctl
> # make obj
> # make
> # make install
> # ldomctl list

Tested on:
hw.model=SUNW,UltraSPARC-T2 (rev 0.0) @ 1415.103 MHz
hw.product=SUNW,SPARC-Enterprise-T5220

# ldomctl list
factory-default
openbsd [current]

Works fine for me.

bye,
Jan

> Index: usr.sbin/ldomctl/mdstore.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/mdstore.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 mdstore.c
> --- usr.sbin/ldomctl/mdstore.c 15 Sep 2018 13:20:16 -0000 1.8
> +++ usr.sbin/ldomctl/mdstore.c 5 Jul 2019 22:54:01 -0000
> @@ -55,6 +55,7 @@ struct mdstore_msg {
>   uint64_t svc_handle;
>   uint64_t reqnum;
>   uint16_t command;
> + uint8_t reserved[6];
>  } __packed;
>  
>  struct mdstore_begin_end_req {
> @@ -104,7 +105,7 @@ struct mdstore_sel_del_req {
>   uint64_t svc_handle;
>   uint64_t reqnum;
>   uint16_t command;
> - uint16_t reserved;
> + uint8_t reserved[2];
>   uint32_t namelen;
>   char name[1];
>  } __packed;
>