RE: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Thursday, October 10, 2013 1:33 AM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Kim Phillips; Christoffer Dall; Alex Williamson; linux- ker...@vger.kernel.org; a.mota...@virtualopensystems.com; ag...@suse.de; Sethi Varun-B16395;

RE: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Kim Phillips Sent: Thursday, October 10, 2013 8:36 AM To: Wood Scott-B07421 Cc: Yoder Stuart-B08248; Wood Scott-B07421; christoffer.d...@linaro.org; alex.william...@redhat.com;

Re: [Qemu-devel] [Bug 1100843] Re: Live Migration Causes Performance Issues

2013-10-10 Thread Peter Lieven
On 07.10.2013 11:55, Paolo Bonzini wrote: Il 07/10/2013 11:49, Peter Lieven ha scritto: It's in general not easy to do this if you take non-x86 targets into account. What about the dirty way to zero out all non zero pages at the beginning of ram_load? I'm not sure I follow? sth like this for

Re: Changing guest I/O path in KVM

2013-10-10 Thread Stefan Hajnoczi
On Wed, Oct 02, 2013 at 08:17:18PM +, Hai Nguyen wrote: Stefan Hajnoczi stefanha at gmail.com writes: On Mon, Sep 30, 2013 at 08:29:30PM -0400, duy hai nguyen wrote: I have this question regarding the way KVM handles I/O requests from a guest: IO requests from a guest are

RE: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, October 07, 2013 5:35 PM To: Alexander Graf Cc: Bhushan Bharat-R65777; Paul Mackerras; Wood Scott-B07421; kvm- p...@vger.kernel.org; kvm@vger.kernel.org mailing list;

Re: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 10:32, Bhushan Bharat-R65777 ha scritto: -Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, October 07, 2013 5:35 PM To: Alexander Graf Cc: Bhushan Bharat-R65777; Paul Mackerras; Wood Scott-B07421; kvm-

[GIT PULL] KVM fixes for 3.12-rc5

2013-10-10 Thread Paolo Bonzini
Linus, The following changes since commit 6d15ee492809d38bd62237b6d0f6a81d4dd12d15: Merge git://git.kernel.org/pub/scm/virt/kvm/kvm (2013-10-03 08:56:41 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-10 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: Am 09.10.2013 um 07:59 schrieb Paul Mackerras pau...@samba.org: On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: Am 09.10.2013 um 01:31 schrieb Paul Mackerras pau...@samba.org: True, until we get

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Tue, Oct 08, 2013 at 11:33:31AM +0530, Bharat Bhushan wrote: We need to search linux pte to get pte attributes for setting TLB in KVM. This patch defines a linux_pte_lookup() function for same. [snip] + /* wait until _PAGE_BUSY is clear */ + while (1) { + pte =

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 12:47:31PM -0500, Scott Wood wrote: On Wed, 2013-10-09 at 03:48 -0500, Bhushan Bharat-R65777 wrote: What lookup_linux_pte_and_update() does:- - find_linux_pte_or_hugepte() - does size and some other trivial checks - Then atomically update the pte:- =

RE: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, October 10, 2013 4:06 PM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; ag...@suse.de; Yoder Stuart- B08248; kvm@vger.kernel.org; kvm-...@vger.kernel.org Subject: Re: [PATCH 3/4]

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Thu, Oct 10, 2013 at 10:44:54AM +, Bhushan Bharat-R65777 wrote: -Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, October 10, 2013 4:06 PM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; ag...@suse.de; Yoder Stuart-

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Gleb Natapov
On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: Gleb has a idea that uses RCU_DESTORY to protect the shadow page table and encodes the page-level into the spte (since we need to check if the spte is the last-spte. ). How about this? Pointer please? Why is

RE: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Yoder Stuart-B08248
I am trying to understand what you are proposing here (example DEVICE can be handled by DRIVER1 and VFIO-PLATFORM-DRIVER): - By default drv-explicit_bind_only will be clear in all drivers. - By default device-explicit_bind_only will also be clear for all devices. - On boot, matching

Re: Changing guest I/O path in KVM

2013-10-10 Thread Hai Nguyen
Stefan Hajnoczi stefanha at gmail.com writes: Thanks, Stefan! In the network file system (NFS) approach you mentioned, I understand that the I/O requests will go directly from VM1 to VM2 via network before reaching QEMU for I/O handling. Please correct if I am wrong. The network

Re: [PATCH] kvm fix: Enable pvspinlock after jump_label_init() to avoid VM hang

2013-10-10 Thread Steven Rostedt
On Wed, 9 Oct 2013 14:33:21 +0530 Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: We use jump label to enable pv-spinlock. With the changes in (442e0973e927 Merge branch 'x86/jumplabel'), the jump label behaviour has changed that would result in evntual hang of the VM since we

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Scott Wood
On Thu, 2013-10-10 at 02:45 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Thursday, October 10, 2013 1:33 AM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Kim Phillips; Christoffer Dall; Alex Williamson; linux-

RE: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Thursday, October 10, 2013 8:53 PM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Yoder Stuart-B08248; Kim Phillips; Christoffer Dall; Alex Williamson; linux-ker...@vger.kernel.org; a.mota...@virtualopensystems.com;

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-10 Thread Scott Wood
On Thu, 2013-10-10 at 03:01 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Kim Phillips Sent: Thursday, October 10, 2013 8:36 AM To: Wood Scott-B07421 Cc: Yoder Stuart-B08248; Wood

Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer

2013-10-10 Thread Jan Kiszka
On 2013-10-02 20:47, Jan Kiszka wrote: On 2013-09-30 11:08, Jan Kiszka wrote: On 2013-09-26 17:04, Paolo Bonzini wrote: Il 16/09/2013 10:11, Arthur Chunqi Li ha scritto: This patch contains the following two changes: 1. Fix the bug in nested preemption timer support. If vmexit L2-L0 with

[PATCH] mm: hugetlb: initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Andrea Arcangeli
11feeb498086a3a5907b8148bdf1786a9b18fc55 introduced a memory leak when KVM is run on gigantic compound pages. 11feeb498086a3a5907b8148bdf1786a9b18fc55 depends on the assumption that PG_reserved is identical for all head and tail pages of a compound page. So that if get_user_pages returns a tail

Re: [PATCH v5] KVM: nVMX: Fully support of nested VMX preemption timer

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 18:12, Jan Kiszka ha scritto: On 2013-10-02 20:47, Jan Kiszka wrote: On 2013-09-30 11:08, Jan Kiszka wrote: On 2013-09-26 17:04, Paolo Bonzini wrote: Il 16/09/2013 10:11, Arthur Chunqi Li ha scritto: This patch contains the following two changes: 1. Fix the bug in nested

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Marcelo Tosatti
On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: Gleb has a idea that uses RCU_DESTORY to protect the shadow page table and encodes the page-level into the spte (since we need to check if the spte is

Re: [PATCH] mm: hugetlb: initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Rik van Riel
On 10/10/2013 12:12 PM, Andrea Arcangeli wrote: 11feeb498086a3a5907b8148bdf1786a9b18fc55 introduced a memory leak when KVM is run on gigantic compound pages. 11feeb498086a3a5907b8148bdf1786a9b18fc55 depends on the assumption that PG_reserved is identical for all head and tail pages of a

[PULL v2 0/8] VFIO updates for QEMU

2013-10-10 Thread Alex Williamson
The following changes since commit a684f3cf9b9b9c3cb82be87aafc463de8974610c: Merge remote-tracking branch 'kraxel/seabios-1.7.3.2' into staging (2013-09-30 17:15:27 -0500) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20131010.0

[PULL v2 1/8] vfio-pci: Add support for MSI affinity

2013-10-10 Thread Alex Williamson
When MSI is accelerated through KVM the vectors are only programmed when the guest first enables MSI support.  Subsequent writes to the vector address or data fields are ignored.  Unfortunately that means we're ignore updates done to adjust SMP affinity of the vectors. MSI SMP affinity already

[PULL v2 2/8] vfio-pci: Test device reset capabilities

2013-10-10 Thread Alex Williamson
Not all resets are created equal. PM reset is not very reliable, especially for GPUs, so we might want to opt for a bus reset if a standard reset will only do a D3hot-D0 transition. We can also use this to tell if the standard reset will do a bus reset (if neither has_pm_reset or has_flr is

[PULL v2 4/8] vfio-pci: Cleanup error_reports

2013-10-10 Thread Alex Williamson
Remove carriage returns and tweak formatting for error_reports. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/misc/vfio.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 730dec5..a73e7f5

[PULL v2 5/8] vfio-pci: Implement PCI hot reset

2013-10-10 Thread Alex Williamson
Now that VFIO has a PCI hot reset interface, take advantage of it. There are two modes that we need to consider. The first is when only one device within the set of devices affected is actually assigned to the guest. In this case the other devices are are just held by VFIO for isolation and we

[PULL v2 3/8] vfio-pci: Lazy PCI option ROM loading

2013-10-10 Thread Alex Williamson
During vfio-pci initfn, the device is not always in a state where the option ROM can be read. In the case of graphics cards, there's often no per function reset, which means we have host driver state affecting whether the option ROM is usable. Ideally we want to move reading the option ROM past

[PULL v2 6/8] vfio: Fix debug output for int128 values

2013-10-10 Thread Alex Williamson
From: Alexey Kardashevskiy a...@ozlabs.ru Memory regions can easily be 2^64 byte long and therefore overflow for just a bit but that is enough for int128_get64() to assert. This takes care of debug printing of huge section sizes. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by:

[PULL v2 8/8] vfio-pci: Fix endian issues in vfio_pci_size_rom()

2013-10-10 Thread Alex Williamson
VFIO is always little endian so do byte swapping of our mask on the way in and byte swapping of the size on the way out. Signed-off-by: Alex Williamson alex.william...@redhat.com Reported-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/misc/vfio.c |4 ++-- 1 file changed, 2 insertions(+), 2

[PULL v2 7/8] vfio-pci: Add dummy PCI ROM write accessor

2013-10-10 Thread Alex Williamson
Just to be sure we don't jump off any NULL pointer cliffs. Signed-off-by: Alex Williamson alex.william...@redhat.com Reported-by: Paolo Bonzini pbonz...@redhat.com --- hw/misc/vfio.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Gleb Natapov
On Thu, Oct 10, 2013 at 01:42:22PM -0300, Marcelo Tosatti wrote: On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: Gleb has a idea that uses RCU_DESTORY to protect the shadow page table and encodes the

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Marcelo Tosatti
On Thu, Oct 10, 2013 at 10:16:46PM +0300, Gleb Natapov wrote: On Thu, Oct 10, 2013 at 01:42:22PM -0300, Marcelo Tosatti wrote: On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: Gleb has a idea that uses

Re: [PATCH] mm: hugetlb: initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Rafael Aquini
On Thu, Oct 10, 2013 at 06:12:41PM +0200, Andrea Arcangeli wrote: 11feeb498086a3a5907b8148bdf1786a9b18fc55 introduced a memory leak when KVM is run on gigantic compound pages. 11feeb498086a3a5907b8148bdf1786a9b18fc55 depends on the assumption that PG_reserved is identical for all head and

[PATCH v2] vfio-pci: Disallow device from using NoSnoop transactions

2013-10-10 Thread Alex Williamson
NoSnoop is a PCIe attribute that allows devices to issue transactions that bypass cache. If devices are allowed to do this then the hypervisor must emulate instructions like WBINVD or else drivers in the guest have no way to synchronize RAM for the device. Instead of forcing WBINVD when a device

WinPE blue screen in guest w/HyperV enlightenment

2013-10-10 Thread Brian Rak
I've been trying to get WinPE to boot correctly as a KVM guest. I've found that WinPE 4.0 (aka server 2012) will boot fine in KVM, but older versions will not. I only see this issue if the HyperV enlightenments are enabled. A screenshot of the crash can be found at:

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Gleb Natapov
On Thu, Oct 10, 2013 at 06:03:01PM -0300, Marcelo Tosatti wrote: On Thu, Oct 10, 2013 at 10:16:46PM +0300, Gleb Natapov wrote: On Thu, Oct 10, 2013 at 01:42:22PM -0300, Marcelo Tosatti wrote: On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: On Wed, Oct 09, 2013 at 10:47:10PM

RE: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, October 07, 2013 5:35 PM To: Alexander Graf Cc: Bhushan Bharat-R65777; Paul Mackerras; Wood Scott-B07421; kvm- p...@vger.kernel.org; k...@vger.kernel.org mailing list;

Re: [PATCH 2/2] kvm: ppc: booke: check range page invalidation progress on page setup

2013-10-10 Thread Paolo Bonzini
Il 10/10/2013 10:32, Bhushan Bharat-R65777 ha scritto: -Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Sent: Monday, October 07, 2013 5:35 PM To: Alexander Graf Cc: Bhushan Bharat-R65777; Paul Mackerras; Wood Scott-B07421; kvm-

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-10 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: Am 09.10.2013 um 07:59 schrieb Paul Mackerras pau...@samba.org: On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: Am 09.10.2013 um 01:31 schrieb Paul Mackerras pau...@samba.org: True, until we get

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Tue, Oct 08, 2013 at 11:33:31AM +0530, Bharat Bhushan wrote: We need to search linux pte to get pte attributes for setting TLB in KVM. This patch defines a linux_pte_lookup() function for same. [snip] + /* wait until _PAGE_BUSY is clear */ + while (1) { + pte =

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 12:47:31PM -0500, Scott Wood wrote: On Wed, 2013-10-09 at 03:48 -0500, Bhushan Bharat-R65777 wrote: What lookup_linux_pte_and_update() does:- - find_linux_pte_or_hugepte() - does size and some other trivial checks - Then atomically update the pte:- =

RE: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, October 10, 2013 4:06 PM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; ag...@suse.de; Yoder Stuart- B08248; k...@vger.kernel.org; kvm-ppc@vger.kernel.org Subject: Re: [PATCH

Re: [PATCH 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-10 Thread Paul Mackerras
On Thu, Oct 10, 2013 at 10:44:54AM +, Bhushan Bharat-R65777 wrote: -Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Thursday, October 10, 2013 4:06 PM To: Wood Scott-B07421 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; ag...@suse.de; Yoder Stuart-