Re: [kvm-unit-tests PATCH v4 08/13] s390x: Add linemode console

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

 



On 2019-01-03 11:08, Janosch Frank wrote:
> z/VM isn't fond of vt220, so we need line mode when running under z/VM.
> 
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> ---
[...]
> diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
> index 63cf609..408bbaf 100644
> --- a/lib/s390x/sclp.h
> +++ b/lib/s390x/sclp.h
> @@ -179,6 +179,7 @@ typedef struct SCCB {
>  /* SCLP event masks */
>  #define SCLP_EVENT_MASK_SIGNAL_QUIESCE          0x00000008
>  #define SCLP_EVENT_MASK_MSG_ASCII               0x00000040
> +#define SCLP_EVENT_MASK_MSG          		0x40000000
>  
>  #define SCLP_UNCONDITIONAL_READ                 0x00
>  #define SCLP_SELECTIVE_READ                     0x01
> @@ -212,6 +213,72 @@ typedef struct ReadEventData {
>      uint32_t mask;
>  } __attribute__((packed)) ReadEventData;
>  
> +#define MDBTYP_GO               0x0001
> +#define MDBTYP_MTO              0x0004
> +#define EVTYP_MSG               0x02
> +#define LNTPFLGS_CNTLTEXT       0x8000
> +#define LNTPFLGS_LABELTEXT      0x4000
> +#define LNTPFLGS_DATATEXT       0x2000
> +#define LNTPFLGS_ENDTEXT        0x1000
> +#define LNTPFLGS_PROMPTTEXT     0x0800
> +
> +typedef uint32_t sccb_mask_t;
> +
> +/* SCLP line mode console related structures. */
> +
> +struct mto {
> +	u16 length;
> +	u16 type;
> +	u16 line_type_flags;
> +	u8  alarm_control;
> +	u8  _reserved[3];
> +} __attribute__((packed));
> +
> +struct go {
> +	u16 length;
> +	u16 type;
> +	u32 domid;
> +	u8  hhmmss_time[8];
> +	u8  th_time[3];
> +	u8  reserved_0;
> +	u8  dddyyyy_date[7];
> +	u8  _reserved_1;
> +	u16 general_msg_flags;
> +	u8  _reserved_2[10];
> +	u8  originating_system_name[8];
> +	u8  job_guest_name[8];
> +} __attribute__((packed));
> +
> +struct mdb_header {
> +	u16 length;
> +	u16 type;
> +	u32 tag;
> +	u32 revision_code;
> +} __attribute__((packed));
> +
> +struct mdb {
> +	struct mdb_header header;
> +	struct go go;
> +	struct mto mto;
> +} __attribute__((packed));
> +
> +struct evbuf_header {
> +	u16	length;
> +	u8	type;
> +	u8	flags;
> +	u16	_reserved;
> +} __attribute__((packed));
> +
> +struct msg_buf {
> +	struct evbuf_header header;
> +	struct mdb mdb;
> +} __attribute__((packed));
> +
> +struct write_sccb {
> +	struct SCCBHeader header;
> +	struct msg_buf msg;
> +} __packed;
You're using "__attribute__((packed))" for all the other structs, so I'd
suggest to use that for write_sccb, too.

 Thomas



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux