Skip to contentSkip to conversation

: How to use qemu to emulate MCTP Over SMBus devices?

qemu Cédric Le Goater 2 participants 2 messages Aug 30, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Byron,

Quoted 8 lines · www

Dear Sir,

I have a few questions for you to ask.
1. According to my data collection, MCTP function should not be implemented in qemu.
I would like to ask you how to simulate MCTP Over SMBus devices?Or do we have a device program with similar functions for reference? (The biggest problem with simulating MCTP Over SMBus devices is that there is a master-slave switch between request and response. It requires the device to actively respond to the requestor, that is, the device initiates the reply.)

Quoted 6 lines

2. Among the BMC functions, the communication between the BMC and the OS is a very important and basic function. Is there a way to simulate the communication between BMC and OS to test device drivers and applications? If we want to implement this feature, how do we go about it?

I am looking forward to your reply.
Byron

Initial support for MCTP over I2C is being discussed here :

https://lore.kernel.org/qemu-devel/[email protected]/

This is not my domain of expertise. So I am adding a few people who could help.

Thanks,

C.

#2 lore raw
Quoted 15 lines · Cédric Le Goater

Hello Byron,

Quoted 12 lines · www

Dear Sir,

I have a few questions for you to ask.
1. According to my data collection, MCTP function should not be implemented in qemu.
I would like to ask you how to simulate MCTP Over SMBus devices?Or do we have a device program with similar functions for reference? (The biggest problem with simulating MCTP Over SMBus devices is that there is a master-slave switch between request and response. It requires the device to actively respond to the requestor, that is, the device initiates the reply.)

2. Among the BMC functions, the communication between the BMC and the OS is a very important and basic function. Is there a way to simulate the communication between BMC and OS to test device drivers and applications? If we want to implement this feature, how do we go about it?

Quoted 9 lines
Quoted 2 lines

I am looking forward to your reply.
Byron

Initial support for MCTP over I2C is being discussed here :

https://lore.kernel.org/qemu-devel/[email protected]/

This is not my domain of expertise. So I am adding a few people who could help.

I think the already upstreamed support for asynchronous send (i2c_send_async + i2c_ack) along with the above series should get you started.

The series referenced by Cédric implements an abstract mctp device that other devices can derive from. This model implements MCTP control message handling as well as handling the actual I2C transport (packetization).

Thanks,
Klaus