Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:21:20AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 17:37 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 04:33:18PM +0200, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha scritto: The hwrng is accessible by host userspace via

Re: [PATCH v2 02/15] KVM: MMU: properly check last spte in fast_page_fault()

2013-10-03 Thread Xiao Guangrong
On Oct 1, 2013, at 5:23 AM, Marcelo Tosatti mtosa...@redhat.com wrote: Unrelated to this patch: If vcpu-mode = OUTSIDE_GUEST_MODE, no IPI is sent by kvm_flush_remote_tlbs. Yes. So how is this supposed to work again? /* * Wait for all vcpus to exit guest mode

Re: [PATCH v2 03/15] KVM: MMU: lazily drop large spte

2013-10-03 Thread Xiao Guangrong
On Oct 1, 2013, at 6:39 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Sep 05, 2013 at 06:29:06PM +0800, Xiao Guangrong wrote: Currently, kvm zaps the large spte if write-protected is needed, the later read can fault on that spte. Actually, we can make the large spte readonly instead

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:07:22AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: Yes, I alluded to it in my email to Paul and Paolo asked also. How this interface is disabled? Also hwrnd is MMIO in a host why guest needs to use hypercall

Re: [PATCH v2 05/15] KVM: MMU: flush tlb out of mmu lock when write-protect the sptes

2013-10-03 Thread Xiao Guangrong
On Oct 1, 2013, at 7:05 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Sep 05, 2013 at 06:29:08PM +0800, Xiao Guangrong wrote: Now we can flush all the TLBs out of the mmu lock without TLB corruption when write-proect the sptes, it is because: - we have marked large sptes readonly

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Benjamin Herrenschmidt
On Thu, 2013-10-03 at 08:43 +0300, Gleb Natapov wrote: Why it can be a bad idea? User can drain hwrng continuously making other users of it much slower, or even worse, making them fall back to another much less reliable, source of entropy. Not in a very significant way, we generate entropy at

[PATCH -V2] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-03 Thread Aneesh Kumar K.V
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com This was introduced by 85a0d845d8 (KVM: PPC: Book3S PR: Allocate kvm_vcpu structs from kvm_vcpu_cache). arch/powerpc/kvm/book3s_pr.c: In function 'kvmppc_core_vcpu_create': arch/powerpc/kvm/book3s_pr.c:1182:30: error: 'struct

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

2013-10-03 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 30/09/2013 11:08, Jan Kiszka ha scritto: On 2013-09-26 17:04, Paolo Bonzini wrote: Hi all, the test fails for me if the preemption timer value is set to a value that is above ~2000 (which means ~65000 TSC cycles on this machine). The

Re: [PATCH 1/1] virt/kvm/iommu.c: Add leading zeros to device's BDF notation in debug messages

2013-10-03 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 12:23:26PM +0200, Andre Richter wrote: When KVM (de)assigns PCI(e) devices to VMs, a debug message is printed including the BDF notation of the respective device. Currently, the BDF notation does not have the commonly used leading zeros. This produces messages like

Re: [PATCH v3 0/3] KVM: prepare for future XSAVE extensions

2013-10-03 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 04:06:13PM +0200, Paolo Bonzini wrote: As soon as the kernel will support the XSAVE extensions in Skylake processors, we will want both userspace and the hypervisor to run guests without showing any trace of the new features (because support for them in the hypervisor

Re: [Qemu-devel] [PATCH v3 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-03 Thread Igor Mammedov
On Wed, 2 Oct 2013 17:54:57 +0200 Paolo Bonzini pbonz...@redhat.com wrote: The data in leaf 0Dh depends on information from other feature bits. Instead of passing it blindly from the host, compute it based on whether these feature bits are enabled. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v3 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 11:59:24AM +0200, Igor Mammedov wrote: On Wed, 2 Oct 2013 17:54:57 +0200 Paolo Bonzini pbonz...@redhat.com wrote: The data in leaf 0Dh depends on information from other feature bits. Instead of passing it blindly from the host, compute it based on whether these

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Paul Mackerras
On Thu, Oct 03, 2013 at 08:48:03AM +0300, Gleb Natapov wrote: On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha

Re: [Qemu-devel] [PATCH v3 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-03 Thread Igor Mammedov
On Thu, 3 Oct 2013 13:01:54 +0300 Gleb Natapov g...@redhat.com wrote: On Thu, Oct 03, 2013 at 11:59:24AM +0200, Igor Mammedov wrote: On Wed, 2 Oct 2013 17:54:57 +0200 Paolo Bonzini pbonz...@redhat.com wrote: The data in leaf 0Dh depends on information from other feature bits.

Re: [PATCH 2/7] KVM: mmu: remove uninteresting MMU new_cr3 callbacks

2013-10-03 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 04:56:11PM +0200, Paolo Bonzini wrote: The new_cr3 MMU callback has been a wrapper for mmu_free_roots since commit e676505 (KVM: MMU: Force cr3 reload with two dimensional paging on mov cr3 emulation, 2012-07-08). The commit message mentioned that mmu_free_roots() is

[RFC PATCH] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-03 Thread Cédric Le Goater
MMIO emulation reads the last instruction executed by the guest and then emulates. If the guest is running in Little Endian mode, the instruction needs to be byte-swapped before being emulated. This patch stores the last instruction in the endian order of the host, primarily doing a byte-swap if

Re: [PATCH 5/7] KVM: mmu: remove argument to kvm_init_shadow_mmu and kvm_init_shadow_ept_mmu

2013-10-03 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 04:56:14PM +0200, Paolo Bonzini wrote: The initialization function in mmu.c can always use walk_mmu, which is known to be vcpu-arch.mmu. Only init_kvm_nested_mmu is used to initialize vcpu-arch.nested_mmu. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [PATCH 5/7] KVM: mmu: remove argument to kvm_init_shadow_mmu and kvm_init_shadow_ept_mmu

2013-10-03 Thread Paolo Bonzini
Il 03/10/2013 13:25, Gleb Natapov ha scritto: On Wed, Oct 02, 2013 at 04:56:14PM +0200, Paolo Bonzini wrote: The initialization function in mmu.c can always use walk_mmu, which is known to be vcpu-arch.mmu. Only init_kvm_nested_mmu is used to initialize vcpu-arch.nested_mmu. Signed-off-by:

Re: [PATCH 2/7] KVM: mmu: remove uninteresting MMU new_cr3 callbacks

2013-10-03 Thread Paolo Bonzini
Il 03/10/2013 12:23, Gleb Natapov ha scritto: The commit message mentioned that mmu_free_roots() is somewhat of an overkill, but fixing that is more complicated and will be done after this minimal fix. One year has passed, and no one really felt the need to do a different fix. Wrap

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:06:30PM +1000, Paul Mackerras wrote: On Thu, Oct 03, 2013 at 08:48:03AM +0300, Gleb Natapov wrote: On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33,

Re: [PATCH 5/7] KVM: mmu: remove argument to kvm_init_shadow_mmu and kvm_init_shadow_ept_mmu

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 01:51:09PM +0200, Paolo Bonzini wrote: Il 03/10/2013 13:25, Gleb Natapov ha scritto: On Wed, Oct 02, 2013 at 04:56:14PM +0200, Paolo Bonzini wrote: The initialization function in mmu.c can always use walk_mmu, which is known to be vcpu-arch.mmu. Only

[PULL] KVM fix for 3.12-rc4

2013-10-03 Thread Gleb Natapov
Linus, Please pull one more KVM fix bellow The following changes since commit 517bf8fc211d37d3aa005fb35f9ee7f1d35cb860: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (2013-10-01 10:28:11 -0700) are available in the git repository at:

Re: [PATCH 0/7] KVM: x86: small MMU cleanups

2013-10-03 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 04:56:09PM +0200, Paolo Bonzini wrote: A few small things (uninteresting callbacks or arguments, duplicate or dead code) that I noticed while reviewing Gleb's latest nVMX series. I applied 1-4 meanwhile. Paolo Bonzini (7): KVM: mmu: remove uninteresting MMU free

[PULL 0/6] VFIO updates for QEMU

2013-10-03 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-20131003.0

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

2013-10-03 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 2/6] vfio-pci: Test device reset capabilities

2013-10-03 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 1/6] vfio-pci: Add support for MSI affinity

2013-10-03 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 5/6] vfio-pci: Implement PCI hot reset

2013-10-03 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 6/6] vfio: Fix debug output for int128 values

2013-10-03 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 4/6] vfio-pci: Cleanup error_reports

2013-10-03 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

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

2013-10-03 Thread Scott Wood
On Wed, 2013-10-02 at 16:40 -0700, gre...@linuxfoundation.org wrote: On Wed, Oct 02, 2013 at 04:35:15PM -0500, Scott Wood wrote: On Wed, 2013-10-02 at 14:16 -0700, gre...@linuxfoundation.org wrote: On Wed, Oct 02, 2013 at 04:08:41PM -0500, Scott Wood wrote: I don't see any equivalent

Re: [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-03 Thread Paolo Bonzini
Il 03/10/2013 17:39, Alex Williamson ha scritto: +static const MemoryRegionOps vfio_rom_ops = { +.read = vfio_rom_read, +.endianness = DEVICE_LITTLE_ENDIAN, +}; + I think you need to define a write callback too (unless you're sure for some other reason that the area will never be

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

2013-10-03 Thread gre...@linuxfoundation.org
On Thu, Oct 03, 2013 at 01:33:27PM -0500, Scott Wood wrote: What it looks like we do still want from the driver core is the ability for a driver to say that it should not be bound to a device except via explicit sysfs bind, You can do that today by not providing any device ids in your driver

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

2013-10-03 Thread Scott Wood
On Thu, 2013-10-03 at 11:54 -0700, gre...@linuxfoundation.org wrote: On Thu, Oct 03, 2013 at 01:33:27PM -0500, Scott Wood wrote: What it looks like we do still want from the driver core is the ability for a driver to say that it should not be bound to a device except via explicit sysfs

Re: [PULL 3/6] vfio-pci: Lazy PCI option ROM loading

2013-10-03 Thread Alex Williamson
On Thu, 2013-10-03 at 20:46 +0200, Paolo Bonzini wrote: Il 03/10/2013 17:39, Alex Williamson ha scritto: +static const MemoryRegionOps vfio_rom_ops = { +.read = vfio_rom_read, +.endianness = DEVICE_LITTLE_ENDIAN, +}; + I think you need to define a write callback too (unless

looking for loan

2013-10-03 Thread Aijaz Lending
Do you have a firm or company that need loan to start up a business or need,personal loan, Debt consolidation? For more information,Contact us now for a guarantee loan with low interest rate. We will provide you with loan to meet your needs. For more information contact us with the following

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

2013-10-03 Thread gre...@linuxfoundation.org
On Thu, Oct 03, 2013 at 02:11:34PM -0500, Scott Wood wrote: On Thu, 2013-10-03 at 11:54 -0700, gre...@linuxfoundation.org wrote: On Thu, Oct 03, 2013 at 01:33:27PM -0500, Scott Wood wrote: What it looks like we do still want from the driver core is the ability for a driver to say that it

Re: [PATCH 3/3] KVM: ARM: Transparent huge pages and hugetlbfs support

2013-10-03 Thread Christoffer Dall
On Mon, Sep 23, 2013 at 11:11:07AM +0100, Marc Zyngier wrote: [...] +static bool transparent_hugepage_adjust(pfn_t *pfnp, phys_addr_t *ipap) +{ + pfn_t pfn = *pfnp; + gfn_t gfn = *ipap PAGE_SHIFT; + + if (PageTransCompound(pfn_to_page(pfn))) { +

[PATCH v2 1/2] KVM: ARM: Support hugetlbfs backed huge pages

2013-10-03 Thread Christoffer Dall
Support huge pages in KVM/ARM and KVM/ARM64. The pud_huge checking on the unmap path may feel a bit silly as the pud_huge check is always defined to false, but the compiler should be smart about this. Note: This deals only with VMAs marked as huge which are allocated by users through hugetlbfs

[PATCH v2 2/2] KVM: ARM: Transparent huge page (THP) support

2013-10-03 Thread Christoffer Dall
Support transparent huge pages in KVM/ARM and KVM/ARM64. The transparent_hugepage_adjust is not very pretty, but this is also how it's solved on x86 and seems to be simply an artifact on how THPs behave. This should eventually be shared across architectures if possible, but that can always be

[PATCH v2 0/2] KVM/ARM Huge pages support

2013-10-03 Thread Christoffer Dall
This small series adds support for Transparent Huge Pages and hugetlbfs pages for KVM on the arm and arm64 architectures. Measurements have shown that using huge pages in for stage-2 mappings provides up to more than 15% performance increase for some workloads. The patch series applies to

Re: [PATCH v2 4/4] kvm: Add VFIO device for handling IOMMU cache coherency

2013-10-03 Thread Alex Williamson
On Wed, 2013-10-02 at 20:55 -0600, Alex Williamson wrote: So far we've succeeded at making KVM and VFIO mostly unaware of each other, but there's an important point where that breaks down. Intel VT-d hardware may or may not support snoop control. When snoop control is available, intel-iommu

RE: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to epapr_hypercall()

2013-10-03 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Thursday, October 03, 2013 12:04 AM To: Alexander Graf Cc: Bhushan Bharat-R65777; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:21:20AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 17:37 +0300, Gleb Natapov wrote: On Wed, Oct 02, 2013 at 04:33:18PM +0200, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha scritto: The hwrng is accessible by host userspace via

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:07:22AM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-10-02 at 13:02 +0300, Gleb Natapov wrote: Yes, I alluded to it in my email to Paul and Paolo asked also. How this interface is disabled? Also hwrnd is MMIO in a host why guest needs to use hypercall

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Benjamin Herrenschmidt
On Thu, 2013-10-03 at 08:43 +0300, Gleb Natapov wrote: Why it can be a bad idea? User can drain hwrng continuously making other users of it much slower, or even worse, making them fall back to another much less reliable, source of entropy. Not in a very significant way, we generate entropy at

[PATCH -V2] kvm: powerpc: book3s: Fix build break for BOOK3S_32

2013-10-03 Thread Aneesh Kumar K.V
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com This was introduced by 85a0d845d8 (KVM: PPC: Book3S PR: Allocate kvm_vcpu structs from kvm_vcpu_cache). arch/powerpc/kvm/book3s_pr.c: In function 'kvmppc_core_vcpu_create': arch/powerpc/kvm/book3s_pr.c:1182:30: error: 'struct

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Paul Mackerras
On Thu, Oct 03, 2013 at 08:48:03AM +0300, Gleb Natapov wrote: On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33, Paolo Bonzini wrote: Il 02/10/2013 16:08, Alexander Graf ha

[RFC PATCH] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-03 Thread Cédric Le Goater
MMIO emulation reads the last instruction executed by the guest and then emulates. If the guest is running in Little Endian mode, the instruction needs to be byte-swapped before being emulated. This patch stores the last instruction in the endian order of the host, primarily doing a byte-swap if

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 08:06:30PM +1000, Paul Mackerras wrote: On Thu, Oct 03, 2013 at 08:48:03AM +0300, Gleb Natapov wrote: On Thu, Oct 03, 2013 at 08:45:42AM +1000, Paul Mackerras wrote: On Wed, Oct 02, 2013 at 04:36:05PM +0200, Alexander Graf wrote: On 02.10.2013, at 16:33,

[RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-03 Thread Greg Kurz
Hi, There have been some work on the topic lately but no agreement has been reached yet. I want to consolidate the facts in a single thread of mail and re-start the discussion. Please find below a recap of what we have as of today: From a virtio POV, guest endianness is reflected by the

looking for loan

2013-10-03 Thread Aijaz Lending
Do you have a firm or company that need loan to start up a business or need,personal loan, Debt consolidation? For more information,Contact us now for a guarantee loan with low interest rate. We will provide you with loan to meet your needs. For more information contact us with the following

RE: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to epapr_hypercall()

2013-10-03 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Thursday, October 03, 2013 12:04 AM To: Alexander Graf Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Bhushan Bharat-R65777 Subject: Re: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to