* linux-next: build failure after merge of the kvm-arm tree
@ 2014-09-22 4:06 Stephen Rothwell
2014-09-22 5:07 ` Eric Auger
` (2 more replies)
0 siblings, 3 replies; 34+ messages in thread
From: Stephen Rothwell @ 2014-09-22 4:06 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel, Eric Auger
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_register_irq_ack_notifier':
arch/x86/kvm/../../../virt/kvm/eventfd.c:493:2: error: implicit declaration of function 'kvm_vcpu_request_scan_ioapic' [-Werror=implicit-function-declaration]
kvm_vcpu_request_scan_ioapic(kvm);
^
Probably caused by commit 0ba09511ddc3 ("KVM: EVENTFD: remove inclusion
of irq.h").
I have used the kvm-arm tree from next-20140919 for today.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2014-09-22 4:06 Stephen Rothwell
@ 2014-09-22 5:07 ` Eric Auger
2014-09-22 5:31 ` Eric Auger
[not found] ` <CAEDV+g+qVgG+=1Q7gBCPs8oAjK8rpzpoQ2cPMF0hi5Q1M3Nckw@mail.gmail.com>
2014-09-24 6:50 ` Stephen Rothwell
2 siblings, 1 reply; 34+ messages in thread
From: Eric Auger @ 2014-09-22 5:07 UTC (permalink / raw)
To: Stephen Rothwell, Christoffer Dall, Marc Zyngier
Cc: linux-next, linux-kernel, Paolo Bonzini
Dear all,
Thanks Stephen for reporting the problem. Indeed removing irq.h header
file is no more possible since commit
c77dcacb397519b6ade8f08201a4a90a7f4f751e, "KVM: Move more code under
CONFIG_HAVE_KVM_IRQFD" which moves among other things
kvm_register_irq_ack_notifier and kvm_unregister_irq_ack_notifier in
eventfd.c.
including virt/kvm/ioapic.h might fix the problem but I am OoO next week
and cannot investigate further right now.
Please can you remove that commit. Sorry for the inconvenience.
Best Regards
Eric
On 09/22/2014 06:06 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_register_irq_ack_notifier':
> arch/x86/kvm/../../../virt/kvm/eventfd.c:493:2: error: implicit declaration of function 'kvm_vcpu_request_scan_ioapic' [-Werror=implicit-function-declaration]
> kvm_vcpu_request_scan_ioapic(kvm);
> ^
>
> Probably caused by commit 0ba09511ddc3 ("KVM: EVENTFD: remove inclusion
> of irq.h").
>
> I have used the kvm-arm tree from next-20140919 for today.
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2014-09-22 5:07 ` Eric Auger
@ 2014-09-22 5:31 ` Eric Auger
0 siblings, 0 replies; 34+ messages in thread
From: Eric Auger @ 2014-09-22 5:31 UTC (permalink / raw)
To: Stephen Rothwell, Christoffer Dall, Marc Zyngier
Cc: linux-next, linux-kernel, Paolo Bonzini
On 09/22/2014 07:07 AM, Eric Auger wrote:
> Dear all,
>
> Thanks Stephen for reporting the problem. Indeed removing irq.h header
> file is no more possible since commit
> c77dcacb397519b6ade8f08201a4a90a7f4f751e, "KVM: Move more code under
> CONFIG_HAVE_KVM_IRQFD" which moves among other things
> kvm_register_irq_ack_notifier and kvm_unregister_irq_ack_notifier in
> eventfd.c.
Hi,
kvm_register_irq_ack_notifier and kvm_unregister_irq_ack_notifier were
already included in Paul's patch,
commit e4d57e1ee1ab59f0cef0272800ac6c52e0ec814a, KVM: Move irq notifier
implementation into eventfd.c and just moved in above patch.
So I completely missed this ioapic function.
You can remove my commit. No commit does depend on it yet.
Thanks
Eric
>
> including virt/kvm/ioapic.h might fix the problem but I am OoO next week
> and cannot investigate further right now.
>
> Please can you remove that commit. Sorry for the inconvenience.
>
> Best Regards
>
> Eric
>
>
> On 09/22/2014 06:06 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the kvm-arm tree, today's linux-next build (x86_64 allmodconfig)
>> failed like this:
>>
>> arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_register_irq_ack_notifier':
>> arch/x86/kvm/../../../virt/kvm/eventfd.c:493:2: error: implicit declaration of function 'kvm_vcpu_request_scan_ioapic' [-Werror=implicit-function-declaration]
>> kvm_vcpu_request_scan_ioapic(kvm);
>> ^
>>
>> Probably caused by commit 0ba09511ddc3 ("KVM: EVENTFD: remove inclusion
>> of irq.h").
>>
>> I have used the kvm-arm tree from next-20140919 for today.
>>
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
[not found] ` <CAEDV+g+qVgG+=1Q7gBCPs8oAjK8rpzpoQ2cPMF0hi5Q1M3Nckw@mail.gmail.com>
@ 2014-09-22 21:26 ` Paolo Bonzini
0 siblings, 0 replies; 34+ messages in thread
From: Paolo Bonzini @ 2014-09-22 21:26 UTC (permalink / raw)
To: Christoffer Dall
Cc: Marc Zyngier, linux-next@vger.kernel.org, linux-kernel,
Eric Auger, Stephen Rothwell
Il 22/09/2014 21:46, Christoffer Dall ha scritto:
>
> I've taken a stab at fixing this properly, can you have a quick look and
> let me know if you prefer this or if I should just revert the commit?
>
> https://git.linaro.org/people/christoffer.dall/linux-kvm-arm.git/commit/3d2603609f2adaae85dd1ef9884270331ec120e3
I think you should include ioapic.h (under #ifdef __KVM_HAVE_IOAPIC as
in your patch), not irq.h. However, I haven't compiled it. Please send
the patch for inclusion in my tree, and I'll fix the conflict when I
pull from you.
Paolo
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2014-09-22 4:06 Stephen Rothwell
2014-09-22 5:07 ` Eric Auger
[not found] ` <CAEDV+g+qVgG+=1Q7gBCPs8oAjK8rpzpoQ2cPMF0hi5Q1M3Nckw@mail.gmail.com>
@ 2014-09-24 6:50 ` Stephen Rothwell
2014-09-24 7:06 ` Christoffer Dall
2 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2014-09-24 6:50 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel, Eric Auger
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
Hi all,
On Mon, 22 Sep 2014 14:06:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_register_irq_ack_notifier':
> arch/x86/kvm/../../../virt/kvm/eventfd.c:493:2: error: implicit declaration of function 'kvm_vcpu_request_scan_ioapic' [-Werror=implicit-function-declaration]
> kvm_vcpu_request_scan_ioapic(kvm);
> ^
>
> Probably caused by commit 0ba09511ddc3 ("KVM: EVENTFD: remove inclusion
> of irq.h").
>
> I have used the kvm-arm tree from next-20140919 for today.
Still getting this failure.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2014-09-24 6:50 ` Stephen Rothwell
@ 2014-09-24 7:06 ` Christoffer Dall
2014-09-24 10:05 ` Paolo Bonzini
0 siblings, 1 reply; 34+ messages in thread
From: Christoffer Dall @ 2014-09-24 7:06 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Marc Zyngier, linux-next, linux-kernel, Eric Auger, Paolo Bonzini
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
On Wed, Sep 24, 2014 at 04:50:30PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> On Mon, 22 Sep 2014 14:06:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the kvm-arm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > arch/x86/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_register_irq_ack_notifier':
> > arch/x86/kvm/../../../virt/kvm/eventfd.c:493:2: error: implicit declaration of function 'kvm_vcpu_request_scan_ioapic' [-Werror=implicit-function-declaration]
> > kvm_vcpu_request_scan_ioapic(kvm);
> > ^
> >
> > Probably caused by commit 0ba09511ddc3 ("KVM: EVENTFD: remove inclusion
> > of irq.h").
> >
> > I have used the kvm-arm tree from next-20140919 for today.
>
> Still getting this failure.
>
Commit e9142e3b69c2ae8a699463e219e5b029ff0d652b in kvm/queue fixes this,
but it hasn't gone to next yet.
Paolo, I know there's a scary commit in queue but there's a bunch of
scary stuff in the kvmarm/next too that I'd like to see in next, any
chance you can put a subset of queue into next?
Thanks,
-Christoffer
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2014-09-24 7:06 ` Christoffer Dall
@ 2014-09-24 10:05 ` Paolo Bonzini
0 siblings, 0 replies; 34+ messages in thread
From: Paolo Bonzini @ 2014-09-24 10:05 UTC (permalink / raw)
To: Christoffer Dall, Stephen Rothwell
Cc: Marc Zyngier, linux-next, linux-kernel, Eric Auger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 24/09/2014 09:06, Christoffer Dall ha scritto:
>>> Still getting this failure.
>>>
> Commit e9142e3b69c2ae8a699463e219e5b029ff0d652b in kvm/queue fixes
> this, but it hasn't gone to next yet.
>
> Paolo, I know there's a scary commit in queue but there's a bunch
> of scary stuff in the kvmarm/next too that I'd like to see in next,
> any chance you can put a subset of queue into next?
Yes, I will put the commit in next and rebase queue on top of it.
Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJUIpdYAAoJEBvWZb6bTYbyAkwP/jwno7pOt/sHUaa+p45Uouse
oFS2aej8ZVLz3LMy6KjFuIME1bJjQytIZrFaGn+UksGd6cfhECydVO8hlJxWUDbc
PrWpnwzX/u4sorewmX+hq9EoFBfIEzC86NyrUaujiL6ojLjoJ4mkoRc9LRCm/K7j
dPJFGEQqifs0HelWSQPxH4ei/YyHk/TcaKgepQGlG4Aw/crLHmEajbrnGLge7isW
H/EtBW5iJToG8mxB+ipSwFCADUkXC+FUrEblX5Nxma/949roXg8LPuZUBxCxWwyr
Voi5/lU1sZMRYixoCHhhKaWPDfoSspjPU4JNEUMj4qtrZrBD9W27+bjyQBTdLjU7
erI1pQCmZsU52RdAtZiUBuSbRxb8is+WlRHJy7dhlb+SBcgXNWw/k9sxV2U6PZ+T
Z4A0ngZM12ZTd6XWgiE+3mMR0XGBsjh7TYq+ybQReCgKeNy/Q3FL6fS4E9me7MWF
CWIfqV327GYfH/eU8Bd1/VHGEZfDefDXZrdANa+A5FhaGTLIZbPHfEo2BCc85LhS
RRlKjIg1LeByCHDRaQ8parl0xgZRLuENfHn5gso4ZsAKgLyUp8IIGanxH8GD2sRO
F2AtAFfLSlXUo/FsxaW0bQOxnBB9L/UX5QmMT/YwG7QoP97Wa4fDBV1ruHTiJ9SO
s/nkZE3pcbAFSv/0rXlG
=ln4T
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2016-09-23 3:31 Stephen Rothwell
2016-09-23 8:43 ` Marc Zyngier
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2016-09-23 3:31 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel, Vladimir Murzin
Hi all,
After merging the kvm-arm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
tmp/cc9rCfjd.s: Assembler messages:
tmp/cc9rCfjd.s:310: Error: bad or missing co-processor number -- `mcr "mrc","mcr","p15, 0, r2, c12, c12, 3",u32'
scripts/Makefile.build:290: recipe for target 'drivers/irqchip/irq-gic-v3.o' failed
Maybe caused by commit
4f2546384150 ("ARM: Move system register accessors to asm/cp15.h")
I have used the kvm-arm tree from next-20160922 for today.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2016-09-23 3:31 linux-next: build failure after merge of the kvm-arm tree Stephen Rothwell
@ 2016-09-23 8:43 ` Marc Zyngier
0 siblings, 0 replies; 34+ messages in thread
From: Marc Zyngier @ 2016-09-23 8:43 UTC (permalink / raw)
To: Christoffer Dall, Vladimir Murzin
Cc: Stephen Rothwell, linux-next, linux-kernel
On 23/09/16 04:31, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> tmp/cc9rCfjd.s: Assembler messages:
> tmp/cc9rCfjd.s:310: Error: bad or missing co-processor number -- `mcr "mrc","mcr","p15, 0, r2, c12, c12, 3",u32'
> scripts/Makefile.build:290: recipe for target 'drivers/irqchip/irq-gic-v3.o' failed
>
> Maybe caused by commit
>
> 4f2546384150 ("ARM: Move system register accessors to asm/cp15.h")
>
> I have used the kvm-arm tree from next-20160922 for today.
Ouch. This comes from 91ef844 ("irqchip/gic-v3: Reset BPR during
initialization") which has introduced a new accessor that doesn't get
converted by Vladimir's patch. My own fault.
This can be fixed-up by adding this to Vladimir's patch:
diff --git a/arch/arm/include/asm/arch_gicv3.h b/arch/arm/include/asm/arch_gicv3.h
index 996848e..809f3be 100644
--- a/arch/arm/include/asm/arch_gicv3.h
+++ b/arch/arm/include/asm/arch_gicv3.h
@@ -216,6 +216,15 @@ static inline void gic_write_sre(u32 val)
isb();
}
+static inline void gic_write_bpr1(u32 val)
+{
+#ifndef __write_sysreg
+ asm volatile("mcr " __stringify(ICC_BPR1) : : "r" (val));
+#else
+ write_sysreg(val, ICC_BPR1);
+#endif
+}
+
/*
* Even in 32bit systems that use LPAE, there is no guarantee that the I/O
* interface provides true 64bit atomic accesses, so using strd/ldrd doesn't
but that'll create a minor conflict.
Another possibility is to put Vladimir's series on the backburner until
tip/irq/core gets in, and bring it back at this time. I'd prefer the
first solution, as it gives a bit more exposure to the code...
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply related [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2022-05-05 10:10 Stephen Rothwell
2022-05-05 10:11 ` Stephen Rothwell
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2022-05-05 10:10 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 510 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (htmldocs)
failed like this:
Sphinx parallel build error:
docutils.utils.SystemMessage: /home/sfr/next/next/Documentation/virt/kvm/api.rst:6175: (SEVERE/4) Title level inconsistent:
For arm/arm64:
^^^^^^^^^^^^^^
Caused by commit
bfbab4456877 ("KVM: arm64: Implement PSCI SYSTEM_SUSPEND")
I have applied the following patch for today (I don't know if it is
correct, but it does build).
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2022-05-05 10:10 Stephen Rothwell
@ 2022-05-05 10:11 ` Stephen Rothwell
2022-05-05 11:27 ` Marc Zyngier
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2022-05-05 10:11 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
Hi all,
On Thu, 5 May 2022 20:10:05 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kvm-arm tree, today's linux-next build (htmldocs)
> failed like this:
>
> Sphinx parallel build error:
> docutils.utils.SystemMessage: /home/sfr/next/next/Documentation/virt/kvm/api.rst:6175: (SEVERE/4) Title level inconsistent:
>
> For arm/arm64:
> ^^^^^^^^^^^^^^
>
> Caused by commit
>
> bfbab4456877 ("KVM: arm64: Implement PSCI SYSTEM_SUSPEND")
>
> I have applied the following patch for today (I don't know if it is
> correct, but it does build).
oops :-)
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 5 May 2022 20:06:34 +1000
Subject: [PATCH] fix up for "VM: arm64: Implement PSCI SYSTEM_SUSPEND"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
Documentation/virt/kvm/api.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index deeb95dabc64..e5d685d4de11 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -6173,7 +6173,7 @@ Valid values for 'type' are:
the VM.
For arm/arm64:
-^^^^^^^^^^^^^^
+--------------
KVM_SYSTEM_EVENT_SUSPEND exits are enabled with the
KVM_CAP_ARM_SYSTEM_SUSPEND VM capability. If a guest invokes the PSCI
--
2.35.1
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2022-05-05 10:11 ` Stephen Rothwell
@ 2022-05-05 11:27 ` Marc Zyngier
0 siblings, 0 replies; 34+ messages in thread
From: Marc Zyngier @ 2022-05-05 11:27 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christoffer Dall, Oliver Upton, Linux Kernel Mailing List,
Linux Next Mailing List
On 2022-05-05 11:11, Stephen Rothwell wrote:
> Hi all,
>
> On Thu, 5 May 2022 20:10:05 +1000 Stephen Rothwell
> <sfr@canb.auug.org.au> wrote:
>>
>> After merging the kvm-arm tree, today's linux-next build (htmldocs)
>> failed like this:
>>
>> Sphinx parallel build error:
>> docutils.utils.SystemMessage:
>> /home/sfr/next/next/Documentation/virt/kvm/api.rst:6175: (SEVERE/4)
>> Title level inconsistent:
>>
>> For arm/arm64:
>> ^^^^^^^^^^^^^^
>>
>> Caused by commit
>>
>> bfbab4456877 ("KVM: arm64: Implement PSCI SYSTEM_SUSPEND")
>>
>> I have applied the following patch for today (I don't know if it is
>> correct, but it does build).
>
> oops :-)
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 5 May 2022 20:06:34 +1000
> Subject: [PATCH] fix up for "VM: arm64: Implement PSCI SYSTEM_SUSPEND"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> Documentation/virt/kvm/api.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/virt/kvm/api.rst
> b/Documentation/virt/kvm/api.rst
> index deeb95dabc64..e5d685d4de11 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -6173,7 +6173,7 @@ Valid values for 'type' are:
> the VM.
>
> For arm/arm64:
> -^^^^^^^^^^^^^^
> +--------------
>
> KVM_SYSTEM_EVENT_SUSPEND exits are enabled with the
> KVM_CAP_ARM_SYSTEM_SUSPEND VM capability. If a guest invokes the
> PSCI
> --
> 2.35.1
Thanks, I've taken this patch in my branch.
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2023-10-05 1:31 Stephen Rothwell
2023-10-05 1:53 ` Oliver Upton
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2023-10-05 1:31 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Jing Zhang, Oliver Upton, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (native perf)
failed like this:
In file included from util/../../arch/arm64/include/asm/cputype.h:201,
from util/arm-spe.c:37:
tools/arch/arm64/include/asm/sysreg.h:132:10: fatal error: asm/sysreg-defs.h: No such file or directory
132 | #include "asm/sysreg-defs.h"
| ^~~~~~~~~~~~~~~~~~~
Caused by commit
6a4c6c6a56c1 ("KVM: arm64: selftests: Import automatic generation of sysreg defs")
I have used the kvm-arm tree from next-20231004 for today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2023-10-05 1:31 Stephen Rothwell
@ 2023-10-05 1:53 ` Oliver Upton
0 siblings, 0 replies; 34+ messages in thread
From: Oliver Upton @ 2023-10-05 1:53 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christoffer Dall, Marc Zyngier, Jing Zhang,
Linux Kernel Mailing List, Linux Next Mailing List
Hi Stephen,
On Thu, Oct 05, 2023 at 12:31:59PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (native perf)
> failed like this:
>
> In file included from util/../../arch/arm64/include/asm/cputype.h:201,
> from util/arm-spe.c:37:
> tools/arch/arm64/include/asm/sysreg.h:132:10: fatal error: asm/sysreg-defs.h: No such file or directory
> 132 | #include "asm/sysreg-defs.h"
> | ^~~~~~~~~~~~~~~~~~~
Gah, shame on me, I didn't build everything in tools/ after this change.
> Caused by commit
>
> 6a4c6c6a56c1 ("KVM: arm64: selftests: Import automatic generation of sysreg defs")
>
> I have used the kvm-arm tree from next-20231004 for today.
Thanks much, I'll back this out from the kvmarm side of things until we
get it sorted.
--
Thanks,
Oliver
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2024-02-22 11:03 Stephen Rothwell
2024-02-22 11:11 ` Joey Gouly
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2024-02-22 11:03 UTC (permalink / raw)
To: Paolo Bonzini, Christoffer Dall, Marc Zyngier
Cc: KVM, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
Hi all,
After merging the kvm tree, today's linux-next build (arm64 defconfig)
failed like this:
In file included from <command-line>:
In function 'check_res_bits',
inlined from 'kvm_sys_reg_table_init' at arch/arm64/kvm/sys_regs.c:4109:2:
include/linux/compiler_types.h:449:45: error: call to '__compiletime_assert_591' declared with attribute error: BUILD_BUG_ON failed: ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0))
449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:430:25: note: in definition of macro '__compiletime_assert'
430 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:449:9: note: in expansion of macro '_compiletime_assert'
449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
arch/arm64/kvm/check-res-bits.h:58:9: note: in expansion of macro 'BUILD_BUG_ON'
58 | BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
| ^~~~~~~~~~~~
I bisected this to the merge of the kvm-arm tree into linux-next but I
could not figure out why it fails :-(
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 11:03 Stephen Rothwell
@ 2024-02-22 11:11 ` Joey Gouly
2024-02-22 11:40 ` Stephen Rothwell
0 siblings, 1 reply; 34+ messages in thread
From: Joey Gouly @ 2024-02-22 11:11 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Paolo Bonzini, Christoffer Dall, Marc Zyngier, KVM,
Linux Kernel Mailing List, Linux Next Mailing List
On Thu, Feb 22, 2024 at 10:03:49PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm tree, today's linux-next build (arm64 defconfig)
> failed like this:
>
> In file included from <command-line>:
> In function 'check_res_bits',
> inlined from 'kvm_sys_reg_table_init' at arch/arm64/kvm/sys_regs.c:4109:2:
> include/linux/compiler_types.h:449:45: error: call to '__compiletime_assert_591' declared with attribute error: BUILD_BUG_ON failed: ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0))
> 449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> | ^
> include/linux/compiler_types.h:430:25: note: in definition of macro '__compiletime_assert'
> 430 | prefix ## suffix(); \
> | ^~~~~~
> include/linux/compiler_types.h:449:9: note: in expansion of macro '_compiletime_assert'
> 449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> | ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
> 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> | ^~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> | ^~~~~~~~~~~~~~~~
> arch/arm64/kvm/check-res-bits.h:58:9: note: in expansion of macro 'BUILD_BUG_ON'
> 58 | BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> | ^~~~~~~~~~~~
>
> I bisected this to the merge of the kvm-arm tree into linux-next but I
> could not figure out why it fails :-(
>
> --
> Cheers,
> Stephen Rothwell
This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
added new fields to that register (ID_AA64DFR1_EL1)
and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
Not sure how to resolve it in the git branches though.
Thanks,
Joey
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 11:11 ` Joey Gouly
@ 2024-02-22 11:40 ` Stephen Rothwell
2024-02-22 13:11 ` Paolo Bonzini
2024-02-22 13:11 ` Paolo Bonzini
0 siblings, 2 replies; 34+ messages in thread
From: Stephen Rothwell @ 2024-02-22 11:40 UTC (permalink / raw)
To: Joey Gouly
Cc: Paolo Bonzini, Christoffer Dall, Marc Zyngier, KVM,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 3863 bytes --]
Hi Joey,
On Thu, 22 Feb 2024 11:11:29 +0000 Joey Gouly <joey.gouly@arm.com> wrote:
>
> On Thu, Feb 22, 2024 at 10:03:49PM +1100, Stephen Rothwell wrote:
> >
> > After merging the kvm tree, today's linux-next build (arm64 defconfig)
> > failed like this:
> >
> > In file included from <command-line>:
> > In function 'check_res_bits',
> > inlined from 'kvm_sys_reg_table_init' at arch/arm64/kvm/sys_regs.c:4109:2:
> > include/linux/compiler_types.h:449:45: error: call to '__compiletime_assert_591' declared with attribute error: BUILD_BUG_ON failed: ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0))
> > 449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > | ^
> > include/linux/compiler_types.h:430:25: note: in definition of macro '__compiletime_assert'
> > 430 | prefix ## suffix(); \
> > | ^~~~~~
> > include/linux/compiler_types.h:449:9: note: in expansion of macro '_compiletime_assert'
> > 449 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > | ^~~~~~~~~~~~~~~~~~~
> > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
> > 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> > | ^~~~~~~~~~~~~~~~~~
> > include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> > 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> > | ^~~~~~~~~~~~~~~~
> > arch/arm64/kvm/check-res-bits.h:58:9: note: in expansion of macro 'BUILD_BUG_ON'
> > 58 | BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> > | ^~~~~~~~~~~~
> >
> > I bisected this to the merge of the kvm-arm tree into linux-next but I
> > could not figure out why it fails :-(
> >
> > --
> > Cheers,
> > Stephen Rothwell
>
> This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
> added new fields to that register (ID_AA64DFR1_EL1)
>
> and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
> took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
>
> Not sure how to resolve it in the git branches though.
Thanks. I will apply this patch to the merge of the kvm-arm tree from
tomorrow (and at the end of today's tree).
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Feb 2024 22:31:22 +1100
Subject: [PATCH] fix up for "arm64/sysreg: Add register fields for ID_AA64DFR1_EL1"
interacting with "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/arm64/kvm/check-res-bits.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/kvm/check-res-bits.h b/arch/arm64/kvm/check-res-bits.h
index 967b5d171d53..39f537875d17 100644
--- a/arch/arm64/kvm/check-res-bits.h
+++ b/arch/arm64/kvm/check-res-bits.h
@@ -55,7 +55,6 @@ static inline void check_res_bits(void)
BUILD_BUG_ON(ID_AA64SMFR0_EL1_RES0 != (GENMASK_ULL(62, 61) | GENMASK_ULL(51, 49) | GENMASK_ULL(31, 31) | GENMASK_ULL(27, 0)));
BUILD_BUG_ON(ID_AA64FPFR0_EL1_RES0 != (GENMASK_ULL(63, 32) | GENMASK_ULL(27, 2)));
BUILD_BUG_ON(ID_AA64DFR0_EL1_RES0 != (GENMASK_ULL(27, 24) | GENMASK_ULL(19, 16)));
- BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
BUILD_BUG_ON(ID_AA64AFR0_EL1_RES0 != (GENMASK_ULL(63, 32)));
BUILD_BUG_ON(ID_AA64AFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
BUILD_BUG_ON(ID_AA64ISAR0_EL1_RES0 != (GENMASK_ULL(3, 0)));
--
2.43.0
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 11:40 ` Stephen Rothwell
@ 2024-02-22 13:11 ` Paolo Bonzini
2024-02-22 13:11 ` Paolo Bonzini
1 sibling, 0 replies; 34+ messages in thread
From: Paolo Bonzini @ 2024-02-22 13:11 UTC (permalink / raw)
To: Stephen Rothwell, Joey Gouly, Oliver Upton, Marc Zyngier
Cc: Christoffer Dall, KVM, Linux Kernel Mailing List,
Linux Next Mailing List
On 2/22/24 12:40, Stephen Rothwell wrote:
>> This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
>> added new fields to that register (ID_AA64DFR1_EL1)
>>
>> and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
>> took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
>>
>> Not sure how to resolve it in the git branches though.
>
> Thanks. I will apply this patch to the merge of the kvm-arm tree from
> tomorrow (and at the end of today's tree).
Marc, Iliver, can you get a topic branch from Catalin and friends for
this sysreg patch, and apply the fixup directly to the kvm-arm branch in
the merge commit?
Not _necessary_, as I can always ask Linus to do the fixup, but
generally he prefers to have this sorted out by the maintainers if it is
detected by linux-next.
Paolo
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 22 Feb 2024 22:31:22 +1100
> Subject: [PATCH] fix up for "arm64/sysreg: Add register fields for ID_AA64DFR1_EL1"
>
> interacting with "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/arm64/kvm/check-res-bits.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/check-res-bits.h b/arch/arm64/kvm/check-res-bits.h
> index 967b5d171d53..39f537875d17 100644
> --- a/arch/arm64/kvm/check-res-bits.h
> +++ b/arch/arm64/kvm/check-res-bits.h
> @@ -55,7 +55,6 @@ static inline void check_res_bits(void)
> BUILD_BUG_ON(ID_AA64SMFR0_EL1_RES0 != (GENMASK_ULL(62, 61) | GENMASK_ULL(51, 49) | GENMASK_ULL(31, 31) | GENMASK_ULL(27, 0)));
> BUILD_BUG_ON(ID_AA64FPFR0_EL1_RES0 != (GENMASK_ULL(63, 32) | GENMASK_ULL(27, 2)));
> BUILD_BUG_ON(ID_AA64DFR0_EL1_RES0 != (GENMASK_ULL(27, 24) | GENMASK_ULL(19, 16)));
> - BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> BUILD_BUG_ON(ID_AA64AFR0_EL1_RES0 != (GENMASK_ULL(63, 32)));
> BUILD_BUG_ON(ID_AA64AFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> BUILD_BUG_ON(ID_AA64ISAR0_EL1_RES0 != (GENMASK_ULL(3, 0)));
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 11:40 ` Stephen Rothwell
2024-02-22 13:11 ` Paolo Bonzini
@ 2024-02-22 13:11 ` Paolo Bonzini
2024-02-22 14:31 ` Marc Zyngier
1 sibling, 1 reply; 34+ messages in thread
From: Paolo Bonzini @ 2024-02-22 13:11 UTC (permalink / raw)
To: Stephen Rothwell, Joey Gouly, Oliver Upton, Marc Zyngier
Cc: Christoffer Dall, KVM, Linux Kernel Mailing List,
Linux Next Mailing List
On 2/22/24 12:40, Stephen Rothwell wrote:
>> This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
>> added new fields to that register (ID_AA64DFR1_EL1)
>>
>> and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
>> took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
>>
>> Not sure how to resolve it in the git branches though.
>
> Thanks. I will apply this patch to the merge of the kvm-arm tree from
> tomorrow (and at the end of today's tree).
Marc, Oliver, can you get a topic branch from Catalin and friends for
this sysreg patch, and apply the fixup directly to the kvm-arm branch in
the merge commit?
Not _necessary_, as I can always ask Linus to do the fixup, but
generally he prefers to have this sorted out by the maintainers if it is
detected by linux-next.
Paolo
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 22 Feb 2024 22:31:22 +1100
> Subject: [PATCH] fix up for "arm64/sysreg: Add register fields for ID_AA64DFR1_EL1"
>
> interacting with "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/arm64/kvm/check-res-bits.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/check-res-bits.h b/arch/arm64/kvm/check-res-bits.h
> index 967b5d171d53..39f537875d17 100644
> --- a/arch/arm64/kvm/check-res-bits.h
> +++ b/arch/arm64/kvm/check-res-bits.h
> @@ -55,7 +55,6 @@ static inline void check_res_bits(void)
> BUILD_BUG_ON(ID_AA64SMFR0_EL1_RES0 != (GENMASK_ULL(62, 61) | GENMASK_ULL(51, 49) | GENMASK_ULL(31, 31) | GENMASK_ULL(27, 0)));
> BUILD_BUG_ON(ID_AA64FPFR0_EL1_RES0 != (GENMASK_ULL(63, 32) | GENMASK_ULL(27, 2)));
> BUILD_BUG_ON(ID_AA64DFR0_EL1_RES0 != (GENMASK_ULL(27, 24) | GENMASK_ULL(19, 16)));
> - BUILD_BUG_ON(ID_AA64DFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> BUILD_BUG_ON(ID_AA64AFR0_EL1_RES0 != (GENMASK_ULL(63, 32)));
> BUILD_BUG_ON(ID_AA64AFR1_EL1_RES0 != (GENMASK_ULL(63, 0)));
> BUILD_BUG_ON(ID_AA64ISAR0_EL1_RES0 != (GENMASK_ULL(3, 0)));
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 13:11 ` Paolo Bonzini
@ 2024-02-22 14:31 ` Marc Zyngier
2024-02-22 18:58 ` Oliver Upton
0 siblings, 1 reply; 34+ messages in thread
From: Marc Zyngier @ 2024-02-22 14:31 UTC (permalink / raw)
To: Paolo Bonzini, Oliver Upton
Cc: Stephen Rothwell, Joey Gouly, Christoffer Dall, KVM,
Linux Kernel Mailing List, Linux Next Mailing List
On Thu, 22 Feb 2024 13:11:59 +0000,
Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 2/22/24 12:40, Stephen Rothwell wrote:
> >> This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
> >> added new fields to that register (ID_AA64DFR1_EL1)
> >>
> >> and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
> >> took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
> >>
> >> Not sure how to resolve it in the git branches though.
> >
> > Thanks. I will apply this patch to the merge of the kvm-arm tree from
> > tomorrow (and at the end of today's tree).
>
> Marc, Oliver, can you get a topic branch from Catalin and friends for
> this sysreg patch, and apply the fixup directly to the kvm-arm branch
> in the merge commit?
>
> Not _necessary_, as I can always ask Linus to do the fixup, but
> generally he prefers to have this sorted out by the maintainers if it
> is detected by linux-next.
I think that's not the correct thing to do at this time. I should have
timed the introduction of these checks a bit later, after the merge
window.
But more to the point, the proposed patch is also not the best thing
to merge, because it hides that there is a discrepancy between what
the architecture describes, and what KVM knows. I really want to know
about it, or it will be yet another bug that we wont detect easily.
Specially for ID_AA64DFR*_EL1 which are a bloody mine-field.
So I'd rather we make the check optional, and we'll play catch up for
a bit longer. Something like the patch below.
Oliver, do you mind queuing this ASAP (also pushed out to my dev
branch)?
Thanks,
M.
From 85d861a6ca055c7681c826c580e7c90d74c26ac5 Mon Sep 17 00:00:00 2001
From: Marc Zyngier <maz@kernel.org>
Date: Thu, 22 Feb 2024 14:12:09 +0000
Subject: [PATCH] KVM: arm64: Make build-time check of RES0/RES1 bits optional
In order to ease the transition towards a state of absolute
paranoia where all RES0/RES1 bits gets checked against what
KVM know of them, make the checks optional and garded by a
config symbol (CONFIG_KVM_ARM64_RES_BITS_PARANOIA) default to n.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/Kconfig | 11 +++++++++++
arch/arm64/kvm/check-res-bits.h | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 5c2a672c06a8..fa9389270cfe 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -67,4 +67,15 @@ config PROTECTED_NVHE_STACKTRACE
If unsure, or not using protected nVHE (pKVM), say N.
+config KVM_ARM64_RES_BITS_PARANOIA
+ bool "Build-time check of RES0/RES1 bits"
+ depends on KVM
+ default n
+ help
+ Say Y here to validate that KVM's knowledge of most system
+ registers' RES0/RES1 bits matches when the rest of the kernel
+ defines. Expect the build to fail badly if you enable this.
+
+ Just say N.
+
endif # VIRTUALIZATION
diff --git a/arch/arm64/kvm/check-res-bits.h b/arch/arm64/kvm/check-res-bits.h
index 967b5d171d53..2d98e60efc3c 100644
--- a/arch/arm64/kvm/check-res-bits.h
+++ b/arch/arm64/kvm/check-res-bits.h
@@ -21,6 +21,8 @@
*/
static inline void check_res_bits(void)
{
+#ifdef CONFIG_KVM_ARM64_RES_BITS_PARANOIA
+
BUILD_BUG_ON(OSDTRRX_EL1_RES0 != (GENMASK_ULL(63, 32)));
BUILD_BUG_ON(MDCCINT_EL1_RES0 != (GENMASK_ULL(63, 31) | GENMASK_ULL(28, 0)));
BUILD_BUG_ON(MDSCR_EL1_RES0 != (GENMASK_ULL(63, 36) | GENMASK_ULL(28, 28) | GENMASK_ULL(25, 24) | GENMASK_ULL(20, 20) | GENMASK_ULL(18, 16) | GENMASK_ULL(11, 7) | GENMASK_ULL(5, 1)));
@@ -118,4 +120,6 @@ static inline void check_res_bits(void)
BUILD_BUG_ON(TRBMAR_EL1_RES0 != (GENMASK_ULL(63, 12)));
BUILD_BUG_ON(TRBTRG_EL1_RES0 != (GENMASK_ULL(63, 32)));
BUILD_BUG_ON(TRBIDR_EL1_RES0 != (GENMASK_ULL(63, 12) | GENMASK_ULL(7, 6)));
+
+#endif
}
--
2.39.2
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2024-02-22 14:31 ` Marc Zyngier
@ 2024-02-22 18:58 ` Oliver Upton
0 siblings, 0 replies; 34+ messages in thread
From: Oliver Upton @ 2024-02-22 18:58 UTC (permalink / raw)
To: Marc Zyngier
Cc: Paolo Bonzini, Stephen Rothwell, Joey Gouly, Christoffer Dall,
KVM, Linux Kernel Mailing List, Linux Next Mailing List
On Thu, Feb 22, 2024 at 02:31:38PM +0000, Marc Zyngier wrote:
> On Thu, 22 Feb 2024 13:11:59 +0000,
> Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > On 2/22/24 12:40, Stephen Rothwell wrote:
> > >> This fails because https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=fdd867fe9b32
> > >> added new fields to that register (ID_AA64DFR1_EL1)
> > >>
> > >> and commit b80b701d5a6 ("KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking")
> > >> took a snapshot of the fields, so the RES0 (reserved 0) bits don't match anymore.
> > >>
> > >> Not sure how to resolve it in the git branches though.
> > >
> > > Thanks. I will apply this patch to the merge of the kvm-arm tree from
> > > tomorrow (and at the end of today's tree).
> >
> > Marc, Oliver, can you get a topic branch from Catalin and friends for
> > this sysreg patch, and apply the fixup directly to the kvm-arm branch
> > in the merge commit?
> >
> > Not _necessary_, as I can always ask Linus to do the fixup, but
> > generally he prefers to have this sorted out by the maintainers if it
> > is detected by linux-next.
>
> I think that's not the correct thing to do at this time. I should have
> timed the introduction of these checks a bit later, after the merge
> window.
>
> But more to the point, the proposed patch is also not the best thing
> to merge, because it hides that there is a discrepancy between what
> the architecture describes, and what KVM knows. I really want to know
> about it, or it will be yet another bug that we wont detect easily.
> Specially for ID_AA64DFR*_EL1 which are a bloody mine-field.
>
> So I'd rather we make the check optional, and we'll play catch up for
> a bit longer. Something like the patch below.
>
> Oliver, do you mind queuing this ASAP (also pushed out to my dev
> branch)?
>
> Thanks,
>
> M.
>
> From 85d861a6ca055c7681c826c580e7c90d74c26ac5 Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <maz@kernel.org>
> Date: Thu, 22 Feb 2024 14:12:09 +0000
> Subject: [PATCH] KVM: arm64: Make build-time check of RES0/RES1 bits optional
>
> In order to ease the transition towards a state of absolute
> paranoia where all RES0/RES1 bits gets checked against what
> KVM know of them, make the checks optional and garded by a
> config symbol (CONFIG_KVM_ARM64_RES_BITS_PARANOIA) default to n.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
Applied as commit 99101dda29e3 ("KVM: arm64: Make build-time check of
RES0/RES1 bits optional") on the kvmarm/next branch.
--
Thanks,
Oliver
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2025-03-06 5:46 Stephen Rothwell
2025-03-06 9:56 ` Shameerali Kolothum Thodi
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2025-03-06 5:46 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Shameer Kolothum, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2867 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/firmware/smccc/kvm_guest.c:58:14: warning: no previous prototype for 'kvm_arm_target_impl_cpu_init' [-Wmissing-prototypes]
58 | void __init kvm_arm_target_impl_cpu_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/smccc/kvm_guest.c: In function 'kvm_arm_target_impl_cpu_init':
drivers/firmware/smccc/kvm_guest.c:89:39: error: invalid application of 'sizeof' to incomplete type 'struct target_impl_cpu'
89 | target = memblock_alloc(sizeof(*target) * max_cpus, __alignof__(*target));
| ^
drivers/firmware/smccc/kvm_guest.c:89:62: error: invalid application of '__alignof__' to incomplete type 'struct target_impl_cpu'
89 | target = memblock_alloc(sizeof(*target) * max_cpus, __alignof__(*target));
| ^~~~~~~~~~~
drivers/firmware/smccc/kvm_guest.c:102:23: error: invalid use of undefined type 'struct target_impl_cpu'
102 | target[i].midr = res.a1;
| ^
drivers/firmware/smccc/kvm_guest.c:102:26: error: invalid use of undefined type 'struct target_impl_cpu'
102 | target[i].midr = res.a1;
| ^
drivers/firmware/smccc/kvm_guest.c:103:23: error: invalid use of undefined type 'struct target_impl_cpu'
103 | target[i].revidr = res.a2;
| ^
drivers/firmware/smccc/kvm_guest.c:103:26: error: invalid use of undefined type 'struct target_impl_cpu'
103 | target[i].revidr = res.a2;
| ^
drivers/firmware/smccc/kvm_guest.c:104:23: error: invalid use of undefined type 'struct target_impl_cpu'
104 | target[i].aidr = res.a3;
| ^
drivers/firmware/smccc/kvm_guest.c:104:26: error: invalid use of undefined type 'struct target_impl_cpu'
104 | target[i].aidr = res.a3;
| ^
drivers/firmware/smccc/kvm_guest.c:107:14: error: implicit declaration of function 'cpu_errata_set_target_impl' [-Wimplicit-function-declaration]
107 | if (!cpu_errata_set_target_impl(max_cpus, target)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/firmware/smccc/kvm_guest.c:116:37: error: invalid application of 'sizeof' to incomplete type 'struct target_impl_cpu'
116 | memblock_free(target, sizeof(*target) * max_cpus);
| ^
Caused by commit
86edf6bdcf05 ("smccc/kvm_guest: Enable errata based on implementation CPUs")
I have used the kvm-arm tree from next-20250305 for today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: linux-next: build failure after merge of the kvm-arm tree
2025-03-06 5:46 Stephen Rothwell
@ 2025-03-06 9:56 ` Shameerali Kolothum Thodi
2025-03-07 0:00 ` Marc Zyngier
0 siblings, 1 reply; 34+ messages in thread
From: Shameerali Kolothum Thodi @ 2025-03-06 9:56 UTC (permalink / raw)
To: Stephen Rothwell, Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Linux Kernel Mailing List, Linux Next Mailing List
> -----Original Message-----
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Sent: Thursday, March 6, 2025 5:46 AM
> To: Christoffer Dall <cdall@cs.columbia.edu>; Marc Zyngier
> <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi@huawei.com>; Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org>; Linux Next Mailing List <linux-
> next@vger.kernel.org>
> Subject: linux-next: build failure after merge of the kvm-arm tree
>
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> drivers/firmware/smccc/kvm_guest.c:58:14: warning: no previous prototype
> for 'kvm_arm_target_impl_cpu_init' [-Wmissing-prototypes]
> 58 | void __init kvm_arm_target_impl_cpu_init(void)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/firmware/smccc/kvm_guest.c: In function
> 'kvm_arm_target_impl_cpu_init':
> drivers/firmware/smccc/kvm_guest.c:89:39: error: invalid application of
> 'sizeof' to incomplete type 'struct target_impl_cpu'
> 89 | target = memblock_alloc(sizeof(*target) * max_cpus,
> __alignof__(*target));
> | ^
> drivers/firmware/smccc/kvm_guest.c:89:62: error: invalid application of
> '__alignof__' to incomplete type 'struct target_impl_cpu'
> 89 | target = memblock_alloc(sizeof(*target) * max_cpus,
> __alignof__(*target));
> | ^~~~~~~~~~~
> drivers/firmware/smccc/kvm_guest.c:102:23: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 102 | target[i].midr = res.a1;
> | ^
> drivers/firmware/smccc/kvm_guest.c:102:26: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 102 | target[i].midr = res.a1;
> | ^
> drivers/firmware/smccc/kvm_guest.c:103:23: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 103 | target[i].revidr = res.a2;
> | ^
> drivers/firmware/smccc/kvm_guest.c:103:26: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 103 | target[i].revidr = res.a2;
> | ^
> drivers/firmware/smccc/kvm_guest.c:104:23: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 104 | target[i].aidr = res.a3;
> | ^
> drivers/firmware/smccc/kvm_guest.c:104:26: error: invalid use of undefined
> type 'struct target_impl_cpu'
> 104 | target[i].aidr = res.a3;
> | ^
> drivers/firmware/smccc/kvm_guest.c:107:14: error: implicit declaration of
> function 'cpu_errata_set_target_impl' [-Wimplicit-function-declaration]
> 107 | if (!cpu_errata_set_target_impl(max_cpus, target)) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/firmware/smccc/kvm_guest.c:116:37: error: invalid application of
> 'sizeof' to incomplete type 'struct target_impl_cpu'
> 116 | memblock_free(target, sizeof(*target) * max_cpus);
> | ^
>
> Caused by commit
>
> 86edf6bdcf05 ("smccc/kvm_guest: Enable errata based on implementation
> CPUs")
>
> I have used the kvm-arm tree from next-20250305 for today.
Thanks for reporting this.
Hmm..kvm_guest.c gets build through HAVE_ARM_SMCCC_DISCOVERY
which is selected by ARM_GIC_V3.
We could limit the kvm_arm_target_impl_cpu_init() to ARM64 to fix this
like below as these hypercall is only supported for KVM/ARM64.
Or is there a better way to handle this?
Thanks,
Shameer
---8---
diff --git a/drivers/firmware/smccc/kvm_guest.c
b/drivers/firmware/smccc/kvm_guest.c
index 2f03b582c298..5767aed25cdc 100644
--- a/drivers/firmware/smccc/kvm_guest.c
+++ b/drivers/firmware/smccc/kvm_guest.c
@@ -55,6 +55,7 @@ bool kvm_arm_hyp_service_available(u32 func_id)
}
EXPORT_SYMBOL_GPL(kvm_arm_hyp_service_available);
+#ifdef CONFIG_ARM64
void __init kvm_arm_target_impl_cpu_init(void)
{
int i;
@@ -115,3 +116,4 @@ void __init kvm_arm_target_impl_cpu_init(void)
mem_free:
memblock_free(target, sizeof(*target) * max_cpus);
}
+#endif
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-03-06 9:56 ` Shameerali Kolothum Thodi
@ 2025-03-07 0:00 ` Marc Zyngier
2025-03-07 0:51 ` Oliver Upton
0 siblings, 1 reply; 34+ messages in thread
From: Marc Zyngier @ 2025-03-07 0:00 UTC (permalink / raw)
To: Oliver Upton, Shameerali Kolothum Thodi
Cc: Stephen Rothwell, Christoffer Dall, Linux Kernel Mailing List,
Linux Next Mailing List
On Thu, 06 Mar 2025 09:56:32 +0000,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Sent: Thursday, March 6, 2025 5:46 AM
> > To: Christoffer Dall <cdall@cs.columbia.edu>; Marc Zyngier
> > <maz@kernel.org>
> > Cc: Oliver Upton <oliver.upton@linux.dev>; Shameerali Kolothum Thodi
> > <shameerali.kolothum.thodi@huawei.com>; Linux Kernel Mailing List
> > <linux-kernel@vger.kernel.org>; Linux Next Mailing List <linux-
> > next@vger.kernel.org>
> > Subject: linux-next: build failure after merge of the kvm-arm tree
> >
> > Hi all,
> >
> > After merging the kvm-arm tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> >
> > drivers/firmware/smccc/kvm_guest.c:58:14: warning: no previous prototype
> > for 'kvm_arm_target_impl_cpu_init' [-Wmissing-prototypes]
> > 58 | void __init kvm_arm_target_impl_cpu_init(void)
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/firmware/smccc/kvm_guest.c: In function
> > 'kvm_arm_target_impl_cpu_init':
> > drivers/firmware/smccc/kvm_guest.c:89:39: error: invalid application of
> > 'sizeof' to incomplete type 'struct target_impl_cpu'
> > 89 | target = memblock_alloc(sizeof(*target) * max_cpus,
> > __alignof__(*target));
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:89:62: error: invalid application of
> > '__alignof__' to incomplete type 'struct target_impl_cpu'
> > 89 | target = memblock_alloc(sizeof(*target) * max_cpus,
> > __alignof__(*target));
> > | ^~~~~~~~~~~
> > drivers/firmware/smccc/kvm_guest.c:102:23: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 102 | target[i].midr = res.a1;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:102:26: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 102 | target[i].midr = res.a1;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:103:23: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 103 | target[i].revidr = res.a2;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:103:26: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 103 | target[i].revidr = res.a2;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:104:23: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 104 | target[i].aidr = res.a3;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:104:26: error: invalid use of undefined
> > type 'struct target_impl_cpu'
> > 104 | target[i].aidr = res.a3;
> > | ^
> > drivers/firmware/smccc/kvm_guest.c:107:14: error: implicit declaration of
> > function 'cpu_errata_set_target_impl' [-Wimplicit-function-declaration]
> > 107 | if (!cpu_errata_set_target_impl(max_cpus, target)) {
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/firmware/smccc/kvm_guest.c:116:37: error: invalid application of
> > 'sizeof' to incomplete type 'struct target_impl_cpu'
> > 116 | memblock_free(target, sizeof(*target) * max_cpus);
> > | ^
> >
> > Caused by commit
> >
> > 86edf6bdcf05 ("smccc/kvm_guest: Enable errata based on implementation
> > CPUs")
> >
> > I have used the kvm-arm tree from next-20250305 for today.
>
> Thanks for reporting this.
>
> Hmm..kvm_guest.c gets build through HAVE_ARM_SMCCC_DISCOVERY
> which is selected by ARM_GIC_V3.
>
> We could limit the kvm_arm_target_impl_cpu_init() to ARM64 to fix this
> like below as these hypercall is only supported for KVM/ARM64.
>
> Or is there a better way to handle this?
>
> Thanks,
> Shameer
>
> ---8---
> diff --git a/drivers/firmware/smccc/kvm_guest.c
> b/drivers/firmware/smccc/kvm_guest.c
> index 2f03b582c298..5767aed25cdc 100644
> --- a/drivers/firmware/smccc/kvm_guest.c
> +++ b/drivers/firmware/smccc/kvm_guest.c
> @@ -55,6 +55,7 @@ bool kvm_arm_hyp_service_available(u32 func_id)
> }
> EXPORT_SYMBOL_GPL(kvm_arm_hyp_service_available);
>
> +#ifdef CONFIG_ARM64
> void __init kvm_arm_target_impl_cpu_init(void)
> {
> int i;
> @@ -115,3 +116,4 @@ void __init kvm_arm_target_impl_cpu_init(void)
> mem_free:
> memblock_free(target, sizeof(*target) * max_cpus);
> }
> +#endif
Yeah, that's probably best for now.
Oliver, do you mind stashing this on top so that -next can build
again? We can revisit this and have a better solution down the line.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-03-07 0:00 ` Marc Zyngier
@ 2025-03-07 0:51 ` Oliver Upton
0 siblings, 0 replies; 34+ messages in thread
From: Oliver Upton @ 2025-03-07 0:51 UTC (permalink / raw)
To: Marc Zyngier
Cc: Shameerali Kolothum Thodi, Stephen Rothwell, Christoffer Dall,
Linux Kernel Mailing List, Linux Next Mailing List
On Fri, Mar 07, 2025 at 12:00:15AM +0000, Marc Zyngier wrote:
> Oliver, do you mind stashing this on top so that -next can build
> again? We can revisit this and have a better solution down the line.
Done -- finally caught a break to open my laptop today.
Thanks,
Oliver
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2025-03-20 9:32 Stephen Rothwell
2025-03-20 13:35 ` Oliver Upton
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2025-03-20 9:32 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2620 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (arm64 defconfig)
failed like this:
arch/arm64/kernel/cpu_errata.c: In function 'has_impdef_pmuv3':
arch/arm64/kernel/cpu_errata.c:279:38: error: passing argument 1 of 'is_midr_in_range_list' makes pointer from integer without a cast [-Wint-conversion]
279 | return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
| ^~~~~~~~~~~~~~~
| |
| u32 {aka unsigned int}
arch/arm64/kernel/cpu_errata.c:47:53: note: expected 'const struct midr_range *' but argument is of type 'u32' {aka 'unsigned int'}
47 | bool is_midr_in_range_list(struct midr_range const *ranges)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
arch/arm64/kernel/cpu_errata.c:279:16: error: too many arguments to function 'is_midr_in_range_list'
279 | return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
| ^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/cpu_errata.c:47:6: note: declared here
47 | bool is_midr_in_range_list(struct midr_range const *ranges)
| ^~~~~~~~~~~~~~~~~~~~~
Caused by commit
1f561ad4b8f5 ("Merge branch 'kvm-arm64/pv-cpuid' into new-next")
The merge missed fixing up this instance from commit
e1231aacb065 ("arm64: Enable IMP DEF PMUv3 traps on Apple M*")
I have applied the following patch for today (but this should go into
the kvm-arm tree (perhaps squashed into the above merge).
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 20 Mar 2025 20:24:04 +1100
Subject: [PATCH] fix up for "Merge branch 'kvm-arm64/pv-cpuid' into new-next"
interacting with "arm64: Enable IMP DEF PMUv3 traps on Apple M*"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/arm64/kernel/cpu_errata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index caac9e10a5bb..b55f5f705750 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -276,7 +276,7 @@ static bool has_impdef_pmuv3(const struct arm64_cpu_capabilities *entry, int sco
if (pmuver != ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
return false;
- return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
+ return is_midr_in_range_list(impdef_pmuv3_cpus);
}
static void cpu_enable_impdef_pmuv3_traps(const struct arm64_cpu_capabilities *__unused)
--
2.45.2
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-03-20 9:32 Stephen Rothwell
@ 2025-03-20 13:35 ` Oliver Upton
0 siblings, 0 replies; 34+ messages in thread
From: Oliver Upton @ 2025-03-20 13:35 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christoffer Dall, Marc Zyngier, Linux Kernel Mailing List,
Linux Next Mailing List
Hi,
On Thu, Mar 20, 2025 at 08:32:03PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (arm64 defconfig)
> failed like this:
>
> arch/arm64/kernel/cpu_errata.c: In function 'has_impdef_pmuv3':
> arch/arm64/kernel/cpu_errata.c:279:38: error: passing argument 1 of 'is_midr_in_range_list' makes pointer from integer without a cast [-Wint-conversion]
> 279 | return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
> | ^~~~~~~~~~~~~~~
> | |
> | u32 {aka unsigned int}
> arch/arm64/kernel/cpu_errata.c:47:53: note: expected 'const struct midr_range *' but argument is of type 'u32' {aka 'unsigned int'}
> 47 | bool is_midr_in_range_list(struct midr_range const *ranges)
> | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
> arch/arm64/kernel/cpu_errata.c:279:16: error: too many arguments to function 'is_midr_in_range_list'
> 279 | return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
> | ^~~~~~~~~~~~~~~~~~~~~
> arch/arm64/kernel/cpu_errata.c:47:6: note: declared here
> 47 | bool is_midr_in_range_list(struct midr_range const *ranges)
> | ^~~~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 1f561ad4b8f5 ("Merge branch 'kvm-arm64/pv-cpuid' into new-next")
>
> The merge missed fixing up this instance from commit
>
> e1231aacb065 ("arm64: Enable IMP DEF PMUv3 traps on Apple M*")
>
> I have applied the following patch for today (but this should go into
> the kvm-arm tree (perhaps squashed into the above merge).
Thanks Stephen for the fix. Looks like I forgot to push /next when I
pushed out the tag, addressing now.
Thanks,
Oliver
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2025-07-29 4:22 Stephen Rothwell
2025-07-29 18:05 ` Oliver Upton
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2025-07-29 4:22 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier
Cc: Oliver Upton, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 538 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (htmldocs)
failed like this:
Using /home/sfr/kernels/next/next/scripts/kernel-doc.pl
Sphinx parallel build error:
docutils.utils.SystemMessage: Documentation/virt/kvm/devices/arm-vgic-v3.rst:128: (SEVERE/4) Unexpected section title or transition.
=====================
Caused by commit
eed9b1420907 ("Documentation: KVM: arm64: Describe VGICv3 registers writable pre-init")
I have reverted that commit for today.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-07-29 4:22 Stephen Rothwell
@ 2025-07-29 18:05 ` Oliver Upton
0 siblings, 0 replies; 34+ messages in thread
From: Oliver Upton @ 2025-07-29 18:05 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Christoffer Dall, Marc Zyngier, Linux Kernel Mailing List,
Linux Next Mailing List
On Tue, Jul 29, 2025 at 02:22:17PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm-arm tree, today's linux-next build (htmldocs)
> failed like this:
>
> Using /home/sfr/kernels/next/next/scripts/kernel-doc.pl
>
> Sphinx parallel build error:
> docutils.utils.SystemMessage: Documentation/virt/kvm/devices/arm-vgic-v3.rst:128: (SEVERE/4) Unexpected section title or transition.
>
> =====================
>
> Caused by commit
>
> eed9b1420907 ("Documentation: KVM: arm64: Describe VGICv3 registers writable pre-init")
>
> I have reverted that commit for today.
Thanks for taking care of this. Paolo has queued the fix after pulling
from kvmarm, should go away tomorrow.
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=next&id=6836e1f30fe90e4c19f6a3749e97ba1e44a840ef
Best,
Oliver
^ permalink raw reply [flat|nested] 34+ messages in thread
* linux-next: build failure after merge of the kvm-arm tree
@ 2025-09-23 15:28 Mark Brown
2025-09-23 16:02 ` Will Deacon
0 siblings, 1 reply; 34+ messages in thread
From: Mark Brown @ 2025-09-23 15:28 UTC (permalink / raw)
To: Christoffer Dall, Marc Zyngier, Catalin Marinas, Will Deacon,
Anshuman Khandual
Cc: Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 4196 bytes --]
Hi all,
After merging the kvm-arm tree, today's linux-next build (arm64
defconfig) failed like this:
In file included from <command-line>:
/tmp/next/build/arch/arm64/kvm/at.c: In function 'setup_s1_walk':
/tmp/next/build/arch/arm64/kvm/at.c:229:30: error: 'TCR_SH1_MASK' undeclared (first use in this function); did you mean 'TCR_SH0_MASK'?
229 | FIELD_GET(TCR_SH1_MASK, tcr) :
| ^~~~~~~~~~~~
/tmp/next/build/include/linux/compiler_types.h:577:23: note: in definition of macro '__compiletime_assert'
577 | if (!(condition)) \
| ^~~~~~~~~
/tmp/next/build/include/linux/compiler_types.h:597:9: note: in expansion of macro '_compiletime_assert'
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/bitfield.h:65:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
65 | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \
| ^~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/bitfield.h:155:17: note: in expansion of macro '__BF_FIELD_CHECK'
155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kvm/at.c:229:20: note: in expansion of macro 'FIELD_GET'
229 | FIELD_GET(TCR_SH1_MASK, tcr) :
| ^~~~~~~~~
/tmp/next/build/arch/arm64/kvm/at.c:229:30: note: each undeclared identifier is reported only once for each function it appears in
229 | FIELD_GET(TCR_SH1_MASK, tcr) :
| ^~~~~~~~~~~~
/tmp/next/build/include/linux/compiler_types.h:577:23: note: in definition of macro '__compiletime_assert'
577 | if (!(condition)) \
| ^~~~~~~~~
/tmp/next/build/include/linux/compiler_types.h:597:9: note: in expansion of macro '_compiletime_assert'
597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/bitfield.h:65:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
65 | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \
| ^~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/bitfield.h:155:17: note: in expansion of macro '__BF_FIELD_CHECK'
155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
/tmp/next/build/arch/arm64/kvm/at.c:229:20: note: in expansion of macro 'FIELD_GET'
229 | FIELD_GET(TCR_SH1_MASK, tcr) :
| ^~~~~~~~~
make[5]: *** [/tmp/next/build/scripts/Makefile.build:287: arch/arm64/kvm/at.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [/tmp/next/build/scripts/Makefile.build:556: arch/arm64/kvm] Error 2
make[3]: *** [/tmp/next/build/scripts/Makefile.build:556: arch/arm64] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/tmp/next/build/Makefile:2011: .] Error 2
make[1]: *** [/tmp/next/build/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Command exited with non-zero status 2
178.88user 199.89system 0:12.26elapsed 3087%CPU (0avgtext+0avgdata 429304maxresident)k
0inputs+0outputs (4major+2413868minor)pagefaults 0swaps
Caused by commit
4f91624778b27 ("arm64/sysreg: Replace TCR_EL1 field macros")
from the arm64 tree. I have reverted that commit.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-09-23 15:28 Mark Brown
@ 2025-09-23 16:02 ` Will Deacon
2025-09-23 16:44 ` Will Deacon
0 siblings, 1 reply; 34+ messages in thread
From: Will Deacon @ 2025-09-23 16:02 UTC (permalink / raw)
To: Mark Brown
Cc: Christoffer Dall, Marc Zyngier, Catalin Marinas,
Anshuman Khandual, Linux Kernel Mailing List,
Linux Next Mailing List
On Tue, Sep 23, 2025 at 05:28:05PM +0200, Mark Brown wrote:
> After merging the kvm-arm tree, today's linux-next build (arm64
> defconfig) failed like this:
>
> In file included from <command-line>:
> /tmp/next/build/arch/arm64/kvm/at.c: In function 'setup_s1_walk':
> /tmp/next/build/arch/arm64/kvm/at.c:229:30: error: 'TCR_SH1_MASK' undeclared (first use in this function); did you mean 'TCR_SH0_MASK'?
> 229 | FIELD_GET(TCR_SH1_MASK, tcr) :
> | ^~~~~~~~~~~~
[...]
> Caused by commit
>
> 4f91624778b27 ("arm64/sysreg: Replace TCR_EL1 field macros")
>
> from the arm64 tree. I have reverted that commit.
Thanks, I'll drop it from arm64 as well.
Will
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-09-23 16:02 ` Will Deacon
@ 2025-09-23 16:44 ` Will Deacon
2025-09-24 2:37 ` Anshuman Khandual
0 siblings, 1 reply; 34+ messages in thread
From: Will Deacon @ 2025-09-23 16:44 UTC (permalink / raw)
To: Mark Brown
Cc: Christoffer Dall, Marc Zyngier, Catalin Marinas,
Anshuman Khandual, Linux Kernel Mailing List,
Linux Next Mailing List
On Tue, Sep 23, 2025 at 05:02:02PM +0100, Will Deacon wrote:
> On Tue, Sep 23, 2025 at 05:28:05PM +0200, Mark Brown wrote:
> > After merging the kvm-arm tree, today's linux-next build (arm64
> > defconfig) failed like this:
> >
> > In file included from <command-line>:
> > /tmp/next/build/arch/arm64/kvm/at.c: In function 'setup_s1_walk':
> > /tmp/next/build/arch/arm64/kvm/at.c:229:30: error: 'TCR_SH1_MASK' undeclared (first use in this function); did you mean 'TCR_SH0_MASK'?
> > 229 | FIELD_GET(TCR_SH1_MASK, tcr) :
> > | ^~~~~~~~~~~~
>
> [...]
>
> > Caused by commit
> >
> > 4f91624778b27 ("arm64/sysreg: Replace TCR_EL1 field macros")
> >
> > from the arm64 tree. I have reverted that commit.
>
> Thanks, I'll drop it from arm64 as well.
(now dropped)
Will
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-09-23 16:44 ` Will Deacon
@ 2025-09-24 2:37 ` Anshuman Khandual
2025-09-24 7:45 ` Will Deacon
0 siblings, 1 reply; 34+ messages in thread
From: Anshuman Khandual @ 2025-09-24 2:37 UTC (permalink / raw)
To: Will Deacon, Mark Brown
Cc: Christoffer Dall, Marc Zyngier, Catalin Marinas,
Linux Kernel Mailing List, Linux Next Mailing List
On 23/09/25 10:14 PM, Will Deacon wrote:
> On Tue, Sep 23, 2025 at 05:02:02PM +0100, Will Deacon wrote:
>> On Tue, Sep 23, 2025 at 05:28:05PM +0200, Mark Brown wrote:
>>> After merging the kvm-arm tree, today's linux-next build (arm64
>>> defconfig) failed like this:
>>>
>>> In file included from <command-line>:
>>> /tmp/next/build/arch/arm64/kvm/at.c: In function 'setup_s1_walk':
>>> /tmp/next/build/arch/arm64/kvm/at.c:229:30: error: 'TCR_SH1_MASK' undeclared (first use in this function); did you mean 'TCR_SH0_MASK'?
>>> 229 | FIELD_GET(TCR_SH1_MASK, tcr) :
>>> | ^~~~~~~~~~~~
>>
>> [...]
>>
>>> Caused by commit
>>>
>>> 4f91624778b27 ("arm64/sysreg: Replace TCR_EL1 field macros")
>>>
>>> from the arm64 tree. I have reverted that commit.
>>
>> Thanks, I'll drop it from arm64 as well.
>
> (now dropped)
Hello Will/Mark,
The conflict happened as the commit c0cc438046ee (“KVM: arm64: Compute shareability for LPA2”)
which came in via the KVM tree, added a new TCR_SH1_MASK instance. Shall I respin the patches
accommodating the new changes from KVM or just wait for the next merge window ?
- Anshuman
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: linux-next: build failure after merge of the kvm-arm tree
2025-09-24 2:37 ` Anshuman Khandual
@ 2025-09-24 7:45 ` Will Deacon
0 siblings, 0 replies; 34+ messages in thread
From: Will Deacon @ 2025-09-24 7:45 UTC (permalink / raw)
To: Anshuman Khandual
Cc: Mark Brown, Christoffer Dall, Marc Zyngier, Catalin Marinas,
Linux Kernel Mailing List, Linux Next Mailing List
On Wed, Sep 24, 2025 at 08:07:16AM +0530, Anshuman Khandual wrote:
>
>
> On 23/09/25 10:14 PM, Will Deacon wrote:
> > On Tue, Sep 23, 2025 at 05:02:02PM +0100, Will Deacon wrote:
> >> On Tue, Sep 23, 2025 at 05:28:05PM +0200, Mark Brown wrote:
> >>> After merging the kvm-arm tree, today's linux-next build (arm64
> >>> defconfig) failed like this:
> >>>
> >>> In file included from <command-line>:
> >>> /tmp/next/build/arch/arm64/kvm/at.c: In function 'setup_s1_walk':
> >>> /tmp/next/build/arch/arm64/kvm/at.c:229:30: error: 'TCR_SH1_MASK' undeclared (first use in this function); did you mean 'TCR_SH0_MASK'?
> >>> 229 | FIELD_GET(TCR_SH1_MASK, tcr) :
> >>> | ^~~~~~~~~~~~
> >>
> >> [...]
> >>
> >>> Caused by commit
> >>>
> >>> 4f91624778b27 ("arm64/sysreg: Replace TCR_EL1 field macros")
> >>>
> >>> from the arm64 tree. I have reverted that commit.
> >>
> >> Thanks, I'll drop it from arm64 as well.
> >
> > (now dropped)
>
> Hello Will/Mark,
>
> The conflict happened as the commit c0cc438046ee (“KVM: arm64: Compute shareability for LPA2”)
> which came in via the KVM tree, added a new TCR_SH1_MASK instance. Shall I respin the patches
> accommodating the new changes from KVM or just wait for the next merge window ?
Probably best to wait at this stage. I don't think anybody is depending
on the cleanup for anything but please correct me if I'm wrong.
Will
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2025-09-24 7:45 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 3:31 linux-next: build failure after merge of the kvm-arm tree Stephen Rothwell
2016-09-23 8:43 ` Marc Zyngier
-- strict thread matches above, loose matches on Subject: below --
2025-09-23 15:28 Mark Brown
2025-09-23 16:02 ` Will Deacon
2025-09-23 16:44 ` Will Deacon
2025-09-24 2:37 ` Anshuman Khandual
2025-09-24 7:45 ` Will Deacon
2025-07-29 4:22 Stephen Rothwell
2025-07-29 18:05 ` Oliver Upton
2025-03-20 9:32 Stephen Rothwell
2025-03-20 13:35 ` Oliver Upton
2025-03-06 5:46 Stephen Rothwell
2025-03-06 9:56 ` Shameerali Kolothum Thodi
2025-03-07 0:00 ` Marc Zyngier
2025-03-07 0:51 ` Oliver Upton
2024-02-22 11:03 Stephen Rothwell
2024-02-22 11:11 ` Joey Gouly
2024-02-22 11:40 ` Stephen Rothwell
2024-02-22 13:11 ` Paolo Bonzini
2024-02-22 13:11 ` Paolo Bonzini
2024-02-22 14:31 ` Marc Zyngier
2024-02-22 18:58 ` Oliver Upton
2023-10-05 1:31 Stephen Rothwell
2023-10-05 1:53 ` Oliver Upton
2022-05-05 10:10 Stephen Rothwell
2022-05-05 10:11 ` Stephen Rothwell
2022-05-05 11:27 ` Marc Zyngier
2014-09-22 4:06 Stephen Rothwell
2014-09-22 5:07 ` Eric Auger
2014-09-22 5:31 ` Eric Auger
[not found] ` <CAEDV+g+qVgG+=1Q7gBCPs8oAjK8rpzpoQ2cPMF0hi5Q1M3Nckw@mail.gmail.com>
2014-09-22 21:26 ` Paolo Bonzini
2014-09-24 6:50 ` Stephen Rothwell
2014-09-24 7:06 ` Christoffer Dall
2014-09-24 10:05 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).