Reputation: 369
I am trying to emulate and use a smbus_eeprom device in QEMU. The smbus_eeprom implementation is already part of the open source QEMU code base. And I am giving the following parameter in the launch command to use the same:
-device smbus-eeprom,address=0x10
However, I am getting an error: "Parameter "driver" expects a pluggable device type"? Can anyone please tell me what is it that I am missing.
Thanks.
Upvotes: 0
Views: 1208
Reputation: 1
I think -global
is the way to do this.
I wanted to set an option for the pegasos2 machine sound card via-ac97. When running without doing so I get this warning:
$ qemu-system-ppc -machine pegasos2 -kernel boot.img -audiodev id=audio1,driver=pa
audio: Device via-ac97: audiodev default parameter is deprecated, please specify audiodev=audio1
Using -device
yields a similar result to what you saw
$ qemu-system-ppc -machine pegasos2 -kernel boot.img -audiodev id=audio1,driver=pa -device via-ac97,audiodev=audio1
audio: Device via-ac97: audiodev default parameter is deprecated, please specify audiodev=audio1
qemu-system-ppc: -device via-ac97,audiodev=audio1: Parameter 'driver' expects a pluggable device type
But with -global
no issue. The command below runs without the deprecation warning or error.
$ qemu-system-ppc -machine pegasos2 -kernel boot.img -audiodev id=audio1,driver=pa -global via-ac97.audiodev=audio1
Upvotes: 0
Reputation: 11473
QEMU's -device option is for users to configure virtual machines by adding devices which can be plugged into the machine being configured. The idea is that this models devices which can be plugged into a bus -- think of a PCI card, which you can plug into the PCI slot of a real piece of hardware.
Internally, QEMU also has models of bits of hardware like "a 16550 UART". These are more like models of individual chips, or pieces of a chip. In real hardware, you can't plug in a single chip like that yourself -- it comes as part of a larger device or built into the motherboard already, and the connections between that chip and the rest of the system are complicated and pre-decided by the motherboard designer. Similarly, in QEMU, users can't plug this kind of model into a VM themselves.
The SMBUS_EEPROM is a device of this second kind -- this is what the error message means by it not being a "pluggable device type". You can't directly add it to a VM; it is automatically provided on those machine models which need it for some purpose, and not present on other machine models.
Upvotes: 1