qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH v5 05/36] ppc/xive: introduce the XIVE Event Notif


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH v5 05/36] ppc/xive: introduce the XIVE Event Notification Descriptors
Date: Thu, 29 Nov 2018 15:46:54 +1100
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Nov 23, 2018 at 12:01:27PM +0100, Cédric Le Goater wrote:
> On 11/23/18 5:35 AM, David Gibson wrote:
> > On Thu, Nov 22, 2018 at 10:47:44PM +0100, Cédric Le Goater wrote:
> >> On 11/22/18 5:41 AM, David Gibson wrote:
> >>> On Fri, Nov 16, 2018 at 11:56:58AM +0100, Cédric Le Goater
> wrote:
[snip]
> >>>> +/*
> >>>> + * XiveEND helpers
> >>>> + */
> >>>> +
> >>>> +void xive_end_reset(XiveEND *end)
> >>>> +{
> >>>> +    memset(end, 0, sizeof(*end));
> >>>> +
> >>>> +    /* switch off the escalation and notification ESBs */
> >>>> +    end->w1 = END_W1_ESe_Q | END_W1_ESn_Q;
> >>>
> >>> It's not obvious to me what circumstances this would be called under.
> >>> Since the ENDs are in system memory, a memset() seems like an odd
> >>> thing for (virtual) hardware to be doing to it.
> >>
> >> It makes sense on sPAPR if one day some OS starts using the END ESBs for 
> >> further coalescing of the events. None does for now but I have added the 
> >> model though.
> > 
> > Hrm, I think that belongs in PAPR specific code.  It's not really part
> > of the router model - it's the PAPR stuff configuring the router at
> > reset time (much as firmware would configure it at reset time for bare
> > metal).
> 
> This is true this routine is only used by the H_INT_RESET hcall and by 
> the reset handler of the sPAPR controller model. But it made sense to put 
> this END helper routine with the other END routines. Don't you think so ? 

Actually, no.  In real hardware this would be handled by a different
component - the system firmware would do this setup of the ENDs as it
configures the XIVE.  So it makes sense to do this in a separate
component for PAPR as well.  In this case that's another piece of qemu
(the spapr stuff) rather than being within the VM, but the difference
isn't important to the END handling itself.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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