All of lore.kernel.org
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] armv7 BE kvm support
Date: Fri, 20 Dec 2013 00:12:07 -0800	[thread overview]
Message-ID: <20131220081207.GA12233@cbox> (raw)
In-Reply-To: <1387524419-4216-1-git-send-email-victor.kamensky@linaro.org>

On Thu, Dec 19, 2013 at 11:26:54PM -0800, Victor Kamensky wrote:
> Hi Guys,

Hi Victor,

> 
> Here is series that enables KVM support for V7 big endian kernels. Mostly
> it deals with BE KVM host support. Marc Zyngier showed before with his patches
> how BE guest could run on top LE host. With these patches BE guest runs on 
> top of BE host. If Marc's kvmtool is used with few additional changes I tested
> that BE host could run LE guest. Also I verified that there were no 
> regressions in BE guest on top of LE host case.

Can you please cc the kvmarm list as per the MAINTAINERS files for
patches to kvm/arm in the future?

Looking forward to reading your code!

-Christoffer

> 
> Note that posted series covers only kernel side changes. The changes were
> tested inside of bigger setup with additional changes in qemu and kvmtool.
> I will post those changes separately in proper aliases but for completeness 
> sake Appendix A gives pointers to git repositories and branches with all
> needed changes.
> 
> Please note first patch is not related to BE KVM per se. I've run
> into an issue of conflicting 'push' identifier use while trying to include 
> assembler.h into KVM .S files. Details of an issue I observed covered in
> Appendix B. The first patch is my take on solving it.
> 
> Victor Kamensky (5):
>   ARM: kvm: replace push and pop with stdmb and ldmia instrs to enable
>     assembler.h inclusion
>   ARM: fix KVM assembler files to work in BE case
>   ARM: kvm one_reg coproc set and get BE fixes
>   ARM: kvm vgic mmio should return data in BE format in BE case
>   ARM: kvm MMIO support BE host running LE code
> 
>  arch/arm/include/asm/assembler.h   |  7 +++
>  arch/arm/include/asm/kvm_asm.h     |  4 +-
>  arch/arm/include/asm/kvm_emulate.h | 22 +++++++--
>  arch/arm/kvm/coproc.c              | 94 ++++++++++++++++++++++++++++----------
>  arch/arm/kvm/init.S                |  7 ++-
>  arch/arm/kvm/interrupts.S          | 50 +++++++++++---------
>  arch/arm/kvm/interrupts_head.S     | 61 +++++++++++++++----------
>  virt/kvm/arm/vgic.c                |  4 +-
>  8 files changed, 168 insertions(+), 81 deletions(-)
> 
> -- 
> 1.8.1.4
> 
> Thanks,
> Victor
> 
>       Appendix A: Testing and Full Setup Description
>       ----------------------------------------------
> 
> I) No mixed mode setup - i.e BE guest on BE host; and LE guest
> on LE host tested to make sure no regressions.
> 
> KVM host and guest kernels:
>   TC2 on top of Linus 3.13-rc4 (this patch series):
>       git: git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be.git
>       branch: armv7be-kvm-3.13-rc4
>       
>   TC2 and Arndale on top of Linaro BE tree:
>       git: git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be.git
>       branch: llct-be-20131216-kvm
> 
> - TC1 kernels used as guests
> 
> qemu:
>       git: git://git.linaro.org/people/victor.kamensky/qemu-be.git 
>       branch: armv7be-v1
>       description: changes to run qemu on armeb target; and other
>       changes to work with be image on top of be host
> 
> kvmtool:
>       git: git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be.git
>       branch: kvmtool-armv7be-v1
>       desciption: minimal changes to build kvmtool for armeb target; and
>       tiny change with virtio magic
> 
> II) Mixed mode setup all possible combinations within V7 (LE guest on BE host;
> BE guest on LE host as Marc's setup tested to make sure no regressions) only
> with kvmtool.
> 
> This work is based on Marc Zyngier's work that made BE guest to run on top
> of LE host. For this setup special version of kvmtool should be used and
> in addition I had to apply patch to guest kernel that would switch reading
> virtio configs reads to be LE only, that is made on top of previous Rusty
> Russell's changes. Effectively I just had to do very minor addition to make
> LE guest to work on BE host, most of heavy lifting was done before by Marc.
> 
> KVM host kernels: as in previous setup
> 
> Guest TC1 kernels with LE virtio config patch:
>       git: git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be.git
>       branch: virtio-leconfig-3.13-rc4
> 
> kvmtool:
>       git: git://git.linaro.org/people/victor.kamensky/linux-linaro-tracking-be.git
>       branch: kvmtool-mixed-v1
>       description: based on git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
>       branch kvm-arm64/kvmtool-be-on-le; adds missing include fix; above armeb target
>       build patches; and one fix related to BE mode
> 
> qemu:
>       git: git://git.linaro.org/people/victor.kamensky/qemu-be.git
>       branch: armv7be-leconfig-v1
>       description: change virtio-blk that so qemu could work with guest image
>       where virtio leconfig is made; note it does not work in mixed mode; to do
>       so qemu would need bunch of similar changes that Marc did in kvmtool
> 
> 
>       Appendix B: kvm asm file and asm/assembler.h file issue
>       -------------------------------------------------------
> 
> diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
> index ddc1553..5d3b511 100644
> --- a/arch/arm/kvm/interrupts.S
> +++ b/arch/arm/kvm/interrupts.S
> @@ -25,6 +25,7 @@
>  #include <asm/kvm_asm.h>
>  #include <asm/kvm_arm.h>
>  #include <asm/vfpmacros.h>
> +#include <asm/assembler.h>
>  #include "interrupts_head.S"
>  
>         .text
> 
> produce the following compilation errors:
> 
> /run/media/kamensky/wd/linaro/linux-linaro-core-tracking/092913/linux-linaro-tracking-be/arch/arm/kvm/interrupts.S: Assembler messages:
> /run/media/kamensky/wd/linaro/linux-linaro-core-tracking/092913/linux-linaro-tracking-be/arch/arm/kvm/interrupts.S:51: Error: ARM register expected -- `lsr {r2,r3}'
> /run/media/kamensky/wd/linaro/linux-linaro-core-tracking/092913/linux-linaro-tracking-be/arch/arm/kvm/interrupts.S:100: Error: ARM register expected -- `lsr {r2}'
> /run/media/kamensky/wd/linaro/linux-linaro-core-tracking/092913/linux-linaro-tracking-be/arch/arm/kvm/interrupts.S:100: Error: ARM register expected -- `lsr {r4-r12}'
> 

-- 
Christoffer

      parent reply	other threads:[~2013-12-20  8:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  7:26 [PATCH 0/5] armv7 BE kvm support Victor Kamensky
2013-12-20  7:26 ` [PATCH 1/5] ARM: kvm: replace push and pop with stdmb and ldmia instrs to enable assembler.h inclusion Victor Kamensky
2014-01-07 16:01   ` Dave Martin
2013-12-20  7:26 ` [PATCH 2/5] ARM: fix KVM assembler files to work in BE case Victor Kamensky
2013-12-20  7:26 ` [PATCH 3/5] ARM: kvm one_reg coproc set and get BE fixes Victor Kamensky
2013-12-20  7:26 ` [PATCH 4/5] ARM: kvm vgic mmio should return data in BE format in BE case Victor Kamensky
2013-12-20  7:26 ` [PATCH 5/5] ARM: kvm MMIO support BE host running LE code Victor Kamensky
2013-12-20  8:12 ` Christoffer Dall [this message]

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=20131220081207.GA12233@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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.