All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, mihajlov@linux.ibm.com, cohuck@redhat.com
Subject: Re: [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask
Date: Tue, 3 Dec 2019 14:33:25 +0100	[thread overview]
Message-ID: <e3a54a31-1b68-89b0-16ed-9b26be2b5fce@de.ibm.com> (raw)
In-Reply-To: <20191203132813.2734-5-frankja@linux.ibm.com>



On 03.12.19 14:28, Janosch Frank wrote:
> We need to set the short psw indication bit in the reset psw, as it is
> a short psw.
> 
> fixes: 9629823290 ("pc-bios/s390-ccw: do a subsystem reset before running the guest")
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

We should also add 
commit 24bb1fa36ff7b25ee774dbe4a18830dc782b54bf (HEAD, github-cohuck/s390-next)
Author:     Janosch Frank <frankja@linux.ibm.com>
AuthorDate: Fri Nov 29 09:20:23 2019 -0500
Commit:     Cornelia Huck <cohuck@redhat.com>
CommitDate: Mon Dec 2 09:58:57 2019 +0100

    s390x: Properly fetch and test the short psw on diag308 subc 0/1

or whatever the final commit id will be. While this patch is not "broken"
it exposes the bug.



> ---
>  pc-bios/s390-ccw/jump2ipl.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c
> index 266f1502b9..da13c43cc0 100644
> --- a/pc-bios/s390-ccw/jump2ipl.c
> +++ b/pc-bios/s390-ccw/jump2ipl.c
> @@ -12,11 +12,11 @@
>  #define KERN_IMAGE_START 0x010000UL
>  #define PSW_MASK_64 0x0000000100000000ULL
>  #define PSW_MASK_32 0x0000000080000000ULL
> -#define IPL_PSW_MASK (PSW_MASK_32 | PSW_MASK_64)
> +#define PSW_MASK_SHORTPSW 0x0008000000000000ULL
> +#define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_32 | PSW_MASK_64)
>  
>  typedef struct ResetInfo {
> -    uint32_t ipl_mask;
> -    uint32_t ipl_addr;
> +    uint64_t ipl_psw;
>      uint32_t ipl_continue;
>  } ResetInfo;
>  
> @@ -50,7 +50,9 @@ void jump_to_IPL_code(uint64_t address)
>      ResetInfo *current = 0;
>  
>      save = *current;
> -    current->ipl_addr = (uint32_t) (uint64_t) &jump_to_IPL_2;
> +
> +    current->ipl_psw = (uint64_t) &jump_to_IPL_2;
> +    current->ipl_psw |= RESET_PSW_MASK;
>      current->ipl_continue = address & 0x7fffffff;
>  
>      debug_print_int("set IPL addr to", current->ipl_continue);
> @@ -82,7 +84,7 @@ void jump_to_low_kernel(void)
>      }
>  
>      /* Trying to get PSW at zero address */
> -    if (*((uint64_t *)0) & IPL_PSW_MASK) {
> +    if (*((uint64_t *)0) & RESET_PSW_MASK) {
>          jump_to_IPL_code((*((uint64_t *)0)) & 0x7fffffff);
>      }
>  
> 



  reply	other threads:[~2019-12-03 13:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 13:28 [PATCH v3 0/4] s390x: Increase architectural compliance Janosch Frank
2019-12-03 13:28 ` [PATCH v3 1/4] Header sync Janosch Frank
2019-12-03 13:28 ` [PATCH v3 2/4] s390x: Add missing vcpu reset functions Janosch Frank
2019-12-03 17:44   ` Cornelia Huck
2019-12-04  9:00     ` Janosch Frank
2019-12-04  9:15       ` Cornelia Huck
2019-12-04 14:59   ` Cornelia Huck
2019-12-04 15:07     ` David Hildenbrand
2019-12-04 15:08       ` David Hildenbrand
2019-12-04 15:33         ` Cornelia Huck
2019-12-04 15:35           ` David Hildenbrand
2019-12-03 13:28 ` [PATCH v3 3/4] s390x: Fix cpu normal reset ri clearing Janosch Frank
2019-12-05 13:32   ` Cornelia Huck
2019-12-03 13:28 ` [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask Janosch Frank
2019-12-03 13:33   ` Christian Borntraeger [this message]
2019-12-03 17:18     ` Cornelia Huck
2019-12-03 17:22   ` Cornelia Huck
2019-12-03 18:32   ` Christian Borntraeger
2019-12-05 10:12   ` Cornelia Huck
2019-12-13 12:06     ` Cornelia Huck
2019-12-13 12:37       ` Janosch Frank
2019-12-17 12:36       ` Thomas Huth
2019-12-17 15:09         ` Thomas Huth
2019-12-18 12:15           ` Janosch Frank
2019-12-18 12:28   ` Cornelia Huck
2019-12-18 16:54   ` Cornelia Huck

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=e3a54a31-1b68-89b0-16ed-9b26be2b5fce@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=mihajlov@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.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.