Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2011 at 11:49:01AM +1030, Rusty Russell wrote: On Tue, 22 Nov 2011 08:29:08 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Nov 22, 2011 at 11:03:04AM +1030, Rusty Russell wrote: - /* If you haven't kicked in this long, you're probably doing something - *

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /* About the whole device. */ + __u64 device_features; /* read-only */ + __u64 guest_features; /* read-write */ We currently require

Re: About hotplug multifunction

2011-11-23 Thread Amos Kong
On 09/09/11 15:08, Amos Kong wrote: Hello all, I'm working on hotplug pci multifunction. 1. qemu cmdline: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor unix:/tmp/a,server,nowait --enable-kvm -net none 2. script

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: On Tue, 22 Nov 2011 20:36:22 +0200, Michael S. Tsirkin m...@redhat.com wrote: Here's an updated vesion. I'm alternating between updating the spec and the driver, spec update to follow. Don't touch the spec yet, we have a

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Sasha Levin
On Wed, 2011-11-23 at 10:49 +0200, Michael S. Tsirkin wrote: On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /* About the whole device. */ + __u64 device_features; /* read-only */ + __u64

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Sasha Levin
On Wed, 2011-11-23 at 13:02 +1030, Rusty Russell wrote: On Tue, 22 Nov 2011 20:36:22 +0200, Michael S. Tsirkin m...@redhat.com wrote: Here's an updated vesion. I'm alternating between updating the spec and the driver, spec update to follow. Don't touch the spec yet, we have a long way

Re: Memory sync algorithm during migration

2011-11-23 Thread Oliver Hookins
On Tue, Nov 22, 2011 at 02:04:17PM +0100, Oliver Hookins wrote: On Tue, Nov 22, 2011 at 10:31:58AM +0100, ext Juan Quintela wrote: Oliver Hookins oliver.hook...@nokia.com wrote: On Tue, Nov 15, 2011 at 11:47:58AM +0100, ext Juan Quintela wrote: Takuya Yoshikawa

Re: IOAPIC doesn't handle byte writes

2011-11-23 Thread Avi Kivity
On 11/22/2011 05:06 PM, Julian Stecklina wrote: Hello, [please don't drop cc list] Avi Kivity wrote: Care to post a patch instead? Sure. Never hacked KVM, though. Is there a particular reason why the void *val argument to ioapic_mmio_read/_write is only dereferenced when ioapic-lock is

Re: [PATCH] Allow aligned byte and word writes to IOAPIC registers.

2011-11-23 Thread Avi Kivity
On 11/22/2011 06:09 PM, Julian Stecklina wrote: This fixes byte accesses to IOAPIC_REG_SELECT as mandated by at least the ICH10 and Intel Series 5 chipset specs. It also makes ioapic_mmio_write consistent with ioapic_mmio_read, which also allows byte and word accesses. Your patch indents with

SMP Example using KVM only ?

2011-11-23 Thread Mian M. Hamayun
Hello Everyone, I am currently using kvm-85 (I know its pretty old ... :)) and it has an smptest example in test/x86/. This example works for 1 cpu but doesn't work for more than one cpus. This issue has already been discussed on KVM Mailing list. And I 'think' this example has been removed

Re: nested virtualization on Intel and needed cpu flags to pass

2011-11-23 Thread Nadav Har'El
On Tue, Nov 22, 2011, Gianluca Cecchi wrote about nested virtualization on Intel and needed cpu flags to pass: I'm going to test nested virtualization on Intel with Fedora 16 host. ... [root at f16 ~]# uname -r 3.1.1-2.fc16.x86_64 This Linux version indeed has nested VMX, while # uname -r

Re: SMP Example using KVM only ?

2011-11-23 Thread Avi Kivity
On 11/23/2011 12:32 PM, Mian M. Hamayun wrote: Hello Everyone, I am currently using kvm-85 (I know its pretty old ... :)) and it has an smptest example in test/x86/. This example works for 1 cpu but doesn't work for more than one cpus. This issue has already been discussed on KVM Mailing

Re: [PATCH] Allow aligned byte and word writes to IOAPIC registers.

2011-11-23 Thread Nadav Har'El
On Wed, Nov 23, 2011, Avi Kivity wrote about Re: [PATCH] Allow aligned byte and word writes to IOAPIC registers.: On 11/22/2011 06:09 PM, Julian Stecklina wrote: This fixes byte accesses to IOAPIC_REG_SELECT as mandated by at least the ICH10 and Intel Series 5 chipset specs. It also makes

Re: [PATCH] Allow aligned byte and word writes to IOAPIC registers.

2011-11-23 Thread Julian Stecklina
On Mi, 2011-11-23 at 12:47 +0200, Avi Kivity wrote: On 11/22/2011 06:09 PM, Julian Stecklina wrote: This fixes byte accesses to IOAPIC_REG_SELECT as mandated by at least the ICH10 and Intel Series 5 chipset specs. It also makes ioapic_mmio_write consistent with ioapic_mmio_read, which also

Re: [PATCH 09/14] KVM: PPC: Add generic single register ioctls

2011-11-23 Thread Marcelo Tosatti
On Wed, Nov 16, 2011 at 12:45:45AM +0100, Alexander Graf wrote: On 10.11.2011, at 18:35, Marcelo Tosatti wrote: On Thu, Nov 10, 2011 at 05:49:42PM +0100, Alexander Graf wrote: Documentation/virtual/kvm/api.txt | 47 ++ arch/powerpc/kvm/powerpc.c

[PATCHv2] KVM: Allow aligned byte and word writes to IOAPIC registers.

2011-11-23 Thread Julian Stecklina
This fixes byte accesses to IOAPIC_REG_SELECT as mandated by at least the ICH10 and Intel Series 5 chipset specs. It also makes ioapic_mmio_write consistent with ioapic_mmio_read, which also allows byte and word accesses. Signed-off-by: Julian Stecklina j...@alien8.de --- virt/kvm/ioapic.c |

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-23 Thread Andrea Arcangeli
Hi! On Mon, Nov 21, 2011 at 07:51:21PM -0600, Anthony Liguori wrote: Fundamentally, the entity that should be deciding what memory should be present and where it should located is the kernel. I'm fundamentally opposed to trying to make QEMU override the scheduler/mm by using cpu or

Re: [PATCH 02/10] nEPT: MMU context for nested EPT

2011-11-23 Thread Nadav Har'El
On Sun, Nov 13, 2011, Orit Wasserman wrote about Re: [PATCH 02/10] nEPT: MMU context for nested EPT: Maybe this patch can help, this is roughly what Avi wants (I hope) done very quickly. I'm sorry I don't have setup to run nested VMX at the moment so i can't test it. Hi Orit, thanks for

[PATCH 1/2] KVM: Use kmemdup() instead of kzalloc/memcpy

2011-11-23 Thread Sasha Levin
Switch to kmemdup() in two places to shorten the code and avoid possible bugs. Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/x86.c |4 ++-- virt/kvm/kvm_main.c |7 +++ 2 files changed, 5

[PATCH 2/2] KVM: Use memdup_user instead of kmalloc/copy_from_user

2011-11-23 Thread Sasha Levin
Switch to using memdup_user when possible. This makes code more smaller and compact, and prevents errors. Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/x86.c | 82

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2011 at 10:46:40AM +0200, Michael S. Tsirkin wrote: On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: On Tue, 22 Nov 2011 20:36:22 +0200, Michael S. Tsirkin m...@redhat.com wrote: Here's an updated vesion. I'm alternating between updating the spec and the

Re: [PATCH 02/10] nEPT: MMU context for nested EPT

2011-11-23 Thread Nadav Har'El
On Wed, Nov 23, 2011, Nadav Har'El wrote about Re: [PATCH 02/10] nEPT: MMU context for nested EPT: +static int nested_ept_init_mmu_context(struct kvm_vcpu *vcpu) +{ + int r = kvm_init_shadow_mmu(vcpu, vcpu-arch.mmu); + + vcpu-arch.nested_mmu.gva_to_gpa = EPT_gva_to_gpa_nested; +

[PATCH] KVM: Move cpuid code to new file

2011-11-23 Thread Avi Kivity
The cpuid code has grown; put it into a separate file. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/Makefile |2 +- arch/x86/kvm/cpuid.c | 629 arch/x86/kvm/cpuid.h | 46 arch/x86/kvm/lapic.c |1 +

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-23 Thread Alexander Graf
On 11/23/2011 04:03 PM, Andrea Arcangeli wrote: Hi! On Mon, Nov 21, 2011 at 07:51:21PM -0600, Anthony Liguori wrote: Fundamentally, the entity that should be deciding what memory should be present and where it should located is the kernel. I'm fundamentally opposed to trying to make QEMU

Re: [Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-11-23 Thread Andrea Arcangeli
On Wed, Nov 23, 2011 at 07:34:37PM +0100, Alexander Graf wrote: So if you define -numa node,mem=1G,cpus=0 then QEMU should be able to tell the kernel that this GB of RAM actually is close to that vCPU thread. Of course the admin still needs to decide how to split up memory. That's the deal

Re: [RFC PATCH 11/11] KVM: PPC: Eliminate global spinlock in kvmppc_h_enter

2011-11-23 Thread Marcelo Tosatti
On Thu, Nov 17, 2011 at 10:55:49AM +1100, Paul Mackerras wrote: From dfd5bcfac841f8a36593edf60d9fb15e0d633287 Mon Sep 17 00:00:00 2001 From: Paul Mackerras pau...@samba.org Date: Mon, 14 Nov 2011 13:30:38 +1100 Subject: Currently, kvmppc_h_enter takes a spinlock that is global to the

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-23 Thread Marcelo Tosatti
On Sat, Nov 19, 2011 at 08:54:24AM +1100, Paul Mackerras wrote: On Fri, Nov 18, 2011 at 02:57:11PM +0100, Alexander Graf wrote: This touches areas that I'm sure non-PPC people would want to see as well. Could you please CC kvm@vger too next time? Avi, Marcelo, mind to review some of

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Rusty Russell
On Wed, 23 Nov 2011 11:38:40 +0200, Sasha Levin levinsasha...@gmail.com wrote: On Wed, 2011-11-23 at 10:49 +0200, Michael S. Tsirkin wrote: On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /*

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Rusty Russell
On Wed, 23 Nov 2011 10:46:41 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Nov 23, 2011 at 01:02:22PM +1030, Rusty Russell wrote: On Tue, 22 Nov 2011 20:36:22 +0200, Michael S. Tsirkin m...@redhat.com wrote: Here's an updated vesion. I'm alternating between updating the

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2011 at 11:06:44AM +1030, Rusty Russell wrote: +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /* About the whole device. */ + __u64 device_features; /* read-only */ + __u64 guest_features; /* read-write */ + __u64 queue_address;

[PATCH v3] kvm tools, qcow: Add the support for copy-on-write cluster

2011-11-23 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through qemu-img check. The

[PATCH v4] kvm tools, qcow: Add the support for copy-on-write cluster

2011-11-23 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through qemu-img check. The

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2011 at 11:06:44AM +1030, Rusty Russell wrote: Because I suspect we'll be different enough anyway, once we change the way we allocate the ring, and write the alignment. Well, it'd be easy to just add pa_high. It'll be *clearer* to have two completely separate paths than to

Re: [RFC PATCH 11/11] KVM: PPC: Eliminate global spinlock in kvmppc_h_enter

2011-11-23 Thread Marcelo Tosatti
On Thu, Nov 17, 2011 at 10:55:49AM +1100, Paul Mackerras wrote: From dfd5bcfac841f8a36593edf60d9fb15e0d633287 Mon Sep 17 00:00:00 2001 From: Paul Mackerras pau...@samba.org Date: Mon, 14 Nov 2011 13:30:38 +1100 Subject: Currently, kvmppc_h_enter takes a spinlock that is global to the

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-23 Thread Marcelo Tosatti
On Sat, Nov 19, 2011 at 08:54:24AM +1100, Paul Mackerras wrote: On Fri, Nov 18, 2011 at 02:57:11PM +0100, Alexander Graf wrote: This touches areas that I'm sure non-PPC people would want to see as well. Could you please CC kvm@vger too next time? Avi, Marcelo, mind to review some of