Re: question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)

2012-04-05 Thread Jason Wang
On 04/04/2012 05:32 PM, Michael S. Tsirkin wrote: On Thu, Dec 29, 2011 at 09:12:38PM +1030, Rusty Russell wrote: Michael S. Tsirkin noticed that we could run the refill work after ndo_close, which can re-enable napi - we don't disable it until virtnet_remove. This is clearly wrong, so

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Jan Kiszka
On 2012-04-05 05:42, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993 [Hardware Error]: APEI

Re: KVM and Hylafax

2012-04-05 Thread Federico Fanton
We have an Hylafax 5.2.5 CentOS 5 installation hosted inside a Xen virtual machine. It works quite well, but now I'm in the process of upgrading/migrating it to a KVM virtual machine running Ubuntu 10.04. The problem I'm having is that - while receiving works fine - sending faxes is extremely

[Bug 42636] PCI passthrough does not work with AMD iommu for PCI device

2012-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42636 --- Comment #9 from Klaus Mueller kmuel...@justmail.de 2012-04-05 08:08:58 --- I tested the same device here and got the same error as you reported. Good to know, that Xen doesn't have any problem. This really means, that it is most

Re: CPU softlockup due to smp_call_function()

2012-04-05 Thread Sasha Levin
On Thu, Apr 5, 2012 at 6:06 AM, Milton Miller milt...@bga.com wrote: On Wed, 4 Apr 2012 about 22:12:36 +0200, Sasha Levin wrote: I've starting seeing soft lockups resulting from smp_call_function() calls. I've attached two different backtraces of this happening with different code paths.

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-05 Thread Raghavendra K T
On 04/01/2012 07:23 PM, Avi Kivity wrote: On 04/01/2012 04:48 PM, Raghavendra K T wrote: I have patch something like below in mind to try: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d3b98b1..5127668 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1608,15

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-05 Thread Avi Kivity
On 04/02/2012 12:51 PM, Raghavendra K T wrote: On 04/01/2012 07:23 PM, Avi Kivity wrote: On 04/01/2012 04:48 PM, Raghavendra K T wrote: I have patch something like below in mind to try: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d3b98b1..5127668 100644 ---

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-05 Thread Avi Kivity
On 04/02/2012 12:26 PM, Thomas Gleixner wrote: One thing about it is that it can give many false positives. Consider a fine-grained spinlock that is being accessed by many threads. That is, the lock is taken and released with high frequency, but there is no contention, because each vcpu

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Michael S. Tsirkin
On Wed, Apr 04, 2012 at 09:42:32PM -0600, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 32993

Re: [PATCH v4 1/4] kvm: Update kernel headers against kvm.git

2012-04-05 Thread Michael S. Tsirkin
On Thu, Mar 08, 2012 at 11:10:24AM +0100, Jan Kiszka wrote: Required for INTx masking / host IRQ sharing support of assigned devices. Corresponding kvm.git hash: 186195928e Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Michael S. Tsirkin m...@redhat.com ---

Re: [PATCH v4 2/4] kvm: Introduce kvm_has_intx_set_mask

2012-04-05 Thread Michael S. Tsirkin
On Thu, Mar 08, 2012 at 11:10:25AM +0100, Jan Kiszka wrote: Will be used by PCI device assignment code. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Michael S. Tsirkin m...@redhat.com --- kvm-all.c |8 kvm.h |1 + 2 files changed, 9 insertions(+), 0

Re: [PATCH v4 3/4] pci-assign: Use PCI-2.3-based shared legacy interrupts

2012-04-05 Thread Michael S. Tsirkin
On Thu, Mar 08, 2012 at 11:10:26AM +0100, Jan Kiszka wrote: Enable the new KVM feature that allows legacy interrupt sharing for PCI-2.3-compliant devices. This requires to synchronize any guest change of the INTx mask bit to the kernel. The feature is controlled by the property 'share_intx'

Re: [PATCH v4 4/4] pci_assign: Flip defaults of prefer_msi and share_intx

2012-04-05 Thread Michael S. Tsirkin
On Thu, Mar 08, 2012 at 11:10:27AM +0100, Jan Kiszka wrote: INTx sharing is a bit more expensive than exclusive host interrupts, but this channel is not supposed to be used for high-performance scenarios anyway. Modern devices support MSI/MSI-X and do not depend on using INTx under critical

Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-04-05 Thread Raghavendra K T
On 04/05/2012 02:31 PM, Avi Kivity wrote: On 04/02/2012 12:51 PM, Raghavendra K T wrote: On 04/01/2012 07:23 PM, Avi Kivity wrote: On 04/01/2012 04:48 PM, Raghavendra K T wrote: I have patch something like below in mind to try: diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index

Re: CPU softlockup due to smp_call_function()

2012-04-05 Thread Avi Kivity
On 04/04/2012 11:12 PM, Sasha Levin wrote: Hi all, I've starting seeing soft lockups resulting from smp_call_function() calls. I've attached two different backtraces of this happening with different code paths. This is running inside a KVM guest with the trinity fuzzer, using today's

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Avi Kivity
On 04/04/2012 01:29 PM, Gleb Natapov wrote: ok. seems to be. will move over to perf as its working fine inside guest. Good riddance IMO. I managed to run it on a guest (but not on my host!). The thing is buggy. It does not use global ctrl MSR to enable counters and kvm has all of them

Re: [RFC PATCH 0/1] NUMA aware scheduling per vhost thread patch

2012-04-05 Thread Michael S. Tsirkin
On Tue, Mar 27, 2012 at 10:43:03AM -0700, Shirley Ma wrote: On Tue, 2012-03-27 at 18:09 +0800, Jason Wang wrote: Hi: Thanks for the work and it looks very reasonable, some questions below. Yes I am happy to see the per-cpu work resurrected. Some comments below. On 03/23/2012 07:48

Re: CPU softlockup due to smp_call_function()

2012-04-05 Thread Sasha Levin
On Thu, Apr 5, 2012 at 2:24 PM, Avi Kivity a...@redhat.com wrote: On 04/04/2012 11:12 PM, Sasha Levin wrote: Hi all, I've starting seeing soft lockups resulting from smp_call_function() calls. I've attached two different backtraces of this happening with different code paths. This is

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Gleb Natapov
On Thu, Apr 05, 2012 at 03:27:18PM +0300, Avi Kivity wrote: On 04/04/2012 01:29 PM, Gleb Natapov wrote: ok. seems to be. will move over to perf as its working fine inside guest. Good riddance IMO. I managed to run it on a guest (but not on my host!). The thing is buggy. It does not

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Avi Kivity
On 04/05/2012 03:37 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:27:18PM +0300, Avi Kivity wrote: On 04/04/2012 01:29 PM, Gleb Natapov wrote: ok. seems to be. will move over to perf as its working fine inside guest. Good riddance IMO. I managed to run it on a guest

Re: CPU softlockup due to smp_call_function()

2012-04-05 Thread Avi Kivity
On 04/05/2012 03:32 PM, Sasha Levin wrote: It would be good to enhance smp_call_function_*() to do this automatically when it happens - it's spinning there anyway, so it might as well count the iterations and NMI the lagging cpu if it waits for too long. What do you think about

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Gleb Natapov
On Thu, Apr 05, 2012 at 03:48:51PM +0300, Avi Kivity wrote: On 04/05/2012 03:37 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:27:18PM +0300, Avi Kivity wrote: On 04/04/2012 01:29 PM, Gleb Natapov wrote: ok. seems to be. will move over to perf as its working fine inside

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Avi Kivity
On 04/05/2012 04:26 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:48:51PM +0300, Avi Kivity wrote: On 04/05/2012 03:37 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:27:18PM +0300, Avi Kivity wrote: On 04/04/2012 01:29 PM, Gleb Natapov wrote: ok. seems to be. will

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Gleb Natapov
On Thu, Apr 05, 2012 at 04:28:48PM +0300, Avi Kivity wrote: On 04/05/2012 04:26 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:48:51PM +0300, Avi Kivity wrote: On 04/05/2012 03:37 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:27:18PM +0300, Avi Kivity wrote: On 04/04/2012

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Gleb Natapov
On Thu, Apr 05, 2012 at 04:48:57PM +0300, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 04:28:48PM +0300, Avi Kivity wrote: On 04/05/2012 04:26 PM, Gleb Natapov wrote: On Thu, Apr 05, 2012 at 03:48:51PM +0300, Avi Kivity wrote: On 04/05/2012 03:37 PM, Gleb Natapov wrote: On Thu, Apr

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Avi Kivity
On 04/05/2012 04:57 PM, Gleb Natapov wrote: May be it used NMI based profiling. We should ask oprofile developers. As I said I am almost sure my inability to run it on a host is probably PEBKAC, although I ran the same script exactly on the host and the guest (the script is from the

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread Gleb Natapov
On Thu, Apr 05, 2012 at 05:38:40PM +0300, Avi Kivity wrote: On 04/05/2012 04:57 PM, Gleb Natapov wrote: May be it used NMI based profiling. We should ask oprofile developers. As I said I am almost sure my inability to run it on a host is probably PEBKAC, although I ran the same

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Alex Williamson
On Thu, 2012-04-05 at 12:34 +0300, Michael S. Tsirkin wrote: On Wed, Apr 04, 2012 at 09:42:32PM -0600, Alex Williamson wrote: We've hit a kernel host panic, when issuing a 'system_reset' with an 82576 nic assigned and a Windows guest. Host system is a PowerEdge R815. [Hardware Error]:

Re: [PATCH v2] kvm: Disable MSI/MSI-X in assigned device reset path

2012-04-05 Thread Michael S. Tsirkin
On Thu, Apr 05, 2012 at 08:42:03AM -0600, Alex Williamson wrote: So far so good. + * We especially do not want MSI-X + * enabled since it lives in MMIO space, which is about to get + * disabled. I think we are better off dropping the above, because it's a bug that

Re: [RFC PATCH 0/1] NUMA aware scheduling per cpu vhost thread patch

2012-04-05 Thread Shirley Ma
On Thu, 2012-04-05 at 15:28 +0300, Michael S. Tsirkin wrote: On Tue, Mar 27, 2012 at 10:43:03AM -0700, Shirley Ma wrote: On Tue, 2012-03-27 at 18:09 +0800, Jason Wang wrote: Hi: Thanks for the work and it looks very reasonable, some questions below. Yes I am happy to see the

Re: [GIT PULL] Please pull powerpc KVM fixes

2012-04-05 Thread Avi Kivity
On 04/03/2012 03:22 PM, Paul Mackerras wrote: On Tue, Apr 03, 2012 at 10:03:05PM +1000, Paul Mackerras wrote: The following changes since commit 592f5d87b3feee9d60411f19d583038c0c7670ad: OK, I messed up the git request-pull command. The request should have looked like this: The

Re: [Qemu-devel] KVM call minutes April 3

2012-04-05 Thread Avi Kivity
On 04/04/2012 05:39 PM, Michael Roth wrote: Will command line take in account hot-plugged devices? No, that's a good point. We'd probably need to generate the options required to ensure the devices are created on the target, and we'd only be able to do that just before sending the device

[GIT PULL] KVM fixes for 3.4-rc1

2012-04-05 Thread Avi Kivity
Linus, please pull a few fixes from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/3.4 A bunch of powerpc KVM fixes, a guest and a host RCU fix (unrelated), and a small build fix. Alexander Graf (3): KVM: PPC:

Re: [RFC PATCH 0/1] NUMA aware scheduling per cpu vhost thread patch

2012-04-05 Thread Shirley Ma
On Thu, 2012-04-05 at 08:22 -0700, Shirley Ma wrote: Haven't had time to focus on single stream result yet. I forgot to mention that if I switch the vhost scheduling to per-device based from per vq based, this minor single stream test regression will be gone. However the improvement of

New git workflow

2012-04-05 Thread Avi Kivity
In a recent conversation, Linus persuaded me that it's time for change in our git workflow; the following will bring it in line with the current practices of most trees. The current 'master' branch will be abandoned (still available for reviewing history). The new branch structure will be as

Re: [PATCH 08/13] KVM: MMU: fask check whether page is writable

2012-04-05 Thread Xiao Guangrong
Hi Avi, Thanks very much for your review! Sorry for the delay reply since i was on vacation. On 04/01/2012 11:52 PM, Avi Kivity wrote: On 03/29/2012 11:25 AM, Xiao Guangrong wrote: Using PTE_LIST_WRITE_PROTECT bit in rmap store the write-protect status to avoid unnecessary shadow page

Re: [PATCH 09/13] KVM: MMU: get expected spte out of mmu-lock

2012-04-05 Thread Xiao Guangrong
On 04/01/2012 11:53 PM, Avi Kivity wrote: On 03/29/2012 11:25 AM, Xiao Guangrong wrote: It depends on PTE_LIST_WRITE_PROTECT bit in rmap which let us quickly know whether the page is writable out of mmu-lock Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---

smp option of qemu-kvm

2012-04-05 Thread Steven
Hi, I started a kvm VM by adding -smp 2 option. From inside the guest, I can see that /proc/cpuinfo outputs 2 cores. However, in the host, I only observe one qemu-kvm process for that VM. Does that mean this VM is actually running on one core? If so, how to make a VM to run on 2 or more cores?

Re: smp option of qemu-kvm

2012-04-05 Thread Daniel P. Berrange
On Thu, Apr 05, 2012 at 02:28:51PM -0400, Steven wrote: Hi, I started a kvm VM by adding -smp 2 option. From inside the guest, I can see that /proc/cpuinfo outputs 2 cores. However, in the host, I only observe one qemu-kvm process for that VM. Does that mean this VM is actually running on one

Re: smp option of qemu-kvm

2012-04-05 Thread Steven
Hi, Daniel, Thanks for your quick response. However, the ps -eLf show 4 threads for the VM and I checked 4 threads have the same tgid. But the VM I created is with -smp 2 option. Could you explain this? Thanks. On Thu, Apr 5, 2012 at 2:40 PM, Daniel P. Berrange berra...@redhat.com wrote: On

Re: smp option of qemu-kvm

2012-04-05 Thread Daniel P. Berrange
On Thu, Apr 05, 2012 at 02:52:40PM -0400, Steven wrote: Hi, Daniel, Thanks for your quick response. However, the ps -eLf show 4 threads for the VM and I checked 4 threads have the same tgid. But the VM I created is with -smp 2 option. Could you explain this? Thanks. As well as the vCPU

Re: [PATCH 11/13] KVM: MMU: fast path of handling guest page fault

2012-04-05 Thread Xiao Guangrong
On 04/02/2012 12:23 AM, Avi Kivity wrote: On 03/29/2012 11:27 AM, Xiao Guangrong wrote: If the the present bit of page fault error code is set, it indicates the shadow page is populated on all levels, it means what we do is only modify the access bit which can be done out of mmu-lock The

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-04-05 Thread Tony Luck
A plain v3.3 kernel hits this when I just type reboot on a 32 cpu (2 socket * 8 core * 2 HT) system: sd 0:0:0:0: [sda] Synchronizing SCSI cache Restarting system. machine restart [ cut here ] WARNING: at arch/x86/kernel/smp.c:120 native_smp_send_reschedule+0x5c/0x60()

Re: [PATCH 00/13] KVM: MMU: fast page fault

2012-04-05 Thread Xiao Guangrong
On 04/01/2012 08:58 PM, Avi Kivity wrote: On 03/30/2012 12:18 PM, Xiao Guangrong wrote: On 03/29/2012 08:57 PM, Avi Kivity wrote: On 03/29/2012 01:40 PM, Xiao Guangrong wrote: * Implementation We can freely walk the page between walk_shadow_page_lockless_begin and

buildbot failure in kvm on next-ppc64

2012-04-05 Thread kvm
The Buildbot has detected a new failure on builder next-ppc64 while building kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ppc64/builds/495 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly

buildbot failure in kvm on next-ppc44x

2012-04-05 Thread kvm
The Buildbot has detected a new failure on builder next-ppc44x while building kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ppc44x/builds/494 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly

Re: Questing regarding KVM Guest PMU

2012-04-05 Thread shashank rachamalla
On Thu, Apr 5, 2012 at 8:11 PM, Gleb Natapov g...@redhat.com wrote: On Thu, Apr 05, 2012 at 05:38:40PM +0300, Avi Kivity wrote: On 04/05/2012 04:57 PM, Gleb Natapov wrote: May be it used NMI based profiling. We should ask oprofile developers. As I said I am almost sure my inability to

Re: [PATCH 00/13] KVM: MMU: fast page fault

2012-04-05 Thread Xiao Guangrong
On 04/06/2012 05:57 AM, Xiao Guangrong wrote: What's the difference between this and if test_and_set_bit(spte.lock) return_to_guest else do checks and cmpxchg ? test_and_set_bit is a atomic operation that is i want to avoid. Right. Can you check what the effect

Re: [GIT PULL] Please pull powerpc KVM fixes

2012-04-05 Thread Avi Kivity
On 04/03/2012 03:22 PM, Paul Mackerras wrote: On Tue, Apr 03, 2012 at 10:03:05PM +1000, Paul Mackerras wrote: The following changes since commit 592f5d87b3feee9d60411f19d583038c0c7670ad: OK, I messed up the git request-pull command. The request should have looked like this: The

New git workflow

2012-04-05 Thread Avi Kivity
In a recent conversation, Linus persuaded me that it's time for change in our git workflow; the following will bring it in line with the current practices of most trees. The current 'master' branch will be abandoned (still available for reviewing history). The new branch structure will be as