Re: [PATCH RFC don't apply] vdpa_sim: endian-ness for config space

2020-07-16 Thread Jason Wang
On 2020/7/16 下午1:42, Michael S. Tsirkin wrote: On Wed, Jul 15, 2020 at 10:02:32PM +0800, Jason Wang wrote: On 2020/7/15 下午9:58, Michael S. Tsirkin wrote: VDPA sim stores config space as native endian, but that is wrong: modern guests expect LE. I coded up the following to fix it up, but it

Re: [PATCH RFC don't apply] vdpa_sim: endian-ness for config space

2020-07-15 Thread Michael S. Tsirkin
On Wed, Jul 15, 2020 at 10:02:32PM +0800, Jason Wang wrote: > > On 2020/7/15 下午9:58, Michael S. Tsirkin wrote: > > VDPA sim stores config space as native endian, but that > > is wrong: modern guests expect LE. > > I coded up the following to fix it up, but it is wrong too: > > vdpasim_create is

Re: [PATCH RFC don't apply] vdpa_sim: endian-ness for config space

2020-07-15 Thread Jason Wang
On 2020/7/15 下午9:58, Michael S. Tsirkin wrote: VDPA sim stores config space as native endian, but that is wrong: modern guests expect LE. I coded up the following to fix it up, but it is wrong too: vdpasim_create is called before guest features are known. So what should we do? New ioctl to

[PATCH RFC don't apply] vdpa_sim: endian-ness for config space

2020-07-15 Thread Michael S. Tsirkin
VDPA sim stores config space as native endian, but that is wrong: modern guests expect LE. I coded up the following to fix it up, but it is wrong too: vdpasim_create is called before guest features are known. So what should we do? New ioctl to specify the interface used? More ideas?