qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [RFC PATCH] pseries: use qemu_irq_raise() in spapr_msi_wr


From: Li Zhong
Subject: Re: [Qemu-ppc] [RFC PATCH] pseries: use qemu_irq_raise() in spapr_msi_write()
Date: Tue, 10 May 2016 10:43:52 +0800

On 二, 2016-05-10 at 12:26 +1000, Alexey Kardashevskiy wrote:
> On 05/10/2016 11:50 AM, Benjamin Herrenschmidt wrote:
> > On Tue, 2016-05-10 at 11:31 +1000, Alexey Kardashevskiy wrote:
> >> On 05/10/2016 11:18 AM, Li Zhong wrote:
> >>>
> >>> It seems that both ics_set_irq() and ics_kvm_set_irq() don't do
> >>> anything
> >>> useful for MSIs with val = 0, so maybe the pulse in
> >>> spapr_msi_write()
> >>> could be replaced with a single raise?
> >>
> >> qemu_irq_raise() needs matching qemu_irq_lower(), where is it?
> >
> > Does qemu require both raise & lower for edge interrupts ?
> 
> It should not and it does not. I was just afraid that something might get 
> missing in the xics state machine after this change but it looks the patch 
> is correct.
> 
> And also noticed that xics_set_irq_type() is a dead code which has to go.

Ah, yes, seems the type is set when doing allocation. Maybe we could
remove it in another patch?

Thanks, Zhong

> 
> 
> >
> > Ben.
> >
> >>
> >>>
> >>>
> >>> Signed-off-by: Li Zhong <address@hidden>
> >>> ---
> >>>  hw/ppc/spapr_pci.c | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> >>> index 573e635..897c541 100644
> >>> --- a/hw/ppc/spapr_pci.c
> >>> +++ b/hw/ppc/spapr_pci.c
> >>> @@ -732,7 +732,7 @@ static void spapr_msi_write(void *opaque,
> >>> hwaddr addr,
> >>>
> >>>      trace_spapr_pci_msi_write(addr, data, irq);
> >>>
> >>> -    qemu_irq_pulse(xics_get_qirq(spapr->icp, irq));
> >>> +    qemu_irq_raise(xics_get_qirq(spapr->icp, irq));
> >>>  }
> >>>
> >>>  static const MemoryRegionOps spapr_msi_ops = {
> >>>
> >>
> >
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]