Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-21 Thread Peter Maydell
On Thu, 21 Mar 2024 at 08:16, Sanjeev Kumar  wrote:
>
> Hi,
> our kernel is build with aarch64le. it is 64 bit ARM architecture.

Such a kernel cannot possibly boot on the vexpress-a15 machine
that you say you are using. So something doesn't seem right...

> when i am trying to use virt as machine, then qemu isn't starting. it is 
> being stuck after entering command,

You probably didn't build your kernel correctly to have all
the support needed for the virt machine's devices.

I recommend finding a tutorial on how to boot Linux
on the virt board. This one is a bit old but the basic
process will still work with newer Debian versions:
https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/

thanks
-- PMM



Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-21 Thread Sanjeev Kumar
as we are beginners. can you please guide us on using virt cpu please.

On Thu, Mar 21, 2024 at 1:52 PM Sanjeev Kumar 
wrote:

> cpu we are using cortex-a57 because it is nearby to our actual hardware
> exynos v9
>
> On Thu, Mar 21, 2024 at 1:46 PM Sanjeev Kumar 
> wrote:
>
>> Hi,
>> our kernel is build with aarch64le. it is 64 bit ARM architecture.
>> when i am trying to use virt as machine, then qemu isn't starting. it is
>> being stuck after entering command,
>>
>> On Wed, Mar 20, 2024 at 7:06 PM Peter Maydell 
>> wrote:
>>
>>> On Wed, 20 Mar 2024 at 13:06, Sanjeev Kumar 
>>> wrote:
>>> >
>>> > Hi Peter,
>>> > Thanks for your detailed review.
>>> > ifs.bin is our custom build and the linux kernel is booting fine with
>>> this file.
>>>
>>> If it is, then it must be a 32-bit kernel. So trying to run it
>>> on the cortex-a57 will not work at all, because that is a 64-bit
>>> CPU and will only boot 64-bit kernels. (QEMU emulation does not
>>> allow booting a guest kernel in 32-bit mode for CPUs that in
>>> hardware support both 32-bit and 64-bit, I'm afraid.)
>>>
>>> > "this board doesn't have a PCI bus" - can you please suggest some
>>> board which can support PCI bus?
>>>
>>> I just did: try the "virt" board. You'll need to decide what
>>> CPU you actually want to run first, though.
>>>
>>> thanks
>>> -- PMM
>>>
>>


Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-21 Thread Sanjeev Kumar
cpu we are using cortex-a57 because it is nearby to our actual hardware
exynos v9

On Thu, Mar 21, 2024 at 1:46 PM Sanjeev Kumar 
wrote:

> Hi,
> our kernel is build with aarch64le. it is 64 bit ARM architecture.
> when i am trying to use virt as machine, then qemu isn't starting. it is
> being stuck after entering command,
>
> On Wed, Mar 20, 2024 at 7:06 PM Peter Maydell 
> wrote:
>
>> On Wed, 20 Mar 2024 at 13:06, Sanjeev Kumar 
>> wrote:
>> >
>> > Hi Peter,
>> > Thanks for your detailed review.
>> > ifs.bin is our custom build and the linux kernel is booting fine with
>> this file.
>>
>> If it is, then it must be a 32-bit kernel. So trying to run it
>> on the cortex-a57 will not work at all, because that is a 64-bit
>> CPU and will only boot 64-bit kernels. (QEMU emulation does not
>> allow booting a guest kernel in 32-bit mode for CPUs that in
>> hardware support both 32-bit and 64-bit, I'm afraid.)
>>
>> > "this board doesn't have a PCI bus" - can you please suggest some board
>> which can support PCI bus?
>>
>> I just did: try the "virt" board. You'll need to decide what
>> CPU you actually want to run first, though.
>>
>> thanks
>> -- PMM
>>
>


Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-21 Thread Sanjeev Kumar
Hi,
our kernel is build with aarch64le. it is 64 bit ARM architecture.
when i am trying to use virt as machine, then qemu isn't starting. it is
being stuck after entering command,

On Wed, Mar 20, 2024 at 7:06 PM Peter Maydell 
wrote:

> On Wed, 20 Mar 2024 at 13:06, Sanjeev Kumar 
> wrote:
> >
> > Hi Peter,
> > Thanks for your detailed review.
> > ifs.bin is our custom build and the linux kernel is booting fine with
> this file.
>
> If it is, then it must be a 32-bit kernel. So trying to run it
> on the cortex-a57 will not work at all, because that is a 64-bit
> CPU and will only boot 64-bit kernels. (QEMU emulation does not
> allow booting a guest kernel in 32-bit mode for CPUs that in
> hardware support both 32-bit and 64-bit, I'm afraid.)
>
> > "this board doesn't have a PCI bus" - can you please suggest some board
> which can support PCI bus?
>
> I just did: try the "virt" board. You'll need to decide what
> CPU you actually want to run first, though.
>
> thanks
> -- PMM
>


Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-20 Thread Peter Maydell
On Wed, 20 Mar 2024 at 13:06, Sanjeev Kumar  wrote:
>
> Hi Peter,
> Thanks for your detailed review.
> ifs.bin is our custom build and the linux kernel is booting fine with this 
> file.

If it is, then it must be a 32-bit kernel. So trying to run it
on the cortex-a57 will not work at all, because that is a 64-bit
CPU and will only boot 64-bit kernels. (QEMU emulation does not
allow booting a guest kernel in 32-bit mode for CPUs that in
hardware support both 32-bit and 64-bit, I'm afraid.)

> "this board doesn't have a PCI bus" - can you please suggest some board which 
> can support PCI bus?

I just did: try the "virt" board. You'll need to decide what
CPU you actually want to run first, though.

thanks
-- PMM



Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-20 Thread Sanjeev Kumar
Hi Peter,
Thanks for your detailed review.
ifs.bin is our custom build and the linux kernel is booting fine with this
file.
"this board doesn't have a PCI bus" - can you please suggest some board
which can support PCI bus?
if possible can you please reframe the command line which i shared with you
with the supported board that supports PCI bus ?

On Wed, Mar 20, 2024 at 3:21 PM Peter Maydell 
wrote:

> On Wed, 20 Mar 2024 at 06:40, Sanjeev Kumar 
> wrote:
> >
> > Hi,
> > Sorry for incomplete command.
> > here is the complete command line.
> >
> > qemu-system-aarch64 -machine vexpress-a15 -cpu cortex-a57 -smp 4 -m 10G
> -kernel ifs.bin -drive file=disk-qemu.vmdk,if=none,id=drv0 -device
> virtio-blk-device,drive=drv0 -netdev
> tap,id=mynet0,ifname=tap0,script=no,downscript=no -device
> virtio-net-device,netdev=mynet0,mac=52:55:00:d1:55:01 -device
> virtio-rng-device -device ivshmem-plain,memdev=hostmem -object
> memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem
> -nographic
>
> Thanks. This command line is very confused. It is trying to use
> the "vexpress-a15" board model with a Cortex-A57. As the
> board name suggests, vexpress-a15 only works with a Cortex-A15.
> This board also cannot support the 10G of memory you are trying
> to use with it. Finally, the reason for the error message is that
> this board doesn't have a PCI bus, so there is no way to plug in
> the ivshmem PCI device you are trying to create.
>
> Also, "ifs.bin" is an odd name for a kernel: is this really
> a file that expects to be booted the way a Linux kernel is booted?
>
> If you want a board model that can handle 64-bit CPUs, lots
> of memory and PCI devices, I would suggest looking at the
> "virt" board. You'll need to make sure your kernel is
> built for that board.
>
> thanks
> -- PMM
>


Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-20 Thread Peter Maydell
On Wed, 20 Mar 2024 at 06:40, Sanjeev Kumar  wrote:
>
> Hi,
> Sorry for incomplete command.
> here is the complete command line.
>
> qemu-system-aarch64 -machine vexpress-a15 -cpu cortex-a57 -smp 4 -m 10G 
> -kernel ifs.bin -drive file=disk-qemu.vmdk,if=none,id=drv0 -device 
> virtio-blk-device,drive=drv0 -netdev 
> tap,id=mynet0,ifname=tap0,script=no,downscript=no -device 
> virtio-net-device,netdev=mynet0,mac=52:55:00:d1:55:01 -device 
> virtio-rng-device -device ivshmem-plain,memdev=hostmem -object 
> memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem 
> -nographic

Thanks. This command line is very confused. It is trying to use
the "vexpress-a15" board model with a Cortex-A57. As the
board name suggests, vexpress-a15 only works with a Cortex-A15.
This board also cannot support the 10G of memory you are trying
to use with it. Finally, the reason for the error message is that
this board doesn't have a PCI bus, so there is no way to plug in
the ivshmem PCI device you are trying to create.

Also, "ifs.bin" is an odd name for a kernel: is this really
a file that expects to be booted the way a Linux kernel is booted?

If you want a board model that can handle 64-bit CPUs, lots
of memory and PCI devices, I would suggest looking at the
"virt" board. You'll need to make sure your kernel is
built for that board.

thanks
-- PMM



Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-20 Thread Sanjeev Kumar
Hi,
Sorry for incomplete command.
here is the complete command line.

qemu-system-aarch64 -machine vexpress-a15 -cpu cortex-a57 -smp 4 -m 10G
-kernel ifs.bin -drive file=disk-qemu.vmdk,if=none,id=drv0 -device
virtio-blk-device,drive=drv0 -netdev
tap,id=mynet0,ifname=tap0,script=no,downscript=no -device
virtio-net-device,netdev=mynet0,mac=52:55:00:d1:55:01 -device
virtio-rng-device -device ivshmem-plain,memdev=hostmem -object
memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem
-nographic


Thanks & Regards,
Sanjeev.

On Tue, Mar 19, 2024 at 3:58 PM Peter Maydell 
wrote:

> On Tue, 19 Mar 2024 at 09:41, Sanjeev Kumar 
> wrote:
> >
> > Hi,
> > I am starting QEMU as below.
> > qemu-system-aarch64 [] -device ivshmem-plain,memdev=hostmem -object
> memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem
>
>
> Please give us the *full* command line, not the command line with
> half of it missing. I suspect the reason this is not working
> is going to be in the part you have [] omitted :-)
>
> thanks
> -- PMM
>


Re: No 'PCI' bus found for device 'ivshmem-plain'

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 09:41, Sanjeev Kumar  wrote:
>
> Hi,
> I am starting QEMU as below.
> qemu-system-aarch64 [] -device ivshmem-plain,memdev=hostmem -object 
> memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem


Please give us the *full* command line, not the command line with
half of it missing. I suspect the reason this is not working
is going to be in the part you have [] omitted :-)

thanks
-- PMM



No 'PCI' bus found for device 'ivshmem-plain'

2024-03-19 Thread Sanjeev Kumar
Hi,
I am starting QEMU as below.
qemu-system-aarch64 [] -device ivshmem-plain,memdev=hostmem -object
memory-backend-file,size=1M,share=on,mem-path=/dev/shm/ivshmem,id=hostmem

before this, i am starting ivshmem-server which i build from QEMU source
git repo. i am able to see ivshmem device created under /dev/shm. but after
starting QEMU, i am seeing error like

qemu-system-aarch64: -device ivshmem-plain,memdev=hostmem: No 'PCI' bus
found for device 'ivshmem-plain'


i tried building uio_ivshmem from
https://github.com/henning-schild-work/ivshmem-guest-code/tree/master/kernel_module/uio
and loading uio_ivshmem.ko

still not working.

output of lspci is
$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: VMware SVGA II Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest
Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio
Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0b.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB2 EHCI Controller
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA
Controller [AHCI mode] (rev 02)

i am using ubuntu 22.04 running in oracle virtualbox hosted on windows PC.

please help.