Re: Clock jumps

2010-05-25 Thread Gleb Natapov
Adding kvm to CC. On Mon, May 24, 2010 at 04:06:32PM +, Orion Poplawski wrote: I have a KVM virtual machine running 2.6.33.4-95.fc13.x86_64 on a CentOS 5.5 host whose clock jumps about 8-12 hours a couple times a day. I have no idea what is causing it. Fedora 12 and Centos 5.5 KVM

Re: [PATCH v4] KVM: VMX: Enable XSAVE/XRSTORE for guest

2010-05-25 Thread Sheng Yang
On Monday 24 May 2010 21:36:12 Avi Kivity wrote: On 05/24/2010 01:03 PM, Sheng Yang wrote: From: Dexuan Cuidexuan@intel.com Enable XSAVE/XRSTORE for guest. Change from V3: 1. Enforced the assumption that host OS would use all available xstate bits. 2. Various fixes, addressed

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

2010-05-25 Thread Gautham R Shenoy
On Mon, May 24, 2010 at 05:21:04PM -0700, Chris Wright wrote: Please send in any agenda items you are interested in covering. Sorry for the delayed response. If the community is interested, I would like to discuss the Generic Asynchronous task offloading framework patches posted to the

Re: [PATCH v4] KVM: VMX: Enable XSAVE/XRSTORE for guest

2010-05-25 Thread Avi Kivity
On 05/25/2010 09:28 AM, Sheng Yang wrote: @@ -3354,6 +3356,29 @@ static int handle_wbinvd(struct kvm_vcpu *vcpu) return 1; } +static int handle_xsetbv(struct kvm_vcpu *vcpu) +{ + u64 new_bv = kvm_read_edx_eax(vcpu); + + if (kvm_register_read(vcpu, VCPU_REGS_RCX) != 0)

Re: [PATCH] vhost: Fix host panic if ioctl called with wrong index

2010-05-25 Thread Michael S. Tsirkin
On Tue, May 25, 2010 at 11:10:36AM +0530, Krishna Kumar wrote: From: Krishna Kumar krkum...@in.ibm.com Missed a boundary value check in vhost_set_vring. The host panics if idx == nvqs is used in ioctl commands in vhost_virtqueue_init. Signed-off-by: Krishna Kumar krkum...@in.ibm.com

Re: [Qemu-devel] [PATCH 1/5] trace: Add trace-events file for declaring trace events

2010-05-25 Thread Stefan Hajnoczi
On Mon, May 24, 2010 at 11:20 PM, Anthony Liguori aligu...@linux.vnet.ibm.com wrote: +# check if trace backend exists + +sh tracetool --$trace_backend --check-backend  /dev/null 2  /dev/null This will fail if objdir != srcdir.  You have to qualify tracetool with the path to srcdir. Thanks

Re: Windows guest debugging on KVM/Qemu

2010-05-25 Thread Avi Kivity
On 05/24/2010 11:07 PM, Neo Jia wrote: hi, I am using KVM/Qemu to debug my Windows guest according to KVM wiki page (http://www.linux-kvm.org/page/WindowsGuestDrivers/GuestDebugging). It works for me and also I can only use one Windows guest and bind its serial port to a TCP port and run

Re: [Qemu-devel] Re: [RFC PATCH] AMD IOMMU emulation

2010-05-25 Thread Joerg Roedel
On Mon, May 24, 2010 at 08:10:16PM +, Blue Swirl wrote: On Mon, May 24, 2010 at 3:40 PM, Joerg Roedel j...@8bytes.org wrote: + +#define MMIO_SIZE               0x2028 This size should be a power-of-two value. In this case probably 0x4000. Not really, the devices can reserve regions

[RFC PATCH 19/23] Introduce ft_tranx_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2010-05-25 Thread Yoshiaki Tamura
Introduce ft_tranx_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_transaction file and turn on event_tap. To end or cancel ft_transaction, ft_mode and event_tap is turned off. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp

[RFC PATCH 23/23] Add a parser to accept FT migration incoming mode.

2010-05-25 Thread Yoshiaki Tamura
The option looks like, -incoming protocol:address:port,ft_mode Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 3334650..a4850f9 100644 ---

[RFC PATCH 16/23] Insert event_tap_mmio() to cpu_physical_memory_rw().

2010-05-25 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index d5c2a05..e9ed477 100644 --- a/exec.c +++ b/exec.c @@ -44,6 +44,7 @@

[RFC PATCH 17/23] Skip assert() when event_tap_state weren't EVENT_TAP_OFF.

2010-05-25 Thread Yoshiaki Tamura
Skip assert(!cpu_single_env) in resume_all_threads() when event_tap_state weren't EVENT_TAP_OFF. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- qemu-kvm.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 1414f49..e28bf59

[RFC PATCH 04/23] Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-05-25 Thread Yoshiaki Tamura
Modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei ohmura@lab.ntt.co.jp --- vl.c | 52

[RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-05-25 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu-kvm.git 2b644fd0e737407133c88054ba498e772ce01f27. On the contrary to the previous version, this series doesn't require any modifications to KVM. The I/O

[RFC PATCH 05/23] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-05-25 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |2 ++ savevm.c | 21 - 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index

[RFC PATCH 09/23] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2010-05-25 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by:

[RFC PATCH 11/23] Introduce qemu_savevm_state_all().

2010-05-25 Thread Yoshiaki Tamura
Introduce qemu_savevm_state_all() to send the memory and device info together, while avoiding cancelling memory state tracking. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- savevm.c | 60 sysemu.h |1 + 2

[RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-05-25 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu-kvm.git 2b644fd0e737407133c88054ba498e772ce01f27. On the contrary to the previous version, this series doesn't require any modifications to KVM. The I/O

[RFC PATCH 13/23] Introduce event-tap.

2010-05-25 Thread Yoshiaki Tamura
event-tap controls when to start ft transaction, and inserts callbacks to the net/block. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- Makefile.target |1 + event-tap.c | 184 +++ event-tap.h | 32 ++ 3

[RFC PATCH 22/23] Introduce -k option to enable FT migration mode (Kemari).

2010-05-25 Thread Yoshiaki Tamura
When -k option is set to migrate command, it will turn on ft_mode to start FT migration mode (Kemari). Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration.c |3 +++ qemu-monitor.hx |7 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[RFC PATCH 03/23] Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty.

2010-05-25 Thread Yoshiaki Tamura
Modifies kvm_get_dirty_pages_log_range to use cpu_physical_memory_set_dirty_range() to update the row of the bit-based phys_ram_dirty bitmap at once. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei ohmura@lab.ntt.co.jp --- qemu-kvm.c | 19

[RFC PATCH 10/23] Introduce util functions to control ft_transaction from savevm layer.

2010-05-25 Thread Yoshiaki Tamura
To utilize ft_transaction function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/hw.h |5 + savevm.c | 41 + 2 files changed, 46 insertions(+), 0 deletions(-) diff --git a/hw/hw.h

[RFC PATCH 20/23] Modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2010-05-25 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() receives ft_transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-tcp.c |

[RFC PATCH 14/23] Call init handler of event-tap at main().

2010-05-25 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 70a8aed..56d12c7 100644 --- a/vl.c +++ b/vl.c @@ -169,6 +169,8 @@ int main(int argc, char **argv) #include qemu-queue.h

[RFC PATCH 15/23] Insert event_tap_ioport() to ioport_write().

2010-05-25 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index 53dd87a..ad7a017 100644 --- a/ioport.c +++ b/ioport.c @@ -26,6 +26,7 @@

[RFC PATCH 08/23] Introduce some socket util functions.

2010-05-25 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- osdep.c | 13 + qemu-char.c | 25 - qemu_socket.h |4 3 files changed, 41 insertions(+), 1 deletions(-) diff --git a/osdep.c b/osdep.c index 3bab79a..63444e7 100644 ---

[RFC PATCH 18/23] Call event_tap_replay() at vm_start().

2010-05-25 Thread Yoshiaki Tamura
Call event_tap_replay() at vm_start() to replay the last ioport/mmio event upon failover. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 56d12c7..762440d 100644 --- a/vl.c +++ b/vl.c

[RFC PATCH 07/23] Introduce skip_header parameter to qemu_loadvm_state().

2010-05-25 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- migration-exec.c |2 +- migration-fd.c |2 +- migration-tcp.c |2 +- migration-unix.c |2 +-

[RFC PATCH 12/23] Insent event-tap callbacks to net/block layer.

2010-05-25 Thread Yoshiaki Tamura
Introduce event-tap callbacks to functions which actually fire outputs at net/block layer. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- block.c | 22 ++

[RFC PATCH 02/23] Introduce cpu_physical_memory_get_dirty_range().

2010-05-25 Thread Yoshiaki Tamura
It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp Signed-off-by: OHMURA Kei

[RFC PATCH 21/23] virtio-blk: Modify save/load handler to handle inuse varialble.

2010-05-25 Thread Yoshiaki Tamura
Modify inuse type to uint16_t, let save/load to handle, and revert last_avail_idx with inuse if there are outstanding emulation. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- hw/virtio.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

Re: Gentoo guest with smp: emerge freeze while recompile world

2010-05-25 Thread Avi Kivity
On 05/24/2010 12:15 AM, Riccardo wrote: Please try with kvmclock disabled. I have recompile gentoo-sources-2.6.34 without kvm-clock: # cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc # dmesg | grep clock [0.00] hpet clockevent registered [0.661050]

Re: [Qemu-devel] [PATCH 1/5] trace: Add trace-events file for declaring trace events

2010-05-25 Thread Avi Kivity
On 05/25/2010 01:07 AM, Anthony Liguori wrote: Interesting approach as it lets us defer the tracing backend decision. Also, it's compatible with the multiplatform nature of qemu. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/24/2010 10:38 PM, Anthony Liguori wrote: - Building a plugin API seems a bit simpler to me, although I'm to sure if I'd get the idea correctly: The block layer has already some kind of api (.bdrv_file_open, .bdrv_read). We could simply compile the block-drivers as shared

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/24/2010 10:16 PM, Anthony Liguori wrote: On 05/24/2010 06:56 AM, Avi Kivity wrote: On 05/24/2010 02:42 PM, MORITA Kazutaka wrote: The server would be local and talk over a unix domain socket, perhaps anonymous. nbd has other issues though, such as requiring a copy and no support for

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/24/2010 10:19 PM, Anthony Liguori wrote: On 05/24/2010 06:03 AM, Avi Kivity wrote: On 05/24/2010 11:27 AM, Stefan Hajnoczi wrote: On Sun, May 23, 2010 at 1:01 PM, Avi Kivitya...@redhat.com wrote: On 05/21/2010 12:29 AM, Anthony Liguori wrote: I'd be more interested in enabling people

Re: [qemu-kvm tests PATCH] qemu-kvm tests cleanup

2010-05-25 Thread Avi Kivity
On 05/15/2010 11:12 AM, Asias He wrote: fix test/x86/msr.c fail to build on i386 Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 2/2 v2] KVM: MMU: allow more page become unsync at getting sp time

2010-05-25 Thread Avi Kivity
On 05/24/2010 10:41 AM, Xiao Guangrong wrote: Allow more page become asynchronous at getting sp time, if need create new shadow page for gfn but it not allow unsync(level 1), we should unsync all gfn's unsync page Both applied, thanks. -- error compiling committee.c: too many arguments

RE: ixgbe: macvlan on PF/VF when SRIOV is enabled

2010-05-25 Thread Shirley Ma
On Mon, 2010-05-24 at 10:54 -0700, Rose, Gregory V wrote: We look forward to it and will be happy to provide feedback. I have submitted the patch to make macvlan on PF works when SRIOV is enabled. One thing you can do is allocate VFs and then load the VF driver in your host domain and then

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

2010-05-25 Thread Avi Kivity
On 05/13/2010 11:15 PM, Mohammed Gamal wrote: On Thu, May 13, 2010 at 9:24 AM, Avi Kivitya...@redhat.com wrote: On 05/11/2010 07:52 PM, Mohammed Gamal wrote: - Add 's' and 'g' field checks on segment registers - Correct SS checks for request and descriptor privilege levels

Re: KVM call agenda for May 18

2010-05-25 Thread Avi Kivity
On 05/19/2010 11:20 AM, Christoph Hellwig wrote: It's time we get a proper bugzilla.qemu.org for both qemu and qemu-kvm that can be used sanely. If you ask nicely you might even get a virtual instance of bugzilla.kernel.org which works quite nicely. That would be my preference too but

Re: host panic on kernel 2.6.34

2010-05-25 Thread Avi Kivity
Copying netdev, bridge mailing lists. On 05/24/2010 11:23 AM, Hao, Xudong wrote: Hi all I build latest kvm 37dec075a7854f0f550540bf3b9bbeef37c11e2a, based on kernel 2.6.34, after kvm and kvm_intel module loaded, then /etc/init.d/kvm start, a few minutes later, the system will panic. kernel:

[PATCH v2 0/7] Tracing backends

2010-05-25 Thread Stefan Hajnoczi
After the RFC discussion, updated patches which I propose for review and merge: The following patches against qemu.git allow static trace events to be declared in QEMU. Trace events use a lightweight syntax and are independent of the backend tracing system (e.g. LTTng UST). Supported backends

[PATCH 2/7] trace: Support disabled events in trace-events

2010-05-25 Thread Stefan Hajnoczi
Sometimes it is useful to disable a trace event. Removing the event from trace-events is not enough since source code will call the trace_*() function for the event. This patch makes it easy to build without specific trace events by marking them disabled in trace-events: disable

[PATCH 1/7] trace: Add trace-events file for declaring trace events

2010-05-25 Thread Stefan Hajnoczi
This patch introduces the trace-events file where trace events can be declared like so: qemu_malloc(size_t size) size %zu qemu_free(void *ptr) ptr %p These trace event declarations are processed by a new tool called tracetool to generate code for the trace events. Trace event declarations are

[PATCH 4/7] trace: Add LTTng Userspace Tracer backend

2010-05-25 Thread Stefan Hajnoczi
This patch adds LTTng Userspace Tracer (UST) backend support. The UST system requires no kernel support but libust and liburcu must be installed. $ ./configure --trace-backend ust $ make Start the UST daemon: $ ustd List available tracepoints and enable some: $ ustctl --list-markers $(pgrep

[PATCH 7/7] trace: Trace virtqueue operations

2010-05-25 Thread Stefan Hajnoczi
This patch adds trace events for virtqueue operations including adding/removing buffers, notifying the guest, and receiving a notify from the guest. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- v2: * This patch is new in v2 hw/virtio.c |8 trace-events |8

[PATCH 6/7] trace: Trace virtio-blk, multiwrite, and paio_submit

2010-05-25 Thread Stefan Hajnoczi
This patch adds trace events that make it possible to observe virtio-blk. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- block.c|7 +++ hw/virtio-blk.c|7 +++ posix-aio-compat.c |2 ++ trace-events | 14 ++ 4 files changed,

[PATCH 5/7] trace: Trace qemu_malloc() and qemu_vmalloc()

2010-05-25 Thread Stefan Hajnoczi
It is often useful to instrument memory management functions in order to find leaks or performance problems. This patch adds trace events for the memory allocation primitives. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- v2: * Record pointer result from allocation functions

[PATCH 3/7] trace: Add simple built-in tracing backend

2010-05-25 Thread Stefan Hajnoczi
This patch adds a simple tracer which produces binary trace files and is built into QEMU. The main purpose of this patch is to show how new tracing backends can be added to tracetool. To try out the simple backend: ./configure --trace-backend=simple make After running QEMU you can pretty-print

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

2010-05-25 Thread Mohammed Gamal
On Tue, May 25, 2010 at 12:37 PM, Avi Kivity a...@redhat.com wrote: On 05/13/2010 11:15 PM, Mohammed Gamal wrote: On Thu, May 13, 2010 at 9:24 AM, Avi Kivitya...@redhat.com  wrote: On 05/11/2010 07:52 PM, Mohammed Gamal wrote: - Add 's' and 'g' field checks on segment registers - Correct

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Kevin Wolf
Am 23.05.2010 14:01, schrieb Avi Kivity: On 05/21/2010 12:29 AM, Anthony Liguori wrote: I'd be more interested in enabling people to build these types of storage systems without touching qemu. Both sheepdog and ceph ultimately transmit I/O over a socket to a central daemon, right?

Re: [Qemu-devel] Re: irq problems after live migration with 0.12.4

2010-05-25 Thread Peter Lieven
Michael Tokarev wrote: 23.05.2010 13:55, Peter Lieven wrote: Hi, after live migrating ubuntu 9.10 server (2.6.31-14-server) and suse linux 10.1 (2.6.16.13-4-smp) it happens sometimes that the guest runs into irq problems. i mention these 2 guest oss since i have seen the error there. there

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

2010-05-25 Thread Avi Kivity
On 05/25/2010 01:36 PM, Mohammed Gamal wrote: Any reference to back this up? I think rpl is valid regardless of ss.unusable (i.e. loading selector 0003 results in an unusable segment with rpl=3), but I don't see how dpl can be valid in an unusable segment. Intel 64 and IA-32

Re: [Qemu-devel] Re: [RFC PATCH] AMD IOMMU emulation

2010-05-25 Thread Eduard - Gabriel Munteanu
On Tue, May 25, 2010 at 10:39:22AM +0200, Joerg Roedel wrote: On Mon, May 24, 2010 at 08:10:16PM +, Blue Swirl wrote: On Mon, May 24, 2010 at 3:40 PM, Joerg Roedel j...@8bytes.org wrote: + +#define MMIO_SIZE ? ? ? ? ? ? ? 0x2028 This size should be a power-of-two value. In this

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 02:02 PM, Kevin Wolf wrote: So could we not standardize a protocol for this that both sheepdog and ceph could implement? The protocol already exists, nbd. It doesn't support snapshotting etc. but we could extend it. But IMO what's needed is a plugin API for the block

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Avi Kivity
On 05/24/2010 01:01 AM, Mohammed Gamal wrote: The vmexit handler returns KVM_EXIT_UNKNOWN since there is no handler for vmentry failures. This intercepts vmentry failures and returns KVM_FAIL_ENTRY to userspace instead. Signed-off-by: Mohammed Gamalm.gamal...@gmail.com --- arch/x86/kvm/vmx.c

Re: [PATCH 2/2] VMX: Add constant for invalid guest state exit reason

2010-05-25 Thread Avi Kivity
On 05/24/2010 01:01 AM, Mohammed Gamal wrote: For the sake of completeness, this patch adds a symbolic constant for VMX exit reason 0x21 (invalid guest state). Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Mohammed Gamal
On Tue, May 25, 2010 at 2:45 PM, Avi Kivity a...@redhat.com wrote: On 05/24/2010 01:01 AM, Mohammed Gamal wrote: The vmexit handler returns KVM_EXIT_UNKNOWN since there is no handler for vmentry failures. This intercepts vmentry failures and returns KVM_FAIL_ENTRY to userspace instead.

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Christoph Hellwig
On Tue, May 25, 2010 at 02:25:53PM +0300, Avi Kivity wrote: Currently if someone wants to add a new block format, they have to upstream it and wait for a new qemu to be released. With a plugin API, they can add a new block format to an existing, supported qemu. So? Unless we want a

Re: [PATCH 7/7] trace: Trace virtqueue operations

2010-05-25 Thread Avi Kivity
On 05/25/2010 01:24 PM, Stefan Hajnoczi wrote: This patch adds trace events for virtqueue operations including adding/removing buffers, notifying the guest, and receiving a notify from the guest. diff --git a/trace-events b/trace-events index 48415f8..a533414 100644 --- a/trace-events +++

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Avi Kivity
On 05/25/2010 03:01 PM, Mohammed Gamal wrote: How does the user distinguish between KVM_EXIT_FAIL_ENTRY due to an exit reason with bit 31 set and vmlauch/vmresume failure (vmx-fail set)? We need separate exit codes (with documentation in api.txt). In both cases the vm fails entry, and I

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 03:03 PM, Christoph Hellwig wrote: On Tue, May 25, 2010 at 02:25:53PM +0300, Avi Kivity wrote: Currently if someone wants to add a new block format, they have to upstream it and wait for a new qemu to be released. With a plugin API, they can add a new block format to an

Re: [PATCH 1/2] VMX: Properly return error to userspace on vmentry failure

2010-05-25 Thread Mohammed Gamal
On Tue, May 25, 2010 at 3:10 PM, Avi Kivity a...@redhat.com wrote: On 05/25/2010 03:01 PM, Mohammed Gamal wrote: How does the user distinguish between KVM_EXIT_FAIL_ENTRY due to an exit reason with bit 31 set and vmlauch/vmresume failure (vmx-fail set)?  We need separate exit codes (with

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 04:14 AM, Avi Kivity wrote: On 05/24/2010 10:38 PM, Anthony Liguori wrote: - Building a plugin API seems a bit simpler to me, although I'm to sure if I'd get the idea correctly: The block layer has already some kind of api (.bdrv_file_open, .bdrv_read). We could simply

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 06:25 AM, Avi Kivity wrote: On 05/25/2010 02:02 PM, Kevin Wolf wrote: So could we not standardize a protocol for this that both sheepdog and ceph could implement? The protocol already exists, nbd. It doesn't support snapshotting etc. but we could extend it. But IMO what's

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:17 PM, Anthony Liguori wrote: On 05/25/2010 04:14 AM, Avi Kivity wrote: On 05/24/2010 10:38 PM, Anthony Liguori wrote: - Building a plugin API seems a bit simpler to me, although I'm to sure if I'd get the idea correctly: The block layer has already some kind of api

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread MORITA Kazutaka
At Mon, 24 May 2010 14:16:32 -0500, Anthony Liguori wrote: On 05/24/2010 06:56 AM, Avi Kivity wrote: On 05/24/2010 02:42 PM, MORITA Kazutaka wrote: The server would be local and talk over a unix domain socket, perhaps anonymous. nbd has other issues though, such as requiring a copy

Re: [PATCH 7/7] trace: Trace virtqueue operations

2010-05-25 Thread Stefan Hajnoczi
On Tue, May 25, 2010 at 1:04 PM, Avi Kivity a...@redhat.com wrote: Those %ps are more or less useless.  We need better ways of identifying them. You're right, the vq pointer is useless in isolation. We don't know which virtio device or which virtqueue number. With the full context of a trace

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:25 AM, Avi Kivity wrote: On 05/25/2010 04:17 PM, Anthony Liguori wrote: On 05/25/2010 04:14 AM, Avi Kivity wrote: On 05/24/2010 10:38 PM, Anthony Liguori wrote: - Building a plugin API seems a bit simpler to me, although I'm to sure if I'd get the idea correctly: The

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:25 PM, Anthony Liguori wrote: Currently if someone wants to add a new block format, they have to upstream it and wait for a new qemu to be released. With a plugin API, they can add a new block format to an existing, supported qemu. Whether we have a plugin or protocol based

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:35 PM, Anthony Liguori wrote: On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based mechanism has the advantage of being more robust in the face of poorly written block backends so if it's possible to make it perform as well as a plugin, it's a preferable approach. May

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based mechanism has the advantage of being more robust in the face of poorly written block backends so if it's possible to make it perform as well as a plugin, it's a preferable approach. May be hard due to difficulty of exposing guest

Re: [PATCH] add support for protocol driver create_options

2010-05-25 Thread Kevin Wolf
Am 24.05.2010 08:34, schrieb MORITA Kazutaka: At Fri, 21 May 2010 18:57:36 +0200, Kevin Wolf wrote: Am 20.05.2010 07:36, schrieb MORITA Kazutaka: + +/* + * Append an option list (list) to an option list (dest). + * + * If dest is NULL, a new copy of list is created. + * + * Returns a

Re: [PATCH 7/7] trace: Trace virtqueue operations

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:27 PM, Stefan Hajnoczi wrote: On Tue, May 25, 2010 at 1:04 PM, Avi Kivitya...@redhat.com wrote: Those %ps are more or less useless. We need better ways of identifying them. You're right, the vq pointer is useless in isolation. We don't know which virtio device or

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Kevin Wolf
Am 25.05.2010 15:25, schrieb Anthony Liguori: On 05/25/2010 06:25 AM, Avi Kivity wrote: On 05/25/2010 02:02 PM, Kevin Wolf wrote: So could we not standardize a protocol for this that both sheepdog and ceph could implement? The protocol already exists, nbd. It doesn't support snapshotting

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:36 AM, Avi Kivity wrote: We'd need a kernel-level generic snapshot API for this eventually. or (2) implement BUSE to complement FUSE and CUSE to enable proper userspace block devices. Likely slow due do lots of copying. Also needs a snapshot API. The kernel could use

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:38 AM, Avi Kivity wrote: On 05/25/2010 04:35 PM, Anthony Liguori wrote: On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based mechanism has the advantage of being more robust in the face of poorly written block backends so if it's possible to make it perform as well as a

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:54 PM, Anthony Liguori wrote: On 05/25/2010 08:36 AM, Avi Kivity wrote: We'd need a kernel-level generic snapshot API for this eventually. or (2) implement BUSE to complement FUSE and CUSE to enable proper userspace block devices. Likely slow due do lots of copying. Also

Re: [PATCH 7/7] trace: Trace virtqueue operations

2010-05-25 Thread Stefan Hajnoczi
On Tue, May 25, 2010 at 2:52 PM, Avi Kivity a...@redhat.com wrote: Hm.  Perhaps we can convert %{type} to %p for backends which don't support it, and to whatever format they do support for those that do. True. Stefan -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 04:55 PM, Anthony Liguori wrote: On 05/25/2010 08:38 AM, Avi Kivity wrote: On 05/25/2010 04:35 PM, Anthony Liguori wrote: On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based mechanism has the advantage of being more robust in the face of poorly written block backends so

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Kevin Wolf
Am 25.05.2010 15:25, schrieb Avi Kivity: On 05/25/2010 04:17 PM, Anthony Liguori wrote: On 05/25/2010 04:14 AM, Avi Kivity wrote: On 05/24/2010 10:38 PM, Anthony Liguori wrote: - Building a plugin API seems a bit simpler to me, although I'm to sure if I'd get the idea correctly: The

[PATCH] KVM: x86: Propagate fpu_alloc errors

2010-05-25 Thread Jan Kiszka
Memory allocation may fail. Propagate such errors. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c |7 ++- arch/x86/kvm/vmx.c |4 +++- arch/x86/kvm/x86.c | 11 +-- 4

[PATCH] KVM: svm: Drop unused local variable

2010-05-25 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/svm.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 5f25e59..3c03c36 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1491,8 +1491,6 @@ static

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:57 AM, Avi Kivity wrote: On 05/25/2010 04:54 PM, Anthony Liguori wrote: On 05/25/2010 08:36 AM, Avi Kivity wrote: We'd need a kernel-level generic snapshot API for this eventually. or (2) implement BUSE to complement FUSE and CUSE to enable proper userspace block devices.

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 08:55 AM, Avi Kivity wrote: On 05/25/2010 04:53 PM, Kevin Wolf wrote: I'm still not convinced that we need either. I share Christoph's concern that we would make our life harder for almost no gain. It's probably a very small group of users (if it exists at all) that wants to add

[PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Michael S. Tsirkin
When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it to mask the vector. This, unless vector is already masked which

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 09:01 AM, Avi Kivity wrote: On 05/25/2010 04:55 PM, Anthony Liguori wrote: On 05/25/2010 08:38 AM, Avi Kivity wrote: On 05/25/2010 04:35 PM, Anthony Liguori wrote: On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based mechanism has the advantage of being more robust in the

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Kevin Wolf
Am 25.05.2010 15:55, schrieb Avi Kivity: On 05/25/2010 04:53 PM, Kevin Wolf wrote: I'm still not convinced that we need either. I share Christoph's concern that we would make our life harder for almost no gain. It's probably a very small group of users (if it exists at all) that wants to add

Re: [PATCH] KVM: svm: Drop unused local variable

2010-05-25 Thread Roedel, Joerg
Ah right, thanks :) On Tue, May 25, 2010 at 10:02:15AM -0400, Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Amit Shah
On (Tue) May 25 2010 [17:00:43], Michael S. Tsirkin wrote: When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it to mask the vector.

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Michael S. Tsirkin
On Tue, May 25, 2010 at 04:37:36PM +0200, Juan Quintela wrote: Michael S. Tsirkin m...@redhat.com wrote: When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Gerd Hoffmann
On 05/25/10 16:00, Michael S. Tsirkin wrote: When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it to mask the vector.

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

2010-05-25 Thread Lucas Meneghel Rodrigues
On Tue, 2010-05-11 at 17:03 +0800, Jason Wang wrote: 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.

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 25, 2010 at 04:37:36PM +0200, Juan Quintela wrote: we have: if (msix_is_masked()) return 0 r = msix_mask_notifier(., !msix_is_masked()); i.e. at that point msix_is_masked() is false, or we really, really needs locking.

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 05:05 PM, Anthony Liguori wrote: On 05/25/2010 09:01 AM, Avi Kivity wrote: On 05/25/2010 04:55 PM, Anthony Liguori wrote: On 05/25/2010 08:38 AM, Avi Kivity wrote: On 05/25/2010 04:35 PM, Anthony Liguori wrote: On 05/25/2010 08:31 AM, Avi Kivity wrote: A protocol based

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Avi Kivity
On 05/25/2010 05:09 PM, Kevin Wolf wrote: The first part of your argument may be true, but the second isn't. No user can run upstream qemu.git. It's not tested or supported, and has no backwards compatibility guarantees. The second part was basically meant to say developers don't

Re: [Qemu-devel] [RFC PATCH 1/1] ceph/rbd block driver for qemu-kvm

2010-05-25 Thread Anthony Liguori
On 05/25/2010 10:00 AM, Avi Kivity wrote: The latter. Why is it less important? If you don't inherit the memory, you can't access it. You can also pass /dev/shm fd's via SCM_RIGHTs to establish shared memory segments dynamically. Doesn't work for anonymous memory. What's wrong with

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-25 Thread Michael S. Tsirkin
On Tue, May 25, 2010 at 04:58:15PM +0200, Juan Quintela wrote: Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 25, 2010 at 04:37:36PM +0200, Juan Quintela wrote: we have: if (msix_is_masked()) return 0 r = msix_mask_notifier(., !msix_is_masked()); i.e. at that

  1   2   >