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-B16

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.c

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

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

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-

[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 : > > > On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: > >> > >> > >> Am 09.10.2013 um 01:31 schrieb Paul Mackerras : > >> > >>> True, until we get to POWER8 wi

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

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

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

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? > > > > > > Pointe

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, m

Re: Changing guest I/O path in KVM

2013-10-10 Thread Hai Nguyen
Stefan Hajnoczi 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 networ

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 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 would end up in a > situation > w

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- > > ker...@v

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; > ag...

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-B08

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

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

[PATCH] initialize PG_reserved for tail pages of gigantig compound pages

2013-10-10 Thread Andrea Arcangeli
Hi, large CC list because the below patch is important to merge before 3.12 final, either that or 11feeb498086a3a5907b8148bdf1786a9b18fc55 should be reverted ASAP. The optimization 11feeb498086a3a5907b8148bdf1786a9b18fc55 avoids deferefencing the head page during KVM mmio vmexit, and it is a wort

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 b

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

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 compound

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

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

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

[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 --- 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 100644 --- a/hw/misc/vfio.c ++

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

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

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

2013-10-10 Thread Alex Williamson
From: Alexey Kardashevskiy 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 Signed-off-by: Alex Williamson --- hw/mis

[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 Reported-by: Alexey Kardashevskiy --- hw/misc/vfio.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/vfio.c

[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 Reported-by: Paolo Bonzini --- hw/misc/vfio.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 68e25bd..1fbc40b 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/v

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

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

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 an

[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: https://dl.dropboxuserc

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 1

[PATCH 3/4] VFIO: pci: amend vfio-pci for explicit binding via sysfs only

2013-10-10 Thread Kim Phillips
Force the vfio-pci driver to only be bound explicitly via sysfs to avoid conflics with other drivers in the event of a hotplug. Signed-off-by: Kim Phillips --- drivers/vfio/pci/vfio_pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_p

[PATCH] VFIO: platform: allow the driver to bind to any device explicitly via sysfs

2013-10-10 Thread Kim Phillips
Set match_any_dev and sysfs_bind_only such that echoing a platform device ID to the driver sysfs bind file will successfully match and bind the device to the vfio-platform meta-driver in accordance to the desired semantics for vfio drivers. Signed-off-by: Kim Phillips --- this patch depends on th

[PATCH 2/4] driver core: platform: allow platform drivers to bind to any device

2013-10-10 Thread Kim Phillips
Platform drivers such as the vfio-platform "meta-" driver [1] should be allowed to specify that they can bind to any device, much like PCI drivers can with PCI_ANY_ID. Currently, binding platform drivers to devices depends on: - a string match in the device node's compatible entry (OF) - a string

[PATCH 1/4] driver core: Add new device_driver flag to allow binding via sysfs only

2013-10-10 Thread Kim Phillips
VFIO supports pass-through of devices to user space - for sake of illustration, say a PCI e1000 device: - the e1000 is first unbound from the PCI e1000 driver via sysfs - the vfio-pci driver is told via new_id that it now handles e1000 devices - the e1000 is explicitly bound to vfio-pci through sy