All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v5 15/17] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt
Date: Tue, 25 Oct 2016 09:58:10 +0200	[thread overview]
Message-ID: <87421643-0697-40d3-8c28-d00348c0c54d@kaod.org> (raw)
In-Reply-To: <20161025053007.GA11052@umbus.fritz.box>

On 10/25/2016 07:30 AM, David Gibson wrote:
> On Sat, Oct 22, 2016 at 11:46:48AM +0200, Cédric Le Goater wrote:
>> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>
>> The PSI (Processor Service Interface) is one of the engines of the
>> "Bridge" unit which connects the different interfaces to the Power
>> Processor.
>>
>> This adds just enough of the PSI bridge to handle various on-chip and
>> the one external interrupt. The rest of PSI has to do with the link to
>> the IBM FSP service processor which we don't plan to emulate (not used
>> on OpenPower machines).
>>
>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> [clg: - updated for qemu-2.7
>>       - changed the XSCOM interface to fit new model
>>       - QOMified the model
>>       - reworked set_xive ]
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
>>
>>  When skiboot initializes PSIHB, it fills the xives with server=0,
>>  prio=0xff, which is fine, but for some reason the last two xive
>>  settings reach the qemu MMIO region with a bogus value :
>>  
>> 	pnv_psi_mmio_write: MMIO write 0x30 val 0x000000ff00000000
>> 	pnv_psi_mmio_write: MMIO write 0x60 val 0x000000ff20000000
>> 	pnv_psi_mmio_write: MMIO write 0x68 val 0x000000ff40000000
>> 	pnv_psi_mmio_write: MMIO write 0x70 val 0x000000ff60000000
>> 	pnv_psi_mmio_write: MMIO write 0x78 val 0xffffffff80000000
>> 	pnv_psi_mmio_write: MMIO write 0x80 val 0xffffffffa0000000
>>
>>  It looks like a badly initialized temp variable in the call
>>  stack. The memory regions look fine, maybe in stdcix ? For the
>>  moment, I have added a logging error to catch non zero values as the
>>  guest should not do that in any case.
> 
> Just to clarify, I think you're saying that you believe this to be a
> skiboot (guest side) bug rather than a qemu bug.  Is that right?

Yes. I just found why. The P8_IRQ_PSI_* values in skiboot need to
be unsigned because they are shifted left of 29 bits :

	...
	#define P8_IRQ_PSI_LOCAL_ERR		4
	#define P8_IRQ_PSI_EXTERNAL		5	/* Used for UART */
	...
	out_be64(psi->regs + PSIHB_XIVR_LOCAL_ERR,
		 (0xffull << 32) | (P8_IRQ_PSI_LOCAL_ERR << 29));
	out_be64(psi->regs + PSIHB_XIVR_HOST_ERR,
		 (0xffull << 32) | (P8_IRQ_PSI_EXTERNAL << 29));


I will send a skiboot patch but we need to keep the code as it is. 

Thanks

C. 


 

  reply	other threads:[~2016-10-25  7:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-22  9:46 [Qemu-devel] [PATCH v5 00/17] ppc/pnv: booting the kernel and reaching user space Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 01/17] ppc: add skiboot firmware for the pnv platform Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 02/17] ppc/pnv: add skeleton PowerNV platform Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 03/17] ppc/pnv: add a PnvChip object Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 04/17] ppc/pnv: add a core mask to PnvChip Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 05/17] ppc/pnv: add a PIR handler " Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 06/17] ppc/pnv: add a PnvCore object Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 07/17] ppc/pnv: add XSCOM infrastructure Cédric Le Goater
2016-10-25  1:13   ` David Gibson
2016-10-25  6:24     ` Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 08/17] ppc/pnv: add XSCOM handlers to PnvCore Cédric Le Goater
2016-10-25  1:14   ` David Gibson
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 09/17] ppc/pnv: add a LPC controller Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 10/17] ppc/pnv: add a ISA bus Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 11/17] ppc/xics: Add "native" XICS subclass Cédric Le Goater
2016-10-25  5:08   ` David Gibson
2016-10-26  7:13     ` Cédric Le Goater
2016-10-27  3:09       ` David Gibson
2016-10-27 17:43         ` Cédric Le Goater
2016-10-28  1:00           ` David Gibson
2016-11-02 10:48             ` Cédric Le Goater
2016-11-08  1:44               ` David Gibson
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 12/17] ppc/pnv: add a XICS native to each PowerNV chip Cédric Le Goater
2016-10-24 15:42   ` Cédric Le Goater
2016-10-25  5:11     ` David Gibson
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 13/17] ppc/xics: add a xics_get_cpu_index_by_pir helper Cédric Le Goater
2016-10-25  5:36   ` David Gibson
2016-10-25 10:58     ` Cédric Le Goater
2016-10-27  3:12       ` David Gibson
2016-10-27 18:05         ` Cédric Le Goater
2016-10-28  1:03           ` David Gibson
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 14/17] ppc/xics: introduce a helper to insert a new ics Cédric Le Goater
2016-10-25  5:12   ` David Gibson
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 15/17] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt Cédric Le Goater
2016-10-25  5:30   ` David Gibson
2016-10-25  7:58     ` Cédric Le Goater [this message]
2016-10-26  0:05       ` David Gibson
2016-10-25 11:00     ` Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 16/17] ppc/pnv: Add OCC model stub with interrupt support Cédric Le Goater
2016-10-22  9:46 ` [Qemu-devel] [PATCH v5 17/17] ppc/pnv: Add Naples chip support for LPC interrupts Cédric Le Goater
2016-10-25  5:35   ` David Gibson
2016-10-24  5:33 ` [Qemu-devel] [PATCH v5 00/17] ppc/pnv: booting the kernel and reaching user space David Gibson
2016-10-25  1:38   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87421643-0697-40d3-8c28-d00348c0c54d@kaod.org \
    --to=clg@kaod.org \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.