Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2025 at 04:57:51PM +0100, Eric Auger wrote: > Hi Michael, > > > On 2/20/25 4:25 PM, Michael S. Tsirkin wrote: > > On Fri, Jan 31, 2025 at 10:55:26AM +0100, Eric Auger wrote: > >> I tested [PATCH] virtio: Remove virtio devices on device_shutdown() > >> https://lore.kernel.org/all/2

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-02-20 Thread Eric Auger
Hi Michael, On 2/20/25 4:25 PM, Michael S. Tsirkin wrote: > On Fri, Jan 31, 2025 at 10:55:26AM +0100, Eric Auger wrote: >> I tested [PATCH] virtio: Remove virtio devices on device_shutdown() >> https://lore.kernel.org/all/20240808075141.3433253-1-kirill.shute...@linux.intel.com/ >> >> and it fixe

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-02-20 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:55:26AM +0100, Eric Auger wrote: > > I tested [PATCH] virtio: Remove virtio devices on device_shutdown() > https://lore.kernel.org/all/20240808075141.3433253-1-kirill.shute...@linux.intel.com/ > > and it fixes my issue > > Eric To make sure, we are dropping this in f

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-31 Thread Eric Auger
Hi On 1/24/25 3:44 AM, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >> disabled >> >> Hi Jason, >> >> >> On 1/23/25 2:34 AM, J

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-30 Thread Peter Xu
On Mon, Jan 27, 2025 at 08:44:50AM +0800, Jason Wang wrote: > On Sun, Jan 26, 2025 at 3:56 PM Jason Wang wrote: > > > > On Sat, Jan 25, 2025 at 12:42 AM Peter Xu wrote: > > > > > > Hello, Jason, Eric, > > > > > > On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > > > > It might be beca

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-26 Thread Jason Wang
On Sun, Jan 26, 2025 at 3:56 PM Jason Wang wrote: > > On Sat, Jan 25, 2025 at 12:42 AM Peter Xu wrote: > > > > Hello, Jason, Eric, > > > > On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > > > It might be because neither virtio bus nor virtio-net provides a > > > shutdown method. > >

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-25 Thread Jason Wang
On Sat, Jan 25, 2025 at 12:42 AM Peter Xu wrote: > > Hello, Jason, Eric, > > On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > > It might be because neither virtio bus nor virtio-net provides a > > shutdown method. > > > > There used to be requests to provide those to unbreak the kexec

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-25 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled ... >>>>>> vtd_address_space_refresh_all() will basically disable the iommu >>>>>> memory region. I

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Eric Auger
Hi, On 1/24/25 4:41 AM, Jason Wang wrote: > On Fri, Jan 24, 2025 at 11:30 AM Jason Wang wrote: >> On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong >> wrote: >>> >>> >>>> -Original Message----- >>>> From: Eric Auger >>>&g

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Eric Auger
Hi Zhenzhong, On 1/24/25 3:44 AM, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >> disabled >> >> Hi Jason, >> >> >> On 1/23/25

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Peter Xu
Hello, Jason, Eric, On Fri, Jan 24, 2025 at 11:30:56AM +0800, Jason Wang wrote: > It might be because neither virtio bus nor virtio-net provides a > shutdown method. > > There used to be requests to provide those to unbreak the kexec. > > A quick try might be to provide a .driver.shutdown to > v

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled > >On Fri, Jan 24, 2025 at 12:01 PM Duan, Zhenzhong > wrote: >> >> >> >> >-Original Message----- >>

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-24 Thread Jason Wang
On Fri, Jan 24, 2025 at 12:01 PM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Jason Wang > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets > >disabled > > > >On Fri, Jan 24, 2025 at 11:30 AM Jaso

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled > >On Fri, Jan 24, 2025 at 11:30 AM Jason Wang wrote: >> >> On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong >> wrote

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Fri, Jan 24, 2025 at 11:30 AM Jason Wang wrote: > > On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong > wrote: > > > > > > > > >-Original Message- > > >From: Eric Auger > > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callb

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Fri, Jan 24, 2025 at 10:44 AM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Eric Auger > >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets > >disabled > > > >Hi Jason, > > > > > >

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled > >Hi Jason, > > >On 1/23/25 2:34 AM, Jason Wang wrote: >> On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: >>>

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Jason Wang
On Thu, Jan 23, 2025 at 4:31 PM Eric Auger wrote: > > Hi Jason, > > > On 1/23/25 2:34 AM, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: > >> Hi Jason, > >> > >> > >> On 1/22/25 8:17 AM, Jason Wang wrote: > >>> On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: > Hi

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-23 Thread Eric Auger
Hi Jason, On 1/23/25 2:34 AM, Jason Wang wrote: > On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: >> Hi Jason, >> >> >> On 1/22/25 8:17 AM, Jason Wang wrote: >>> On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: Hi Jason, On 1/21/25 4:27 AM, Jason Wang wrote: > On Tue, Jan

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-22 Thread Jason Wang
On Wed, Jan 22, 2025 at 3:55 PM Eric Auger wrote: > > Hi Jason, > > > On 1/22/25 8:17 AM, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: > >> > >> Hi Jason, > >> > >> On 1/21/25 4:27 AM, Jason Wang wrote: > >>> On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: > Wh

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-22 Thread Eric Auger
Hi Jason, On 1/22/25 8:17 AM, Jason Wang wrote: > On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: >> >> Hi Jason, >> >> On 1/21/25 4:27 AM, Jason Wang wrote: >>> On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: When a guest exposed with a vhost device and protected by an intel IOM

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Jason Wang
On Wed, Jan 22, 2025 at 12:25 AM Eric Auger wrote: > > > Hi Jason, > > On 1/21/25 4:27 AM, Jason Wang wrote: > > On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: > >> When a guest exposed with a vhost device and protected by an > >> intel IOMMU gets rebooted, we sometimes observe a spurious warn

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Eric Auger
Hi, On 1/21/25 9:31 AM, Laurent Vivier wrote: > On 20/01/2025 18:33, Eric Auger wrote: >> When a guest exposed with a vhost device and protected by an >> intel IOMMU gets rebooted, we sometimes observe a spurious warning: >> >> Fail to lookup the translated address e000 >> >> We observe that

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Eric Auger
Hi Jason, On 1/21/25 4:27 AM, Jason Wang wrote: > On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: >> When a guest exposed with a vhost device and protected by an >> intel IOMMU gets rebooted, we sometimes observe a spurious warning: >> >> Fail to lookup the translated address e000 >> >> W

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled > >Hi Zhenzhong, > > >On 1/21/25 10:18 AM, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message---

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Eric Auger
Hi Zhenzhong, On 1/21/25 10:18 AM, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Subject: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >> disabled >> >> When a guest exposed with a vhost

RE: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets >disabled > >When a guest exposed with a vhost device and protected by an >intel IOMMU gets rebooted, we sometimes observe a spurious warning:

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Eric Auger
Hi Stefano, On 1/21/25 9:45 AM, Stefano Garzarella wrote: > On Tue, Jan 21, 2025 at 09:31:53AM +0100, Laurent Vivier wrote: >> On 20/01/2025 18:33, Eric Auger wrote: >>> When a guest exposed with a vhost device and protected by an >>> intel IOMMU gets rebooted, we sometimes observe a spurious war

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Eric Auger
On 1/21/25 9:31 AM, Laurent Vivier wrote: > On 20/01/2025 18:33, Eric Auger wrote: >> When a guest exposed with a vhost device and protected by an >> intel IOMMU gets rebooted, we sometimes observe a spurious warning: >> >> Fail to lookup the translated address e000 >> >> We observe that th

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Stefano Garzarella
On Tue, Jan 21, 2025 at 09:31:53AM +0100, Laurent Vivier wrote: On 20/01/2025 18:33, Eric Auger wrote: When a guest exposed with a vhost device and protected by an intel IOMMU gets rebooted, we sometimes observe a spurious warning: Fail to lookup the translated address e000 We observe that

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Laurent Vivier
On 20/01/2025 18:33, Eric Auger wrote: When a guest exposed with a vhost device and protected by an intel IOMMU gets rebooted, we sometimes observe a spurious warning: Fail to lookup the translated address e000 We observe that the IOMMU gets disabled through a write to the global command re

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-20 Thread Eric Auger
Hi Jason, On 1/21/25 4:27 AM, Jason Wang wrote: > On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: >> When a guest exposed with a vhost device and protected by an >> intel IOMMU gets rebooted, we sometimes observe a spurious warning: >> >> Fail to lookup the translated address e000 >> >> W

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-20 Thread Jason Wang
On Tue, Jan 21, 2025 at 1:33 AM Eric Auger wrote: > > When a guest exposed with a vhost device and protected by an > intel IOMMU gets rebooted, we sometimes observe a spurious warning: > > Fail to lookup the translated address e000 > > We observe that the IOMMU gets disabled through a write to

[PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-20 Thread Eric Auger
When a guest exposed with a vhost device and protected by an intel IOMMU gets rebooted, we sometimes observe a spurious warning: Fail to lookup the translated address e000 We observe that the IOMMU gets disabled through a write to the global command register (CMAR_GCMD.TE) before the vhost de