[PATCH] KVM: update mmu documetation for role.nxe.

2010-05-11 Thread Gui Jianfeng
There's no member cr4_nxe in struct kvm_mmu_page_role, it names nxe now. Update mmu document. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- Documentation/kvm/mmu.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/kvm/mmu.txt

[PATCH] fix 80000001.EDX supported bit filtering

2010-05-11 Thread Gleb Natapov
On AMD some bits from 1.EDX are reported in 8001.EDX. The mask used to copy bits from 1.EDX to 8001.EDX is incorrect resulting in unsupported features passed into a guest. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 76c1adb..6463390

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/10/2010 08:25 PM, Anthony Liguori wrote: On 05/10/2010 11:59 AM, Avi Kivity wrote: On 05/10/2010 06:38 PM, Anthony Liguori wrote: Otherwise, if the BAR is allocated during initialization, I would have to use MAP_FIXED to mmap the memory. This is what I did before the qemu_ram_mmap()

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/10/2010 08:52 PM, Anthony Liguori wrote: Why try to attempt to support multi-master shared memory? What's the use-case? I don't see it as multi-master, but that the latest guest to join shouldn't have their contents take precedence. In developing this patch, my motivation has been to

Re: [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Avi Kivity
On 05/10/2010 06:48 PM, Anthony Liguori wrote: On 05/10/2010 03:11 AM, Gleb Natapov wrote: This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapovg...@redhat.com A related problem that I think we need to think about how we solve is indicating to

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/11/2010 02:17 AM, Cam Macdonell wrote: On Mon, May 10, 2010 at 5:59 AM, Avi Kivitya...@redhat.com wrote: On 04/21/2010 08:53 PM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also

Re: [PATCH v3 5/8] export paravirtual cpuid flags in KVM_GET_SUPPORTED_CPUID

2010-05-11 Thread Avi Kivity
On 05/06/2010 12:27 AM, Glauber Costa wrote: Right now, we were using individual KVM_CAP entities to communicate userspace about which cpuids we support. This is suboptimal, since it generates a delay between the feature arriving in the host, and being available at the guest. A much better

Re: [PATCH v3 0/8] pvclock fixes - v3

2010-05-11 Thread Avi Kivity
On 05/06/2010 12:27 AM, Glauber Costa wrote: Hello, Avi, this version fixes the issues you raised in the last review. Hopte it is better now. Sorry about the late review. Looks reasonable, apart from a couple of minor points. A cpuid.txt wil follow as soon as we're set on

Re: [PATCH v2 0/2] fix kvmclock bug - memory corruption (v2)

2010-05-11 Thread Avi Kivity
On 05/05/2010 10:19 PM, Glauber Costa wrote: Hi, Avi, in this patch, I am resetting all msrs upon CPU reset. Hope it is better. Patch 1 is yet another cleanup. Looks good. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

[PATCH v2 00/10] Redirct and make use of the guest serial console

2010-05-11 Thread Jason Wang
The guest console is useful for failure troubleshooting especially for the one who has calltrace. And as we plan to push the network related test in the next few weeks, we found the serial session in more reliable during the network testing. So this patchset logs the guest serial throught the

[PATCH v2 01/10] KVM test: Introduce prompt assist

2010-05-11 Thread Jason Wang
We need to send an assist string to a session in order to get the prompt when re-connecting to session through serial. This patch sends assist string before matching the prompt in remote_login(). Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py |9 +++-- 1

[PATCH v2 02/10] KVM test: Send the username in remote_login()

2010-05-11 Thread Jason Wang
In order to let the serial console work, we must let the remote_login() send the username when met the username prompt. This patch fails the progress if if it met the username prompt twice. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py | 23

[PATCH v2 03/10] KVM test: Make the login re suitable for serial console

2010-05-11 Thread Jason Wang
Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:\s*$. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py

[PATCH v2 04/10] KVM test: Redirect the serial to the unix domain socket

2010-05-11 Thread Jason Wang
This patch redirect the guest serial to the unix domain socket which would be used by the following patches to dump its content or use it as a session. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_vm.py | 19 --- 1 files changed, 12 insertions(+), 7

[PATCH v2 05/10] KVM test: Log the content from guest serial console

2010-05-11 Thread Jason Wang
This patch tries to get the content of guest serial and log it into the debug directoy of the testcase through a dedicated thread which is created in the preprocessing and ended in the postprocessing. The params of serial_mode must be set to dump in order to make use of this feature.

[PATCH v2 06/10] KVM test: Return none when met unknown type in kvm_vm.remote_login().

2010-05-11 Thread Jason Wang
None is returned when met the unknown type of shell_client in kvm_vm.remote_login() in order to avoid the traceback. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_vm.py |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[PATCH v2 07/10] KVM test: Introduce local_login()

2010-05-11 Thread Jason Wang
This patch introduces a new method which is used to log into the guest through the guest serial console. The serial_mode must be set to session in order to make use of this patch. Serial does not support cocurrent sessions, so it doest not aim at replacing the regular remote shell servers. But it

[PATCH v2 08/10] KVM test: Enable the serial console for all linux guests

2010-05-11 Thread Jason Wang
As we have the ability to dump the content from serial console or use a session through it, we need to redirect the console to serial through unattended files to make use of it. The patch also keep the tty0 accroding to the suggestion of Michael Goldish. Signed-off-by: Jason Wang

[PATCH v2 09/10] KVM test: Enable the serial console during unattended installation

2010-05-11 Thread Jason Wang
This patch enable the serial console during unattended installation for all linux guests. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v2 10/10] KVM test: Add a helper to search the panic in the log

2010-05-11 Thread Jason Wang
This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/scripts/check_serial.py | 41 ++

Re: [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Stefan Hajnoczi
From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and CMOS_BIOS_BOOTFLAG2 from non-volatile memory. The values index into bev[], which contains IPL entries (the drives). Is the order of bev[] entries well-defined? Is there a way for QEMU command-line to know that the first virtio-blk

Re: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.

2010-05-11 Thread Avi Kivity
On 05/07/2010 05:43 AM, Xu, Dongxiao wrote: From: Dongxiao Xudongxiao...@intel.com SDM suggests VMXON should be called before VMPTRLD, and VMXOFF should be called after doing VMCLEAR. Therefore in vmm coexistence case, we should firstly call VMXON before any VMCS operation, and then call

Re: [PATCH] VMX: Invalid guest state detection enhancements and bug fixes

2010-05-11 Thread Avi Kivity
On 05/10/2010 06:51 PM, Mohammed Gamal wrote: - Correct unusable flag check on SS, DS, ES, FS, GS, and LDTR - Add rflags checks - Report failed instruction on emulation failure Please post as separate patches. diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 777e00d..968384b

Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Markus Armbruster
Alex Williamson alex.william...@redhat.com writes: If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a bogus pointer in the bus devices array

Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Gerd Hoffmann
On 05/11/10 11:25, Markus Armbruster wrote: Alex Williamsonalex.william...@redhat.com writes: If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a

RE: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.

2010-05-11 Thread Xu, Dongxiao
Avi Kivity wrote: On 05/07/2010 05:43 AM, Xu, Dongxiao wrote: From: Dongxiao Xudongxiao...@intel.com SDM suggests VMXON should be called before VMPTRLD, and VMXOFF should be called after doing VMCLEAR. Therefore in vmm coexistence case, we should firstly call VMXON before any VMCS

Re: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.

2010-05-11 Thread Avi Kivity
On 05/11/2010 12:38 PM, Xu, Dongxiao wrote: I'm not sure why this is needed. vmx_cpuid_update() is called from a vcpu ioctl which should have called vcpu_load() before. Apart from that, everything looks good for merging. Vcpu_load() and vcpu_put() is not called in that ioctl. I will

RE: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.

2010-05-11 Thread Xu, Dongxiao
Avi Kivity wrote: On 05/11/2010 12:38 PM, Xu, Dongxiao wrote: I'm not sure why this is needed. vmx_cpuid_update() is called from a vcpu ioctl which should have called vcpu_load() before. Apart from that, everything looks good for merging. Vcpu_load() and vcpu_put() is not called in

Re: [RFC][PATCH 0/12] KVM, x86, ppc, asm-generic: moving dirty bitmaps to user space

2010-05-11 Thread Takuya Yoshikawa
In usual workload, the number of dirty pages varies a lot for each iteration and we should gain really a lot for relatively clean cases. Can you post such a test, for an idle large guest? OK, I'll do! Result of low workload test (running top during migration) first, 4GB guest picked up

[PATCH] KVM: x86: Call vcpu_load and vcpu_put in cpuid_update.

2010-05-11 Thread Xu, Dongxiao
From: Dongxiao Xu dongxiao...@intel.com cpuid_update may operate VMCS, so vcpu_load() and vcpu_put() should be called to ensure correctness. Signed-off-by: Dongxiao Xu dongxiao...@intel.com --- arch/x86/kvm/x86.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 0/4 v4] KVM: VMX: Support hosted VMM coexsitence.

2010-05-11 Thread Xu, Dongxiao
Hi all, This is hosted VMM coexistence support v4. Main changes from v3: Remove the change to vmx_cpuid_update() since vcpu_load() and vcpu_put() will be added around cpuid_update by another patch. Main changes from v2: 1) Change vmm_coexistence to vmm_exclusive. 2) Some code structure changes.

[PATCH 1/4 v4] KVM: VMX: Define new functions to wrapper direct call of asm code.

2010-05-11 Thread Xu, Dongxiao
From: Dongxiao Xu dongxiao...@intel.com Define vmcs_load() and kvm_cpu_vmxon() to avoid direct call of asm code. Also move VMXE bit operation out of kvm_cpu_vmxoff(). Signed-off-by: Dongxiao Xu dongxiao...@intel.com --- arch/x86/kvm/vmx.c | 36 +++- 1 files

[PATCH 3/4 v4] KVM: VMX: VMCLEAR/VMPTRLD usage changes.

2010-05-11 Thread Xu, Dongxiao
From: Dongxiao Xu dongxiao...@intel.com Originally VMCLEAR/VMPTRLD is called on vcpu migration. To support hosted VMM coexistance, VMCLEAR is executed on vcpu schedule out, and VMPTRLD is executed on vcpu schedule in. This could also eliminate the IPI when doing VMCLEAR. Signed-off-by: Dongxiao

[PATCH 4/4 v4] KVM: VMX: VMXON/VMXOFF usage changes.

2010-05-11 Thread Xu, Dongxiao
From: Dongxiao Xu dongxiao...@intel.com SDM suggests VMXON should be called before VMPTRLD, and VMXOFF should be called after doing VMCLEAR. Therefore in vmm coexistence case, we should firstly call VMXON before any VMCS operation, and then call VMXOFF after the operation is done.

[PATCH 2/4 v4] KVM: VMX: Some minor changes to code structure.

2010-05-11 Thread Xu, Dongxiao
From: Dongxiao Xu dongxiao...@intel.com Do some preparations for vmm coexistence support. Signed-off-by: Dongxiao Xu dongxiao...@intel.com --- arch/x86/kvm/vmx.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

Re: [PATCH] VMX: Invalid guest state detection enhancements and bug fixes

2010-05-11 Thread Mohammed Gamal
On Tue, May 11, 2010 at 12:24 PM, Avi Kivity a...@redhat.com wrote: On 05/10/2010 06:51 PM, Mohammed Gamal wrote: - Correct unusable flag check on SS, DS, ES, FS, GS, and LDTR - Add rflags checks - Report failed instruction on emulation failure Please post as separate patches. diff

Qemu-KVM Livate Migration 0.12.2 - 0.12.3/4 broken?

2010-05-11 Thread Peter Lieven
Hi Qemu/KVM Devel Team, Live Migration from a 0.12.2 qemu-kvm to a 0.12.3 (and 0.12.4) does not work: load of migration failed Is there any way to find out, why exactly it fails? I have a lot of VMs running on 0.12.2 and would like to migrate them to 0.12.4 cmdline: -net

Re: [PATCH] VMX: Invalid guest state detection enhancements and bug fixes

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 01:53:51PM +0300, Mohammed Gamal wrote:                if (err != EMULATE_DONE) { +                       kvm_report_emulation_failure(vcpu, invalid guest state handler);                        vcpu-run-exit_reason = KVM_EXIT_INTERNAL_ERROR;                        

Re: 2.6.33.3: possible recursive locking detected

2010-05-11 Thread CaT
On Wed, May 05, 2010 at 10:52:50AM +0800, Américo Wang wrote: On Wed, May 5, 2010 at 10:32 AM, Yong Zhang yong.zh...@windriver.com wrote: On Tue, May 04, 2010 at 11:37:37AM +0300, Avi Kivity wrote: On 05/04/2010 10:03 AM, CaT wrote: I'm currently running 2.6.33.3 in a KVM instance emulating

Re: [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 11:19:07AM +0300, Avi Kivity wrote: On 05/10/2010 06:48 PM, Anthony Liguori wrote: On 05/10/2010 03:11 AM, Gleb Natapov wrote: This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapovg...@redhat.com A related problem that

Re: [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote: From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and CMOS_BIOS_BOOTFLAG2 from non-volatile memory. The values index into bev[], which contains IPL entries (the drives). Is the order of bev[] entries well-defined?

Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Kevin O'Connor
On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote: From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and CMOS_BIOS_BOOTFLAG2 from non-volatile memory. The values index into bev[], which contains IPL entries (the drives). Is the order of bev[] entries well-defined?

Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 08:45:29AM -0400, Kevin O'Connor wrote: On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote: From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and CMOS_BIOS_BOOTFLAG2 from non-volatile memory. The values index into bev[], which contains IPL

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Anthony Liguori
On 05/11/2010 02:59 AM, Avi Kivity wrote: (Replying again to list) What data structure would you use? For a lockless ring queue, you can only support a single producer and consumer. To achieve bidirectional communication in virtio, we always use two queues. You don't have to use a

[PATCH] KVM: VMX: blocked-by-sti must not defer NMI injections

2010-05-11 Thread Jan Kiszka
As the processor may not consider GUEST_INTR_STATE_STI as a reason for blocking NMI, it could return immediately with EXIT_REASON_NMI_WINDOW when we asked for it. But as we consider this state as NMI-blocking, we can run into an endless loop. Resolve this by allowing NMI injection if just

Re: KVM call agenda for May 11

2010-05-11 Thread Chris Wright
* Chris Wright (chr...@redhat.com) wrote: Please send in any agenda items you are interested in covering. If we have a lack of agenda items I'll cancel the week's call. No agenda, so no call this week. thanks, -chris -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [Qemu-devel] KVM call agenda for May 11

2010-05-11 Thread Luiz Capitulino
On Mon, 10 May 2010 08:02:50 -0700 Chris Wright chr...@redhat.com wrote: Please send in any agenda items you are interested in covering. - Exposing named errno in QMP errors (hope it's not too late) -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH] KVM: VMX: blocked-by-sti must not defer NMI injections

2010-05-11 Thread Gleb Natapov
On Tue, May 11, 2010 at 03:16:46PM +0200, Jan Kiszka wrote: As the processor may not consider GUEST_INTR_STATE_STI as a reason for blocking NMI, it could return immediately with EXIT_REASON_NMI_WINDOW when we asked for it. But as we consider this state as NMI-blocking, we can run into an

Re: [Qemu-devel] KVM call agenda for May 11

2010-05-11 Thread Alexander Graf
Luiz Capitulino wrote: On Mon, 10 May 2010 08:02:50 -0700 Chris Wright chr...@redhat.com wrote: Please send in any agenda items you are interested in covering. - Exposing named errno in QMP errors - flush=on Alex -- To unsubscribe from this list: send the line unsubscribe

Re: [Qemu-devel] KVM call agenda for May 11

2010-05-11 Thread Luiz Capitulino
On Tue, 11 May 2010 15:50:32 +0200 Alexander Graf ag...@suse.de wrote: Luiz Capitulino wrote: On Mon, 10 May 2010 08:02:50 -0700 Chris Wright chr...@redhat.com wrote: Please send in any agenda items you are interested in covering. - Exposing named errno in QMP errors

Re: [Qemu-devel] KVM call agenda for May 11

2010-05-11 Thread Jes Sorensen
On 05/11/10 15:53, Luiz Capitulino wrote: On Tue, 11 May 2010 15:50:32 +0200 Alexander Graf ag...@suse.de wrote: Luiz Capitulino wrote: On Mon, 10 May 2010 08:02:50 -0700 Chris Wright chr...@redhat.com wrote: Please send in any agenda items you are interested in covering. -

Re: [PATCH v2 0/2] fix kvmclock bug - memory corruption (v2)

2010-05-11 Thread Marcelo Tosatti
On Wed, May 05, 2010 at 03:19:19PM -0400, Glauber Costa wrote: Hi, Avi, in this patch, I am resetting all msrs upon CPU reset. Hope it is better. Patch 1 is yet another cleanup. Glauber Costa (2): change header for kvm_get_msr_list turn off kvmclock when resetting cpu Applied,

Re: [Qemu-devel] KVM call agenda for May 11

2010-05-11 Thread Luiz Capitulino
On Tue, 11 May 2010 15:57:10 +0200 Jes Sorensen jes.soren...@redhat.com wrote: On 05/11/10 15:53, Luiz Capitulino wrote: On Tue, 11 May 2010 15:50:32 +0200 Alexander Graf ag...@suse.de wrote: Luiz Capitulino wrote: On Mon, 10 May 2010 08:02:50 -0700 Chris Wright chr...@redhat.com

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/11/2010 04:10 PM, Anthony Liguori wrote: On 05/11/2010 02:59 AM, Avi Kivity wrote: (Replying again to list) What data structure would you use? For a lockless ring queue, you can only support a single producer and consumer. To achieve bidirectional communication in virtio, we always

Re: [RFC][PATCH 11/12] KVM: introduce new API for getting/switching dirty bitmaps

2010-05-11 Thread Marcelo Tosatti
On Tue, May 11, 2010 at 02:53:54PM +0900, Takuya Yoshikawa wrote: (2010/05/11 12:43), Marcelo Tosatti wrote: On Tue, May 04, 2010 at 10:08:21PM +0900, Takuya Yoshikawa wrote: +How to Get + +Before calling this, you have to set the slot member of kvm_user_dirty_log +to indicate the target

[PATCH RESENT] fix 80000001.EDX supported bit filtering

2010-05-11 Thread Gleb Natapov
On AMD some bits from 1.EDX are reported in 8001.EDX. The mask used to copy bits from 1.EDX to 8001.EDX is incorrect resulting in unsupported features passed into a guest. Signed-off-by: Gleb Natapov g...@redhat.com Resent since Avi's email bounced first time. diff --git

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Cam Macdonell
On Tue, May 11, 2010 at 8:03 AM, Avi Kivity a...@redhat.com wrote: On 05/11/2010 04:10 PM, Anthony Liguori wrote: On 05/11/2010 02:59 AM, Avi Kivity wrote: (Replying again to list) What data structure would you use?  For a lockless ring queue, you can only support a single producer and

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/11/2010 05:17 PM, Cam Macdonell wrote: The master is the shared memory area. It's a completely separate entity that is represented by the backing file (or shared memory server handing out the fd to mmap). It can exists independently of any guest. I think the master/peer idea

Re: 2.6.33.3: possible recursive locking detected

2010-05-11 Thread Greg KH
On Tue, May 11, 2010 at 09:33:50PM +1000, CaT wrote: On Wed, May 05, 2010 at 10:52:50AM +0800, Américo Wang wrote: On Wed, May 5, 2010 at 10:32 AM, Yong Zhang yong.zh...@windriver.com wrote: On Tue, May 04, 2010 at 11:37:37AM +0300, Avi Kivity wrote: On 05/04/2010 10:03 AM, CaT wrote:

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Anthony Liguori
On 05/11/2010 09:53 AM, Avi Kivity wrote: On 05/11/2010 05:17 PM, Cam Macdonell wrote: The master is the shared memory area. It's a completely separate entity that is represented by the backing file (or shared memory server handing out the fd to mmap). It can exists independently of any

Re: [RFC][PATCH 0/12] KVM, x86, ppc, asm-generic: moving dirty bitmaps to user space

2010-05-11 Thread Alexander Graf
Takuya Yoshikawa wrote: Hi, sorry for sending from my personal account. The following series are all from me: From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp The 3rd version of moving dirty bitmaps to user space. From this version, we add x86 and ppc and asm-generic people to CC

Re: [qemu-kvm tests PATCH v3] qemu-kvm tests: fix linker script problem

2010-05-11 Thread Marcelo Tosatti
On Wed, May 05, 2010 at 08:28:15PM +0300, Naphtali Sprei wrote: commit 848bd0c89c83814023cf51c72effdbc7de0d18b7 causes the linker script itself (flat.lds) to become part of the linked objects, which messed the output file, specifically, the symbol edata is not the last symbol anymore.

Re: [PATCH] Fix segfault after device assignment hot remove

2010-05-11 Thread Marcelo Tosatti
On Thu, May 06, 2010 at 12:58:12PM -0600, Alex Williamson wrote: We keep a qlist of assigned devices for irq updates, but we forgot to remove entries from it if they're hot unplugged. This makes assigned_dev_update_irqs() a timebomb that goes off when the guest is rebooted. Signed-off-by:

Re: [RFC][PATCH 7/12 not tested yet] PPC: introduce __set_bit() like function for bitmaps in user space

2010-05-11 Thread Alexander Graf
Takuya Yoshikawa wrote: During the work of KVM's dirty page logging optimization, we encountered the need of manipulating bitmaps in user space efficiantly. To achive this, we introduce a uaccess function for setting a bit in user space following Avi's suggestion. KVM is now using dirty

[PATCH 0/9] pvclock misc fixes - v4.

2010-05-11 Thread Glauber Costa
This is the fourth version ov kvmclock fixes. Just two minor changes in patch 5, per avi request, and the addition of cpuid.txt file, documenting all cpuid flags we use. As a side effect, this patch removes the time-travel feature in kvm guests. Glauber Costa (9): Enable pvclock flags in

[PATCH 1/9] Enable pvclock flags in vcpu_time_info structure

2010-05-11 Thread Glauber Costa
This patch removes one padding byte and transform it into a flags field. New versions of guests using pvclock will query these flags upon each read. Flags, however, will only be interpreted when the guest decides to. It uses the pvclock_valid_flags function to signal that a specific set of flags

[PATCH 5/9] export paravirtual cpuid flags in KVM_GET_SUPPORTED_CPUID

2010-05-11 Thread Glauber Costa
Right now, we were using individual KVM_CAP entities to communicate userspace about which cpuids we support. This is suboptimal, since it generates a delay between the feature arriving in the host, and being available at the guest. A much better mechanism is to list para features in

[PATCH 6/9] Try using new kvm clock msrs

2010-05-11 Thread Glauber Costa
We now added a new set of clock-related msrs in replacement of the old ones. In theory, we could just try to use them and get a return value indicating they do not exist, due to our use of kvm_write_msr_save. However, kvm clock registration happens very early, and if we ever try to write to a

[PATCH 9/9] Add cpuid.txt file

2010-05-11 Thread Glauber Costa
This file documents cpuid bits used by KVM. Signed-off-by: Glauber Costa glom...@redhat.com --- Documentation/kvm/cpuid.txt | 44 +++ 1 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 Documentation/kvm/cpuid.txt diff --git

[PATCH 8/9] Tell the guest we'll warn it about tsc stability

2010-05-11 Thread Glauber Costa
This patch puts up the flag that tells the guest that we'll warn it about the tsc being trustworthy or not. By now, we also say it is not. --- arch/x86/kvm/x86.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

[PATCH 7/9] don't compute pvclock adjustments if we trust the tsc

2010-05-11 Thread Glauber Costa
If the HV told us we can fully trust the TSC, skip any correction Signed-off-by: Glauber Costa glom...@redhat.com --- arch/x86/include/asm/kvm_para.h|5 + arch/x86/include/asm/pvclock-abi.h |1 + arch/x86/kernel/kvmclock.c |3 +++ arch/x86/kernel/pvclock.c |

[PATCH 4/9] add new KVMCLOCK cpuid feature

2010-05-11 Thread Glauber Costa
This cpuid, KVM_CPUID_CLOCKSOURCE2, will indicate to the guest that kvmclock is available through a new set of MSRs. The old ones are deprecated. Signed-off-by: Glauber Costa glom...@redhat.com --- arch/x86/include/asm/kvm_para.h |4 1 files changed, 4 insertions(+), 0 deletions(-)

[PATCH 3/9] change msr numbers for kvmclock

2010-05-11 Thread Glauber Costa
Avi pointed out a while ago that those MSRs falls into the pentium PMU range. So the idea here is to add new ones, and after a while, deprecate the old ones. Signed-off-by: Glauber Costa glom...@redhat.com --- arch/x86/include/asm/kvm_para.h |4 arch/x86/kvm/x86.c |7

[PATCH 2/9] Add a global synchronization point for pvclock

2010-05-11 Thread Glauber Costa
In recent stress tests, it was found that pvclock-based systems could seriously warp in smp systems. Using ingo's time-warp-test.c, I could trigger a scenario as bad as 1.5mi warps a minute in some systems. (to be fair, it wasn't that bad in most of them). Investigating further, I found out that

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Cam Macdonell
On Tue, May 11, 2010 at 9:51 AM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/11/2010 09:53 AM, Avi Kivity wrote: On 05/11/2010 05:17 PM, Cam Macdonell wrote: The master is the shared memory area.  It's a completely separate entity that is represented by the backing file (or shared

[PATCH] VMX: Fix and improve guest state validity checks

2010-05-11 Thread Mohammed Gamal
- Add 's' and 'g' field checks on segment registers - Correct SS checks for request and descriptor privilege levels Signed-off-by: Mohammed Gamal m.gamal...@gmail.com --- arch/x86/kvm/vmx.c | 73 +++ 1 files changed, 67 insertions(+), 6

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Anthony Liguori
On 05/11/2010 11:39 AM, Cam Macdonell wrote: Most of the people I hear from who are using my patch are using a peer model to share data between applications (simulations, JVMs, etc). But guest-to-host applications work as well of course. I think transparent migration can be achieved by making

[PATCH RFC] vhost: fix barrier pairing

2010-05-11 Thread Michael S. Tsirkin
According to memory-barriers.txt, an smp memory barrier should always be paired with another smp memory barrier, and I quote a lack of appropriate pairing is almost certainly an error. In case of vhost, failure to flush out used index update before looking at the interrupt disable flag could

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Cam Macdonell
On Tue, May 11, 2010 at 11:05 AM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/11/2010 11:39 AM, Cam Macdonell wrote: Most of the people I hear from who are using my patch are using a peer model to share data between applications (simulations, JVMs, etc). But guest-to-host applications

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/11/2010 06:51 PM, Anthony Liguori wrote: On 05/11/2010 09:53 AM, Avi Kivity wrote: On 05/11/2010 05:17 PM, Cam Macdonell wrote: The master is the shared memory area. It's a completely separate entity that is represented by the backing file (or shared memory server handing out the fd

Re: [PATCH v5 4/5] Inter-VM shared memory PCI device

2010-05-11 Thread Avi Kivity
On 05/11/2010 08:05 PM, Anthony Liguori wrote: On 05/11/2010 11:39 AM, Cam Macdonell wrote: Most of the people I hear from who are using my patch are using a peer model to share data between applications (simulations, JVMs, etc). But guest-to-host applications work as well of course. I think

virtio: power management

2010-05-11 Thread Michael S. Tsirkin
Anyone looked at power management with virtio? virtio-pci has callbacks to save/restore pci config on suspend/resume, but it seems that more action, such as restoring queue state, would be needed for e.g. suspend to disk to work. Rusty, any hints on the code in virtio-pci that deals with suspend?

Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Blue Swirl
On 5/10/10, Alex Williamson alex.william...@redhat.com wrote: If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a bogus pointer in the bus

Net KVM

2010-05-11 Thread Willi
Dears, I tried to install NetKVM in the guest machine windows xp with your download kvm-guest-drivers-windows-2.zip. But there is not a content like your page http://www.linux-kvm.com/content/using-windows-installer-paravirtual-net work-drivers I am missing the netkvminstall.exe. And a

Re: [PATCH 0/9] pvclock misc fixes - v4.

2010-05-11 Thread Avi Kivity
On 05/11/2010 07:17 PM, Glauber Costa wrote: This is the fourth version ov kvmclock fixes. Just two minor changes in patch 5, per avi request, and the addition of cpuid.txt file, documenting all cpuid flags we use. Looks good. As a side effect, this patch removes the time-travel feature

Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Alex Williamson
On Tue, 2010-05-11 at 21:17 +0300, Blue Swirl wrote: On 5/10/10, Alex Williamson alex.william...@redhat.com wrote: hw/pci.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index f167436..3d3560e 100644 --- a/hw/pci.c

[PATCH v2] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Alex Williamson
If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a bogus pointer in the bus devices array that can cause a segfault or garbage data from 'info pci'.

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-11 Thread Ryan Harper
* Michael S. Tsirkin m...@redhat.com [2010-05-05 16:37]: Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, host can

[PATCH] x86 emulator: Add test acc, imm instruction (opcodes 0xA8 - 0xA9)

2010-05-11 Thread Mohammed Gamal
This adds test acc, imm instruction to the x86 emulator Signed-off-by: Mohammed Gamal m.gamal...@gmail.com --- arch/x86/kvm/emulate.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index b43ac98..be5e78d 100644 ---

Re: [PATCH] KVM: MMU: Fix free memory accounting race in mmu_alloc_roots()

2010-05-11 Thread Marcelo Tosatti
On Mon, May 10, 2010 at 12:09:56PM +0300, Avi Kivity wrote: We drop the mmu lock between freeing memory and allocating the roots; this allows some other vcpu to sneak in and allocate memory. While the race is benign (resulting only in temporary overallocation, not oom) it is simple and easy

Re: [PATCHv2] KVM: inject #UD if instruction emulation fails and exit to userspace

2010-05-11 Thread Marcelo Tosatti
On Mon, May 10, 2010 at 11:16:56AM +0300, Gleb Natapov wrote: Do not kill VM when instruction emulation fails. Inject #UD and report failure to userspace instead. Userspace may choose to reenter guest if vcpu is in userspace (cpl == 3) in which case guest OS will kill offending process and

Re: [PATCH 3/4] KVM: x86: Remove kvm_mmu_reset_context() in kvm_set_efer()

2010-05-11 Thread Marcelo Tosatti
On Tue, May 11, 2010 at 01:30:06PM +0800, Sheng Yang wrote: Modify EFER won't result in mode switch directly. After EFER.LME set, the following set CR0.PG would result in mode switch to IA32e. And the later action already covered by kvm_set_cr0(). Signed-off-by: Sheng Yang

Re: [PATCH 4/4] VMX: x86: Only reset MMU when necessary

2010-05-11 Thread Marcelo Tosatti
On Tue, May 11, 2010 at 01:30:07PM +0800, Sheng Yang wrote: Only modifying some bits of CR0/CR4 needs paging mode switch. Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved bits. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |

Re: [PATCH] Do not stop VM if emulation failed in userspace.

2010-05-11 Thread Marcelo Tosatti
On Mon, May 10, 2010 at 11:21:34AM +0300, Gleb Natapov wrote: Continue vcpu execution in case emulation failure happened while vcpu was in userspace. In this case #UD will be injected into the guest allowing guest OS to kill offending process and continue. Signed-off-by: Gleb Natapov

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-11 Thread Michael S. Tsirkin
On Tue, May 11, 2010 at 01:46:08PM -0500, Ryan Harper wrote: * Michael S. Tsirkin m...@redhat.com [2010-05-05 16:37]: Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-11 Thread Michael S. Tsirkin
On Tue, May 11, 2010 at 10:27:22PM +0300, Avi Kivity wrote: On 05/07/2010 06:23 AM, Rusty Russell wrote: On Thu, 6 May 2010 07:30:00 pm Avi Kivity wrote: On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: + /* We publish the last-seen used index at the end of the available ring. +

Re: [PATCH] fix 80000001.EDX supported bit filtering

2010-05-11 Thread Marcelo Tosatti
On Tue, May 11, 2010 at 09:41:25AM +0300, Gleb Natapov wrote: On AMD some bits from 1.EDX are reported in 8001.EDX. The mask used to copy bits from 1.EDX to 8001.EDX is incorrect resulting in unsupported features passed into a guest. Signed-off-by: Gleb Natapov g...@redhat.com diff

Re: [PATCH] KVM: update mmu documetation for role.nxe.

2010-05-11 Thread Marcelo Tosatti
On Tue, May 11, 2010 at 02:36:58PM +0800, Gui Jianfeng wrote: There's no member cr4_nxe in struct kvm_mmu_page_role, it names nxe now. Update mmu document. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- Documentation/kvm/mmu.txt |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] qemu-kvm problem with DOS/4GW extender and EMM386.EXE

2010-05-11 Thread Avi Kivity
On 05/11/2010 11:56 PM, Andy Walls wrote: Running an MS-DOS 6.22 image with qemu-kvm on a RedHat Linux OS, I noticed the guest OS becomes hung and my dmesg gets spammed with set_cr0: #GP, set PG flag with a clear PE flag That message appears to be the linux kernel's kvm emulator

[PATCH] KVM: Don't allow lmsw to clear cr0.pe

2010-05-11 Thread Avi Kivity
The current lmsw implementation allows the guest to clear cr0.pe, contrary to the manual, which breaks EMM386.EXE. Fix by ORing the old cr0.pe with lmsw's operand. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

  1   2   >