public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Paul Mackerras <paulus@samba.org>, kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: [RFC PATCH 5/5] KVM: PPC: Book3S: Make kvmppc_handle_load/store handle any load or store
Date: Mon, 28 Jul 2014 14:14:58 +0200	[thread overview]
Message-ID: <53D63EC2.5090605@suse.de> (raw)
In-Reply-To: <1405764872-8744-6-git-send-email-paulus@samba.org>


On 19.07.14 12:14, Paul Mackerras wrote:
> At present, kvmppc_handle_load and kvmppc_handle_store only handle
> emulated MMIO loads and stores.  This extends them to be able to handle
> loads and stores to guest memory as well.  This is so that
> kvmppc_emulate_instruction can be used to emulate loads and stores
> in cases other than when an attempt to execute the instruction by the
> CPU has resulted in an interrupt.
>
> To avoid having to look up the translation for the effective address
> again in kvmppc_handle_load/store when the caller of kvmppc_emulate_mmio
> has already done it, we arrange to pass down the translation in a new
> struct kvmppc_translated_address, which is a new argument to
> kvmppc_emulate_mmio() and kvmppc_emulate_instruction().  This also
> enables us to check that the guest hasn't replaced a load with a store
> instruction.
>
> This also makes the register updates for the paired-single FPU registers
> match for emulated MMIO accesses what is done for accesses to normal
> memory.
>
> The new code for accessing normal guest memory uses kvmppc_ld and kvmppc_st,
> which call kvmppc_xlate, which is only defined for Book 3S.  For Book E,
> kvmppc_handle_load/store still only work for emulated MMIO.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>

Please check out my other patch set where I made kvmppc_ld/st available 
for BookE and also split the MMIO path off completely. Since we do want 
to take the shortcut through paddr that we only know for memory traps, I 
really think we're better off treating that whole optimized code path as 
a separate piece.


Alex

  reply	other threads:[~2014-07-28 12:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 10:14 [RFC PATCH 0/5] Improve PPC instruction emulation Paul Mackerras
2014-07-19 10:14 ` [RFC PATCH 1/5] powerpc: Split out instruction analysis part of emulate_step() Paul Mackerras
2014-07-28 12:01   ` Alexander Graf
2014-07-19 10:14 ` [RFC PATCH 2/5] powerpc: Implement emulation of string loads and stores Paul Mackerras
2014-07-19 10:14 ` [RFC PATCH 3/5] KVM: PPC: Use pt_regs struct for integer registers in struct vcpu_arch Paul Mackerras
2014-07-19 10:14 ` [RFC PATCH 4/5] KVM: PPC: Use analyse_instr() in kvmppc_emulate_instruction() Paul Mackerras
2014-07-28 12:12   ` Alexander Graf
2014-07-19 10:14 ` [RFC PATCH 5/5] KVM: PPC: Book3S: Make kvmppc_handle_load/store handle any load or store Paul Mackerras
2014-07-28 12:14   ` Alexander Graf [this message]
2014-07-28 11:46 ` [RFC PATCH 0/5] Improve PPC instruction emulation Alexander Graf

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=53D63EC2.5090605@suse.de \
    --to=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox