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) i

[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: [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 2

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: [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 > Acked-by: Julia Lawall > --- > arch/mips/kvm/tlb.c |1 + > 1 file changed, 1 insertion(+) > > diff --git

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_c

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

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 Ack

[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 L

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) +

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

2015-03-02 Thread Joel Schopp
From: David Kaplan 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) * added trace hook

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" 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" wrote: > > > > > > > On Mon, M

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" 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" wrote: > > > > > > > On Mon, M

QEMU, libvirt, and KVM are participating in Google Summer of Code 2015

2015-03-02 Thread Stefan Hajnoczi
I am delighted to announce that QEMU, libvirt, and KVM are participating in Google Summer of Code 2015. Thanks to Google's generous funding we are inviting students to apply for 12-week full-time work from May to August 2015. Here is our project ideas list page where students can select a project

[PATCH v3 2/2] x86: svm: make wbinvd faster

2015-03-02 Thread Joel Schopp
From: David Kaplan No need to re-decode WBINVD since we know what it is from the intercept. Signed-off-by: David Kaplan [extracted from larger unlrelated patch, forward ported, tested,style cleanup] Signed-off-by: Joel Schopp --- arch/x86/kvm/svm.c |8 +++- 1 file changed, 7 insertion

[PATCH v3 1/2] kvm: x86: make kvm_emulate_* consistant

2015-03-02 Thread Joel Schopp
Currently kvm_emulate() skips the instruction but kvm_emulate_* sometimes don't. The end reult is the caller ends up doing the skip themselves. Let's make them consistant. Signed-off-by: Joel Schopp --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/svm.c |2 -- arch/x8

[PATCH v3 0/2] kvm: x86: kvm_emulate_*

2015-03-02 Thread Joel Schopp
Review comments from v1 that used kvm_emulate_wbinvd() pointed out that kvm_emulate_* was inconsistant in using skipping, while kvm_emulate() always skips. The first patch cleans up the existing use while the second patch adds use of the updated version of kvm_emulate_wbinvd() in svm Changes sin

Re: [PATCH v3 00/16] s390x cpu model implementation

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:43:52PM +0100, Michael Mueller wrote: [...] > > What's currently a little bit unclear to me is how to best initialize the > various accelerators for machine 'none'. I played around with different > options and finally came up with the following sugguestion: > > Introduc

Re: [PATCH v2 1/2] kvm: x86: make kvm_emulate_* consistant

2015-03-02 Thread Joel Schopp
--- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c @@ -4995,7 +4995,7 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu, if (emulate_instruction(vcpu, 0) == EMULATE_DONE) { if (vcpu->arch.halt_request) { vcpu-

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

2015-03-02 Thread Radim Krčmář
2015-03-02 10:40-0600, Joel Schopp: > From: David Kaplan > > We can make the in instruction go faster the same way the out instruction is > already. > > Changes from v1 > * Added kvm_fast_pio_in() implementation that was left out of v1 > > Signed-off-by: David Kaplan > [extracted from la

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

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:43:53PM +0100, Michael Mueller wrote: > 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 "_CONFIG" defines predefined list of accelerators run > the

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

2015-03-02 Thread Eduardo Habkost
On Mon, Mar 02, 2015 at 01:44:06PM +0100, Michael Mueller wrote: > 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 > fo

Re: [PATCH v2 1/2] kvm: x86: make kvm_emulate_* consistant

2015-03-02 Thread Radim Krčmář
2015-03-02 12:04-0600, Joel Schopp: > Currently kvm_emulate() skips the instruction but kvm_emulate_* sometimes > don't. The end reult is the caller ends up doing the skip themselves. > Let's make them consistant. > > Signed-off-by: Joel Schopp > --- > diff --git a/arch/x86/kvm/vmx.c b/arch/x86

Re: [PATCH v2 2/2] x86: svm: make wbinvd faster

2015-03-02 Thread Radim Krčmář
2015-03-02 12:04-0600, Joel Schopp: > From: David Kaplan > No need to re-decode WBINVD since we know what it is from the intercept. > > Signed-off-by: David Kaplan > [extracted from larger unlrelated patch, forward ported, tested] > Signed-off-by: Joel Schopp > --- Reviewed-by: Radim Krčmář

Re: [BUG] Balloon malfunctions with memory hotplug

2015-03-02 Thread Luiz Capitulino
On Mon, 2 Mar 2015 11:52:34 +0530 Amit Shah wrote: > > >Another important detail is that, I *suspect* that a very similar > > >bug already exists with 32-bit guests even without memory > > >hotplug: what happens if you assign 6GB to a 32-bit without PAE > > >support? I think the same problem we'r

[PATCH v2 2/2] x86: svm: make wbinvd faster

2015-03-02 Thread Joel Schopp
From: David Kaplan No need to re-decode WBINVD since we know what it is from the intercept. Signed-off-by: David Kaplan [extracted from larger unlrelated patch, forward ported, tested] Signed-off-by: Joel Schopp --- arch/x86/kvm/svm.c |9 - 1 file changed, 8 insertions(+), 1 deleti

[PATCH v2 1/2] kvm: x86: make kvm_emulate_* consistant

2015-03-02 Thread Joel Schopp
Currently kvm_emulate() skips the instruction but kvm_emulate_* sometimes don't. The end reult is the caller ends up doing the skip themselves. Let's make them consistant. Signed-off-by: Joel Schopp --- arch/x86/kvm/svm.c |2 -- arch/x86/kvm/vmx.c |9 +++-- arch/x86/kvm/x86.c | 23

[PATCH v2 0/2] Series short description

2015-03-02 Thread Joel Schopp
Review comments from v1 that used kvm_emulate_wbinvd() pointed out that kvm_emulate_* was inconsistant in using skipping, while kvm_emulate() always skips. The first patch cleans up the existing use while the second patch adds use of the updated version of kvm_emulate_wbinvd() in svm --- Joel S

[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 #7 from Alex Williamson --- (In reply to Tom Stellard from comment #6) > 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 >

Re: [PATCH] arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()

2015-03-02 Thread Christoffer Dall
On Fri, Feb 27, 2015 at 07:41:45PM +0800, weiyj...@163.com wrote: > From: Wei Yongjun > > Add the missing unlock before return from function kvm_vgic_create() > in the error handling case. > > Signed-off-by: Wei Yongjun Thanks, applied. -Christoffer -- To unsubscribe from this list: send the l

Re: [PATCH 5/6] target-arm/kvm64: fix save/restore of SPSR regs

2015-03-02 Thread Christoffer Dall
Hi Alex, Seems like you accidentally sent out two copies of this patch, hopefully I'm reviewing the right one... On Wed, Feb 25, 2015 at 04:02:38PM +, Alex Bennée wrote: > From: Christoffer Dall > > The current code was negatively indexing the cpu state array and not > synchronizing banked

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal ---

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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. Signed-off-by: Antonios Motakis

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis Add support for discovering AMBA devices with VFIO and handle them similarly to Linux platform devices. Signed-off-by: Antonios Motakis Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_amba.c | 115 ++ include/uapi/linux/

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 instead that a given domain supports

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 IOMMU_NOEXEC flag needs to be availabl

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis Enable building the VFIO PLATFORM driver that allows to use Linux platform devices with VFIO. Signed-off-by: Antonios Motakis Signed-off-by: Baptiste Reynal --- drivers/vfio/Kconfig | 1 + drivers/vfio/Makefile | 1 + drivers/vfio/platform/Kconfig |

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 refuse to fetch DMA instructions fro

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 separate file where any Linux plat

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- include/uapi/linux/vfio.h | 24 +++- 1

[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 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. Signed-off-by: Antonios Motakis Sign

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 interrupts are not advertised as m

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 other VFIO bus drivers. Signed-o

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/Makefile

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 enables the VFIO_DEVICE_GET_INF

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/Makefile

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 cannot provide mmap functionality due

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_platform_common.c | 106 ++

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_platform_common.c | 52 +-- driver

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis Level sensitive interrupts are exposed as maskable and automasked interrupts and are masked and disabled automatically when they fire. Signed-off-by: Antonios Motakis [Baptiste Reynal: Move masked interrupt initialization from "vfio/platform: trigger an interrupt via even

[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 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 Signed-off-by: Baptiste Reynal -

[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 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. Signed-off-by: Antonios Motakis Signed

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 KV

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_platform_irq.c | 47

[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 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 [Baptiste Reynal: Move rename vfio_pci_virqfd_init and vfio_pci_

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

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis 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 Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_platform_common.c | 65 ++

[PATCH v14 02/20] vfio: platform: probe to devices on the platform bus

2015-03-02 Thread Baptiste Reynal
From: Antonios Motakis Driver to bind to Linux platform devices, and callbacks to discover their resources to be used by the main VFIO PLATFORM code. Signed-off-by: Antonios Motakis Signed-off-by: Baptiste Reynal --- drivers/vfio/platform/vfio_platform.c | 103

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 wrote: > >>> int configure_accelerator(MachineState *ms) >>> { >>> -const char *p; >>> +const char *p, *name; >>> char buf[10]; >>> int ret; >>> bool accel_initialised =

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ář writes: 2015-03-01 21:29-0500, Bandan Das: Joel Schopp writes: +static int wbinvd_interception(struct vcpu_svm *svm) +{ + kvm_emulate_wbinvd(&svm->vcpu); + skip_emulated_instruction(&svm

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 aspec

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 08:31:46AM -0800, Christoffer Dall wrote: > On Tue, Feb 24, 2015 at 05:47:19PM +, Ard Biesheuvel wrote: > > On 24 February 2015 at 14:55, Andrew Jones wrote: > > > On Fri, Feb 20, 2015 at 04:36:26PM +0100, Andrew Jones wrote: > > >> On Fri, Feb 20, 2015 at 02:37:25PM +0

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 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; > > Acc

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

2015-03-02 Thread Paolo Bonzini
On 02/03/2015 17:31, Christoffer Dall wrote: > 2. While the code is probably as nice as this kind of stuff gets, it > is non-trivial and extremely difficult to debug. The counter-point here > is that we may end up handling other stuff at EL2 for performanc reasons > in the future. > > Mainly be

[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 --- 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 are: 1. What methods

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

2015-03-02 Thread Joel Schopp
From: David Kaplan We can make the in instruction go faster the same way the out instruction is already. Changes from v1 * Added kvm_fast_pio_in() implementation that was left out of v1 Signed-off-by: David Kaplan [extracted from larger unlrelated patch, forward ported, tested] Signed-

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 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, Andrew Jon

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 th

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_EVEN

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: [PATCH] x86: svm: make wbinvd faster

2015-03-02 Thread Radim Krčmář
2015-03-02 10:25-0500, Bandan Das: > Radim Krčmář writes: > > 2015-03-01 21:29-0500, Bandan Das: > >> Joel Schopp writes: > >> > +static int wbinvd_interception(struct vcpu_svm *svm) > >> > +{ > >> > +kvm_emulate_wbinvd(&svm->vcpu); > >> > +skip_emulated_instruction(&svm->vcpu); >

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

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

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

2015-03-02 Thread Alex Bennée
Marc Zyngier writes: > On 02/03/15 08:50, Alex Bennée wrote: >> >> Marc Zyngier writes: >> >>> On Wed, 25 Feb 2015 15:36:21 + >>> Alex Bennée wrote: >>> >>> Alex, Christoffer, >>> >> >>> >>> So the first half of the patch looks perfectly OK to me... >>> diff --git a/virt/kvm/arm/vg

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 > No need to re-decode WBINVD since we know what it is from the intercept. > > Signed-off-by: David Kaplan > [extracted from larger unlrelated patch, forward ported, tested] > Signed-off-by: Joel Schopp > --- Reviewed-by: Radim Krčmář

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:

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

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

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 "_CONFIG" defines predefined list of accelerators run > their init() methods

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 alr

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 o

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 > > We can make the in instruction go faster the same way the out instruction is > already. > > Signed-off-by: David Kaplan > [extracted from larger unlrelated patch, forward ported, tested] > Signed-off-by: Joel Schopp > --- > arch/x86

[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: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/head

[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: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads

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; a

[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: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-q

[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 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 flush the vgic as usual, but we

[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 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 @@ static int vgic_irq_

[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 d

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

2015-03-02 Thread Alex Bennée
From: Christoffer Dall 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 Signed-off-by: Alex Bennée --- AJB: - fixed

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

2015-03-02 Thread Alex Bennée
From: Christoffer Dall 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, we mask the guest's timer a

[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 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 Mu

[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 Reviewed-by: Cornelia Huck --- target-s390x/cpu-models.c | 89 +++ target-s390x/cpu-models.h | 11 ++ target-s390x/cpu.c| 1 + 3

[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 e

[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"

[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 "_CONFIG" defines predefined list of accelerators run their init() methods. Signed-off-by: Michael Mueller --- accel.c

[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 --- target-s390x/cpu-facilities.h | 76 +++ 1 file changed, 76 insertions(+) create mode 100644 target-s

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

2015-03-02 Thread Michael Mueller
Signed-off-by: Michael Mueller --- 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 +++ b/linux-headers/asm-s390/kvm.h

[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 model.

[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 curr

[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 f

[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 t

  1   2   >