[PATCH] VT-d: enable DMAR on 32-bit kernel

2009-02-17 Thread Yu Zhao
From: David Woodhouse dw...@infradead.org If we fix a few highmem-related thinkos and a couple of printk format warnings, the Intel IOMMU driver works fine in a 32-bit kernel. -- Fixed end address roundup problem in dma_pte_clear_range(). Tested both 32 and 32 PAE modes on Intel X58 and Q35

Userspace compilation issues

2009-02-17 Thread Avishay Traeger1
Hello, I am trying to compile kvm-userspace on one machine (let's call it the build machine), and plan to use it on another (let's call it the target machine). Both machines are x86-64. I got a fresh copy from git: $ git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git Initialized

[ kvm-Bugs-2609069 ] cannot create guests with 3584 mb memory with =kvm-81

2009-02-17 Thread SourceForge.net
Bugs item #2609069, was opened at 2009-02-17 12:38 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2609069group_id=180599 Please note that this message will contain a full copy of

[PATCH] kvm: ||/ typo

2009-02-17 Thread Roel Kluin
This was also reported by Jörg-Volker Peetz here: http://lkml.org/lkml/2009/2/16/325 ---8-8--- Since ss.type is always either not 3 or not 7. Signed-off-by: Roel Kluin roel.kl...@gmail.com --- diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH] kvm: ||/ typo

2009-02-17 Thread Roel Kluin
Roel Kluin wrote: This was also reported by Jörg-Volker Peetz here: http://lkml.org/lkml/2009/2/16/325 Please use this one, It gives Jörg-Volker Peetz credits, and I missed another issue just below. ---8-8--- Since ss.type is always

[ kvm-Bugs-2609423 ] Segmentation fault when creating guest on PAE host

2009-02-17 Thread SourceForge.net
Bugs item #2609423, was opened at 2009-02-17 07:30 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2609423group_id=180599 Please note that this message will contain a full copy of

[PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it

2009-02-17 Thread Amit Shah
host_cpuid now accepts a 'count' parameter for cpuid. Initialise the value of ecx before any call to the function. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu/qemu-kvm-x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c

Re: [PATCH] include qemu-kvm.h at all cases.

2009-02-17 Thread Avi Kivity
Glauber Costa wrote: We don't have any kind of kvm support for linux-user targets, but conditionalizing the inclusion of kvm header make linux-user compilation break. And we don't have a reason to prevent that, do we? Applied, thanks. -- I have a truly marvellous patch that fixes the bug

Current KVM head crashes on startup

2009-02-17 Thread Brian Kress
When I try to run KVM built off the current head, it crashes with a Segmentation fault. KVM-84 does not. Seems to be dealing with the CPUID changes: 0x081a5c70 in host_cpuid () at /home/kressb/kvm/src/qemu/target-i386/helper.c:1426 1426asm volatile(pusha \n\t At a

RE: [PATCH 01/02] ia64: Move the macro definitions related to MSI to one header file.

2009-02-17 Thread Luck, Tony
For supporting kvm's MSI, we have to move some macros from ia64_msi.c out to avoide duplicate them. In addition, to keep them consistent with x86's , I also changed some macros' name. How do you think of the patch ? If you agree to the changes, could you add your Sign-off-by to the patch,

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-17 Thread Avi Kivity
Sheng Yang wrote: + if (assigned_dev-irq_requested_type == KVM_ASSIGNED_DEV_MSIX) { + u32 gsi; + gsi = find_gsi_from_host_irq(assigned_dev, irq); + if (gsi == 0) + return IRQ_HANDLED; So you chose GSI == 0 as invalid

Re: [PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it

2009-02-17 Thread Avi Kivity
Amit Shah wrote: host_cpuid now accepts a 'count' parameter for cpuid. Initialise the value of ecx before any call to the function. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu/qemu-kvm-x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: [PATCH] kvm: ||/ typo

2009-02-17 Thread Avi Kivity
Roel Kluin wrote: Roel Kluin wrote: This was also reported by Jörg-Volker Peetz here: http://lkml.org/lkml/2009/2/16/325 Please use this one, It gives Jörg-Volker Peetz credits, and I missed another issue just below. This is already fixed in kvm.git. -- I have a truly

Re: Userspace compilation issues

2009-02-17 Thread Hans de Bruin
Avishay Traeger1 wrote: Hello, I am trying to compile kvm-userspace on one machine (let's call it the build machine), and plan to use it on another (let's call it the target machine). Both machines are x86-64. I got a fresh copy from git: ... Then I configure: $ cd kvm-userspace $

Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X

2009-02-17 Thread Sheng Yang
On Wednesday 18 February 2009 02:09:49 Avi Kivity wrote: Sheng Yang wrote: + if (assigned_dev-irq_requested_type == KVM_ASSIGNED_DEV_MSIX) { + u32 gsi; + gsi = find_gsi_from_host_irq(assigned_dev, irq); + if (gsi == 0) + return IRQ_HANDLED; So

Re: [PATCH 7/7] [V3] kvm: qemu: fix hot remove assigned device with iommu

2009-02-17 Thread Marcelo Tosatti
On Fri, Feb 13, 2009 at 05:49:49PM +0800, Han, Weidong wrote: when hot remove the assigned device with iommu, it should deassign it from guest and free it from qemu. assign_dev_update_irqs may not be invoked when hot add a device, so need to assign irq after device assignment in

RE: [PATCH 7/7] [V3] kvm: qemu: fix hot remove assigned device with iommu

2009-02-17 Thread Han, Weidong
Marcelo Tosatti wrote: On Fri, Feb 13, 2009 at 05:49:49PM +0800, Han, Weidong wrote: when hot remove the assigned device with iommu, it should deassign it from guest and free it from qemu. assign_dev_update_irqs may not be invoked when hot add a device, so need to assign irq after device

RE: [PATCH 01/02] ia64: Move the macro definitions related to MSI to one header file.

2009-02-17 Thread Zhang, Xiantao
Thanks, Tony! It should not break anything due to no changes about code logic. :) Avi, Could you help to commit the patches with Tony's Ack ? Thanks! Xiantao Luck, Tony wrote: For supporting kvm's MSI, we have to move some macros from ia64_msi.c out to avoide duplicate them. In

RE: [PATCH 7/7] [V3] kvm: qemu: fix hot remove assigned device with iommu

2009-02-17 Thread Han, Weidong
Han, Weidong wrote: Marcelo Tosatti wrote: On Fri, Feb 13, 2009 at 05:49:49PM +0800, Han, Weidong wrote: when hot remove the assigned device with iommu, it should deassign it from guest and free it from qemu. assign_dev_update_irqs may not be invoked when hot add a device, so need to

Re: [PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it

2009-02-17 Thread Amit Shah
On (Tue) Feb 17 2009 [18:11:55], Avi Kivity wrote: Amit Shah wrote: host_cpuid now accepts a 'count' parameter for cpuid. Initialise the value of ecx before any call to the function. Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu/qemu-kvm-x86.c |2 ++ 1 files changed, 2

[PATCH 0/8] kvm: fix device assignment hotplug

2009-02-17 Thread Han, Weidong
Last qemu merge broke device assignment hotplug. It didn't call qemu_pci_hot_assign_device in pci_device_hot_add for device assignment hot add, and also missed device assignment hotplug command in pci_add command. This patchset fixes this issue. Note that this patchset rebases and includes the

[PATCH 1/8] kvm: define KVM_CAP_DEVICE_DEASSIGNMENT

2009-02-17 Thread Han, Weidong
define KVM_CAP_DEVICE_DEASSIGNMENT and KVM_DEASSIGN_PCI_DEVICE for device deassignment. the ioctl has been already implemented in the commit: 0a920356748df4fb06e86c21c23d2ed6d31d37ad Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com ---

[PATCH 2/8] kvm: fix kvm_vm_ioctl_deassign_device

2009-02-17 Thread Han, Weidong
only need to set assigned_dev_id for deassignment, use match-flags to judge and deassign it. Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com --- virt/kvm/kvm_main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 3/8] kvm: qemu: fix hot assign device

2009-02-17 Thread Han, Weidong
Last qemu merge broke device assignment hotplug. Call qemu_pci_hot_assign_device in pci_device_hot_add for hot assign device, and add the command for it. for example hot assign 01:00.0, can use following command: pci_add pci_addr=auto host host=01:00.0 Signed-off-by: Weidong Han

[PATCH 4/8] kvm: libkvm: add deassign ioctl

2009-02-17 Thread Han, Weidong
Add this to support hot remove assigned device. Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com --- libkvm/libkvm.c | 14 ++ libkvm/libkvm.h | 13 + 2 files changed, 27 insertions(+), 0 deletions(-) diff --git

[PATCH 8/8] kvm: qemu: fix hot remove assigned device

2009-02-17 Thread Han, Weidong
When hot remove assigned device, should deassign it from guest and free it from qemu. assign_dev_update_irqs may not be invoked when hot add a device, so need to assign irq after device assignment in init_assigned_device. Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han

[PATCH 5/8] kvm: qemu: free device on error in init_assigned_device

2009-02-17 Thread Han, Weidong
make init_assigned_device call free_assigned_device on error, and then make free_assigned_device is static because it's only invoked in device-assigned.c. Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com --- qemu/hw/device-assignment.c | 12

[PATCH 6/8] kvm: qemu: wrap assign_device and assign_irq

2009-02-17 Thread Han, Weidong
Just wrap assign_device and assign_irq, no functional changes Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com --- qemu/hw/device-assignment.c | 121 +-- 1 files changed, 70 insertions(+), 51 deletions(-) diff

[PATCH 7/8] kvm: qemu: deassign device from guest

2009-02-17 Thread Han, Weidong
free_assigned_device just frees device from qemu, it should also deassign the device from guest when guest exits or hot remove assigned device. Acked-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Weidong Han weidong@intel.com --- qemu/hw/device-assignment.c | 28

Re: How is the -smb switch supposed to work?

2009-02-17 Thread Tassilo Horn
Tassilo Horn tass...@member.fsf.org writes: Hi again, I've successfully installed KVM (version 83 with 2.6.28 kernel) and windows as guest. I start it with kvm -net nic,macaddr=46:0e:b3:53:9f:3a \ -net user -localtime -smb /home/horn \ ~/kvm/windows.img and basically it

Re: Current KVM head crashes on startup

2009-02-17 Thread Amit Shah
On (Tue) Feb 17 2009 [12:47:10], Brian Kress wrote: When I try to run KVM built off the current head, it crashes with a Segmentation fault. KVM-84 does not. Seems to be dealing with the CPUID changes: 0x081a5c70 in host_cpuid () at

Re: Running KVM on a Laptop

2009-02-17 Thread Louis-David Mitterrand
On Fri, Feb 13, 2009 at 12:56:56PM +1100, Ross McKay wrote: dnjap wrote: I'm looking for a laptop on which I can run KVM. 1. Does anyone have a list of AMD-V or VT-x capable laptop CPU's? Is it not as simple as checking for the svm or vt flags? No, one must also check that the bios

RE: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.

2009-02-17 Thread Liu Yu-B13201
-Original Message- From: Blue Swirl [mailto:blauwir...@gmail.com] Sent: Tuesday, February 17, 2009 10:56 PM To: qemu-de...@nongnu.org Cc: aurel...@aurel32.net; holl...@us.ibm.com; Liu Yu-B13201; kvm-ppc@vger.kernel.org Subject: Re: [Qemu-devel] [PATCH 1/5] kvm/powerpc: Enable

RE: [PATCH] Add emulation of E500 register mmucsr0

2009-02-17 Thread Liu Yu-B13201
-Original Message- From: Hollis Blanchard [mailto:holl...@us.ibm.com] Sent: Wednesday, February 18, 2009 4:07 AM To: Avi Kivity Cc: kvm-ppc@vger.kernel.org; Liu Yu-B13201 Subject: Re: [PATCH] Add emulation of E500 register mmucsr0 Acked-by: Hollis Blanchard holl...@us.ibm.com