public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Jan 2 (riscv: exittext undef. references)
       [not found] <20240102165725.6d18cc50@canb.auug.org.au>
@ 2024-01-02 17:15 ` Randy Dunlap
  2024-01-04 11:02   ` Alexandre Ghiti
  2024-01-02 18:07 ` linux-next: Tree for Jan 2 (riscv & KVM problem) Randy Dunlap
  1 sibling, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2024-01-02 17:15 UTC (permalink / raw)
  To: Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, linux-riscv

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]



On 1/1/24 21:57, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20231222:
> 

on riscv 64-bit:
(gcc 13.2.0)

riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L8':
patch.c:(.text+0x17e): undefined reference to `__exittext_begin'
riscv64-linux-ld: patch.c:(.text+0x19c): undefined reference to `__exittext_end'
riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L43':
patch.c:(.text+0x40a): undefined reference to `__exittext_begin'
riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L0 ':
patch.c:(.text+0x428): undefined reference to `__exittext_end'
riscv64-linux-ld: patch.c:(.text+0xae8): undefined reference to `__exittext_begin'
riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L82':
patch.c:(.text+0xb06): undefined reference to `__exittext_end'
riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L118':
patch.c:(.text+0xd6e): undefined reference to `__exittext_begin'
riscv64-linux-ld: patch.c:(.text+0xd8c): undefined reference to `__exittext_end'


Full randconfig file is attached.


-- 
#Randy

[-- Attachment #2: config-r4502.gz --]
[-- Type: application/gzip, Size: 31928 bytes --]

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jan 2 (riscv & KVM problem)
       [not found] <20240102165725.6d18cc50@canb.auug.org.au>
  2024-01-02 17:15 ` linux-next: Tree for Jan 2 (riscv: exittext undef. references) Randy Dunlap
@ 2024-01-02 18:07 ` Randy Dunlap
  2024-01-03 15:18   ` Andrew Jones
  1 sibling, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2024-01-02 18:07 UTC (permalink / raw)
  To: Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, KVM list, linux-riscv



On 1/1/24 21:57, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20231222:
> 

It is possible for a riscv randconfig to create a .config file with
CONFIG_KVM enabled but CONFIG_HAVE_KVM is not set.
Is that expected?

CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_KVM_MMIO=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m

Should arch/riscv/kvm/Kconfig: "config KVM" select HAVE_KVM
along with the other selects there or should that "config KVM"
depend on HAVE_KVM?


The problem .config file causes build errors because EVENTFD
is not set:

../arch/riscv/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_irqfd_assign':
../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:19: error: implicit declaration of function 'eventfd_ctx_fileget'; did you mean 'eventfd_ctx_fdget'? [-Werror=implicit-function-declaration]
  335 |         eventfd = eventfd_ctx_fileget(f.file);
      |                   ^~~~~~~~~~~~~~~~~~~
      |                   eventfd_ctx_fdget
../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:17: warning: assignment to 'struct eventfd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  335 |         eventfd = eventfd_ctx_fileget(f.file);
      |                 ^


-- 
#Randy

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: linux-next: Tree for Jan 2 (riscv & KVM problem)
  2024-01-02 18:07 ` linux-next: Tree for Jan 2 (riscv & KVM problem) Randy Dunlap
@ 2024-01-03 15:18   ` Andrew Jones
  2024-01-04  6:06     ` Randy Dunlap
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Jones @ 2024-01-03 15:18 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, KVM list, linux-riscv

On Tue, Jan 02, 2024 at 10:07:21AM -0800, Randy Dunlap wrote:
> 
> 
> On 1/1/24 21:57, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Changes since 20231222:
> > 
> 
> It is possible for a riscv randconfig to create a .config file with
> CONFIG_KVM enabled but CONFIG_HAVE_KVM is not set.
> Is that expected?
> 
> CONFIG_HAVE_KVM_IRQCHIP=y
> CONFIG_HAVE_KVM_IRQ_ROUTING=y
> CONFIG_KVM_MMIO=y
> CONFIG_HAVE_KVM_MSI=y
> CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
> CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL=y
> CONFIG_KVM_XFER_TO_GUEST_WORK=y
> CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
> CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
> CONFIG_VIRTUALIZATION=y
> CONFIG_KVM=m
> 
> Should arch/riscv/kvm/Kconfig: "config KVM" select HAVE_KVM
> along with the other selects there or should that "config KVM"
> depend on HAVE_KVM?

We probably should add a patch which makes RISCV select HAVE_KVM and
KVM depend on HAVE_KVM in order for riscv kvm to be consistent with
the other KVM supporting architectures.

> 
> 
> The problem .config file causes build errors because EVENTFD
> is not set:
> 
> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_irqfd_assign':
> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:19: error: implicit declaration of function 'eventfd_ctx_fileget'; did you mean 'eventfd_ctx_fdget'? [-Werror=implicit-function-declaration]
>   335 |         eventfd = eventfd_ctx_fileget(f.file);
>       |                   ^~~~~~~~~~~~~~~~~~~
>       |                   eventfd_ctx_fdget
> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:17: warning: assignment to 'struct eventfd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>   335 |         eventfd = eventfd_ctx_fileget(f.file);
>       |                 ^
>

Hmm. riscv kvm selects HAVE_KVM_EVENTFD, which selects EVENTFD. I'm
not sure how the lack of HAVE_KVM is leading to this.

Thanks,
drew

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jan 2 (riscv & KVM problem)
  2024-01-03 15:18   ` Andrew Jones
@ 2024-01-04  6:06     ` Randy Dunlap
  2024-01-04  8:44       ` Andrew Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2024-01-04  6:06 UTC (permalink / raw)
  To: Andrew Jones
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, KVM list, linux-riscv



On 1/3/24 07:18, Andrew Jones wrote:
> On Tue, Jan 02, 2024 at 10:07:21AM -0800, Randy Dunlap wrote:
>>
>>
>> On 1/1/24 21:57, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20231222:
>>>
>>
>> It is possible for a riscv randconfig to create a .config file with
>> CONFIG_KVM enabled but CONFIG_HAVE_KVM is not set.
>> Is that expected?
>>
>> CONFIG_HAVE_KVM_IRQCHIP=y
>> CONFIG_HAVE_KVM_IRQ_ROUTING=y
>> CONFIG_KVM_MMIO=y
>> CONFIG_HAVE_KVM_MSI=y
>> CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
>> CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL=y
>> CONFIG_KVM_XFER_TO_GUEST_WORK=y
>> CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
>> CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
>> CONFIG_VIRTUALIZATION=y
>> CONFIG_KVM=m
>>
>> Should arch/riscv/kvm/Kconfig: "config KVM" select HAVE_KVM
>> along with the other selects there or should that "config KVM"
>> depend on HAVE_KVM?
> 
> We probably should add a patch which makes RISCV select HAVE_KVM and
> KVM depend on HAVE_KVM in order for riscv kvm to be consistent with
> the other KVM supporting architectures.
> 

Yes, I agree.

>>
>>
>> The problem .config file causes build errors because EVENTFD
>> is not set:
>>
>> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_irqfd_assign':
>> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:19: error: implicit declaration of function 'eventfd_ctx_fileget'; did you mean 'eventfd_ctx_fdget'? [-Werror=implicit-function-declaration]
>>   335 |         eventfd = eventfd_ctx_fileget(f.file);
>>       |                   ^~~~~~~~~~~~~~~~~~~
>>       |                   eventfd_ctx_fdget
>> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:17: warning: assignment to 'struct eventfd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>>   335 |         eventfd = eventfd_ctx_fileget(f.file);
>>       |                 ^
>>
> 
> Hmm. riscv kvm selects HAVE_KVM_EVENTFD, which selects EVENTFD. I'm
> not sure how the lack of HAVE_KVM is leading to this.

The "select HAVE_KVM_EVENTFD" is gone in linux-next.

-- 
#Randy

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: linux-next: Tree for Jan 2 (riscv & KVM problem)
  2024-01-04  6:06     ` Randy Dunlap
@ 2024-01-04  8:44       ` Andrew Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Jones @ 2024-01-04  8:44 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, KVM list, linux-riscv

On Wed, Jan 03, 2024 at 10:06:52PM -0800, Randy Dunlap wrote:
> 
> 
> On 1/3/24 07:18, Andrew Jones wrote:
> > On Tue, Jan 02, 2024 at 10:07:21AM -0800, Randy Dunlap wrote:
> >>
> >>
> >> On 1/1/24 21:57, Stephen Rothwell wrote:
> >>> Hi all,
> >>>
> >>> Changes since 20231222:
> >>>
> >>
> >> It is possible for a riscv randconfig to create a .config file with
> >> CONFIG_KVM enabled but CONFIG_HAVE_KVM is not set.
> >> Is that expected?
> >>
> >> CONFIG_HAVE_KVM_IRQCHIP=y
> >> CONFIG_HAVE_KVM_IRQ_ROUTING=y
> >> CONFIG_KVM_MMIO=y
> >> CONFIG_HAVE_KVM_MSI=y
> >> CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
> >> CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL=y
> >> CONFIG_KVM_XFER_TO_GUEST_WORK=y
> >> CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
> >> CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
> >> CONFIG_VIRTUALIZATION=y
> >> CONFIG_KVM=m
> >>
> >> Should arch/riscv/kvm/Kconfig: "config KVM" select HAVE_KVM
> >> along with the other selects there or should that "config KVM"
> >> depend on HAVE_KVM?
> > 
> > We probably should add a patch which makes RISCV select HAVE_KVM and
> > KVM depend on HAVE_KVM in order for riscv kvm to be consistent with
> > the other KVM supporting architectures.
> > 
> 
> Yes, I agree.
> 
> >>
> >>
> >> The problem .config file causes build errors because EVENTFD
> >> is not set:
> >>
> >> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_irqfd_assign':
> >> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:19: error: implicit declaration of function 'eventfd_ctx_fileget'; did you mean 'eventfd_ctx_fdget'? [-Werror=implicit-function-declaration]
> >>   335 |         eventfd = eventfd_ctx_fileget(f.file);
> >>       |                   ^~~~~~~~~~~~~~~~~~~
> >>       |                   eventfd_ctx_fdget
> >> ../arch/riscv/kvm/../../../virt/kvm/eventfd.c:335:17: warning: assignment to 'struct eventfd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >>   335 |         eventfd = eventfd_ctx_fileget(f.file);
> >>       |                 ^
> >>
> > 
> > Hmm. riscv kvm selects HAVE_KVM_EVENTFD, which selects EVENTFD. I'm
> > not sure how the lack of HAVE_KVM is leading to this.
> 
> The "select HAVE_KVM_EVENTFD" is gone in linux-next.

Doh, sorry about looking at the wrong tree...

I'll send a patch for riscv kvm now.

Thanks,
drew

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jan 2 (riscv: exittext undef. references)
  2024-01-02 17:15 ` linux-next: Tree for Jan 2 (riscv: exittext undef. references) Randy Dunlap
@ 2024-01-04 11:02   ` Alexandre Ghiti
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2024-01-04 11:02 UTC (permalink / raw)
  To: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, linux-riscv

Hi Randy,

On 02/01/2024 18:15, Randy Dunlap wrote:
>
> On 1/1/24 21:57, Stephen Rothwell wrote:
>> Hi all,
>>
>> Changes since 20231222:
>>
> on riscv 64-bit:
> (gcc 13.2.0)
>
> riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L8':
> patch.c:(.text+0x17e): undefined reference to `__exittext_begin'
> riscv64-linux-ld: patch.c:(.text+0x19c): undefined reference to `__exittext_end'
> riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L43':
> patch.c:(.text+0x40a): undefined reference to `__exittext_begin'
> riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L0 ':
> patch.c:(.text+0x428): undefined reference to `__exittext_end'
> riscv64-linux-ld: patch.c:(.text+0xae8): undefined reference to `__exittext_begin'
> riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L82':
> patch.c:(.text+0xb06): undefined reference to `__exittext_end'
> riscv64-linux-ld: arch/riscv/kernel/patch.o: in function `.L118':
> patch.c:(.text+0xd6e): undefined reference to `__exittext_begin'
> riscv64-linux-ld: patch.c:(.text+0xd8c): undefined reference to `__exittext_end'


This one is already fixed by this patch: 
https://lore.kernel.org/linux-riscv/20231214091926.203439-1-alexghiti@rivosinc.com/

Thanks for the report!

Alex


>
>
> Full randconfig file is attached.
>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-04 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240102165725.6d18cc50@canb.auug.org.au>
2024-01-02 17:15 ` linux-next: Tree for Jan 2 (riscv: exittext undef. references) Randy Dunlap
2024-01-04 11:02   ` Alexandre Ghiti
2024-01-02 18:07 ` linux-next: Tree for Jan 2 (riscv & KVM problem) Randy Dunlap
2024-01-03 15:18   ` Andrew Jones
2024-01-04  6:06     ` Randy Dunlap
2024-01-04  8:44       ` Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox