[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-10-28 Thread Asias He
vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He as...@redhat.com --- drivers/scsi/virtio_scsi.c | 15 ++- 1 file changed, 14

Re: lkvm: virtio-net-rx general protection error

2013-10-28 Thread Asias He
On Mon, Oct 21, 2013 at 8:18 PM, Pekka Enberg penb...@iki.fi wrote: On 10/21/13 1:35 PM, Milan Kocian wrote: hi, sorry for writing it directly to you but I didn't find better recipient. Does exist some mailing-list about lkvm? I found the crash in virtio-net-rx thread (I can reproduce it

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

2013-10-28 Thread Bharat Bhushan
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. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- removed _PAGE_BUSY and _PAGE_PRESENT as suggested by PaulS -- Added _PAGE_SPLITTING

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-10-28 Thread Paolo Bonzini
Il 28/10/2013 09:01, Asias He ha scritto: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He as...@redhat.com --- drivers/scsi/virtio_scsi.c |

[PATCH 4/4 v2] kvm: powerpc: use caching attributes as per linux pte

2013-10-28 Thread Bharat Bhushan
KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- No Change

[PATCH 1/4 v2] kvm: booke: clear host tlb reference flag on guest tlb invalidation

2013-10-28 Thread Bharat Bhushan
On booke, struct tlbe_ref contains host tlb mapping information (pfn: for guest-pfn to pfn, flags: attribute associated with this mapping) for a guest tlb entry. So when a guest creates a TLB entry then struct tlbe_ref is set to point to valid pfn and set attributes in flags field of the above

[PATCH 2/4 v2] kvm: book3s: rename lookup_linux_pte() to lookup_linux_pte_and_update()

2013-10-28 Thread Bharat Bhushan
lookup_linux_pte() is doing more than lookup, updating the pte, so for clarity it is renamed to lookup_linux_pte_and_update() Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- No Change arch/powerpc/kvm/book3s_hv_rm_mmu.c |8 +--- 1 files changed, 5 insertions(+),

[PATCH 0/4] *** SUBJECT HERE ***

2013-10-28 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com v1-v2 - Removed _PAGE_BUSY loop as suggested by PaulS. - Added check for PAGE_SPLITTING kvm: powerpc: use cache attributes from linux pte - 1st Patch fixes a bug in booke (detail in patch) - 2nd patch is renaming the

[PATCH 0/4] kvm: powerpc: use cache attributes from linux pte

2013-10-28 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com v1-v2 - Removed _PAGE_BUSY loop as suggested by PaulS. - Added check for PAGE_SPLITTING kvm: powerpc: use cache attributes from linux pte - 1st Patch fixes a bug in booke (detail in patch) - 2nd patch is renaming the

Re: Webmail Account Certificate expired on the 27th-10-2013

2013-10-28 Thread Grundy, Jeffrey W.
Your Webmail account Certificate expired on the 27th-10-2013, This may interrupt your email delivery configuration, and account POP settings, page error when sending message. To re-new your webmail Certificate, Please take a second to update your records by following the reference link below

Re: [PATCH] nVMX: Report CPU_BASED_VIRTUAL_NMI_PENDING as supported

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 18:43, Jan Kiszka ha scritto: If the host supports it, we can and should expose it to the guest as well, just like we already do with PIN_BASED_VIRTUAL_NMIS. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH] nVMX: Fix pick-up of uninjected NMIs

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 18:42, Jan Kiszka ha scritto: __vmx_complete_interrupts stored uninjected NMIs in arch.nmi_injected, not arch.nmi_pending. So we actually need to check the former field in vmcs12_save_pending_event. This fixes the eventinj unit test when run in nested KVM. Signed-off-by: Jan

Re: [PATCH] KVM: Mapping IOMMU pages after updating memslot

2013-10-28 Thread Paolo Bonzini
Il 24/10/2013 03:56, Yang Zhang ha scritto: From: Yang Zhang yang.z.zh...@intel.com In kvm_iommu_map_pages(), we need to know the page size via call kvm_host_page_size(). And it will check whether the target slot is valid before return the right page size. Currently, we will map the iommu

Re: [PATCH] KVM: nVMX: Report 2MB EPT pages as supported

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 15:40, Jan Kiszka ha scritto: As long as the hardware provides us 2MB EPT pages, we can also expose them to the guest because our shadow EPT code already supports this feature. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/vmx.c | 3 ++- 1 file changed,

Re: RFC: paravirtualizing perf_clock

2013-10-28 Thread Gleb Natapov
On Sun, Oct 27, 2013 at 07:27:27PM -0600, David Ahern wrote: Often when debugging performance problems in a virtualized environment you need to correlate what is happening in the guest with what is happening in the host. To correlate events you need a common time basis (or the ability to

[PATCH] [kvm-unit-tests] VMX: clean up switch statements for the stage state machine

2013-10-28 Thread Paolo Bonzini
See comments made during the original review of these tests, at http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/114001. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/vmx_tests.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-)

Re: [PATCH][kvm-unit-tests] VMX preemption timer: Make test case more robust

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 16:21, Jan Kiszka ha scritto: If we both print from L2 and, on timer expiry, from L1, we risk a deadlock in L1 on the printf lock that is held by L2 then. Avoid this by only printing from L1. Furthermore, if the timer fails to fire in time, disable it before continuing to

Re: [PATCH][kvm-unit-tests] nEPT: Fix logic for testing read access

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 16:21, Jan Kiszka ha scritto: We need to fail the test if MAGIC_VAL_1 cannot be found in either data_page1 or data_page2. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- BTW, this and the previous patch apply on top of the vmx queue of kvm-unit-tests.

Re: [PATCH][kvm-unit-tests] nEPT: Fix test cases for 2M huge pages

2013-10-28 Thread Paolo Bonzini
Il 23/10/2013 15:38, Jan Kiszka ha scritto: If 2M pages are available with EPT, the test code creates its initial identity map with such pages. But then it tries to remap two 4K pages in that range which fails as their level 3 PTE is set up for huge pages. Fix this up by ensuring that

Re: RFC: paravirtualizing perf_clock

2013-10-28 Thread Peter Zijlstra
On Sun, Oct 27, 2013 at 07:27:27PM -0600, David Ahern wrote: Often when debugging performance problems in a virtualized environment you need to correlate what is happening in the guest with what is happening in the host. To correlate events you need a common time basis (or the ability to

Re: [PATCH] vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter

2013-10-28 Thread Michael S. Tsirkin
On Fri, Oct 25, 2013 at 06:07:16PM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch addresses a long-standing bug where the get_user_pages_fast() write parameter used for setting the underlying page table entry permission bits was incorrectly set

Re: Vga passthrough to KVM Guest issues

2013-10-28 Thread Alex Williamson
On Wed, 2013-10-16 at 21:08 +0200, Max Schettler wrote: Hi guys, Im trying to set up vga passthrough. I use the latest mainline kernel (3.12rc5) and patched qemu (1.6.50). When i try to start a VM using this command: qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu qemu64 -bios

Re: lkvm: virtio-net-rx general protection error

2013-10-28 Thread Milan Kocian
hello, On Mon, Oct 28, 2013 at 04:28:57PM +0800, Asias He wrote: Hello Milan, Does the attached patch fix your problem? -- Asias From b48eaeff7250bf7476c771e82cdbf20c3e85c4c9 Mon Sep 17 00:00:00 2001 From: Asias He asias.he...@gmail.com Date: Mon, 28 Oct 2013 15:02:54 +0800

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

2013-10-28 Thread Alex Williamson
On Fri, 2013-10-11 at 01:27 -0500, Kim Phillips wrote: Force the vfio-pci driver to only be bound explicitly via sysfs to avoid conflics with other drivers in the event of a hotplug. We can't break userspace, so we can't disable the current method of binding devices to vfio-pci. We can add a

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 11:47 -0600, Alex Williamson wrote: On Fri, 2013-10-11 at 01:27 -0500, Kim Phillips wrote: Force the vfio-pci driver to only be bound explicitly via sysfs to avoid conflics with other drivers in the event of a hotplug. We can't break userspace, so we can't disable the

Re: [PATCH] KVM: Return the actual unmapped size in intel_iommu_unmap()

2013-10-28 Thread Alex Williamson
On Fri, 2013-10-25 at 11:21 +, Wu, Feng wrote: Actual unmapped size should be returned by intel_iommu_unmap(), because iommu_map() which calls this function depends on the real unmapped size. However, in the current logic, the return value of intel_iommu_unmap() is far smaller than the

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 13:00 -0500, Scott Wood wrote: On Mon, 2013-10-28 at 11:47 -0600, Alex Williamson wrote: On Fri, 2013-10-11 at 01:27 -0500, Kim Phillips wrote: Force the vfio-pci driver to only be bound explicitly via sysfs to avoid conflics with other drivers in the event of a

Re: [PATCH] KVM: Mapping IOMMU pages after updating memslot

2013-10-28 Thread Alex Williamson
On Thu, 2013-10-24 at 09:56 +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com In kvm_iommu_map_pages(), we need to know the page size via call kvm_host_page_size(). And it will check whether the target slot is valid before return the right page size. Currently, we will map

BUG unpinning 1 GiB huge pages with KVM PCI assignment

2013-10-28 Thread Greg Edwards
Using KVM PCI assignment with 1 GiB huge pages trips a BUG in 3.12.0-rc7, e.g. # qemu-system-x86_64 \ -m 8192 \ -mem-path /var/lib/hugetlbfs/pagesize-1GB \ -mem-prealloc \ -enable-kvm \ -device pci-assign,host=1:0.0 \ -drive

Improving scheduler for KVM

2013-10-28 Thread R
Hi, everyone I am a graduate student. And now I have some spare time. I notice that KVM uses kernel scheduler to schedule VCPUs. But there exists many problem beyond the capability of current scheduler. (e.g. Lock Waiter Preemption problem) And I don't want to reinvent the wheel. So I want to

Re: RFC: paravirtualizing perf_clock

2013-10-28 Thread David Ahern
On 10/28/13 7:15 AM, Peter Zijlstra wrote: Any suggestions on how to do this and without impacting performance. I noticed the MSR path seems to take about twice as long as the current implementation (which I believe results in rdtsc in the VM for x86 with stable TSC). So assuming all the TSCs

Hello,

2013-10-28 Thread Mrs Chantal Diarrah
Hello, Compliment of the day to you. I am Mrs Chantal Diarrah, I am sending this brief letter to solicit your partnership to transfer $19.5 million US Dollars. I shall send you more information and procedures when I receive positive response from you. Best Regards, Thanks Mrs. Chantal

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-10-28 Thread Jason Wang
On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He as...@redhat.com --- drivers/scsi/virtio_scsi.c | 15

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

2013-10-28 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Monday, October 28, 2013 11:40 PM To: Alex Williamson Cc: Kim Phillips; Bhushan Bharat-R65777; Wood Scott-B07421; Yoder Stuart-B08248; christoffer.d...@linaro.org; linux-ker...@vger.kernel.org; a.mota...@virtualopensystems.com;

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 22:38 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Monday, October 28, 2013 11:40 PM To: Alex Williamson Cc: Kim Phillips; Bhushan Bharat-R65777; Wood Scott-B07421; Yoder Stuart-B08248;

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

2013-10-28 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 9:11 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248; christoffer.d...@linaro.org; linux-ker...@vger.kernel.org; a.mota...@virtualopensystems.com;

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 22:52 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 9:11 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248; christoffer.d...@linaro.org;

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

2013-10-28 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 10:00 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248; christoffer.d...@linaro.org; linux-ker...@vger.kernel.org; a.mota...@virtualopensystems.com;

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 23:31 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 10:00 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248;

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

2013-10-28 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 10:05 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248; christoffer.d...@linaro.org; linux-ker...@vger.kernel.org; a.mota...@virtualopensystems.com;

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

2013-10-28 Thread Scott Wood
On Mon, 2013-10-28 at 23:45 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, October 29, 2013 10:05 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; Alex Williamson; Kim Phillips; Yoder Stuart-B08248;

Re: [PATCH 1/7] VFIO_IOMMU_TYPE1 workaround to build for platform devices

2013-10-28 Thread Don Dutile
On 10/02/2013 08:14 AM, Alexander Graf wrote: On 01.10.2013, at 21:21, Yoder Stuart-B08248 wrote: static int __init vfio_iommu_type1_init(void) { - if (!iommu_present(pci_bus_type)) +#ifdef CONFIG_PCI + if (iommu_present(pci_bus_type)) { + iommu_bus_type

Re: [PATCH 2/7] Initial skeleton of VFIO support for Device Tree based devices

2013-10-28 Thread Don Dutile
On 09/30/2013 11:37 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: iommu-boun...@lists.linux-foundation.org [mailto:iommu- boun...@lists.linux-foundation.org] On Behalf Of Antonios Motakis Sent: Monday, September 30, 2013 8:59 PM To: kvm...@lists.cs.columbia.edu;

Re: Calling to kvm_mmu_load

2013-10-28 Thread Arthur Chunqi Li
Hi Paolo, On Fri, Oct 25, 2013 at 8:43 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 24/10/2013 08:55, Arthur Chunqi Li ha scritto: Hi Paolo, Thanks for your reply. On Wed, Oct 23, 2013 at 2:21 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 21/10/2013 08:56, Arthur Chunqi Li ha scritto:

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-10-28 Thread Wanlong Gao
On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He as...@redhat.com Reviewed-by: Wanlong Gao

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

2013-10-28 Thread Bharat Bhushan
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. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- removed _PAGE_BUSY and _PAGE_PRESENT as suggested by PaulS -- Added _PAGE_SPLITTING

[PATCH 2/4 v2] kvm: book3s: rename lookup_linux_pte() to lookup_linux_pte_and_update()

2013-10-28 Thread Bharat Bhushan
lookup_linux_pte() is doing more than lookup, updating the pte, so for clarity it is renamed to lookup_linux_pte_and_update() Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- No Change arch/powerpc/kvm/book3s_hv_rm_mmu.c |8 +--- 1 files changed, 5 insertions(+),

[PATCH 4/4 v2] kvm: powerpc: use caching attributes as per linux pte

2013-10-28 Thread Bharat Bhushan
KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v1-v2 -- No Change

[PATCH 0/4] kvm: powerpc: use cache attributes from linux pte

2013-10-28 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com v1-v2 - Removed _PAGE_BUSY loop as suggested by PaulS. - Added check for PAGE_SPLITTING kvm: powerpc: use cache attributes from linux pte - 1st Patch fixes a bug in booke (detail in patch) - 2nd patch is renaming the

[PATCH 0/4] *** SUBJECT HERE ***

2013-10-28 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com v1-v2 - Removed _PAGE_BUSY loop as suggested by PaulS. - Added check for PAGE_SPLITTING kvm: powerpc: use cache attributes from linux pte - 1st Patch fixes a bug in booke (detail in patch) - 2nd patch is renaming the