qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Gibson <david@gibson.dropbear.id.au>,
	aik@ozlabs.ru, mdroth@linux.vnet.ibm.com
Cc: lvivier@redhat.com, thuth@redhat.com, qemu-ppc@nongnu.org,
	agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Allow 64kiB pages for POWER8 in TCG
Date: Mon, 21 Dec 2015 13:49:38 +1100	[thread overview]
Message-ID: <1450666178.22905.9.camel@kernel.crashing.org> (raw)
In-Reply-To: <1450665670-18323-3-git-send-email-david@gibson.dropbear.id.au>

On Mon, 2015-12-21 at 13:41 +1100, David Gibson wrote:
> Now that the spapr code has been extended to support 64kiB pages, we can
> allow guests to use 64kiB pages on an emulated POWER8 by adding it to the
> "segment_page_sizes" structure which is advertised via the device tree.
> 
> For now we just add support for 64kiB pages in 64kiB page segments.  Real
> POWER8 also supports 64kiB pages in 4kiB page segments, but that will
> require more work to implement.
> 
> Real POWER7s (and maybe some other CPU models) also support 64kiB pages,
> however, I don't want to add support there without double checking if they
> use the same HPTE and SLB encodings (in principle these are implementation
> dependent).

Don't I have a patch for that in my series already ? IIRC, I had
another fix somewhere...

https://github.com/ozbenh/qemu/commit/6c9dc80db82ed87d5ee77852930348232
f5f9db2

Cheers,
Ben.


> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  target-ppc/translate_init.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index e88dc7f..ae5a269 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -8200,6 +8200,22 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(oc);
>      PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
> +    static const struct ppc_segment_page_sizes POWER8_sps = {
> +        .sps = {
> +            { .page_shift = 12, /* 4K */
> +              .slb_enc = 0,
> +              .enc = { { .page_shift = 12, .pte_enc = 0 } }
> +            },
> +            { .page_shift = 16, /* 64K */
> +              .slb_enc = 0x110,
> +              .enc = { { .page_shift = 16, .pte_enc = 0x1 } }
> +            },
> +            { .page_shift = 24, /* 16M */
> +              .slb_enc = 0x100,
> +              .enc = { { .page_shift = 24, .pte_enc = 0 } }
> +            },
> +        }
> +    };
>  
>      dc->fw_name = "PowerPC,POWER8";
>      dc->desc = "POWER8";
> @@ -8258,6 +8274,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
>      pcc->l1_dcache_size = 0x8000;
>      pcc->l1_icache_size = 0x8000;
>      pcc->interrupts_big_endian = ppc_cpu_interrupts_big_endian_lpcr;
> +    pcc->sps = &POWER8_sps;
>  }
>  #endif /* defined (TARGET_PPC64) */
>  

  reply	other threads:[~2015-12-21  2:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21  2:41 [Qemu-devel] [PATCH 0/2] 64kiB page support for TCG guests with POWER8 CPU David Gibson
2015-12-21  2:41 ` [Qemu-devel] [PATCH 1/2] ppc: Move HPTE size parsing code to target-ppc helper (and add 64kiB pages) David Gibson
2016-01-08  3:31   ` Alexey Kardashevskiy
2015-12-21  2:41 ` [Qemu-devel] [PATCH 2/2] ppc: Allow 64kiB pages for POWER8 in TCG David Gibson
2015-12-21  2:49   ` Benjamin Herrenschmidt [this message]
2016-01-08  3:56   ` Alexey Kardashevskiy
2016-01-12  0:26     ` David Gibson
2016-01-12  4:30       ` Alexey Kardashevskiy
2016-01-12  4:33         ` David Gibson
2016-01-12  5:39           ` Alexey Kardashevskiy

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=1450666178.22905.9.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).