CV-Bowen commented on PR #9297:
URL: https://github.com/apache/nuttx/pull/9297#issuecomment-1657063000

   @masayuki2009 I found the root cause of `error: kvm run failed Function not 
implemented` and it have fixed now.
   The root cause is the non-aligned copy from the virtio mmio config region, 
which does not match the standard:
   **Virtio 1.2 Spec 4.2.2.2 Driver Requirements: MMIO Device Register Layout**
   ```c
   The driver MUST only use 32 bit wide and aligned reads and writes to access 
the control registers described
   in table 4.1. For the device-specific configuration space, the driver MUST 
use 8 bit wide accesses for 8 bit
   wide fields, 16 bit wide and aligned accesses for 16 bit wide fields and 32 
bit wide and aligned accesses for
   32 and 64 bit wide fields.
   ```
   Follow Linux does, I change the virtio mmio read/write config to aligned 
copy and add macro virtio_read_config_member() and virtio_write_config_member() 
to directly read the config member. Could you have a look?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to