[Qemu-devel] [PATCH 2/5] intel_iommu: reset intr_enabled when system reset

Peter Xu posted 5 patches 6 years, 10 months ago
Maintainers: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>, Marcelo Tosatti <mtosatti@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
There is a newer version of this series
[Qemu-devel] [PATCH 2/5] intel_iommu: reset intr_enabled when system reset
Posted by Peter Xu 6 years, 10 months ago
This is found when I was debugging another problem.  Until now no bug
is reported with this but we'd better reset the IR status correctly
after a system reset.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 hw/i386/intel_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 6d5cc1d039..ee22e754f0 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3138,6 +3138,7 @@ static void vtd_init(IntelIOMMUState *s)
     s->root = 0;
     s->root_extended = false;
     s->dmar_enabled = false;
+    s->intr_enabled = false;
     s->iq_head = 0;
     s->iq_tail = 0;
     s->iq = 0;
-- 
2.17.1


Re: [Qemu-devel] [PATCH 2/5] intel_iommu: reset intr_enabled when system reset
Posted by Jason Wang 6 years, 10 months ago
On 2019/1/8 下午7:47, Peter Xu wrote:
> This is found when I was debugging another problem.  Until now no bug
> is reported with this but we'd better reset the IR status correctly
> after a system reset.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>   hw/i386/intel_iommu.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 6d5cc1d039..ee22e754f0 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3138,6 +3138,7 @@ static void vtd_init(IntelIOMMUState *s)
>       s->root = 0;
>       s->root_extended = false;
>       s->dmar_enabled = false;
> +    s->intr_enabled = false;
>       s->iq_head = 0;
>       s->iq_tail = 0;
>       s->iq = 0;


Acked-by: Jason Wang <jasowang@redhat.com>