Re: Intel VT-x VMCS doubt

2011-10-16 Thread Nadav Har'El
On Sat, Oct 15, 2011, Shashank Rachamalla wrote about Intel VT-x VMCS doubt: Hi After catching up with some reading on Intel VT-x, I could understand the use of VMCS ( virtual machine control structure ) which allows a VMM to specify instructions and events that cause VM entries and exits.

Re: [RFC/PATCH] kvm: Handle diagnose 0x10 (release pages)

2011-10-16 Thread Avi Kivity
On 10/14/2011 11:06 AM, Christian Borntraeger wrote: Avi, Marcelo, below is a patch for the System z (s390x) ballooner (as defined by the other System z hypervisors). I want to push that patch via Martins tree, since the tricky part is in architecture specific memory management code. Can

Re: [PATCH 1/1 V3] kernel/kvm: fix improper nmi emulation

2011-10-16 Thread Avi Kivity
On 10/14/2011 02:54 AM, Lai Jiangshan wrote: From: Kenji Kaneshige kaneshige.ke...@jp.fujitsu.com Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers LINT1. Because of this, NMI

Re: [PATCH 1/1 V3] kernel/kvm: fix improper nmi emulation

2011-10-16 Thread Jan Kiszka
On 2011-10-16 10:54, Avi Kivity wrote: On 10/14/2011 02:54 AM, Lai Jiangshan wrote: From: Kenji Kaneshige kaneshige.ke...@jp.fujitsu.com Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button

Re: Intel VT-x VMCS doubt

2011-10-16 Thread Nadav Har'El
On Sat, Oct 15, 2011, Shashank Rachamalla wrote about Re: Intel VT-x VMCS doubt: However, I am not sure when the CPU switches between host and guest state ? I came across instructions VMRUN and VMRESUME while reading which do a VM entry. I think guest state gets loaded when these instructions

Re: [PATCH 1/1 V3] kernel/kvm: fix improper nmi emulation

2011-10-16 Thread Avi Kivity
On 10/16/2011 11:05 AM, Jan Kiszka wrote: + KVM_CAP_LAPIC_NMI + documentation of KVM_CAP_LAPIC_NMI vs. !KVM_CAP_LAPIC_NMI So you prefer this approach over V5 / KVM_SET_LINT1? Just to make sure we are all looking at the full picture. Sorry, I haven't read v5 yet (I think it wasn't downloaded

Re: [PATCH 1/1 V5] kernel/kvm: introduce KVM_SET_LINT1 and fix improper nmi emulation

2011-10-16 Thread Avi Kivity
On 10/14/2011 11:03 AM, Lai Jiangshan wrote: Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers LINT1. Because of this, NMI is sent to the processor even when LINT1 is masked in

Re: [PATCH RFC 2/2] kvm: set affinity hint for assigned device msi

2011-10-16 Thread Michael S. Tsirkin
On Thu, Oct 13, 2011 at 11:54:50AM -0300, Marcelo Tosatti wrote: On Tue, Oct 11, 2011 at 08:38:28PM +0200, Michael S. Tsirkin wrote: To forward an interrupt to a vcpu that runs on a host cpu different from the current one, we need an ipi which likely will cost us as much as delivering the

Re: [PATCH 0/3] PCI: Rework config space locking, add INTx masking services

2011-10-16 Thread Michael S. Tsirkin
On Mon, Sep 12, 2011 at 06:54:01PM +0200, Jan Kiszka wrote: This series tries to heal the currently broken locking scheme around PCI config space accesses. We have an interface lock out access via sysfs, but that service wrongly assumes it is only called by one instance at a time for some

Re: [Qemu-devel] [PATCH 1/1 V5 tuning] kernel/kvm: introduce KVM_SET_LINT1 and fix improper nmi emulation

2011-10-16 Thread Lai Jiangshan
On 10/14/2011 08:07 PM, Jan Kiszka wrote: On 2011-10-14 13:59, Sasha Levin wrote: On Fri, 2011-10-14 at 17:51 +0800, Lai Jiangshan wrote: Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button

[PATCH v2 1/3] kvm tools: Switch to using UNIX sockets instead of signals

2011-10-16 Thread Sasha Levin
This patch changes the IPC method to use UNIX sockets instead of signals. This allows for more flexibility in moving data between processes, for example it would allow avoid printing output in the terminal of the guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile

[PATCH v2 2/3] kvm tools: Move memory stat print to client

2011-10-16 Thread Sasha Levin
So far we were printing memory statistics in the terminal of the guest, this was annoying, confusing and inneficient. This patch moves the print to the terminal which ran 'kvm stat' Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-stat.c | 46

[PATCH v2 3/3] kvm tools: Allow piping debug output to file descriptor

2011-10-16 Thread Sasha Levin
This patch makes debug output go to a 'debug_fd' instead of stdout. Doing so allows us to send the output to a different console when required. This patch also changes the behaviour of 'kvm debug' to show the debug output in the console that executed the debug command instead of in the console

Re: Running KVM inside a chroot

2011-10-16 Thread Avi Kivity
On 10/13/2011 02:51 AM, Jorge Lucangeli Obes wrote: On Wed, Oct 12, 2011 at 3:52 PM, Jorge Lucangeli Obes jorg...@chromium.org wrote: On Wed, Oct 12, 2011 at 12:55 PM, Alexander Graf ag...@suse.de wrote: On 12.10.2011, at 20:49, Jorge Lucangeli Obes wrote: Hi all, I'm working on

[PATCH v2 rebased 1/3] kvm tools: Switch to using UNIX sockets instead of signals

2011-10-16 Thread Sasha Levin
This patch changes the IPC method to use UNIX sockets instead of signals. This allows for more flexibility in moving data between processes, for example it would allow avoid printing output in the terminal of the guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile

[PATCH v2 rebased 2/3] kvm tools: Move memory stat print to client

2011-10-16 Thread Sasha Levin
So far we were printing memory statistics in the terminal of the guest, this was annoying, confusing and inneficient. This patch moves the print to the terminal which ran 'kvm stat' Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-stat.c | 46

[PATCH v2 rebased 3/3] kvm tools: Allow piping debug output to file descriptor

2011-10-16 Thread Sasha Levin
This patch makes debug output go to a 'debug_fd' instead of stdout. Doing so allows us to send the output to a different console when required. This patch also changes the behaviour of 'kvm debug' to show the debug output in the console that executed the debug command instead of in the console