[PATCH] Make physical_resources_check cope with qemu change on 'info block'

2011-05-20 Thread Lucas Meneghel Rodrigues
New qemu upstream versions report block info like this: (monitor humanmonitor1) Sending command 'info block' (monitor humanmonitor1) Response to 'info block' (monitor humanmonitor1)virtio0: removable=0 file=/tmp/kvm_autotest_root/images/rhel6-64.qcow2 ro=0 drv=qcow2 encrypted=0 (monitor

[Patch] kvm tools: implement help xxx command

2011-05-20 Thread Amerigo Wang
'kvm run --help' works fine but 'kvm help run' shows nothing, this patch implements it. Signed-off-by: WANG Cong amw...@redhat.com --- diff --git a/tools/kvm/include/kvm/kvm-cmd.h b/tools/kvm/include/kvm/kvm-cmd.h index 8d5fca5..0a73bce 100644 --- a/tools/kvm/include/kvm/kvm-cmd.h +++

[PATCH v5 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-05-20 Thread Ulrich Obergfell
'target_get_irq_delivered' and 'target_reset_irq_delivered' point to functions that are called by update_irq() to detect coalesced interrupts. Initially they point to stub functions which pretend successful interrupt injection. apic code calls two registration functions to replace the stubs with

[PATCH v5 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-05-20 Thread Ulrich Obergfell
The new fields in HPETTimer are covered by a separate VMStateDescription which is a subsection of 'vmstate_hpet_timer'. They are only migrated if -global hpet.driftfix=on Signed-off-by: Ulrich Obergfell uober...@redhat.com --- hw/hpet.c | 42 ++ 1

[PATCH v5 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers

2011-05-20 Thread Ulrich Obergfell
Hi, This is version 5 of a series of patches that I originally posted in: http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg01989.html http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg01992.html http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg01991.html

[PATCH v5 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only)

2011-05-20 Thread Ulrich Obergfell
update_irq() uses a similar method as in 'rtc_td_hack' to detect coalesced interrupts. The function entry addresses are retrieved from 'target_get_irq_delivered' and 'target_reset_irq_delivered'. This change can be replaced if a generic feedback infrastructure to track coalesced IRQs for

[PATCH v5 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo

2011-05-20 Thread Ulrich Obergfell
driftfix is a 'bit type' property. Compensation of delayed callbacks and coalesced interrupts can be enabled with the command line option -global hpet.driftfix=on driftfix is 'off' (disabled) by default. Signed-off-by: Ulrich Obergfell uober...@redhat.com --- hw/hpet.c |3 +++ 1 files

[PATCH v5 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-20 Thread Ulrich Obergfell
Loss of periodic timer interrupts caused by delayed callbacks and by interrupt coalescing is compensated by gradually injecting additional interrupts during subsequent timer intervals, starting at a rate of one additional interrupt per interval. The injection of additional interrupts is based on a

Re: [Patch] kvm tools: implement help xxx command

2011-05-20 Thread Pekka Enberg
On Fri, May 20, 2011 at 10:01 AM, Amerigo Wang amw...@redhat.com wrote: 'kvm run --help' works fine but 'kvm help run' shows nothing, this patch implements it. Signed-off-by: WANG Cong amw...@redhat.com Looks good to me. Prasad? --- diff --git a/tools/kvm/include/kvm/kvm-cmd.h

Re: [PATCH 14/18] virtio: add api for delayed callbacks

2011-05-20 Thread Rusty Russell
On Thu, 19 May 2011 10:24:12 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 16, 2011 at 04:43:21PM +0930, Rusty Russell wrote: On Sun, 15 May 2011 15:48:18 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Mon, May 09, 2011 at 03:27:33PM +0930, Rusty Russell wrote: On

Re: [PATCHv2 00/14] virtio and vhost-net performance enhancements

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:10:07 +0300, Michael S. Tsirkin m...@redhat.com wrote: OK, here is the large patchset that implements the virtio spec update that I sent earlier (the spec itself needs a minor update, will send that out too next week, but I think we are on the same page here already).

RE: [PATCH 02/31] nVMX: Implement VMXON and VMXOFF

2011-05-20 Thread Tian, Kevin
From: Nadav Har'El Sent: Tuesday, May 17, 2011 3:45 AM This patch allows a guest to use the VMXON and VMXOFF instructions, and emulates them accordingly. Basically this amounts to checking some prerequisites, and then remembering whether the guest has enabled or disabled VMX operation.

RE: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-20 Thread Tian, Kevin
From: Nadav Har'El Sent: Tuesday, May 17, 2011 3:48 AM We saw in a previous patch that L1 controls its L2 guest with a vcms12. L0 needs to create a real VMCS for running L2. We call that vmcs02. A later patch will contain the code, prepare_vmcs02(), for filling the vmcs02 fields. This

RE: [PATCH 09/31] nVMX: Add VMCS fields to the vmcs12

2011-05-20 Thread Tian, Kevin
From: Nadav Har'El Sent: Tuesday, May 17, 2011 3:49 AM In this patch we add to vmcs12 (the VMCS that L1 keeps for L2) all the standard VMCS fields. Later patches will enable L1 to read and write these fields using VMREAD/ VMWRITE, and they will be used during a VMLAUNCH/VMRESUME in

[PATCH 1/2 V3] kvm tools: Copy net/9p/9p.h

2011-05-20 Thread Sasha Levin
Header could not be included directly because among some minor issues, the original header declared the same function twice: int p9_errstr2errno(char *errstr, int len); int p9_errstr2errno(char *, int); A patch has been sent to 9P maintainers, this header should be removed once the patch is in.

[PATCH 2/2 V3] kvm tools: Add virtio-9p

2011-05-20 Thread Sasha Levin
Overview: 9p allows for simple RPC based resource sharing over different transports (in our case, virtio). This is the implementation of (most of) the original 9p2000 protocol, without the .u or the .l extensions. How to use: 1. Make sure kernel is compiled with: CONFIG_NET_9P=y

RE: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-20 Thread Tian, Kevin
From: Tian, Kevin Sent: Friday, May 20, 2011 4:05 PM From: Nadav Har'El Sent: Tuesday, May 17, 2011 3:48 AM We saw in a previous patch that L1 controls its L2 guest with a vcms12. L0 needs to create a real VMCS for running L2. We call that vmcs02. A later patch will contain the

bridge with a bonded device - slow rate in the guest machine

2011-05-20 Thread Алексей Кашин
Hi. Server with two gigabit NIC's. I'm trying to setup a bridge with a bonded device (2 links,balance-rr). host# cat /etc/network/interfaces auto lo iface lo inet loopback auto bond0 iface bond0 inet manual slaves eth0 eth1 bond_mode balance-rr bond_miimon 100

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Avi Kivity
On 05/19/2011 10:07 PM, Alex Williamson wrote: On Thu, 2011-05-19 at 10:12 -0400, Avi Kivity wrote: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This

Re: [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Avi Kivity
On 05/19/2011 10:27 PM, Jan Kiszka wrote: On 2011-05-19 16:12, Avi Kivity wrote: +/* Sets an offset to be added to MemoryRegionOps callbacks. */ +void memory_region_set_offset(MemoryRegion *mr, target_phys_addr_t offset); Please mark this as a legacy helper, ideally to be removed after the

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Avi Kivity
On 05/19/2011 11:43 PM, Anthony Liguori wrote: On 05/19/2011 09:12 AM, Avi Kivity wrote: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Avi Kivity
On 05/20/2011 12:04 AM, Stefan Weil wrote: Am 19.05.2011 16:12, schrieb Avi Kivity: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled. This allows a device to

Re: [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Avi Kivity
On 05/20/2011 12:11 AM, Stefan Hajnoczi wrote: On Thu, May 19, 2011 at 3:12 PM, Avi Kivitya...@redhat.com wrote: +struct MemoryRegion { +/* All fields are private - violators will be prosecuted */ +const MemoryRegionOps *ops; +MemoryRegion *parent; In the case where a

Re: How to diagnose memory leak in kvm-qemu-0.14.0?

2011-05-20 Thread Stefan Hajnoczi
On Fri, May 20, 2011 at 12:47 PM, Steve Kemp st...@bytemark.co.uk wrote: On Fri May 20, 2011 at 12:01:58 +0100, Stefan Hajnoczi wrote:  wget http://mirror.bytemark.co.uk/misc/test-files/500M  while true; do cp 500M foo.img; rm foo.img; sleep 2; done  top shows the virt memory growing to

Re: [PATCH 2/2 V3] kvm tools: Add virtio-9p

2011-05-20 Thread Pekka Enberg
On Fri, 20 May 2011, Sasha Levin wrote: This is the implementation of (most of) the original 9p2000 protocol, without the .u or the .l extensions. How to use: 1. Make sure kernel is compiled with: CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_NET_9P_DEBUG=y (At least until code is

Re: [PATCH 2/2 V3] kvm tools: Add virtio-9p

2011-05-20 Thread Sasha Levin
On Fri, 2011-05-20 at 16:30 +0300, Pekka Enberg wrote: On Fri, 20 May 2011, Sasha Levin wrote: This is the implementation of (most of) the original 9p2000 protocol, without the .u or the .l extensions. How to use: 1. Make sure kernel is compiled with: CONFIG_NET_9P=y

Re: How to diagnose memory leak in kvm-qemu-0.14.0?

2011-05-20 Thread Steve Kemp
On Fri May 20, 2011 at 14:16:05 +0100, Stefan Hajnoczi wrote:  I've had a quick read of hw/virtio-blk.c but didn't see anything  glaringly obvious.  I'll need to trace through the code, drink more  coffee, or get lucky to narrow it down further. Enabling the memory allocation trace events

Re: bridge with a bonded device - slow rate in the guest machine

2011-05-20 Thread David Ahern
On 05/20/11 03:12, Алексей Кашин wrote: Hi. Server with two gigabit NIC's. I'm trying to setup a bridge with a bonded device (2 links,balance-rr). host# cat /etc/network/interfaces auto lo iface lo inet loopback auto bond0 iface bond0 inet manual slaves eth0 eth1

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Richard Henderson
On 05/20/2011 02:23 AM, Avi Kivity wrote: On 05/19/2011 11:43 PM, Anthony Liguori wrote: On 05/19/2011 09:12 AM, Avi Kivity wrote: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and

[PATCH] kvm tools: Cleanup e820 code

2011-05-20 Thread Sasha Levin
Several cleanups in the patch: - Use kernel headers for e820 types and definitions. - A byte sized entry count for e820 enteries was used, this should be dword sized. Update in-memory layout and bios code to fix it. - Use struct e820map to calculate offsets used by bios code. Signed-off-by:

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Anthony Liguori
On 05/20/2011 09:06 AM, Richard Henderson wrote: On 05/20/2011 02:23 AM, Avi Kivity wrote: On 05/19/2011 11:43 PM, Anthony Liguori wrote: On 05/19/2011 09:12 AM, Avi Kivity wrote: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty

Re: How to diagnose memory leak in kvm-qemu-0.14.0?

2011-05-20 Thread Stefan Hajnoczi
On Fri, May 20, 2011 at 2:47 PM, Steve Kemp st...@bytemark.co.uk wrote: On Fri May 20, 2011 at 14:16:05 +0100, Stefan Hajnoczi wrote:  I've had a quick read of hw/virtio-blk.c but didn't see anything  glaringly obvious.  I'll need to trace through the code, drink more  coffee, or get lucky

Re: [PATCH] kvm tools: Cleanup e820 code

2011-05-20 Thread Cyrill Gorcunov
On 05/20/2011 06:23 PM, Sasha Levin wrote: Several cleanups in the patch: - Use kernel headers for e820 types and definitions. - A byte sized entry count for e820 enteries was used, this should be dword sized. Update in-memory layout and bios code to fix it. - Use struct e820map to

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Richard Henderson
On 05/20/2011 07:31 AM, Anthony Liguori wrote: But is this a characteristic of devices or is this a characteristic of the chipset/CPU? Chipset. r~ -- 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

Re: How to diagnose memory leak in kvm-qemu-0.14.0?

2011-05-20 Thread Steve Kemp
On Fri May 20, 2011 at 15:32:34 +0100, Stefan Hajnoczi wrote:  virtio_blk_alloc_request 0.000 req=0x91e08f0  - Allocation 1  virtio_blk_alloc_request 77.659 req=0x9215650  - Allocation 2 Are you sure this isn't the temporary one that is allocated but freed immediately once the virtqueue is

[PATCH v2 3/4] kvm tools: Add a wrapper function to initialize all virtio block devices

2011-05-20 Thread Prasad Joshi
The patch moves the code for initialization of all of the virtio block devices to virtio subsystem. Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/include/kvm/kvm.h|1 + tools/kvm/include/kvm/virtio-blk.h |1 + tools/kvm/kvm-run.c|4 ++--

[PATCH v2 1/4] kvm tools: Add a wrapper function to open disk images

2011-05-20 Thread Prasad Joshi
The patch was suggested by Ingo to move the disk image subsystem code from the kvm-run.c file. The code to open all of the specified disk images is now moved to a wrapper function in disk/core.c. Suggested-by: Ingo Molnar mi...@elte.hu Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com ---

[PATCH v2 2/4] kvm tools: Close the disk images after the guest shuts down

2011-05-20 Thread Prasad Joshi
Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/disk/core.c |8 tools/kvm/include/kvm/disk-image.h |1 + tools/kvm/kvm-run.c|1 + 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/kvm/disk/core.c

[PATCH v2 4/4] kvm tools: Release memory allocated during virtio block initialization

2011-05-20 Thread Prasad Joshi
Add a new function virtio_blk__delete() goes through array of block devices and releases memory allocated for block device. Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/include/kvm/virtio-blk.h |1 + tools/kvm/kvm-run.c|2 ++ tools/kvm/virtio/blk.c

Re: [PATCH v2 1/4] kvm tools: Add a wrapper function to open disk images

2011-05-20 Thread Sasha Levin
On Fri, 2011-05-20 at 16:02 +0100, Prasad Joshi wrote: The patch was suggested by Ingo to move the disk image subsystem code from the kvm-run.c file. The code to open all of the specified disk images is now moved to a wrapper function in disk/core.c. Suggested-by: Ingo Molnar mi...@elte.hu

Re: [PATCH v2 2/4] kvm tools: Close the disk images after the guest shuts down

2011-05-20 Thread Sasha Levin
On Fri, 2011-05-20 at 16:02 +0100, Prasad Joshi wrote: Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/disk/core.c |8 tools/kvm/include/kvm/disk-image.h |1 + tools/kvm/kvm-run.c|1 + 3 files changed, 10 insertions(+), 0

[PATCH] Enable CPU SMEP feature support for QEMU-KVM

2011-05-20 Thread Yang, Wei Y
Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU feature for QEMU-KVM. Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published

[PATCH] Enable CPU SMEP feature for KVM

2011-05-20 Thread Yang, Wei Y
Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU feature in KVM module. Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be published

Re: bridge with a bonded device - slow rate in the guest machine

2011-05-20 Thread Алексей Кашин
Hi. This problem was solved. I disabled option large-receive-offload in the network cards. Thanks. 2011/5/20, David Ahern daah...@cisco.com: On 05/20/11 03:12, Алексей Кашин wrote: Hi. Server with two gigabit NIC's. I'm trying to setup a bridge with a bonded device (2 links,balance-rr).

[PATCH 10/10] qemu-kvm: Rework ioport access management

2011-05-20 Thread Jan Kiszka
Clean up the interface for enabling/disabling direct ioport access for assigned devices. There is now only a register and a deregister service. Both are automatically updating the access on all vcpus. Besides that, there is an update service for newly created VCPUs that applies all currently

[PATCH 01/10] qemu-kvm: Remove obsolete inclusions

2011-05-20 Thread Jan Kiszka
Reduces the diff to upstream. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpu-exec.c |2 -- exec.c |1 - gdbstub.c |1 - hw/acpi.c |3 --- hw/ppc440.c|1 - hw/ppc440_bamboo.c |1 -

[PATCH 07/10] qemu-kvm: Refactor exit_request processing in kvm_run

2011-05-20 Thread Jan Kiszka
Move closer to upstream by reusing its self-signaling service in kvm_run, maintain cpu_single_env the same way, push this under qemu_mutex, and clear exit_request unconditionally when leaving kvm_run. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c | 25

[PATCH 04/10] qemu-kvm: Refactor vm exit in kvm_run

2011-05-20 Thread Jan Kiszka
Use kvm_vcpu_ioctl to simplify the vm exit code a bit. This increases the similarity to upstream. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index

[PATCH 06/10] qemu-kvm: Activate iothread version of qemu_cpu_kick_self

2011-05-20 Thread Jan Kiszka
This is a temporary hack: We will soon use this service for kvm which is running in iothread mode - but with CONFIG_IOTHREAD disabled. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index

[PATCH 02/10] qemu-kvm: Remove remaining s390 fragments

2011-05-20 Thread Jan Kiszka
qemu-kvm is not used with s390, only upstream works theses days. So remove any conditionals related to this arch. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c | 12 qemu-kvm.h | 10 +- 2 files changed, 1 insertions(+), 21 deletions(-) diff --git

[PATCH 05/10] qemu-kvm: Use thread_kicked instead of KVMCPUState::signalled

2011-05-20 Thread Jan Kiszka
Another step forward to use signaling services from cpus.c. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpu-defs.h |1 - qemu-kvm.c |6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index 624fd1a..5a0f11d 100644 --- a/cpu-defs.h

[PATCH 08/10] qemu-kvm: Use upstream kvm_arch_process_async_events

2011-05-20 Thread Jan Kiszka
Upstream's kvm_arch_process_async_events is now identical to qemu-kvm's combination of kvm_arch_process_async_events and process_irqchip_events. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm-x86.c| 49 - qemu-kvm.c|

[PATCH 03/10] qemu-kvm: ppc: Drop diff to upstream

2011-05-20 Thread Jan Kiszka
qemu-kvm is x86-only today. Remove the remaining delta of the former ppc support to avoid needless conflicts when sync'ing with upstream. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Alexander Graf ag...@suse.de --- target-ppc/cpu.h | 10 + target-ppc/fake-exec.c | 104

[PATCH 00/10] qemu-kvm: Cleanup and switch to upstream - Part III

2011-05-20 Thread Jan Kiszka
This is a rather short round as the next and final one cannot be split up very well. We start with three code cleanup patches, then work towards using upstream kvm_cpu_exec, and finally rework the core's PIO access management used for device assignment. Please review/merge. CC: Alexander Graf

[PATCH 09/10] qemu-kvm: Use upstream kvm_cpu_exec

2011-05-20 Thread Jan Kiszka
Upstream's and qemu-kvm's kvm_cpu_exec are not logically equivalent so that we can safely switch the implementations. A bit refactoring of kvm_main_loop_cpu is required as upstream's cpu loop already contains the asynchronous event processing which ran outside so far. Signed-off-by: Jan Kiszka

Re: [PATCH 00/10] qemu-kvm: Cleanup and switch to upstream - Part III

2011-05-20 Thread Alexander Graf
On 20.05.2011, at 19:12, Jan Kiszka wrote: This is a rather short round as the next and final one cannot be split up very well. We start with three code cleanup patches, then work towards using upstream kvm_cpu_exec, and finally rework the core's PIO access management used for device

Re: [PATCH 00/10] qemu-kvm: Cleanup and switch to upstream - Part III

2011-05-20 Thread Jan Kiszka
On 2011-05-20 19:14, Alexander Graf wrote: On 20.05.2011, at 19:12, Jan Kiszka wrote: This is a rather short round as the next and final one cannot be split up very well. We start with three code cleanup patches, then work towards using upstream kvm_cpu_exec, and finally rework the

Re: [PATCH 09/10] qemu-kvm: Use upstream kvm_cpu_exec

2011-05-20 Thread Christoph Hellwig
On Fri, May 20, 2011 at 07:12:39PM +0200, Jan Kiszka wrote: Upstream's and qemu-kvm's kvm_cpu_exec are not logically equivalent so s/not/now/? -- 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

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Blue Swirl
On Thu, May 19, 2011 at 5:12 PM, Avi Kivity a...@redhat.com wrote: The memory API separates the attributes of a memory region (its size, how reads or writes are handled, dirty logging, and coalescing) from where it is mapped and whether it is enabled.  This allows a device to configure a

Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API

2011-05-20 Thread Blue Swirl
On Fri, May 20, 2011 at 5:46 PM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/20/2011 09:40 AM, Richard Henderson wrote: On 05/20/2011 07:31 AM, Anthony Liguori wrote: But is this a characteristic of devices or is this a characteristic of the chipset/CPU? Chipset. So if the chipset

[PATCH v3 3/4] kvm tools: Add a wrapper function to initialize all virtio block devices

2011-05-20 Thread Prasad Joshi
The patch moves the code for initialization of all of the virtio block devices to virtio subsystem. Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/include/kvm/kvm.h|1 + tools/kvm/include/kvm/virtio-blk.h |1 + tools/kvm/kvm-run.c|4 ++--

[PATCH v3 1/4] kvm tools: Add a wrapper function to open disk images

2011-05-20 Thread Prasad Joshi
The patch was suggested by Ingo to move the disk image subsystem code from the kvm-run.c file. The code to open all of the specified disk images is now moved to a wrapper function in disk/core.c. Suggested-by: Ingo Molnar mi...@elte.hu Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com ---

[PATCH v3 4/4] kvm tools: Release memory allocated during virtio block initialization

2011-05-20 Thread Prasad Joshi
Add a new function virtio_blk__delete() goes through array of block devices and releases memory allocated for block device. Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/include/kvm/virtio-blk.h |1 + tools/kvm/kvm-run.c|2 ++ tools/kvm/virtio/blk.c

[PATCH v3 2/4] kvm tools: Close the disk images after the guest shuts down

2011-05-20 Thread Prasad Joshi
Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com --- tools/kvm/disk/core.c | 11 +++ tools/kvm/include/kvm/disk-image.h |1 + tools/kvm/kvm-run.c|1 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/tools/kvm/disk/core.c

[PATCH 1/2] KVM test: Make physical_resources_check cope with qemu change on 'info block'

2011-05-20 Thread Lucas Meneghel Rodrigues
New qemu upstream versions report block info like this: (monitor humanmonitor1) Sending command 'info block' (monitor humanmonitor1) Response to 'info block' (monitor humanmonitor1)virtio0: removable=0 file=/tmp/kvm_autotest_root/images/rhel6-64.qcow2 ro=0 drv=qcow2 encrypted=0 (monitor

[PATCH 2/2] KVM test: Adding dmidecode to the list of packages on Fedora 14

2011-05-20 Thread Lucas Meneghel Rodrigues
So it's possible to execute the proper command to get memory assigned during physical_resources_check. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/unattended/Fedora-14.ks |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [Autotest] [PATCH] KVM Test: Correct file_transfer import link.

2011-05-20 Thread Lucas Meneghel Rodrigues
On Thu, 2011-05-19 at 14:48 +0800, fy...@redhat.com wrote: From: Feng Yang fy...@redhat.com modified: client/tests/kvm/tests/set_link.py modified: client/virt/tests/nic_promisc.py modified: client/virt/tests/nicdriver_unload.py Applied, thanks!

Re: [Autotest] [PATCH] KVM Test: Switch current working folder in unattended_install.py.

2011-05-20 Thread Lucas Meneghel Rodrigues
On Thu, 2011-05-19 at 18:24 +0800, fy...@redhat.com wrote: From: Feng Yang fy...@redhat.com Current working folder for unattended_install_config = UnattendedInstallConfig(test, params) unattended_install_config.setup() must be kvm folder. This is not needed at all. What might be

Re: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2

2011-05-20 Thread Nadav Har'El
On Fri, May 20, 2011, Tian, Kevin wrote about RE: [PATCH 07/31] nVMX: Introduce vmcs02: VMCS used to run L2: btw, shouldn't you clear recycled VMCS and reset 'cpu' and 'launched' fields? Well, I believe the answer is no: As far as I understood, a host is allowed to take a VMCS that has been

Re: [PATCH v2] KVM: Sanitize cpuid

2011-05-20 Thread Marcelo Tosatti
On Wed, May 18, 2011 at 05:56:07AM -0400, Avi Kivity wrote: Instead of blacklisting known-unsupported cpuid leaves, whitelist known- supported leaves. This is more conservative and prevents us from reporting features we don't support. Also whitelist a few more leaves while at it.

Re: [PATCH v2 1/7] KVM: MMU: optimize pte write path if don't have protected sp

2011-05-20 Thread Marcelo Tosatti
On Sun, May 15, 2011 at 11:20:27PM +0800, Xiao Guangrong wrote: Simply return from kvm_mmu_pte_write path if no shadow page is write-protected, then we can avoid to walk all shadow pages and hold mmu-lock Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Applied, thanks. -- To

Re: [PATCHv2 09/14] virtio_net: fix TX capacity checks using new API

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:11:47 +0300, Michael S. Tsirkin m...@redhat.com wrote: virtio net uses the number of sg entries to check for TX ring capacity freed. But this gives incorrect results when indirect buffers are used. Use the new capacity API instead. OK, but this explanation needs

Re: [PATCHv2 05/14] virtio_test: support event index

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:11:05 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add ability to test the new event idx feature, enable by default. Applied. Thanks, Rusty. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCHv2 11/14] virtio: don't delay avail index update

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:12:19 +0300, Michael S. Tsirkin m...@redhat.com wrote: Update avail index immediately instead of upon kick: for virtio-net RX this helps parallelism with the host. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_ring.c | 28

Re: [PATCHv2 01/14] virtio: event index interface

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:10:17 +0300, Michael S. Tsirkin m...@redhat.com wrote: Define a new feature bit for the guest and host to utilize an event index (like Xen) instead if a flag bit to enable/disable interrupts and kicks. Applied. Thanks, Rusty. -- To unsubscribe from this list: send the

Re: [PATCHv2 03/14] virtio_ring: support event idx feature

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:10:44 +0300, Michael S. Tsirkin m...@redhat.com wrote: Support for the new event idx feature: 1. When enabling interrupts, publish the current avail index value to the host to get interrupts on the next update. 2. Use the new avail_event feature to reduce the number

Re: [PATCHv2 02/14] virtio ring: inline function to check for events

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:10:27 +0300, Michael S. Tsirkin m...@redhat.com wrote: With the new used_event and avail_event and features, both host and guest need similar logic to check whether events are enabled, so it helps to put the common code in the header. Note that Xen has similar logic

Re: [PATCHv2 06/14] virtio: add api for delayed callbacks

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:11:14 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add an API that tells the other side that callbacks should be delayed until a lot of work has been done. Implement using the new event_idx feature. Note: it might seem advantageous to let the drivers ask for a

Re: [PATCHv2 10/14] virtio_net: limit xmit polling

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:11:56 +0300, Michael S. Tsirkin m...@redhat.com wrote: Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for real-time applications and can't be good for TCP either. Do we

Re: [PATCHv2 04/14] vhost: support event index

2011-05-20 Thread Rusty Russell
On Fri, 20 May 2011 02:10:54 +0300, Michael S. Tsirkin m...@redhat.com wrote: Support the new event index feature. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin m...@redhat.com Applied, even though it'd normally be in your tree,

[PATCH] KVM: x86 emulator: Fix unconditional return from get_descriptor_table_ptr()

2011-05-20 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp A trivial typo was found in the following commit: commit 7753ed6043bfce55dc0c407490896632014b677e KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks When the table indicator flag is set, when the selector selects the

[PATCH 0/5] Setup private bridge in KVM autotest, get rid of ifup scripts

2011-05-20 Thread Lucas Meneghel Rodrigues
This patch combines 2 awesome patchsets by Amos and Jason to single handedly slay 2 long time annoyances for KVM autotest users: * By default we were using qemu userspace networking, a mode unsupported by KVM developers and not terribly useful, and many network tests are not supposed to work

[PATCH 1/5] KVM test: Adding framework code to control bridge creation

2011-05-20 Thread Lucas Meneghel Rodrigues
Provide in framework utility code to control the creation of a bridge, in order to provide TAP functionality for autotest users without relying on previous setup made by the user. This is a reimplementation of Amos's code, the differences are: * Implemented as a setup class, taking advantage of

[PATCH 2/5] KVM test: Add helpers to control the TAP/bridge

2011-05-20 Thread Lucas Meneghel Rodrigues
This patch adds some helpers to assist virt test to setup the bridge or macvtap based guest networking. Changes from v1: * Fixed undefined variable errors on the exception class definitions Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com ---

[PATCH 3/5] KVM test: virt_env_process: Setup private bridge during postprocessing

2011-05-20 Thread Lucas Meneghel Rodrigues
Call bridge setup at preprocessing and cleanup at postprocessing. The bridge can be cleaned up when no tap interfaces are using it. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/virt/virt_env_process.py |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff

[PATCH 4/5] KVM test: setup tap fd and pass it to qemu-kvm

2011-05-20 Thread Lucas Meneghel Rodrigues
We used to use qemu-ifup to manage the tap which have several limitations: 1) If we want to specify a bridge, we must create a customized qemu-ifup file as the default script always match the first bridge. 2) It's hard to add support for macvtap device. So this patch let kvm subtest control the

[PATCH 5/5] KVM test: Changing KVM autotest default to private bridge

2011-05-20 Thread Lucas Meneghel Rodrigues
Rather than the unsupported userspace mode, which still is an option. This way we are giving users a default setup much closer to a real world usage scenario, and enable people to run all the network tests that don't work properly in user mode. Signed-off-by: Lucas Meneghel Rodrigues

[PATCH v2] Enable CPU SMEP feature support for QEMU-KVM

2011-05-20 Thread Yang, Wei Y
Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU feature for QEMU-KVM. Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP prevents kernel from executing code in application. Updated Intel SDM describes this CPU feature. The document will be