Re: [Qemu-devel] [PATCH v3 02/11] AARCH64: add a57core

2013-09-30 Thread Mian M. Hamayun
On 28/09/2013 02:16, Peter Maydell wrote: On 28 September 2013 00:53, Andreas Färber afaer...@suse.de wrote: Hi, Am 27.09.2013 12:10, schrieb Mian M. Hamayun: From: John Rigby john.ri...@linaro.org Just an copy of a15 with a57 substituting a15 for now. I had previously gently nack'ed

[Qemu-devel] [PATCH v3 01/11] ARM: arm64 kvm headers from kernel arm64-kvm tree

2013-09-27 Thread Mian M. Hamayun
From: John Rigby john.ri...@linaro.org Also add the KVM_REG_ARM64 register type to linux/kvm header file. Signed-off-by: John Rigby john.ri...@linaro.org Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- linux-headers/asm-arm64/kvm.h | 168

[Qemu-devel] [PATCH v3 11/11] AARCH64: Add 32-bit mode selection parameter

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit introduces a commandline argument to select the AARCH64 or AARCH32 mode for processor initilization. Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- qemu-options.hx | 8 target-arm/cpu.c | 9

[Qemu-devel] [PATCH v3 07/11] AARCH64: Add boot support for aarch64 processor

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit adds support for booting a single AArch64 CPU by setting appropriate registers. The bootloader includes placehoders for Board-ID that are used to implement uniform indexing across different bootloaders. We also introduce Cortex

[Qemu-devel] [PATCH v3 06/11] target-arm: Parameterize the bootloader selection and setup mechanism

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit replaces the constant indices used in bootloaders, such as for specifying the Board ID and kernel arguments with variable parameters. This change is used as mechanism to minimize code changes for different bootloaders, for example

[Qemu-devel] [PATCH v3 08/11] AARCH64: Enable SMP support for aarch64 processors using PSCI method

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com We enable SMP support for aarch64 processors using the PSCI method, by setting the appropriate CPU feature flags at initilializtion time. Secondary boot code for non-aarch64 processors is disabled in case of compilation for aarch64. Signed

[Qemu-devel] [PATCH v3 09/11] AARCH64: Enable configure support for 32-bit guests on AARCH64

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 7298b69..dbaf56f 100755 --- a/configure +++ b/configure @@ -4485,6 +4485,7 @@ case

[Qemu-devel] [PATCH v3 10/11] AARCH64: Add flags and boot parameters for 32-bit guests on AARCH64

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit adds the necessary flags and kernel load address to enable booting of 32-bit guests on AArch64 processors. The actual enable/disable mechanism is not included in this commit, which should tweak the value of env-aarch64 variable

[Qemu-devel] [PATCH v3 00/11] AARCH64 support on machvirt machine model using KVM

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This is the v3 of patch series that implements KVM support in QEMU for the ARMv8 Cortex A57 CPU. It depends on the recently mainlined AArch64 preparation patch series and machvirt patches version v7, and uses the already available KVM

[Qemu-devel] [PATCH v3 02/11] AARCH64: add a57core

2013-09-27 Thread Mian M. Hamayun
From: John Rigby john.ri...@linaro.org Just an copy of a15 with a57 substituting a15 for now. Signed-off-by: John Rigby john.ri...@linaro.org Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- hw/cpu/Makefile.objs | 1 + hw/cpu/a57mpcore.c | 122

[Qemu-devel] [PATCH v3 04/11] AARCH64: Separate 32-bit specific code from common KVM hooks

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit separates the 32-bit (ARMv7) specific KVM hooks from the common code. It also adds the stub functions for 64-bit (ARMv8). The makefile objects are also tweaked accordingly to compile code either of ARMv7 or ARMv8 depending

[Qemu-devel] [PATCH v3 05/11] AARCH64: Add AARCH64 CPU initialization, get and put registers support

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com The cpu init function tries to initialize with all possible cpu types, as KVM does not provide a means to detect the real cpu type and simply refuses to initialize on cpu type mis-match. By using the loop based init function, we avoid

[Qemu-devel] [PATCH v3 03/11] AARCH64: Add A57 CPU to default AArch64 configuration and enable KVM

2013-09-27 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com Introduce the A57 cpu to the default AArch64 configuration and enable KVM for 64-bit guests only. Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- configure | 2 +- default-configs/aarch64

[Qemu-devel] [PATCH v2 1/7] AARCH64: Add A57 CPU to default AArch64 configuration and enable KVM

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com Introduce the A57 cpu to the default AArch64 configuration and enable KVM for 64-bit guests only. Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- configure |2 +- default-configs/aarch64

[Qemu-devel] [PATCH v2 2/7] Add the additional parent parameter to memory region init calls

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com The memory region init calls require an additional parent parameter, so introduce a null parent parameter to make it happy. Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- hw/arm/virt.c |2 +- hw/cpu/a57mpcore.c

[Qemu-devel] [PATCH v2 0/7] AARCH64 support on machvirt machine model using KVM

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This is the v2 of patch series that implements KVM support in QEMU for the ARMv8 Cortex A57 CPU. It depends on the previously submitted AArch64 preparation patch series v5 and machvirt patches, and uses the already available KVM in-kernel GIC

[Qemu-devel] [PATCH v2 6/7] AARCH64: Add SMP support for aarch64 processors

2013-07-23 Thread Mian M. Hamayun
From: Alexander Spyridakis a.spyrida...@virtualopensystems.com AArch64 uses a cpu-release-addr memory location (defined in the dts) as a way to inform secondary CPUs where to jump to and enter their holding pen. Inject a very simple bootloader that polls this memory location, until the primary

[Qemu-devel] [PATCH v2 4/7] AARCH64: Add boot support for aarch64 processor

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This version supports booting of a single Aarch64 CPU by setting appropriate registers. The bootloader includes placehoders for Board-ID that are used to implementing uniform indexing across different bootloaders. The same macro names

[Qemu-devel] [PATCH v2 5/7] AARCH64: Disable the non-aarch64 specific reset code

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This commit disables the co-processor registers reset code for KVM, when compiling for AArch64 cpus. Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- target-arm/kvm.c |2 ++ 1 file changed, 2 insertions(+) diff --git

[Qemu-devel] [PATCH v2 3/7] AARCH64: Add aarch64 CPU initialization, get and put registers support

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com The cpu init function tries to initialize with all possible cpu types, as KVM does not provide a means to detect the real cpu type and simply refuses to initialize on cpu type mis-match. By using the loop based init function, we avoid

[Qemu-devel] [PATCH v2 7/7] AARCH64: Use the spin-table method for booting secondary processors in machvirt

2013-07-23 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com As the SMP bootloader uses a spin-table to wait for the cpu_release_addr, we disable the PSCI method for AArch64 in machvirt and use spin-table instead. The CPU_RELEASE_OFFSET is introduced in machvirt and is to calculate

Re: [Qemu-devel] [PATCH v2 3/7] AARCH64: Add aarch64 CPU initialization, get and put registers support

2013-08-09 Thread Mian M. Hamayun
On 09/08/2013 15:24, Peter Maydell wrote: On 23 July 2013 10:33, Mian M. Hamayun m.hama...@virtualopensystems.com wrote: From: Mian M. Hamayun m.hama...@virtualopensystems.com The cpu init function tries to initialize with all possible cpu types, as KVM does not provide a means to detect

Re: [Qemu-devel] [PATCH v2 7/7] AARCH64: Use the spin-table method for booting secondary processors in machvirt

2013-08-09 Thread Mian M. Hamayun
On 09/08/2013 16:34, Peter Maydell wrote: On 23 July 2013 10:33, Mian M. Hamayun m.hama...@virtualopensystems.com wrote: From: Mian M. Hamayun m.hama...@virtualopensystems.com As the SMP bootloader uses a spin-table to wait for the cpu_release_addr, we disable the PSCI method for AArch64

Re: [Qemu-devel] [PATCH 0/6][RFC] AArch64 support for Versatile Express using KVM

2013-07-01 Thread Mian M. Hamayun
At the time we started working on AArch64, we were not certain that our implementation would be published in near future. Now that this is cleared up we are more than happy to coordinate together. On 28 June 2013 14:04, Andreas Färber afaer...@suse.de wrote: I had been looking into that tree

[Qemu-devel] [PATCH 1/6] Added aarch64 configure support and default configuration

2013-06-28 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- configure |3 +- default-configs/aarch64-softmmu.mak | 83 +++ 2 files changed, 85 insertions(+), 1 deletion

[Qemu-devel] [PATCH 4/6] Added the Versatile Express Machine Model for A57

2013-06-28 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com The vexpress model for A57 is based on the A15 machine model with a few changes in the daughterboard initialization (using a subset of A15 functionality). The A57 daughterboard init also shares the A15MPCore private memory region with A15

[Qemu-devel] [PATCH 2/6] Added KVM Headers from KVM Tool

2013-06-28 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com Signed-off-by: Mian M. Hamayun m.hama...@virtualopensystems.com --- linux-headers/asm-arm64/kvm.h | 168 linux-headers/asm-arm64/kvm_para.h |1 + 2 files changed, 169 insertions(+) create mode

[Qemu-devel] [PATCH 5/6] Added Boot Support for Aarch64 Processor.

2013-06-28 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com This version supports booting of a single Aarch64 CPU by setting appropriate registers. The bootloader includes placehoders for Board-ID that are used to implementing uniform indexing across different bootloaders. The same macro names

[Qemu-devel] [PATCH 6/6] Added SMP for Aarch64 Processors.

2013-06-28 Thread Mian M. Hamayun
From: Alexander Spyridakis a.spyrida...@virtualopensystems.com AArch64 uses a cpu-release-addr memory location (defined in the dts) as a way to inform secondary CPUs where to jump to and enter their holding pen. Inject a very simple bootloader that polls this memory location, until the primary

[Qemu-devel] [PATCH 0/6][RFC] AArch64 support for Versatile Express using KVM

2013-06-28 Thread Mian M. Hamayun
This patch series implements KVM support in QEMU for the ARMv8 Cortex A57 CPU. It depends on the previously submitted AArch64 Preparation Patchset V4, and uses as a base, the existing Versatile Express machine model and the already available KVM in-kernel GIC support. As a reference, KVM Tool

[Qemu-devel] [PATCH 3/6] Added Aarch64 CPU Initialization, Get and Put Registers Support.

2013-06-28 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com The init function tries to initialize with Foundation models first and on failure retries initializing on Fast Models. Get and Put Registers deal with the basic state of Aarch64 CPUs for the moment. Signed-off-by: Mian M. Hamayun m.hama

Re: [Qemu-devel] [PATCH 3/6] Added Aarch64 CPU Initialization, Get and Put Registers Support.

2013-06-29 Thread Mian M. Hamayun
On 06/28/2013 02:43 PM, Alexander Graf wrote: On 28.06.2013, at 14:11, Mian M. Hamayun wrote: diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index c614070..4df5292 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -783,6 +783,7 @@ struct

[Qemu-devel] Cross-Compiling Qemu for Aarch64?

2013-05-16 Thread Mian M. Hamayun
Hello Everyone, I am currently trying to compile qemu for Aarch64 but so far I haven't been able to configure qemu for this purpose. My first objective is to just configure and cross-compile qemu for Aarch64, which is currently blocked by the qemu's dependency on cross-compiled glib-2.12.

[Qemu-devel] [PATCH v4 2/7] Decouple vhost from kernel interface

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com We introduce the concept of vhost-backend, which can be either vhost-kernel or vhost-user. The existing vhost interface to the kernel is abstracted behind the vhost-kernel backend. We replace all direct ioctls to the kernel with a

[Qemu-devel] [PATCH v4 0/7] Vhost and vhost-net support for userspace based backends

2013-12-20 Thread Mian M. Hamayun
From: Mian M. Hamayun m.hama...@virtualopensystems.com In this patch series we would like to introduce our approach for putting a virtio-net backend in an external userspace process. Our eventual target is to run the network backend in the Snabbswitch ethernet switch, while receiving traffic from

[Qemu-devel] [PATCH v4 6/7] Add new vhost-user netdev backend

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com Add a new QEMU netdev backend that is intended to invoke vhost_net with the vhost-user backend. Also decouple virtio-net from the tap backend. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev

[Qemu-devel] [PATCH v4 3/7] Add vhost-user skeleton

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com Add empty vhost_call, init and cleanup for the vhost-user backend. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev n.nikol...@virtualopensystems.com --- hw/net/vhost_net.c|

[Qemu-devel] [PATCH v4 1/7] Convert -mem-path to QemuOpts and add prealloc, share and unlink properties

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com Extend -mem-path with additional properties: - prealloc=on|off - default off, same as -mem-prealloc - share=on|off - default off, memory is mmapped with MAP_SHARED flag - unlink=on|off - default on, inlink the file after openinng it

[Qemu-devel] [PATCH v4 5/7] Add vhost-user calls implementation

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com Each ioctl request of vhost-kernel has a vhost-user message equivalent, which is sent over the control socket. The general approach is to copy the data from the supplied argument pointer to a designated field in the message. If a file

[Qemu-devel] [PATCH v4 4/7] Add domain socket communication for vhost-user backend

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com Add structures for passing vhost-user messages over a unix domain socket. This is the equivalent to the existing vhost-kernel ioctls. Connect to the named unix domain socket. The system call sendmsg is used for communication. To be able to

[Qemu-devel] [PATCH v4 7/7] Add vhost-user reconnection

2013-12-20 Thread Mian M. Hamayun
From: Antonios Motakis a.mota...@virtualopensystems.com At runtime vhost-user netdev will detect if the vhost backend is up or down. Upon disconnection it will set link_down accordingly and notify virtio-net. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay

[Qemu-devel] AArch64: QEMU fails in swapcontext

2014-04-18 Thread Mian M. Hamayun
Hello Peter All, I am trying to figure out a problem in qemu on aarch64 (with kvm enabled). I have found this problem in many different versions of qemu (v2.0.0-rc3/rc2/rc1/rc0, master 2d03b49), and I believe that either I am missing something common in all of these versions or its a genuine

Re: [Qemu-devel] AArch64: QEMU fails in swapcontext

2014-04-18 Thread Mian M. Hamayun
On 18/04/2014 16:44, Richard Henderson wrote: On 04/18/2014 07:00 AM, Mian M. Hamayun wrote: Hello Peter All, I am trying to figure out a problem in qemu on aarch64 (with kvm enabled). I have found this problem in many different versions of qemu (v2.0.0-rc3/rc2/rc1/rc0, master 2d03b49