NetBSD Problem Report #58653

From christos@astron.com  Wed Aug 28 23:19:00 2024
Return-Path: <christos@astron.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D1CD41A9245
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 28 Aug 2024 23:18:59 +0000 (UTC)
Message-Id: <20240828231857.AA8976C28E@quasar.astron.com>
Date: Wed, 28 Aug 2024 23:18:57 +0000 (UTC)
From: christos@astron.com
Reply-To: christos@astron.com
To: gnats-bugs@NetBSD.org
Subject: vector.S i386 btsl issue
X-Send-Pr-Version: 3.95

>Number:         58653
>Category:       kern
>Synopsis:       New binutils-2.42 picks negative bts operand
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 28 23:20:00 +0000 2024
>Closed-Date:    Wed Sep 25 14:36:06 +0000 2024
>Last-Modified:  Wed Sep 25 14:36:06 +0000 2024
>Originator:     Christos Zoulas
>Release:        NetBSD 10.99.11
>Organization:
	Negative bits, LLC.
>Environment:
System: NetBSD quasar.astron.com 10.99.11 NetBSD 10.99.11 (QUASAR) #20: Mon Jul 29 22:40:13 EDT 2024 christos@quasar.astron.com:/usr/src/sys/arch/amd64/compile/QUASAR amd64
Architecture: x86_64
Machine: amd64
>Description:
Compiling vector.S with binutils-2.42 says:
../../../../arch/i386/i386/vector.S:357: Error: operand type mismatch for `bts'

The offending instruction is:
btsl    $(LIR_HV - 32),CPUVAR(IPENDING)+4
LIR_HV = 22
This happened when the code was converted to 56 interrupt sources:

revision 1.89
date: 2022-09-06 20:40:18 -0400;  author: knakahara;  state: Exp;  lines: +204 -
466;  commitid: mZl6pzzk8UxjIRSD;
NetBSD/x86: Raise the number of interrupt sources per CPU from 32 to 56.

There has been no objection for three years.
https://mail-index.netbsd.org/port-amd64/2019/09/22/msg003012.html
Implemented by nonaka@n.o, updated by me.


>How-To-Repeat:
	build the system try to compile GENERIC
>Fix:
Put it back to use orl

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58653 CVS commit: src/sys/arch/i386/i386
Date: Wed, 28 Aug 2024 19:20:51 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Wed Aug 28 23:20:50 UTC 2024

 Modified Files:
 	src/sys/arch/i386/i386: vector.S

 Log Message:
 PR/58653: me: Revert btsl of negative value to orl


 To generate a diff of this commit:
 cvs rdiff -u -r1.89 -r1.90 src/sys/arch/i386/i386/vector.S

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
 "christos@netbsd.org" <christos@NetBSD.org>
Cc: 
Subject: Re: kern/58653: vector.S i386 btsl issue
Date: Mon, 9 Sep 2024 20:31:53 +0900

 Christos, thank you very much for fixing this!

 It seems that no-one had ever tested NetBSD/i386 10.0 on Hyper-V,
 but still, it would be nice to have this fix for 10.1.

 Can someone test this fix on Hyper-V? I'd like to, but sorry,
 I cannot for a while :( My knowledge on Hyper-V ~ zero, but rough
 googling suggests 32-bit guests can run on 64-bit hypervisors...

 Thanks,
 rin

 On 2024/08/29 8:20, Christos Zoulas wrote:
  > Module Name:	src
  > Committed By:	christos
  > Date:		Wed Aug 28 23:20:50 UTC 2024
  >
  > Modified Files:
  > 	src/sys/arch/i386/i386: vector.S
  >
  > Log Message:
  > PR/58653: me: Revert btsl of negative value to orl
  >
  >
  > To generate a diff of this commit:
  > cvs rdiff -u -r1.89 -r1.90 src/sys/arch/i386/i386/vector.S
  >
  > Please note that diffs are not public domain; they are subject to the
  > copyright notices on the relevant files.
  >
  >
  > Modified files:

State-Changed-From-To: open->pending-pullups
State-Changed-By: rin@NetBSD.org
State-Changed-When: Sat, 21 Sep 2024 07:51:05 +0000
State-Changed-Why:
For Windows 11 x86_64 Hyper-V, I've confirmed:

- For netbsd-10 branch, i386 kernel crashes during boot.

- With this fix applied, it boots just fine and survives full ATF run.
  https://dmesgd.nycbug.org/index.cgi?do=view&id=7932

I've requested pullup to netbsd-10: [pullup-10 #908]
netbsd-9 is not affected.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58653 CVS commit: [netbsd-10] src/sys/arch/i386/i386
Date: Sat, 21 Sep 2024 12:37:02 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Sep 21 12:37:02 UTC 2024

 Modified Files:
 	src/sys/arch/i386/i386 [netbsd-10]: vector.S

 Log Message:
 Pull up following revision(s) (requested by rin in ticket #908):

 	sys/arch/i386/i386/vector.S: revision 1.90

 PR/58653: me: Revert btsl of negative value to orl


 To generate a diff of this commit:
 cvs rdiff -u -r1.89 -r1.89.4.1 src/sys/arch/i386/i386/vector.S

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: rin@NetBSD.org
State-Changed-When: Wed, 25 Sep 2024 14:36:06 +0000
State-Changed-Why:
Pulled up to netbsd-10. netbsd-9 is not affected.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.