[RFC] vduse config write support

2024-07-23 Thread Srivatsa Vaddagiri
Currently vduse does not seem to support configuration space writes (vduse_vdpa_set_config does nothing). Is there any plan to lift that limitation? I am aware of the discussions that took place here: https://patchwork.kernel.org/project/netdevbpf/patch/20210615141331.407-11-xieyon...@bytedance.co

Re: [RFC] vduse config write support

2024-07-25 Thread Yongji Xie
On Wed, Jul 24, 2024 at 11:38 AM Srivatsa Vaddagiri wrote: > > Currently vduse does not seem to support configuration space writes > (vduse_vdpa_set_config does nothing). Is there any plan to lift that > limitation? I am aware of the discussions that took place here: > The problem is that current

Re: [RFC] vduse config write support

2024-07-25 Thread Jason Wang
On Wed, Jul 24, 2024 at 11:45 AM Srivatsa Vaddagiri wrote: > > Currently vduse does not seem to support configuration space writes > (vduse_vdpa_set_config does nothing). Is there any plan to lift that > limitation? I am aware of the discussions that took place here: > > https://patchwork.kernel.o

Re: [RFC] vduse config write support

2024-07-25 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 10:47:59AM +0800, Jason Wang wrote: > On Wed, Jul 24, 2024 at 11:45 AM Srivatsa Vaddagiri > wrote: > > > > Currently vduse does not seem to support configuration space writes > > (vduse_vdpa_set_config does nothing). Is there any plan to lift that > > limitation? I am aware

Re: [RFC] vduse config write support

2024-07-26 Thread Srivatsa Vaddagiri
* Jason Wang [2024-07-26 10:47:59]: > On Wed, Jul 24, 2024 at 11:45???AM Srivatsa Vaddagiri > wrote: > > > > Currently vduse does not seem to support configuration space writes > > (vduse_vdpa_set_config does nothing). Is there any plan to lift that > > limitation? I am aware of the discussions

Re: [RFC] vduse config write support

2024-07-26 Thread Srivatsa Vaddagiri
* Yongji Xie [2024-07-26 10:37:40]: > On Wed, Jul 24, 2024 at 11:38???AM Srivatsa Vaddagiri > wrote: > > > > Currently vduse does not seem to support configuration space writes > > (vduse_vdpa_set_config does nothing). Is there any plan to lift that > > limitation? I am aware of the discussions

Re: [RFC] vduse config write support

2024-07-26 Thread Michael S. Tsirkin
On Fri, Jul 26, 2024 at 12:33:24PM +0530, Srivatsa Vaddagiri wrote: > > Maybe you can give an example for this? We cache the configuration > > space to a faster access to that. > > Yes for the same reason of faster access, we wish to have config information > cached in hypervisor. In case of VDUSE

Re: [RFC] vduse config write support

2024-07-26 Thread Srivatsa Vaddagiri
* Jason Wang [2024-07-26 10:47:59]: > > 2) For PCI pass-through devices, we are concerned of letting VMM be in > > charge of > > emulating the complete configuration space (how can VM defend against > > invalid > > attributes presented for passthr devices)? > > Virtio driver has been hardened

Re: [RFC] vduse config write support

2024-07-28 Thread Jason Wang
On Fri, Jul 26, 2024 at 1:15 PM Michael S. Tsirkin wrote: > > On Fri, Jul 26, 2024 at 10:47:59AM +0800, Jason Wang wrote: > > On Wed, Jul 24, 2024 at 11:45 AM Srivatsa Vaddagiri > > wrote: > > > > > > Currently vduse does not seem to support configuration space writes > > > (vduse_vdpa_set_config

Re: [RFC] vduse config write support

2024-07-28 Thread Jason Wang
On Fri, Jul 26, 2024 at 3:04 PM Srivatsa Vaddagiri wrote: > > * Jason Wang [2024-07-26 10:47:59]: > > > On Wed, Jul 24, 2024 at 11:45???AM Srivatsa Vaddagiri > > wrote: > > > > > > Currently vduse does not seem to support configuration space writes > > > (vduse_vdpa_set_config does nothing). Is

Re: [RFC] vduse config write support

2024-07-28 Thread Srivatsa Vaddagiri
* Jason Wang [2024-07-29 10:16:48]: > > Without this optimization, guest VCPU would have stalled until VMM in host > > can > > emulate it, which can be long, especially a concern when the read is issued > > in > > hot path (interrupt handler, w/o MSI_X). > > I think I agree with Michael, let's

Re: [RFC] vduse config write support

2024-07-29 Thread Jason Wang
On Fri, Jul 26, 2024 at 8:42 PM Srivatsa Vaddagiri wrote: > > * Jason Wang [2024-07-26 10:47:59]: > > > > 2) For PCI pass-through devices, we are concerned of letting VMM be in > > > charge of > > > emulating the complete configuration space (how can VM defend against > > > invalid > > > attrib

Re: [RFC] vduse config write support

2024-07-29 Thread Jason Wang
On Mon, Jul 29, 2024 at 2:03 PM Srivatsa Vaddagiri wrote: > > * Jason Wang [2024-07-29 10:16:48]: > > > > Without this optimization, guest VCPU would have stalled until VMM in > > > host can > > > emulate it, which can be long, especially a concern when the read is > > > issued in > > > hot pat

Re: [RFC] vduse config write support

2024-07-29 Thread Jason Wang
On Tue, Jul 30, 2024 at 11:06 AM Jason Wang wrote: > > On Mon, Jul 29, 2024 at 2:03 PM Srivatsa Vaddagiri > wrote: > > > > * Jason Wang [2024-07-29 10:16:48]: > > > > > > Without this optimization, guest VCPU would have stalled until VMM in > > > > host can > > > > emulate it, which can be long