All of lore.kernel.org
 help / color / mirror / Atom feed
* Parameter 'driver' expects pluggable device type
@ 2020-05-06 12:56 Priyamvad Acharya
  2020-05-07 21:02 ` John Snow
  0 siblings, 1 reply; 5+ messages in thread
From: Priyamvad Acharya @ 2020-05-06 12:56 UTC (permalink / raw)
  To: qemu-devel

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

Hello developer community,
I want to allow a *sysbus *type device to boot with kernel image(arm
architecture) via Qemu command line .

When I run qemu arm system executable with *-device *option via qemu
command line,I get following error message

> qemu-system-arm: -device pl061: Parameter 'driver' expects pluggable
device type

So, how to allow a sysbus device via command line?
Is there any working patch?

[-- Attachment #2: Type: text/html, Size: 615 bytes --]

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

* Re: Parameter 'driver' expects pluggable device type
  2020-05-06 12:56 Parameter 'driver' expects pluggable device type Priyamvad Acharya
@ 2020-05-07 21:02 ` John Snow
  2020-05-08  2:08   ` Priyamvad Acharya
  2020-05-08  2:10   ` Priyamvad Acharya
  0 siblings, 2 replies; 5+ messages in thread
From: John Snow @ 2020-05-07 21:02 UTC (permalink / raw)
  To: Priyamvad Acharya, qemu-devel



On 5/6/20 8:56 AM, Priyamvad Acharya wrote:
> 
> Hello developer community,
> I want to allow a *sysbus *type device to boot with kernel image(arm
> architecture) via Qemu command line .
> 
> When I run qemu arm system executable with *-device *option via qemu
> command line,I get following error message
> 
>> qemu-system-arm: -device pl061: Parameter 'driver' expects pluggable
> device type
> 
> So, how to allow a sysbus device via command line?
> Is there any working patch?

Hi, it looks like the pl061 device is not declared "user creatable" so
it is unavailable from the CLI. As a sysbus device, QEMU is not aware,
in the abstract, of how to "connect" the device to other devices.

See the sysbus class initialization code for more detail:
https://github.com/qemu/qemu/blob/master/hw/core/sysbus.c#L301


However, It looks like these boards/devices create such a device:

hw/arm/highbank
hw/arm/realview
hw/arm/sbsa-ref
hw/arm/stellaris
hw/arm/versatilepb
hw/arm/virt

If you want one on some other kind of machine, you'll need to write it
up yourself in the machine board code, but you didn't tell us what
version of QEMU you're using, what machine type you are trying to use, etc.

--js



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

* Re: Parameter 'driver' expects pluggable device type
  2020-05-07 21:02 ` John Snow
@ 2020-05-08  2:08   ` Priyamvad Acharya
  2020-05-08  2:10   ` Priyamvad Acharya
  1 sibling, 0 replies; 5+ messages in thread
From: Priyamvad Acharya @ 2020-05-08  2:08 UTC (permalink / raw)
  To: John Snow; +Cc: qemu-devel

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

Hi,
Thanks for providing relevant information.
FYI
I am using Qemu version *4.2.94 (v5.0.0-rc4-dirty).*
I am using *virt* board.

Where we need to set *user creatable *to true?
Any other modification is needed to allow sysbus device support?

Below is the script which I am using  to boot linux image with pl061 device
on virt board.

#!/bin/bash
>
> KERNEL="/lhome/priyamvad/debian_qemu_arm32/vmlinuz-3.16.0-6-armmp-lpae"
>
> INIT_IMAGE="/lhome/priyamvad/debian_qemu_arm32/initrd.img-3.16.0-6-armmp-lpae"
> DISK="/lhome/priyamvad/debian_qemu_arm32/hda30.qcow2"
>
> ./qemu-system-arm \
> -M virt \
> -m 1024 \
> -smp 4 \
> -kernel $KERNEL \
> -object rng-random,filename=/dev/urandom,id=rng0 \
> -device virtio-rng-device,rng=rng0 \
> -initrd $INIT_IMAGE \
> -append 'root=/dev/vda2' \
> -drive if=none,file=$DISK,format=qcow2,id=hd \
> -device pl061 \
> -device virtio-blk-device,drive=hd \
> -device virtio-net-device,netdev=usernet \
> -netdev user,id=usernet,hostfwd=tcp::2222-:22 \
> -nographic
>

Is this script  to boot linux image with pl061 device on virt board?


On Fri, 8 May 2020 at 02:32, John Snow <jsnow@redhat.com> wrote:

>
>
> On 5/6/20 8:56 AM, Priyamvad Acharya wrote:
> >
> > Hello developer community,
> > I want to allow a *sysbus *type device to boot with kernel image(arm
> > architecture) via Qemu command line .
> >
> > When I run qemu arm system executable with *-device *option via qemu
> > command line,I get following error message
> >
> >> qemu-system-arm: -device pl061: Parameter 'driver' expects pluggable
> > device type
> >
> > So, how to allow a sysbus device via command line?
> > Is there any working patch?
>
> Hi, it looks like the pl061 device is not declared "user creatable" so
> it is unavailable from the CLI. As a sysbus device, QEMU is not aware,
> in the abstract, of how to "connect" the device to other devices.
>
> See the sysbus class initialization code for more detail:
> https://github.com/qemu/qemu/blob/master/hw/core/sysbus.c#L301
>
>
> However, It looks like these boards/devices create such a device:
>
> hw/arm/highbank
> hw/arm/realview
> hw/arm/sbsa-ref
> hw/arm/stellaris
> hw/arm/versatilepb
> hw/arm/virt
>
> If you want one on some other kind of machine, you'll need to write it
> up yourself in the machine board code, but you didn't tell us what
> version of QEMU you're using, what machine type you are trying to use, etc.
>
> --js
>
>

[-- Attachment #2: Type: text/html, Size: 3455 bytes --]

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

* Re: Parameter 'driver' expects pluggable device type
  2020-05-07 21:02 ` John Snow
  2020-05-08  2:08   ` Priyamvad Acharya
@ 2020-05-08  2:10   ` Priyamvad Acharya
  2020-05-09  2:52     ` Priyamvad Acharya
  1 sibling, 1 reply; 5+ messages in thread
From: Priyamvad Acharya @ 2020-05-08  2:10 UTC (permalink / raw)
  To: John Snow; +Cc: qemu-devel

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

 Hi,
Thanks for providing relevant information.
FYI
I am using Qemu version *4.2.94 (v5.0.0-rc4-dirty).*
I am using *virt* board.

Where we need to set *user creatable *to true?
Any other modification is needed to allow sysbus device support?

Below is the script which I am using  to boot linux image with pl061 device
on virt board.

#!/bin/bash
>
> KERNEL="/lhome/priyamvad/debian_qemu_arm32/vmlinuz-3.16.0-6-armmp-lpae"
>
> INIT_IMAGE="/lhome/priyamvad/debian_qemu_arm32/initrd.img-3.16.0-6-armmp-lpae"
> DISK="/lhome/priyamvad/debian_qemu_arm32/hda30.qcow2"
>
> ./qemu-system-arm \
> -M virt \
> -m 1024 \
> -smp 4 \
> -kernel $KERNEL \
> -object rng-random,filename=/dev/urandom,id=rng0 \
> -device virtio-rng-device,rng=rng0 \
> -initrd $INIT_IMAGE \
> -append 'root=/dev/vda2' \
> -drive if=none,file=$DISK,format=qcow2,id=hd \
> -device pl061 \
> -device virtio-blk-device,drive=hd \
> -device virtio-net-device,netdev=usernet \
> -netdev user,id=usernet,hostfwd=tcp::2222-:22 \
> -nographic
>

Is the above script  correct  to boot linux image with pl061 device on virt
board?

On Fri, 8 May 2020 at 02:32, John Snow <jsnow@redhat.com> wrote:

>
>
> On 5/6/20 8:56 AM, Priyamvad Acharya wrote:
> >
> > Hello developer community,
> > I want to allow a *sysbus *type device to boot with kernel image(arm
> > architecture) via Qemu command line .
> >
> > When I run qemu arm system executable with *-device *option via qemu
> > command line,I get following error message
> >
> >> qemu-system-arm: -device pl061: Parameter 'driver' expects pluggable
> > device type
> >
> > So, how to allow a sysbus device via command line?
> > Is there any working patch?
>
> Hi, it looks like the pl061 device is not declared "user creatable" so
> it is unavailable from the CLI. As a sysbus device, QEMU is not aware,
> in the abstract, of how to "connect" the device to other devices.
>
> See the sysbus class initialization code for more detail:
> https://github.com/qemu/qemu/blob/master/hw/core/sysbus.c#L301
>
>
> However, It looks like these boards/devices create such a device:
>
> hw/arm/highbank
> hw/arm/realview
> hw/arm/sbsa-ref
> hw/arm/stellaris
> hw/arm/versatilepb
> hw/arm/virt
>
> If you want one on some other kind of machine, you'll need to write it
> up yourself in the machine board code, but you didn't tell us what
> version of QEMU you're using, what machine type you are trying to use, etc.
>
> --js
>
>

[-- Attachment #2: Type: text/html, Size: 3649 bytes --]

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

* Re: Parameter 'driver' expects pluggable device type
  2020-05-08  2:10   ` Priyamvad Acharya
@ 2020-05-09  2:52     ` Priyamvad Acharya
  0 siblings, 0 replies; 5+ messages in thread
From: Priyamvad Acharya @ 2020-05-09  2:52 UTC (permalink / raw)
  To: John Snow; +Cc: qemu-devel

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

Hi,
I have set user_creatable to true in class_init function of pl061 source
code.
Now when I run qemu via command line with *-device *option it gives below
output

> qemu-system-arm: Device pl061 can not be dynamically instantiated
>


I request community members to reply asap!!!!!!!!!!!!!!!



On Fri, 8 May 2020 at 07:40, Priyamvad Acharya <priyamvad.agnisys@gmail.com>
wrote:

> Hi,
> Thanks for providing relevant information.
> FYI
> I am using Qemu version *4.2.94 (v5.0.0-rc4-dirty).*
> I am using *virt* board.
>
> Where we need to set *user creatable *to true?
> Any other modification is needed to allow sysbus device support?
>
> Below is the script which I am using  to boot linux image with pl061
> device on virt board.
>
> #!/bin/bash
>>
>> KERNEL="/lhome/priyamvad/debian_qemu_arm32/vmlinuz-3.16.0-6-armmp-lpae"
>>
>> INIT_IMAGE="/lhome/priyamvad/debian_qemu_arm32/initrd.img-3.16.0-6-armmp-lpae"
>> DISK="/lhome/priyamvad/debian_qemu_arm32/hda30.qcow2"
>>
>> ./qemu-system-arm \
>> -M virt \
>> -m 1024 \
>> -smp 4 \
>> -kernel $KERNEL \
>> -object rng-random,filename=/dev/urandom,id=rng0 \
>> -device virtio-rng-device,rng=rng0 \
>> -initrd $INIT_IMAGE \
>> -append 'root=/dev/vda2' \
>> -drive if=none,file=$DISK,format=qcow2,id=hd \
>> -device pl061 \
>> -device virtio-blk-device,drive=hd \
>> -device virtio-net-device,netdev=usernet \
>> -netdev user,id=usernet,hostfwd=tcp::2222-:22 \
>> -nographic
>>
>
> Is the above script  correct  to boot linux image with pl061 device on
> virt board?
>
> On Fri, 8 May 2020 at 02:32, John Snow <jsnow@redhat.com> wrote:
>
>>
>>
>> On 5/6/20 8:56 AM, Priyamvad Acharya wrote:
>> >
>> > Hello developer community,
>> > I want to allow a *sysbus *type device to boot with kernel image(arm
>> > architecture) via Qemu command line .
>> >
>> > When I run qemu arm system executable with *-device *option via qemu
>> > command line,I get following error message
>> >
>> >> qemu-system-arm: -device pl061: Parameter 'driver' expects pluggable
>> > device type
>> >
>> > So, how to allow a sysbus device via command line?
>> > Is there any working patch?
>>
>> Hi, it looks like the pl061 device is not declared "user creatable" so
>> it is unavailable from the CLI. As a sysbus device, QEMU is not aware,
>> in the abstract, of how to "connect" the device to other devices.
>>
>> See the sysbus class initialization code for more detail:
>> https://github.com/qemu/qemu/blob/master/hw/core/sysbus.c#L301
>>
>>
>> However, It looks like these boards/devices create such a device:
>>
>> hw/arm/highbank
>> hw/arm/realview
>> hw/arm/sbsa-ref
>> hw/arm/stellaris
>> hw/arm/versatilepb
>> hw/arm/virt
>>
>> If you want one on some other kind of machine, you'll need to write it
>> up yourself in the machine board code, but you didn't tell us what
>> version of QEMU you're using, what machine type you are trying to use,
>> etc.
>>
>> --js
>>
>>

[-- Attachment #2: Type: text/html, Size: 4568 bytes --]

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

end of thread, other threads:[~2020-05-09  2:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 12:56 Parameter 'driver' expects pluggable device type Priyamvad Acharya
2020-05-07 21:02 ` John Snow
2020-05-08  2:08   ` Priyamvad Acharya
2020-05-08  2:10   ` Priyamvad Acharya
2020-05-09  2:52     ` Priyamvad Acharya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.