qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 05/12] pc-bios: s390x: Remove unneeded dasd-ipl.c reset ps


From: Thomas Huth
Subject: Re: [PATCH v5 05/12] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes
Date: Thu, 25 Jun 2020 12:57:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 24/06/2020 09.52, Janosch Frank wrote:
jump_to_low_kernel() and the functions that it calls will already or
64 bit addressing into the reset psw mask when executing
jump_to_IPL_2() after the diag308 subcode 1.

Hmm, the jump_to_IPL_code() also sets the 64-bit addressing bits ... but jump_to_low_kernel() has some logic that tests for the bits before that function is called:

    /* Trying to get PSW at zero address */
    if (*((uint64_t *)0) & RESET_PSW_MASK) {
        jump_to_IPL_code((*((uint64_t *)0)) & 0x7fffffff);
    }

Could it be that the code in dasd-ipl.c has been written with that if-statement in mind?

 Thomas


The kernel proper is then branched to rather than doing a full PSW
change.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
  pc-bios/s390-ccw/dasd-ipl.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
index 0fc879bb8e..e8f2846740 100644
--- a/pc-bios/s390-ccw/dasd-ipl.c
+++ b/pc-bios/s390-ccw/dasd-ipl.c
@@ -206,7 +206,6 @@ static void run_ipl2(SubChannelId schid, uint16_t cutype, 
uint32_t addr)
   */
  void dasd_ipl(SubChannelId schid, uint16_t cutype)
  {
-    PSWLegacy *pswl = (PSWLegacy *) 0x00;
      uint32_t ipl2_addr;
/* Construct Read IPL CCW and run it to read IPL1 from boot disk */
@@ -229,7 +228,5 @@ void dasd_ipl(SubChannelId schid, uint16_t cutype)
      run_ipl2(schid, cutype, ipl2_addr);
/* Transfer control to the guest operating system */
-    pswl->mask |= PSW_MASK_EAMODE;   /* Force z-mode */
-    pswl->addr |= PSW_MASK_BAMODE;   /* ...          */
      jump_to_low_kernel();
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]