diff mbox

apic: reset apic_delivered global variable on machine reset

Message ID 20170131114054.276.62201.stgit@PASHA-ISP (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Dovgalyuk Jan. 31, 2017, 11:40 a.m. UTC
This patch adds call to apic_reset_irq_delivered when the virtual
machine is reset.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 hw/intc/apic_common.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Paolo Bonzini Feb. 6, 2017, 9:50 a.m. UTC | #1
On 31/01/2017 12:40, Pavel Dovgalyuk wrote:
> This patch adds call to apic_reset_irq_delivered when the virtual
> machine is reset.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  hw/intc/apic_common.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> index 17df24c..cda3e9c 100644
> --- a/hw/intc/apic_common.c
> +++ b/hw/intc/apic_common.c
> @@ -251,6 +251,8 @@ static void apic_reset_common(DeviceState *dev)
>      s->apicbase = APIC_DEFAULT_ADDRESS | bsp | MSR_IA32_APICBASE_ENABLE;
>      s->id = s->initial_apic_id;
>  
> +    apic_reset_irq_delivered();
> +
>      s->vapic_paddr = 0;
>      info->vapic_base_update(s);
>  
> 

Queued, thanks.

Paolo
diff mbox

Patch

diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 17df24c..cda3e9c 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -251,6 +251,8 @@  static void apic_reset_common(DeviceState *dev)
     s->apicbase = APIC_DEFAULT_ADDRESS | bsp | MSR_IA32_APICBASE_ENABLE;
     s->id = s->initial_apic_id;
 
+    apic_reset_irq_delivered();
+
     s->vapic_paddr = 0;
     info->vapic_base_update(s);