Re: [PATCH] arch: mips: kvm: Enable after disabling interrupt

2015-03-02 Thread Marcelo Tosatti
On Sun, Feb 22, 2015 at 09:48:21PM +0530, Tapasweni Pathak wrote: Enable disabled interrupt, on unsuccessful operation. Found by Coccinelle. Signed-off-by: Tapasweni Pathak tapaswenipat...@gmail.com Acked-by: Julia Lawall julia.law...@lip6.fr --- arch/mips/kvm/tlb.c |1 + 1 file

Re: [PATCH v2] KVM: SVM: fix interrupt injection (apic-isr_count always 0)

2015-03-02 Thread Marcelo Tosatti
On Fri, Feb 27, 2015 at 04:32:38PM +0100, Radim Krčmář wrote: In commit b4eef9b36db4, we started to use hwapic_isr_update() != NULL instead of kvm_apic_vid_enabled(vcpu-kvm). This didn't work because SVM had it defined and apicv path in apic_{set,clear}_isr() does not change apic-isr_count,

Re: [PATCH] MIPS: KVM: Fix trace event to save PC directly

2015-03-02 Thread Marcelo Tosatti
On Tue, Feb 24, 2015 at 11:46:20AM +, James Hogan wrote: Currently the guest exit trace event saves the VCPU pointer to the structure, and the guest PC is retrieved by dereferencing it when the event is printed rather than directly from the trace record. This isn't safe as the printing may

[PATCH] Revert remove sched notifier for cross-cpu migrations

2015-03-02 Thread Marcelo Tosatti
Untested patch, do not apply. The following point: 2. per-CPU pvclock time info is updated if the underlying CPU changes. Is not true anymore since KVM: x86: update pvclock area conditionally, on cpu migration. Add task migration notification back. Problem noticed by Andy

Re: [PATCH 2/6] arm_gic_kvm.c: restore config before pending IRQs

2015-03-02 Thread Christoffer Dall
On Wed, Feb 25, 2015 at 04:02:34PM +, Alex Bennée wrote: As there is logic to deal with the difference between edge and level triggered interrupts in the kernel we must ensure it knows the configuration of the IRQs before we restore the pending state. Signed-off-by: Alex Bennée

Re: [PATCH] Revert target-ppc: Create versionless CPU class per family if KVM

2015-03-02 Thread Alexey Kardashevskiy
On 03/03/2015 12:51 AM, Alexander Graf wrote: On 02.03.15 14:42, Andreas Färber wrote: Am 02.03.2015 um 14:37 schrieb Alexander Graf: On 01.03.15 01:31, Andreas Färber wrote: This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid double-registration of types: Registering

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-02 Thread Mario Smarduch
Hi Christoffer, I don't understand how can the CPU handle different cache attributes used by QEMU and Guest won't you run into B2.9 checklist? Wouldn't cache evictions or cleans wipe out guest updates to same cache line(s)? - Mario On 03/02/2015 08:31 AM, Christoffer Dall wrote: On Tue, Feb

[PATCH] KVM: vmx: Set msr bitmap correctly if vcpu is in guest mode

2015-03-02 Thread Wincy Van
In commit 3af18d9c5fe9 (KVM: nVMX: Prepare for using hardware MSR bitmap), we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This is not enough since the field will be modified by following vmx_set_efer. Fix this by setting vmx_msr_bitmap_nested in vmx_set_msr_bitmap if vcpu

Re: [BUG] Balloon malfunctions with memory hotplug

2015-03-02 Thread zhanghailiang
On 2015/3/2 14:22, Amit Shah wrote: On (Fri) 27 Feb 2015 [12:09:20], zhanghailiang wrote: On 2015/2/27 3:26, Luiz Capitulino wrote: Hello, Reproducer: 1. Start QEMU with balloon and memory hotplug support: # qemu [...] -m 1G,slots=2,maxmem=2G -balloon virtio 2. Check balloon size: (qemu)

Re: [PATCH 3/4] arm/arm64: KVM: Fix migration race in the arch timer

2015-03-02 Thread Marc Zyngier
On 02/03/15 08:50, Alex Bennée wrote: Marc Zyngier marc.zyng...@arm.com writes: On Wed, 25 Feb 2015 15:36:21 + Alex Bennée alex.ben...@linaro.org wrote: Alex, Christoffer, snip So the first half of the patch looks perfectly OK to me... diff --git a/virt/kvm/arm/vgic.c

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Rusty Russell
Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 01:11:02PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote:

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 01:35:05PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 13:19:43 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 01:11:02PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote:

[PATCH v3] x86: svm: use kvm_fast_pio_in()

2015-03-02 Thread Joel Schopp
From: David Kaplan david.kap...@amd.com We can make the in instruction go faster the same way the out instruction is already. Changes from v2[Joel]: * changed rax from u32 to unsigned long * changed a couple return 0 to BUG_ON() * changed 8 to sizeof(new_rax) *

Re: [PATCH v2] x86: svm: use kvm_fast_pio_in()

2015-03-02 Thread Joel Schopp
return emulate_instruction(vcpu, 0) == EMULATE_DONE; port = io_info 16; @@ -1907,6 +1907,8 @@ static int io_interception(struct vcpu_svm *svm) svm-next_rip = svm-vmcb-control.exit_info_2; skip_emulated_instruction(svm-vcpu); + if (in) +

Re: [PATCH 3/4] arm/arm64: KVM: Fix migration race in the arch timer

2015-03-02 Thread Alex Bennée
Marc Zyngier marc.zyng...@arm.com writes: On 02/03/15 08:50, Alex Bennée wrote: Marc Zyngier marc.zyng...@arm.com writes: On Wed, 25 Feb 2015 15:36:21 + Alex Bennée alex.ben...@linaro.org wrote: Alex, Christoffer, snip So the first half of the patch looks perfectly OK to me...

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Cornelia Huck
On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote:

[PATCH v3 12/16] target-s390x: Prepare accelerator during cpu object realization

2015-03-02 Thread Michael Mueller
This patch implements routine s390_cpu_model_init(). It is called by the realize function during instantiation of an cpu object. Its task is to initialize the current accelerator with the properties of the selected processor model. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com ---

[PATCH v3 13/16] target-s390x: New QMP command query-cpu-model

2015-03-02 Thread Michael Mueller
This patch implements a new QMP request named 'query-cpu-model'. It returns the cpu model of cpu 0 and its backing accelerator. request: {execute : query-cpu-model } answer: {return : {name: 2827-ga2, accelerator: kvm }} Alias names are resolved to their respective machine type and GA names

[PATCH v3 15/16] target-s390x: Introduce facility test routine

2015-03-02 Thread Michael Mueller
The patch introduces routine s390_facility_test() which allows to verify a specific facility bit is set. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com --- target-s390x/cpu-models.c | 30 ++ target-s390x/cpu-models.h | 1 + 2 files changed, 31 insertions(+)

[PATCH v3 16/16] target-s390x: Enable cpu model usage

2015-03-02 Thread Michael Mueller
This patch enables QEMU to instantiate S390 CPUs with cpu model types. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com --- hw/s390x/s390-virtio.c | 12 +++- target-s390x/helper.c | 9 ++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git

[PATCH v3 11/16] target-s390x: Add cpu class initialization routines

2015-03-02 Thread Michael Mueller
This patch provides routines to dynamically update the previously defined S390 cpu classes in the current host context. The main function performing this process is s390_setup_cpu_classes(). It takes the current host context as parameter to setup the classes accordingly. It basically performs the

[PATCH v3 10/16] target-s390x: Add KVM VM attribute interface for cpu models

2015-03-02 Thread Michael Mueller
The patch implements routines to set and retrieve processor configuration data and to retrieve machine configuration data. The machine related data is used together with the cpu model facility lists to determine the list of supported cpu models of this host. The above mentioned routines have QEMU

Re: [PATCH] Revert target-ppc: Create versionless CPU class per family if KVM

2015-03-02 Thread Alexander Graf
On 02.03.15 14:42, Andreas Färber wrote: Am 02.03.2015 um 14:37 schrieb Alexander Graf: On 01.03.15 01:31, Andreas Färber wrote: This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid double-registration of types: Registering `POWER5+-powerpc64-cpu' which already exists

Re: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Radim Krčmář
2015-03-01 21:29-0500, Bandan Das: Joel Schopp joel.sch...@amd.com writes: From: David Kaplan david.kap...@amd.com No need to re-decode WBINVD since we know what it is from the intercept. Signed-off-by: David Kaplan david.kap...@amd.com [extracted from larger unlrelated patch, forward

Re: [PATCH] Revert target-ppc: Create versionless CPU class per family if KVM

2015-03-02 Thread Andreas Färber
Am 02.03.2015 um 14:37 schrieb Alexander Graf: On 01.03.15 01:31, Andreas Färber wrote: This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid double-registration of types: Registering `POWER5+-powerpc64-cpu' which already exists Taking the textual description of a CPU type

Re: [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-02 Thread Andreas Färber
Am 02.03.2015 um 13:43 schrieb Michael Mueller: QEMU now switches into probe mode when the selected machine is none and no specific accelerator(s) has been requested (i.e.: -machine none). In probe mode a by ARCH_CONFIG defines predefined list of accelerators run their init() methods.

Re: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Radim Krčmář
2015-02-27 18:19-0600, Joel Schopp: From: David Kaplan david.kap...@amd.com No need to re-decode WBINVD since we know what it is from the intercept. Signed-off-by: David Kaplan david.kap...@amd.com [extracted from larger unlrelated patch, forward ported, tested] Signed-off-by: Joel Schopp

Re: [PATCH] Revert target-ppc: Create versionless CPU class per family if KVM

2015-03-02 Thread Andreas Färber
Am 02.03.2015 um 14:51 schrieb Alexander Graf: On 02.03.15 14:42, Andreas Färber wrote: Am 02.03.2015 um 14:37 schrieb Alexander Graf: On 01.03.15 01:31, Andreas Färber wrote: This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid double-registration of types: Registering

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a

Re: Qemu and virtio 1.0

2015-03-02 Thread Michael S. Tsirkin
On Wed, Feb 25, 2015 at 02:50:22PM +1030, Rusty Russell wrote: OK, I am trying to experiment with virtio 1.0 support using the latest kernel and MST's qemu tree: https://git.kernel.org/cgit/virt/kvm/mst/qemu.git/?h=virtio-1.0 The first issue is that the device config endian was

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 01:11:02PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote:

[PATCH v3 00/16] s390x cpu model implementation

2015-03-02 Thread Michael Mueller
This patch set in combination with its kernel kvm patch set proposes an implementation of S390 cpu models. The origin of this item is to provide a means for management interfaces like libvirt to draw decisions if life guest migration to a target hypervisor is reasonable. A migration constraint is

[PATCH v3 05/16] target-s390x: Generate facility defines per cpu model

2015-03-02 Thread Michael Mueller
This patch introduces the helper gen-facilities which allows to generate facility list definitions and masks at compile time. Its flexibility is better and the error-proneness is lower when compared to static programming time added statements. The helper includes target-s390x/cpu-facilities.h to

[PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-02 Thread Michael Mueller
QEMU now switches into probe mode when the selected machine is none and no specific accelerator(s) has been requested (i.e.: -machine none). In probe mode a by ARCH_CONFIG defines predefined list of accelerators run their init() methods. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com ---

[PATCH v3 02/16] Introduce option --probe to switch into probe mode

2015-03-02 Thread Michael Mueller
The option --probe allows to switch into probe mode also for machines different from none. If one or more accelerators are specified these accelerators are used to provide probable properties. If no accelerator is given a list of accelerators that support probing is used. Signed-off-by: Michael

[PATCH v3 08/16] target-s390x: Add cpu model alias definition routines

2015-03-02 Thread Michael Mueller
This patch implements the infrastructure to dynamically add cpu model aliases. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/cpu-models.c | 89 +++ target-s390x/cpu-models.h

[PATCH v3 03/16] Introduce stub routine cpu_desc_avail

2015-03-02 Thread Michael Mueller
This patch introduces the function cpu_desc_avail() which returns by default true if not architecture specific implemented. Its intention is to indicate if the cpu model description is available for display by list_cpus(). This change allows cpu model descriptions to become dynamically created by

[PATCH v3 04/16] target-s390x: Introduce cpu facilities

2015-03-02 Thread Michael Mueller
The patch introduces S390 CPU facility bit numbers and names as well as the architectural facility size limit in bytes. Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com --- target-s390x/cpu-facilities.h | 76 +++ 1 file changed, 76 insertions(+)

RE: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-03-02 Thread Wu, Feng
-Original Message- From: Marcelo Tosatti [mailto:mtosa...@redhat.com] Sent: Friday, February 27, 2015 7:41 AM To: Wu, Feng Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; j...@8bytes.org;

[3.16.y-ckt stable] Patch MIPS: Export MSA functions used by lose_fpu(1) for KVM has been added to staging queue

2015-03-02 Thread Luis Henriques
This is a note to let you know that I have just added a patch titled MIPS: Export MSA functions used by lose_fpu(1) for KVM to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree which can be found at:

[3.16.y-ckt stable] Patch MIPS: Export FP functions used by lose_fpu(1) for KVM has been added to staging queue

2015-03-02 Thread Luis Henriques
This is a note to let you know that I have just added a patch titled MIPS: Export FP functions used by lose_fpu(1) for KVM to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree which can be found at:

Re: [PATCH] x86: svm: use kvm_fast_pio_in()

2015-03-02 Thread Radim Krčmář
2015-02-27 18:04-0600, Joel Schopp: From: David Kaplan david.kap...@amd.com We can make the in instruction go faster the same way the out instruction is already. Signed-off-by: David Kaplan david.kap...@amd.com [extracted from larger unlrelated patch, forward ported, tested]

[PATCH stable 3.12, 3.14] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread James Hogan
[ Upstream commit f798217dfd038af981a18bbe4bc57027a08bb182 ] The FPU and DSP are enabled via the CP0 Status CU1 and MX bits by kvm_mips_set_c0_status() on a guest exit, presumably in case there is active state that needs saving if pre-emption occurs. However neither of these bits are cleared

[PATCH stable 3.10] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread James Hogan
[ Upstream commit f798217dfd038af981a18bbe4bc57027a08bb182 ] The FPU and DSP are enabled via the CP0 Status CU1 and MX bits by kvm_mips_set_c0_status() on a guest exit, presumably in case there is active state that needs saving if pre-emption occurs. However neither of these bits are cleared

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030

[PATCH v3 14/16] target-s390x: Extend QMP command query-cpu-definitions

2015-03-02 Thread Michael Mueller
This patch implements the QMP command 'query-cpu-definitions' in the S390 context. The command returns a list of cpu model names in the current host context. A consumer may successfully request each listed cpu model as long for a given accelerator this model is runnable. The QMP type

[PATCH v2 2/5] arm/arm64: KVM: Implement support for unqueueing active IRQs

2015-03-02 Thread Alex Bennée
From: Christoffer Dall christoffer.d...@linaro.org Migrating active interrupts causes the active state to be lost completely. This implements some additional bitmaps to track the active state on the distributor and export this to user space. Signed-off-by: Christoffer Dall

[PATCH v2 3/5] arm: KVM: add a common vgic_queue_irq_to_lr fn

2015-03-02 Thread Alex Bennée
This helps re-factor away some of the repetitive code and makes the code flow more nicely. Signed-off-by: Alex Bennée alex.ben...@linaro.org diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index bfb6fbb..3b4ded2 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -263,6 +263,13

[PATCH v2 5/5] arm/arm64: KVM: Keep elrsr/aisr in sync with software model

2015-03-02 Thread Alex Bennée
From: Christoffer Dall christoffer.d...@linaro.org There is an interesting bug in the vgic code, which manifests itself when the KVM run loop has a signal pending or needs a vmid generation rollover after having disabled interrupts but before actually switching to the guest. In this case, we

[PATCH v2 1/5] arm: KVM: export vcpi-pause state via MP_STATE ioctls

2015-03-02 Thread Alex Bennée
To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration restore completes when it was paused before it state was captured. We use the existing KVM_GET/SET_MP_STATE ioctl to

[PATCH v3 06/16] target-s390x: Introduce cpu models

2015-03-02 Thread Michael Mueller
This patch implements the static part of the s390 cpu class definitions. It defines s390 cpu models by means of virtual cpu ids (enum) which contain information on the cpu generation, the machine class, the GA number and the machine type. The cpu id is used to instantiate a cpu class per cpu

[PATCH v3 07/16] target-s390x: Define cpu model specific facility lists

2015-03-02 Thread Michael Mueller
This patch defines S390 cpu facilities and their presence at the different cpu model levels. Beside defining a base which facilities have to be requested per cpu model, these sets are associated to the defined cpu classes and used to calculate the list of supported cpu models in context of the

[PATCH v3 09/16] target-s390x: Update linux-headers/asm-s390/kvm.h

2015-03-02 Thread Michael Mueller
Signed-off-by: Michael Mueller m...@linux.vnet.ibm.com --- linux-headers/asm-s390/kvm.h | 20 1 file changed, 20 insertions(+) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index d36b2fa..e38c942 100644 --- a/linux-headers/asm-s390/kvm.h +++

[PATCH v2 0/5] KVM ARM64 Migration Fixes

2015-03-02 Thread Alex Bennée
An update to the patch posted earlier this week. Result is textually identical but - split out the vgic_queue_irq_to_lr re-factoring - merged doc changes into earlier patch - added Acked-by tags Christoffer, Are you ok with the split? The branch I've been working with can be found at:

[PATCH v2 4/5] arm/arm64: KVM: Fix migration race in the arch timer

2015-03-02 Thread Alex Bennée
From: Christoffer Dall christoffer.d...@linaro.org When a VCPU is no longer running, we currently check to see if it has a timer scheduled in the future, and if it does, we schedule a host hrtimer to notify is in case the timer expires while the VCPU is still not running. When the hrtimer fires,

[3.16.y-ckt stable] Patch KVM: MIPS: Don't leak FPU/DSP to guest has been added to staging queue

2015-03-02 Thread Luis Henriques
This is a note to let you know that I have just added a patch titled KVM: MIPS: Don't leak FPU/DSP to guest to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree which can be found at:

Re: Qemu and virtio 1.0

2015-03-02 Thread Cornelia Huck
On Mon, 2 Mar 2015 12:43:43 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Feb 25, 2015 at 02:50:22PM +1030, Rusty Russell wrote: OK, I am trying to experiment with virtio 1.0 support using the latest kernel and MST's qemu tree:

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Cornelia Huck
On Mon, 2 Mar 2015 13:19:43 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 01:11:02PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On

Re: [PATCH 3/4] arm/arm64: KVM: Fix migration race in the arch timer

2015-03-02 Thread Alex Bennée
Marc Zyngier marc.zyng...@arm.com writes: On Wed, 25 Feb 2015 15:36:21 + Alex Bennée alex.ben...@linaro.org wrote: Alex, Christoffer, snip So the first half of the patch looks perfectly OK to me... diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index af6a521..3b4ded2 100644

Re: [PATCH resend v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-03-02 Thread Yong Wang
On Fri, Feb 27, 2015 at 04:56:06PM +0800, Wincy Van wrote: On Sun, Feb 15, 2015 at 2:27 PM, Yong Wang yong.y.w...@linux.intel.com wrote: Wincy, our QA found regressions with this patch that 64bit L2 linux guest fails to boot up when running nested kvm on kvm. Environment:

[patch added to the 3.12 stable tree] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread Jiri Slaby
From: James Hogan james.ho...@imgtec.com This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. === [ Upstream commit f798217dfd038af981a18bbe4bc57027a08bb182 ] The FPU and DSP are enabled via the CP0 Status CU1 and MX bits by

RE: [v3 23/26] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

2015-03-02 Thread Wu, Feng
-Original Message- From: Marcelo Tosatti [mailto:mtosa...@redhat.com] Sent: Tuesday, February 24, 2015 6:22 AM To: Wu, Feng Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; j...@8bytes.org;

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Cornelia Huck
On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth

Re: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Bandan Das
Radim Krčmář rkrc...@redhat.com writes: 2015-03-01 21:29-0500, Bandan Das: Joel Schopp joel.sch...@amd.com writes: From: David Kaplan david.kap...@amd.com No need to re-decode WBINVD since we know what it is from the intercept. Signed-off-by: David Kaplan david.kap...@amd.com

Re: [PATCH] x86: svm: use kvm_fast_pio_in()

2015-03-02 Thread Joel Schopp
+ if (in) + return kvm_fast_pio_in(vcpu, size, port); Have I missed a patch that defined kvm_fast_pio_in()? Not sure how I managed to leave out the bulk of the patch. Resending v2 momentarily. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of

Re: [kvm-unit-tests PATCH 00/18] arm/arm64: add smp support

2015-03-02 Thread Christoffer Dall
On Thu, Feb 26, 2015 at 02:50:38PM +0100, Andrew Jones wrote: On Thu, Feb 26, 2015 at 12:34:02PM +0100, Christoffer Dall wrote: On Sun, Feb 01, 2015 at 07:34:28PM +0100, Andrew Jones wrote: This series extends the kvm-unit-tests/arm[64] framework to support smp. A break down of the

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-02 Thread Christoffer Dall
On Tue, Feb 24, 2015 at 05:47:19PM +, Ard Biesheuvel wrote: On 24 February 2015 at 14:55, Andrew Jones drjo...@redhat.com wrote: On Fri, Feb 20, 2015 at 04:36:26PM +0100, Andrew Jones wrote: On Fri, Feb 20, 2015 at 02:37:25PM +, Ard Biesheuvel wrote: On 20 February 2015 at 14:29,

Re: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Radim Krčmář
2015-03-02 10:25-0500, Bandan Das: Radim Krčmář rkrc...@redhat.com writes: 2015-03-01 21:29-0500, Bandan Das: Joel Schopp joel.sch...@amd.com writes: +static int wbinvd_interception(struct vcpu_svm *svm) +{ +kvm_emulate_wbinvd(svm-vcpu); +

Re: [PATCH v8 5/5] KVM: arm/arm64: add irqfd support

2015-03-02 Thread Eric Auger
On 02/23/2015 10:45 PM, Christoffer Dall wrote: On Mon, Jan 19, 2015 at 05:43:13PM +0100, Eric Auger wrote: This patch enables irqfd on arm/arm64. Both irqfd and resamplefd are supported. Injection is implemented in vgic.c without routing. This patch enables CONFIG_HAVE_KVM_EVENTFD and

[Bug 88671] Radeon driver fails to reset hardware properly after kvm guest reboot

2015-03-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=88671 --- Comment #6 from Tom Stellard tstel...@gmail.com --- I've been playing with this a little more and it seems to be working correctly, but radeon dynamic power management (dpm) always fails to initialize on the second guest boot. My questions

[PATCH v14 05/20] vfio: amba: add the VFIO for AMBA devices module to Kconfig

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Enable building the VFIO AMBA driver. VFIO_AMBA depends on VFIO_PLATFORM, since it is sharing a portion of the code, and it is essentially implemented as a platform device whose resources are discovered via AMBA specific APIs in the kernel.

[PATCH v14 04/20] vfio: amba: VFIO support for AMBA devices

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Add support for discovering AMBA devices with VFIO and handle them similarly to Linux platform devices. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal b.rey...@virtualopensystems.com ---

[PATCH v4 5/5] vfio: type1: implement the VFIO_DMA_MAP_FLAG_NOEXEC flag

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Some IOMMU drivers, such as the ARM SMMU driver, make available the IOMMU_NOEXEC flag to set the page tables for a device as XN (execute never). This affects devices such as the ARM PL330 DMA Controller, which respects this flag and will

[PATCH v4 4/5] vfio: type1: replace vfio_domains_have_iommu_cache with generic function

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Replace the function vfio_domains_have_iommu_cache() with a more generic function vfio_domains_have_iommu_cap() which allows to check all domains of an vfio_iommu structure for a given cached capability. Signed-off-by: Antonios Motakis

[PATCH v14 01/20] vfio/platform: initial skeleton of VFIO support for platform devices

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com This patch forms the common skeleton code for platform devices support with VFIO. This will include the core functionality of VFIO_PLATFORM, however binding to the device and discovering the device resources will be done with the help of a

[PATCH v4 3/5] vfio: type1: replace domain wide protection flags with supported capabilities

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com VFIO_IOMMU_TYPE1 keeps track for each domain it knows a list of protection flags it always applies to all mappings in the domain. This is used for domains that support IOMMU_CAP_CACHE_COHERENCY. Refactor this slightly, by keeping track

[PATCH v4 2/5] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call, and expose its availability via the capability VFIO_DMA_NOEXEC_IOMMU. This way the user can control whether the XN flag will be set on the requested mappings. The

[PATCH v14 03/20] vfio: platform: add the VFIO PLATFORM module to Kconfig

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Enable building the VFIO PLATFORM driver that allows to use Linux platform devices with VFIO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal b.rey...@virtualopensystems.com ---

[PATCH v4 1/5] vfio: implement iommu driver capabilities with an enum

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Currently a VFIO driver's IOMMU capabilities are encoded as a series of numerical defines. Replace this with an enum for future maintainability. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal

Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-02 Thread Michael Mueller
On Mon, 02 Mar 2015 14:57:21 +0100 Andreas Färber afaer...@suse.de wrote: int configure_accelerator(MachineState *ms) { -const char *p; +const char *p, *name; char buf[10]; int ret; bool accel_initialised = false; bool init_failed = false;

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-02 Thread Laszlo Ersek
On 03/02/15 17:47, Paolo Bonzini wrote: Also, we may want to invalidate the cache for dirty pages before returning the dirty bitmap, and probably should do that directly in KVM_GET_DIRTY_LOG. I agree. If KVM_GET_DIRTY_LOG is supposed to be atomic fetch and clear (from userspace's aspect),

[PATCH v14 09/20] vfio/platform: support MMAP of MMIO regions

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Allow to memory map the MMIO regions of the device so userspace can directly access them. PIO regions are not being handled at this point. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal

[PATCH v14 15/20] vfio: virqfd: rename vfio_pci_virqfd_init and vfio_pci_virqfd_exit

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com The functions vfio_pci_virqfd_init and vfio_pci_virqfd_exit are not really PCI specific, since we plan to reuse the virqfd code with more VFIO drivers in addition to VFIO_PCI. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com

[PATCH v14 20/20] vfio/platform: implement IRQ masking/unmasking via an eventfd

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com With this patch the VFIO user will be able to set an eventfd that can be used in order to mask and unmask IRQs of platform devices. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal

[PATCH v14 13/20] vfio/platform: support for level sensitive interrupts

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Level sensitive interrupts are exposed as maskable and automasked interrupts and are masked and disabled automatically when they fire. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com [Baptiste Reynal: Move masked interrupt

[PATCH v14 16/20] vfio: add local lock for virqfd instead of depending on VFIO PCI

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com The Virqfd code needs to keep accesses to any struct *virqfd safe, but this comes into play only when creating or destroying eventfds, so sharing the same spinlock with the VFIO bus driver is not necessary. Signed-off-by: Antonios Motakis

[PATCH v14 18/20] vfio: move eventfd support code for VFIO_PCI to a separate file

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com The virqfd functionality that is used by VFIO_PCI to implement interrupt masking and unmasking via an eventfd, is generic enough and can be reused by another driver. Move it to a separate file in order to allow the code to be shared.

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-02 Thread Andrew Jones
On Mon, Mar 02, 2015 at 05:55:44PM +0100, Laszlo Ersek wrote: On 03/02/15 17:47, Paolo Bonzini wrote: Also, we may want to invalidate the cache for dirty pages before returning the dirty bitmap, and probably should do that directly in KVM_GET_DIRTY_LOG. I agree. If

[PATCH v14 11/20] vfio/platform: initial interrupts support code

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com This patch is a skeleton for the VFIO_DEVICE_SET_IRQS IOCTL, around which most IRQ functionality is implemented in VFIO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste Reynal

[PATCH v14 10/20] vfio/platform: return IRQ info

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Return information for the interrupts exposed by the device. This patch extends VFIO_DEVICE_GET_INFO with the number of IRQs and enables VFIO_DEVICE_GET_IRQ_INFO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com

[PATCH v14 08/20] vfio/platform: read and write support for the device fd

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com VFIO returns a file descriptor which we can use to manipulate the memory regions of the device. Usually, the user will mmap memory regions that are addressable on page boundaries, however for memory regions where this is not the case we

[PATCH v14 06/20] vfio/platform: return info for bound device

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com A VFIO userspace driver will start by opening the VFIO device that corresponds to an IOMMU group, and will use the ioctl interface to get the basic device info, such as number of memory regions and interrupts, and their properties. This

[PATCH v14 14/20] vfio: add a vfio_ prefix to virqfd_enable and virqfd_disable and export

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com We want to reuse virqfd functionality in multiple VFIO drivers; before moving these functions to core VFIO, add the vfio_ prefix to the virqfd_enable and virqfd_disable functions, and export them so they can be used from other modules.

[PATCH v14 12/20] vfio/platform: trigger an interrupt via eventfd

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com This patch allows to set an eventfd for a platform device's interrupt, and also to trigger the interrupt eventfd from userspace for testing. Level sensitive interrupts are marked as maskable and are handled in a later patch. Edge triggered

[PATCH v14 17/20] vfio: pass an opaque pointer on virqfd initialization

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com VFIO_PCI passes the VFIO device structure *vdev via eventfd to the handler that implements masking/unmasking of IRQs via an eventfd. We can replace it in the virqfd infrastructure with an opaque type so we can make use of the mechanism from

[PATCH v14 07/20] vfio/platform: return info for device memory mapped IO regions

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com This patch enables the IOCTLs VFIO_DEVICE_GET_REGION_INFO ioctl call, which allows the user to learn about the available MMIO resources of a device. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Baptiste

[PATCH v14 19/20] vfio: initialize the virqfd workqueue in VFIO generic code

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis a.mota...@virtualopensystems.com Now we have finally completely decoupled virqfd from VFIO_PCI. We can initialize it from the VFIO generic code, in order to safely use it from multiple independent VFIO bus drivers. Signed-off-by: Antonios Motakis

Re: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Joel Schopp
On 03/02/2015 10:03 AM, Radim Krčmář wrote: 2015-03-02 10:25-0500, Bandan Das: Radim Krčmář rkrc...@redhat.com writes: 2015-03-01 21:29-0500, Bandan Das: Joel Schopp joel.sch...@amd.com writes: +static int wbinvd_interception(struct vcpu_svm *svm) +{ + kvm_emulate_wbinvd(svm-vcpu); +

Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none

2015-03-02 Thread Andreas Färber
Am 02.03.2015 um 17:43 schrieb Michael Mueller: On Mon, 02 Mar 2015 14:57:21 +0100 Andreas Färber afaer...@suse.de wrote: int configure_accelerator(MachineState *ms) { -const char *p; +const char *p, *name; char buf[10]; int ret; bool accel_initialised = false;

  1   2   >