Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-14 Thread Thomas Gleixner
On Mon, Sep 13 2021 at 16:54, Michael S. Tsirkin wrote: > On Mon, Sep 13, 2021 at 09:38:30PM +0200, Thomas Gleixner wrote: >> and disable it again >> before reset() is invoked. That's a question of general robustness and >> not really a question of trusted hypervisors and encrypted guests. > > We

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
在 2021/9/14 上午6:31, Thomas Gleixner 写道: On Mon, Sep 13 2021 at 16:54, Michael S. Tsirkin wrote: On Mon, Sep 13, 2021 at 09:38:30PM +0200, Thomas Gleixner wrote: On Mon, Sep 13 2021 at 15:07, Jason Wang wrote: On Mon, Sep 13, 2021 at 2:50 PM Michael S. Tsirkin wrote: But doen't "irq is

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Thomas Gleixner
On Mon, Sep 13 2021 at 16:54, Michael S. Tsirkin wrote: > On Mon, Sep 13, 2021 at 09:38:30PM +0200, Thomas Gleixner wrote: >> On Mon, Sep 13 2021 at 15:07, Jason Wang wrote: >> > On Mon, Sep 13, 2021 at 2:50 PM Michael S. Tsirkin wrote: >> >> > But doen't "irq is disabled" basically mean "we

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 09:38:30PM +0200, Thomas Gleixner wrote: > On Mon, Sep 13 2021 at 15:07, Jason Wang wrote: > > On Mon, Sep 13, 2021 at 2:50 PM Michael S. Tsirkin wrote: > >> > But doen't "irq is disabled" basically mean "we told the hypervisor > >> > to disable the irq"? What extractly

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Thomas Gleixner
On Mon, Sep 13 2021 at 15:07, Jason Wang wrote: > On Mon, Sep 13, 2021 at 2:50 PM Michael S. Tsirkin wrote: >> > But doen't "irq is disabled" basically mean "we told the hypervisor >> > to disable the irq"? What extractly prevents hypervisor from >> > sending the irq even if guest thinks it

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
On Mon, Sep 13, 2021 at 3:01 PM Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 02:43:08PM +0800, Jason Wang wrote: > > On Mon, Sep 13, 2021 at 2:37 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > > > > On Mon, Sep 13, 2021 at 2:28 PM

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
On Mon, Sep 13, 2021 at 2:50 PM Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 02:37:42AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > > > On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Sep 13,

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 02:43:08PM +0800, Jason Wang wrote: > On Mon, Sep 13, 2021 at 2:37 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > > > On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Sep 13, 2021

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 02:37:42AM -0400, Michael S. Tsirkin wrote: > On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > > On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 13, 2021 at 02:08:02PM +0800, Jason Wang wrote: > > > > On Mon, Sep 13, 2021 at

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
On Mon, Sep 13, 2021 at 2:37 PM Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > > On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 13, 2021 at 02:08:02PM +0800, Jason Wang wrote: > > > > On Mon, Sep 13, 2021 at 2:04 PM

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 02:34:01PM +0800, Jason Wang wrote: > On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 13, 2021 at 02:08:02PM +0800, Jason Wang wrote: > > > On Mon, Sep 13, 2021 at 2:04 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Sep 13, 2021

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
On Mon, Sep 13, 2021 at 2:28 PM Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 02:08:02PM +0800, Jason Wang wrote: > > On Mon, Sep 13, 2021 at 2:04 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Sep 13, 2021 at 01:53:50PM +0800, Jason Wang wrote: > > > > We used to synchronize pending

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 02:08:02PM +0800, Jason Wang wrote: > On Mon, Sep 13, 2021 at 2:04 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 13, 2021 at 01:53:50PM +0800, Jason Wang wrote: > > > We used to synchronize pending MSI-X irq handlers via > > > synchronize_irq(), this may not work for

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Jason Wang
On Mon, Sep 13, 2021 at 2:04 PM Michael S. Tsirkin wrote: > > On Mon, Sep 13, 2021 at 01:53:50PM +0800, Jason Wang wrote: > > We used to synchronize pending MSI-X irq handlers via > > synchronize_irq(), this may not work for the untrusted device which > > may keep sending interrupts after reset

Re: [PATCH 6/9] virtio_pci: harden MSI-X interrupts

2021-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2021 at 01:53:50PM +0800, Jason Wang wrote: > We used to synchronize pending MSI-X irq handlers via > synchronize_irq(), this may not work for the untrusted device which > may keep sending interrupts after reset which may lead unexpected > results. Similarly, we should not enable