[PATCH] qemu-kvm: device assignment: Enabling MSI-X according to mask bit

2010-12-16 Thread Sheng Yang
The old MSI-X enabling method assume the entries are written before MSI-X enabled, but some OS didn't obey this, e.g. FreeBSD. This patch would fix this. Also, according to the PCI spec, mask bit of MSI-X table should be set after reset. Signed-off-by: Sheng Yang sh...@linux.intel.com ---

Re: KVM Test report, kernel d335b15... qemu cb1983b8...

2010-12-16 Thread Avi Kivity
On 12/15/2010 08:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git d335b156f9fafd177d0606cf845d9a2df2dc5431, and qemu-kvm.git cb1983b8809d0e06a97384a40bad1194a32fc814. Currently qemu-kvm build fail on RHEL5 with a undeclared PCI_PM_CTRL_NO_SOFT_RST error. I saw there

RE: KVM Test report, kernel d335b15... qemu cb1983b8...

2010-12-16 Thread Hao, Xudong
Avi Kivity wrote: On 12/15/2010 08:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git d335b156f9fafd177d0606cf845d9a2df2dc5431, and qemu-kvm.git cb1983b8809d0e06a97384a40bad1194a32fc814. Currently qemu-kvm build fail on RHEL5 with a undeclared

Re: [PATCH v3] qemu,qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Avi Kivity
On 12/15/2010 08:00 PM, Luiz Capitulino wrote: Looks like a GUI feature to me, Really? Can't see how you can build NMI to all CPUs from NMI this CPU. Or am I misunderstanding you? I guess so. Avi referred to 'nmi button on many machines', I assumed he meant a virtual machine GUI,

Re: [PATCH] kvm,x86: return true when user space query KVM_CAP_USER_NMI extension

2010-12-16 Thread Avi Kivity
On 12/14/2010 11:57 AM, Lai Jiangshan wrote: userspace may check this extension in runtime. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Avi Kivity
On 12/15/2010 06:43 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawayoshikawa.tak...@oss.ntt.co.jp Move slots_lock aquisition from kvm_ioapic_init() and kvm_create_pic() to their caller. As a result, x86's KVM_CREATE_IRQCHIP is now covered by a unified slots_lock section, including

Re: [PATCH 1/3] KVM: Take missing slots_lock for kvm_io_bus_unregister_dev()

2010-12-16 Thread Avi Kivity
On 12/15/2010 06:41 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawayoshikawa.tak...@oss.ntt.co.jp In KVM_CREATE_IRQCHIP, kvm_io_bus_unregister_dev() is called without taking slots_lock in the error handling path. Thanks, applied. -- error compiling committee.c: too many arguments to

Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write().

2010-12-16 Thread Michael S. Tsirkin
On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: Record ioport event to replay it upon failover.

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Takuya Yoshikawa
(2010/12/16 18:11), Avi Kivity wrote: On 12/15/2010 06:43 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawayoshikawa.tak...@oss.ntt.co.jp Move slots_lock aquisition from kvm_ioapic_init() and kvm_create_pic() to their caller. As a result, x86's KVM_CREATE_IRQCHIP is now covered by a unified

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Avi Kivity
On 12/16/2010 11:29 AM, Takuya Yoshikawa wrote: and here, the reader might wonder why we don't take slots_lock, which protects io_bus. Maybe we ought to move slots_lock acquisition to kvm_io_bus_register() and friends. So it will move the lock acquisition to the opposite ( callee ) side

Re: linux-next: Tree for November 22 (kvm)

2010-12-16 Thread Avi Kivity
On 12/12/2010 11:23 AM, Avi Kivity wrote: On 12/10/2010 07:18 PM, Randy Dunlap wrote: Looks like this is the appropriate fix: #ifdef CONFIG_SMP static void __init kvm_smp_prepare_boot_cpu(void) { #ifdef CONFIG_KVM_CLOCK WARN_ON(kvm_register_clock(primary cpu clock)); #endif

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Markus Armbruster
Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 15 Dec 2010 18:45:09 +0100 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 15 Dec 2010 19:18:32 +0200 Avi Kivity a...@redhat.com wrote: [...] I'd like to see cpu-index made

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Takuya Yoshikawa
(2010/12/16 18:34), Avi Kivity wrote: Maybe we ought to move slots_lock acquisition to kvm_io_bus_register() and friends. So it will move the lock acquisition to the opposite ( callee ) side than mine. At first, I tried to do that, but there are so many ... Anyway, your suggestion seems to

Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write().

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: Record

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Michael S. Tsirkin
On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed, Dec 01, 2010 at 05:03:43PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On Sun,

Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write().

2010-12-16 Thread Michael S. Tsirkin
On Thu, Dec 16, 2010 at 06:50:04PM +0900, Yoshiaki Tamura wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin m...@redhat.com: On

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Avi Kivity
On 12/16/2010 11:47 AM, Takuya Yoshikawa wrote: They're under srcu now, the comments are outdated. We used to have slots_lock be a rwsem, taken for read or write as necessary. Now we use srcu for read, and the slots_lock mutex + synchronize_srcu for write. Ah, would you mind updating the

Re: trace_printk() support in trace-cmd

2010-12-16 Thread Avi Kivity
On 12/13/2010 01:20 PM, Masami Hiramatsu wrote: (2010/12/13 2:47), Avi Kivity wrote: On 12/12/2010 07:43 PM, Arnaldo Carvalho de Melo wrote: Em Sun, Dec 12, 2010 at 07:42:06PM +0200, Avi Kivity escreveu: On 12/12/2010 07:36 PM, Arnaldo Carvalho de Melo wrote: Em Sun, Dec 12, 2010

Re: KVM Test report, kernel d335b15... qemu cb1983b8...

2010-12-16 Thread Luiz Capitulino
On Thu, 16 Dec 2010 10:32:12 +0200 Avi Kivity a...@redhat.com wrote: On 12/15/2010 08:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git d335b156f9fafd177d0606cf845d9a2df2dc5431, and qemu-kvm.git cb1983b8809d0e06a97384a40bad1194a32fc814. Currently qemu-kvm

Re: KVM Test report, kernel d335b15... qemu cb1983b8...

2010-12-16 Thread Avi Kivity
On 12/16/2010 12:43 PM, Luiz Capitulino wrote: On Thu, 16 Dec 2010 10:32:12 +0200 Avi Kivitya...@redhat.com wrote: On 12/15/2010 08:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git d335b156f9fafd177d0606cf845d9a2df2dc5431, and qemu-kvm.git

Re: [PATCH v3] qemu,qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Luiz Capitulino
On Thu, 16 Dec 2010 11:03:38 +0200 Avi Kivity a...@redhat.com wrote: On 12/15/2010 08:00 PM, Luiz Capitulino wrote: Looks like a GUI feature to me, Really? Can't see how you can build NMI to all CPUs from NMI this CPU. Or am I misunderstanding you? I guess so. Avi

Re: [PATCH v3] qemu,qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Avi Kivity
On 12/16/2010 12:48 PM, Luiz Capitulino wrote: Ok, I didn't know that, but I had another idea: the command could accept either a single cpu index or a list: { execute: inject-nmi, arguments: { cpus: 2 } } { execute: inject-nmi, arguments: { cpus: [1, 2, 3, 4] } } This has the feature

Re: [PATCH v3] qemu,qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Luiz Capitulino
On Thu, 16 Dec 2010 12:51:14 +0200 Avi Kivity a...@redhat.com wrote: On 12/16/2010 12:48 PM, Luiz Capitulino wrote: Ok, I didn't know that, but I had another idea: the command could accept either a single cpu index or a list: { execute: inject-nmi, arguments: { cpus: 2 } } {

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Markus Armbruster
Luiz Capitulino lcapitul...@redhat.com writes: On Thu, 16 Dec 2010 11:03:38 +0200 Avi Kivity a...@redhat.com wrote: On 12/15/2010 08:00 PM, Luiz Capitulino wrote: Looks like a GUI feature to me, Really? Can't see how you can build NMI to all CPUs from NMI this CPU. Or

Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-16 Thread Andre Przywara
Avi Kivity wrote: On 12/10/2010 03:51 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in svm.c and use it when the info is provided. + +

Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-16 Thread Avi Kivity
On 12/16/2010 02:07 PM, Andre Przywara wrote: Avi Kivity wrote: On 12/10/2010 03:51 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Avi Kivity
On 12/16/2010 01:47 PM, Markus Armbruster wrote: This has the feature of injecting the nmi in just some cpus, although I'm not sure this is going to be desired/useful. Use case for NMI-ing a subset of the CPUs? Heck, use case for anything else but NMI all? Exactly. -- error compiling

Re: [PATCH 2/3] KVM: Centralize slots_lock aquisition during KVM_CREATE_IRQCHIP

2010-12-16 Thread Takuya Yoshikawa
Avi Kivity a...@redhat.com wrote: One day I'll write Documentation/kvm/locking.txt, so it could get outdated as well. I seemed to be in EOY(End Of Year) mode. I remember why I could not move slots_lock acquisition to kvm_io_bus_[un]register(). The locking order constraint forced me to

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Luiz Capitulino
On Thu, 16 Dec 2010 14:50:08 +0200 Avi Kivity a...@redhat.com wrote: On 12/16/2010 01:47 PM, Markus Armbruster wrote: This has the feature of injecting the nmi in just some cpus, although I'm not sure this is going to be desired/useful. Use case for NMI-ing a subset of the CPUs?

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Avi Kivity
On 12/16/2010 03:09 PM, Luiz Capitulino wrote: On Thu, 16 Dec 2010 14:50:08 +0200 Avi Kivitya...@redhat.com wrote: On 12/16/2010 01:47 PM, Markus Armbruster wrote: This has the feature of injecting the nmi in just some cpus, although I'm not sure this is going to be

Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state

2010-12-16 Thread Thomas Gleixner
On Mon, 13 Dec 2010, Jan Kiszka wrote: + if (old_action (old_action-flags IRQF_ADAPTIVE) + !(desc-irq_data.drv_status IRQS_SHARED)) { + /* + * Signal the old handler that is has to switch to shareable + * handling mode. Disable the line to

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Luiz Capitulino
On Thu, 16 Dec 2010 15:11:50 +0200 Avi Kivity a...@redhat.com wrote: On 12/16/2010 03:09 PM, Luiz Capitulino wrote: On Thu, 16 Dec 2010 14:50:08 +0200 Avi Kivitya...@redhat.com wrote: On 12/16/2010 01:47 PM, Markus Armbruster wrote: This has the feature of injecting

[PATCH] KVM: Fix preemption counter leak in kvm_timer_init()

2010-12-16 Thread Avi Kivity
Based on a patch from Thomas Meyer. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e3abd84..b989e1f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c

Re: trace_printk() support in trace-cmd

2010-12-16 Thread Masami Hiramatsu
(2010/12/16 19:20), Avi Kivity wrote: On 12/13/2010 01:20 PM, Masami Hiramatsu wrote: (2010/12/13 2:47), Avi Kivity wrote: On 12/12/2010 07:43 PM, Arnaldo Carvalho de Melo wrote: Em Sun, Dec 12, 2010 at 07:42:06PM +0200, Avi Kivity escreveu: On 12/12/2010 07:36 PM, Arnaldo Carvalho

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed, Dec 01, 2010 at 05:03:43PM +0900, Yoshiaki Tamura wrote: 2010/11/28

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Michael S. Tsirkin
On Thu, Dec 16, 2010 at 11:28:46PM +0900, Yoshiaki Tamura wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/12/2 Michael S. Tsirkin m...@redhat.com: On Wed,

[KVM-Autotest][PATCH][virtio-console] Repair sigio bug, cleanup_function and code clean.

2010-12-16 Thread Jiří Župka
* Sigio console timeout. * Repair Multiopen test. * Cleanup function try repair ports. Virtual machine is restarted if something goes wrong. After crash any part of test summarize output is written to logs. Remove debug version of summarize output because there are to much unnecessary information.

[KVM-Autotest][PATCH][virtio-console][REPAIR] Repair sigio bug, cleanup_function and code clean.

2010-12-16 Thread Jiří Župka
* Sigio console timeout. * Repair Multiopen test. * Cleanup function try repair ports. Virtual machine is restarted if something goes wrong. After crash any part of test summarize output is written to logs. Remove debug version of summarize output because there are to much unnecessary information.

Re: [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble.

2010-12-16 Thread Yoshiaki Tamura
2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 11:28:46PM +0900, Yoshiaki Tamura wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:36:16PM +0900, Yoshiaki Tamura wrote: 2010/12/3 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp:

Re: USB Passthrough 1.1 performance problem...

2010-12-16 Thread Erik Brakkee
quote who=Kenni Lund 2010/12/14 Erik Brakkee e...@brakkee.org: Daniel P. Berrange wrote: On Tue, Dec 14, 2010 at 12:55:04PM +0100, Kenni Lund wrote: 2010/12/14 Erik Brakkeee...@brakkee.org: From: Kenni Lundke...@kelu.dk 2010/12/14 Erik Brakkeee...@brakkee.org: From: Kenni

Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write().

2010-12-16 Thread Stefan Hajnoczi
On Thu, Dec 16, 2010 at 9:50 AM, Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp wrote: 2010/12/16 Michael S. Tsirkin m...@redhat.com: On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: 2010/11/28 Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp: 2010/11/28 Michael S. Tsirkin

Re: [RFC -v2 PATCH 2/3] sched: add yield_to function

2010-12-16 Thread Rik van Riel
On 12/14/2010 01:08 AM, Mike Galbraith wrote: On Mon, 2010-12-13 at 22:46 -0500, Rik van Riel wrote: diff --git a/kernel/sched.c b/kernel/sched.c index dc91a4d..6399641 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5166,6 +5166,46 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid,

Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state

2010-12-16 Thread Jan Kiszka
Am 16.12.2010 14:13, Thomas Gleixner wrote: On Mon, 13 Dec 2010, Jan Kiszka wrote: +if (old_action (old_action-flags IRQF_ADAPTIVE) +!(desc-irq_data.drv_status IRQS_SHARED)) { +/* + * Signal the old handler that is has to switch to shareable +

change of email address: p...@cisco.com - p...@ieee.org

2010-12-16 Thread Tom Lyon
eom -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: USB Passthrough 1.1 performance problem...

2010-12-16 Thread Erik Brakkee
Erik Brakkee wrote: quote who=Kenni Lund 2010/12/14 Erik Brakkeee...@brakkee.org: Daniel P. Berrange wrote: On Tue, Dec 14, 2010 at 12:55:04PM +0100, Kenni Lund wrote: 2010/12/14 Erik Brakkeee...@brakkee.org: From: Kenni Lundke...@kelu.dk 2010/12/14

RE: Does KVM use one EPT table per Guest CR3?

2010-12-16 Thread Lok Kwong Yan
Thanks for the reply and it makes a lot of sense. I am not seeing any EPT tables being zapped after the guest has fully started up although the value of EPTP continuously changes as the guest is running. From: Avi Kivity [...@redhat.com] Sent: Sunday,

Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-16 Thread Lai Jiangshan
On 12/16/2010 09:17 PM, Luiz Capitulino wrote: On Thu, 16 Dec 2010 15:11:50 +0200 Avi Kivity a...@redhat.com wrote: Why have an argument at all? Always nmi to all cpus. I think Avi's suggest is better, and I will use inject-nmi (without cpu-index argument) to send NMI to all cpus, like

Re: [RFC -v2 PATCH 2/3] sched: add yield_to function

2010-12-16 Thread Mike Galbraith
On Thu, 2010-12-16 at 14:49 -0500, Rik van Riel wrote: On 12/14/2010 01:08 AM, Mike Galbraith wrote: +EXPORT_SYMBOL_GPL(yield_to); That part looks ok, except for the yield cross cpu bit. Trying to yield a resource you don't have doesn't make much sense to me. The current task just

Re: [RFC -v2 PATCH 2/3] sched: add yield_to function

2010-12-16 Thread Mike Galbraith
On Fri, 2010-12-17 at 07:57 +0100, Mike Galbraith wrote: On Thu, 2010-12-16 at 14:49 -0500, Rik van Riel wrote: +static void yield_to_fair(struct rq *rq, struct task_struct *p) +{ +struct sched_entity *se =p-se; +struct cfs_rq *cfs_rq = cfs_rq_of(se); +u64