Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-05-10 Thread Avi Kivity
On 05/09/2010 10:35 PM, Gerhard Wiesinger wrote: Please run kvm_stat and report output for both tests to confirm. See below. 2nd column is per second statistic when running the test. efer_reload 0 0 exits 18470836 554582 fpu_reload

Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-10 Thread Avi Kivity
On 05/06/2010 10:10 PM, Marcelo Tosatti wrote: On Tue, May 04, 2010 at 01:03:50PM +0300, Avi Kivity wrote: On svm, kvm_read_pdptr() may require reading guest memory, which can sleep. Push the spinlock into mmu_alloc_roots(), and only take it after we've read the pdptr. Marcelo, dropping

[Autotest][PATCH] KVM Test: Update qemu-ifup script to set bridge's forwarding delay to 0.

2010-05-10 Thread Feng Yang
Our pxe case always fail. The problem is that the bridge takes some time to enter the forwarding state. Before that, packages are simply dropped by the bridge. If one sets: $ brctl setfd bridge 0 # forward delay = 0 It works. Signed-off-by: Feng Yang fy...@redhat.com ---

Re: Another SIGFPE in display code, now in cirrus

2010-05-10 Thread Avi Kivity
On 05/06/2010 11:07 PM, Michael Tokarev wrote: There was a bug recently fixed in vnc code. Apparently there's something similar in the cirrus emulation as well. Here it triggers _always_ (including old versions of kvm) when running windows NT and hitting test button in its display resolution

[PATCHv2] Support for booting from virtio disks

2010-05-10 Thread Gleb Natapov
This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapov g...@redhat.com --- Changelog: v1-v2: - free memory in case of vq initialization error. - change license of virtio ring/pci to LGPLv3 with permission of Laurent Vivier (aka the author).

Re: Another SIGFPE in display code, now in cirrus

2010-05-10 Thread Avi Kivity
On 05/10/2010 10:41 AM, Avi Kivity wrote: On 05/06/2010 11:07 PM, Michael Tokarev wrote: There was a bug recently fixed in vnc code. Apparently there's something similar in the cirrus emulation as well. Here it triggers _always_ (including old versions of kvm) when running windows NT and

qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Sasha Levin
Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1 pixel box and just stops. Starting the same machine with the same BIOS on 0.12.3 is working great. Is starting qemu

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

2010-05-10 Thread Gleb Natapov
Do not kill VM when instruction emulation fails. Inject #UD and report failure to userspace instead. Userspace may choose to reenter guest if vcpu is in userspace (cpl == 3) in which case guest OS will kill offending process and continue running. Signed-off-by: Gleb Natapov g...@redhat.com ---

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

2010-05-10 Thread Gleb Natapov
Continue vcpu execution in case emulation failure happened while vcpu was in userspace. In this case #UD will be injected into the guest allowing guest OS to kill offending process and continue. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/kvm-all.c b/kvm-all.c index 9ac35aa..db28d94

Re: [PATCHv2] Support for booting from virtio disks

2010-05-10 Thread Stefan Hajnoczi
diff --git a/src/virtio-blk.c b/src/virtio-blk.c new file mode 100644 index 000..a41c336 --- /dev/null +++ b/src/virtio-blk.c @@ -0,0 +1,155 @@ +// Virtio blovl boot support. Just noticed the blovl typo. +        char *desc = malloc_tmphigh(MAXDESCSIZE); +        struct

Re: [PATCHv2] Support for booting from virtio disks

2010-05-10 Thread Gleb Natapov
On Mon, May 10, 2010 at 09:25:20AM +0100, Stefan Hajnoczi wrote: diff --git a/src/virtio-blk.c b/src/virtio-blk.c new file mode 100644 index 000..a41c336 --- /dev/null +++ b/src/virtio-blk.c @@ -0,0 +1,155 @@ +// Virtio blovl boot support. Just noticed the blovl typo. +    

Re: qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Avi Kivity
On 05/10/2010 11:16 AM, Sasha Levin wrote: Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1 pixel box and just stops. Starting the same machine with the same BIOS on

[PATCHv3] Support for booting from virtio disks

2010-05-10 Thread Gleb Natapov
This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapov g...@redhat.com --- Changelog: v1-v2: - free memory in case of vq initialization error. - change license of virtio ring/pci to LGPLv3 with permission of Laurent Vivier (aka the author).

Re: qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Sasha Levin
On Mon, May 10, 2010 at 11:35 AM, Avi Kivity a...@redhat.com wrote: On 05/10/2010 11:16 AM, Sasha Levin wrote: Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1

Re: [PATCH v3 0/2] x86 FPU API

2010-05-10 Thread Avi Kivity
On 05/06/2010 11:45 AM, Avi Kivity wrote: Currently all fpu accessors are wedded to task_struct. However kvm also uses the fpu in a different context. Introduce an FPU API, and replace the current uses with the new API. While this patchset is oriented towards deeper changes, as a first step

Re: [PATCH] kvm: update document of gfns

2010-05-10 Thread Avi Kivity
On 05/07/2010 11:47 AM, Lai Jiangshan wrote: When don't use -gfns when role.direct=1, update document for it. Please fold into the patch that does the change. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm

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

2010-05-10 Thread Stefan Hajnoczi
Looks good. Stefan -- 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 http://vger.kernel.org/majordomo-info.html

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-10 Thread Rusty Russell
On Sun, 9 May 2010 06:27:33 pm Michael S. Tsirkin wrote: On Fri, May 07, 2010 at 12:35:39PM +0930, Rusty Russell wrote: Then there's padding to page boundary. That puts us on a cacheline again for the used ring; also 2 bytes per entry. Hmm, is used ring really 2 bytes per entry? Err,

Re: [RFC PATCH] kvm: calculate correct gfn for small host pages which emulates large guest pages

2010-05-10 Thread Avi Kivity
On 04/30/2010 05:41 AM, Lai Jiangshan wrote: Lai Jiangshan wrote: RFC, because maybe I missing something with the old code. Frome: Lai Jiangshanla...@cn.fujitsu.com In Document/kvm/mmu.txt: gfn: Either the guest page table containing the translations shadowed by this page, or

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

2010-05-10 Thread Avi Kivity
We drop the mmu lock between freeing memory and allocating the roots; this allows some other vcpu to sneak in and allocate memory. While the race is benign (resulting only in temporary overallocation, not oom) it is simple and easy to fix by moving the freeing close to the allocation.

Re: qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Michael Tokarev
10.05.2010 12:16, Sasha Levin wrote: Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1 pixel box and just stops. Starting the same machine with the same BIOS on 0.12.3

migration fails with virtio-blk

2010-05-10 Thread Michael Tokarev
Apparently there's an issue with migration when virtio-blk is in use at the time migration occurs. See Debian bug #580649 for details: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580649 In short: 2.6.26 (guest) + 0.12.3 + virtio-blk fails. 2.6.32 guest works, 0.11 works, non-virtio-blk

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

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

Re: [Autotest] [PATCH 2/2] KVM test: Support to SLES install

2010-05-10 Thread pradeepkumar
On Wed, 10 Mar 2010 08:45:59 -0300 Lucas Meneghel Rodrigues l...@redhat.com wrote: Hi Yogi/Lucas Thanks for including SLES guests support in KVM autotest. I tried SLES guest install. After succsfull install of SLES guest first stage, again install started. Autotest keep installing first stage in

Re: [PATCH v5 2/5] Support adding a file to qemu's ram allocation

2010-05-10 Thread Avi Kivity
On 04/21/2010 08:53 PM, Cam Macdonell wrote: This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM. This function mmaps the opened file anywhere and adds the memory to the ram blocks. Usage is qemu_ram_mmap(fd, size, MAP_SHARED, offset);

Re: [PATCH v5 3/5] Add functions for assigning ioeventfd and irqfds.

2010-05-10 Thread Avi Kivity
On 04/21/2010 08:53 PM, Cam Macdonell wrote: Generic functions to assign irqfds and ioeventfds. Signoff. } #ifdef KVM_IOEVENTFD +int kvm_set_irqfd(int fd, uint16_t vector, uint32_t gsi) +{ +struct kvm_irqfd call = { }; +int r; + +call.fd = fd; +call.gsi = gsi;

network between host and guest

2010-05-10 Thread Thanasis
I have installed kvm (app-emulation/qemu-kvm-0.12.3-r1) on linux (a laptop with gentoo linux) and MS Windows 7 as guest. Here is what info I get about the network on each one: 1) on linux (host): eth0 Link encap:Ethernet HWaddr 00:03:25:43:7f:93 inet addr:192.168.0.13

RE: virtio-win problem

2010-05-10 Thread Yan Vugenfirer
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Martin Maurer Sent: Thursday, May 06, 2010 5:59 PM To: kvm@vger.kernel.org Subject: RE: virtio-win problem -Original Message- From: kvm-ow...@vger.kernel.org

Re: network between host and guest

2010-05-10 Thread Liang Guo
在 星期一 10 5月 2010 18:46:20,Thanasis 写道: Question: Where is my interface on linux with IP address of 10.0.2.2 ? The guest can actually access the internet (via the host), but where can I see that hidden routing that linux provides to it? I think you are using user networking(slirp) , with

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-10 Thread Takuya Yoshikawa
(2010/05/06 22:38), Arnd Bergmann wrote: On Wednesday 05 May 2010, Takuya Yoshikawa wrote: Date: Yesterday 04:59:24 That's why the bitmaps are defined as little endian u64 aligned, even on big endian 32-bit systems. Little endian bitmaps are wordsize agnostic, and u64 alignment ensures we can

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

2010-05-10 Thread Avi Kivity
On 04/21/2010 08:53 PM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository.

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-10 Thread Avi Kivity
On 05/10/2010 02:46 PM, Takuya Yoshikawa wrote: (2010/05/06 22:38), Arnd Bergmann wrote: On Wednesday 05 May 2010, Takuya Yoshikawa wrote: Date: Yesterday 04:59:24 That's why the bitmaps are defined as little endian u64 aligned, even on big endian 32-bit systems. Little endian bitmaps are

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-10 Thread Arnd Bergmann
On Monday 10 May 2010, Takuya Yoshikawa wrote: (2010/05/06 22:38), Arnd Bergmann wrote: On Wednesday 05 May 2010, Takuya Yoshikawa wrote: There was a suggestion to propose set_le_bit_user() kind of macros. But what I thought was these have a constraint you two explained and seemed to be

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-10 Thread Takuya Yoshikawa
Yes, I'm just using in kernel space: qemu has its own endian related helpers. So if you allow us to place this macro in asm-generic/bitops/* it will help us. No problem at all then. Thanks for the explanation. Acked-by: Arnd Bergmanna...@arndb.de Thanks you both. I will add your Acked-by

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

2010-05-10 Thread Avi Kivity
On 05/04/2010 03:56 PM, Takuya Yoshikawa wrote: [Performance test] We measured the tsc needed to the ioctl()s for getting dirty logs in kernel. Test environment AMD Phenom(tm) 9850 Quad-Core Processor with 8GB memory 1. GUI test (running Ubuntu guest in graphical mode) sudo

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

2010-05-10 Thread Takuya Yoshikawa
get.org get.opt switch.opt slots[7].len=32768 278379 66398 64024 slots[8].len=32768 181246 270 160 slots[7].len=32768 263961 64673 64494 slots[8].len=32768 181655 265 160 slots[7].len=32768 263736 64701 64610 slots[8].len=32768 182785 267 160 slots[7].len=32768 260925 65360 65042

KVM call agenda for May 11

2010-05-10 Thread Chris Wright
Please send in any agenda items you are interested in covering. If we have a lack of agenda items I'll cancel the week's call. thanks, -chris -- 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: [PATCH v5 3/5] Add functions for assigning ioeventfd and irqfds.

2010-05-10 Thread Avi Kivity
On 05/10/2010 06:13 PM, Cam Macdonell wrote: +int kvm_set_ioeventfd_mmio_long(int fd, uint32_t addr, uint32_t val, bool assign) +{ + +int ret; +struct kvm_ioeventfd iofd; + +iofd.datamatch = val; +iofd.addr = addr; +iofd.len = 4; +iofd.flags =

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

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

Re: [PATCH v3 0/2] x86 FPU API

2010-05-10 Thread H. Peter Anvin
On 05/10/2010 01:48 AM, Avi Kivity wrote: On 05/06/2010 11:45 AM, Avi Kivity wrote: Currently all fpu accessors are wedded to task_struct. However kvm also uses the fpu in a different context. Introduce an FPU API, and replace the current uses with the new API. While this patchset is

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

2010-05-10 Thread Avi Kivity
On 05/10/2010 06:22 PM, Cam Macdonell wrote: + +/* if the position is -1, then it's shared memory region fd */ +if (incoming_posn == -1) { + +s-num_eventfds = 0; + +if (check_shm_size(s, incoming_fd) == -1) { +exit(-1); +} + +/* creating a

Re: [PATCH v5 2/5] Support adding a file to qemu's ram allocation

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 4:39 AM, Avi Kivity a...@redhat.com wrote: On 04/21/2010 08:53 PM, Cam Macdonell wrote: This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM.  This function mmaps the opened file anywhere and adds the memory to the

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

2010-05-10 Thread Anthony Liguori
On 05/10/2010 10:28 AM, Avi Kivity wrote: On 05/10/2010 06:22 PM, Cam Macdonell wrote: + +/* if the position is -1, then it's shared memory region fd */ +if (incoming_posn == -1) { + +s-num_eventfds = 0; + +if (check_shm_size(s, incoming_fd) == -1) { +

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

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 9:28 AM, Avi Kivity a...@redhat.com wrote: On 05/10/2010 06:22 PM, Cam Macdonell wrote: + +    /* if the position is -1, then it's shared memory region fd */ +    if (incoming_posn == -1) { + +        s-num_eventfds = 0; + +        if (check_shm_size(s,

Re: [PATCHv2] Support for booting from virtio disks

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

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

2010-05-10 Thread Mohammed Gamal
- Correct unusable flag check on SS, DS, ES, FS, GS, and LDTR - Add rflags checks - Report failed instruction on emulation failure Signed-off-by: Mohammed Gamal m.gamal...@gmail.com --- arch/x86/kvm/vmx.c | 31 +++ 1 files changed, 27 insertions(+), 4 deletions(-)

Re: [PATCHv2] Support for booting from virtio disks

2010-05-10 Thread Anthony Liguori
On 05/10/2010 10:54 AM, Gleb Natapov wrote: On Mon, May 10, 2010 at 10:48:42AM -0500, Anthony Liguori wrote: On 05/10/2010 03:11 AM, Gleb Natapov wrote: This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapovg...@redhat.com A

Re: [PATCHv2] Support for booting from virtio disks

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

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

2010-05-10 Thread Mohammed Gamal
On Mon, May 10, 2010 at 1:25 PM, Gleb Natapov g...@redhat.com wrote: On Mon, May 10, 2010 at 11:16:56AM +0300, Gleb Natapov wrote: Do not kill VM when instruction emulation fails. Inject #UD and report failure to userspace instead. Userspace may choose to reenter guest if vcpu is in userspace

Re: [PATCHv2] Support for booting from virtio disks

2010-05-10 Thread Gleb Natapov
On Mon, May 10, 2010 at 10:58:45AM -0500, Anthony Liguori wrote: On 05/10/2010 10:54 AM, Gleb Natapov wrote: On Mon, May 10, 2010 at 10:48:42AM -0500, Anthony Liguori wrote: On 05/10/2010 03:11 AM, Gleb Natapov wrote: This patch adds native support for booting from virtio disks to Seabios.

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

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 9:38 AM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/10/2010 10:28 AM, Avi Kivity wrote: On 05/10/2010 06:22 PM, Cam Macdonell wrote: + +    /* if the position is -1, then it's shared memory region fd */ +    if (incoming_posn == -1) { + +        

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

2010-05-10 Thread Avi Kivity
On 05/10/2010 06:41 PM, Cam Macdonell wrote: What would happen to any data written to the BAR before the the handshake completed? I think it would disappear. But, the BAR isn't there until the handshake is completed. Only after receiving the shared memory fd does my device call

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: @@ -218,18 +248,19 @@ static void handle_rx(struct vhost_net * use_mm(net-dev.mm); mutex_lock(vq-mutex); vhost_disable_notify(vq); - hdr_size = vq-hdr_size; + vhost_hlen = vq-vhost_hlen;

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

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 10:40 AM, Avi Kivity a...@redhat.com wrote: On 05/10/2010 06:41 PM, Cam Macdonell wrote: What would happen to any data written to the BAR before the the handshake completed?  I think it would disappear. But, the BAR isn't there until the handshake is completed.  Only

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

2010-05-10 Thread Anthony Liguori
On 05/10/2010 11:20 AM, Cam Macdonell wrote: On Mon, May 10, 2010 at 9:38 AM, Anthony Liguorianth...@codemonkey.ws wrote: On 05/10/2010 10:28 AM, Avi Kivity wrote: On 05/10/2010 06:22 PM, Cam Macdonell wrote: + +/* if the position is -1, then it's

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

2010-05-10 Thread Avi Kivity
On 05/10/2010 06:38 PM, Anthony Liguori wrote: Otherwise, if the BAR is allocated during initialization, I would have to use MAP_FIXED to mmap the memory. This is what I did before the qemu_ram_mmap() function was added. What would happen to any data written to the BAR before the the

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread David Stevens
Since datalen carries the difference and will be negative by that amount from the original loop, what about just adding something like: } if (headcount) heads[headcount-1].len += datalen; [and really, headcount 0 since datalen 0, so just:

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

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

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Mon, May 10, 2010 at 10:09:03AM -0700, David Stevens wrote: Since datalen carries the difference and will be negative by that amount from the original loop, what about just adding something like: } if (headcount) heads[headcount-1].len += datalen; [and

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

2010-05-10 Thread Gleb Natapov
On Mon, May 10, 2010 at 07:06:05PM +0300, Mohammed Gamal wrote: On Mon, May 10, 2010 at 1:25 PM, Gleb Natapov g...@redhat.com wrote: On Mon, May 10, 2010 at 11:16:56AM +0300, Gleb Natapov wrote: Do not kill VM when instruction emulation fails. Inject #UD and report failure to userspace

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: @@ -218,18 +248,19 @@ static void handle_rx(struct vhost_net * use_mm(net-dev.mm); mutex_lock(vq-mutex); vhost_disable_notify(vq); - hdr_size = vq-hdr_size; + vhost_hlen = vq-vhost_hlen;

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

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 11:25 AM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/10/2010 11:59 AM, Avi Kivity wrote: On 05/10/2010 06:38 PM, Anthony Liguori wrote: Otherwise, if the BAR is allocated during initialization, I would have to use MAP_FIXED to mmap the memory.  This is what I

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread David Stevens
netdev-ow...@vger.kernel.org wrote on 05/10/2010 10:25:57 AM: On Mon, May 10, 2010 at 10:09:03AM -0700, David Stevens wrote: Since datalen carries the difference and will be negative by that amount from the original loop, what about just adding something like: } if

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

2010-05-10 Thread Anthony Liguori
On 05/10/2010 12:43 PM, Cam Macdonell wrote: On Mon, May 10, 2010 at 11:25 AM, Anthony Liguorianth...@codemonkey.ws wrote: On 05/10/2010 11:59 AM, Avi Kivity wrote: On 05/10/2010 06:38 PM, Anthony Liguori wrote: Otherwise, if the BAR is allocated during

Instant crash (invalid free()) at migrate for all 32bit qemu-kvm-0.12

2010-05-10 Thread Michael Tokarev
Seeing an.. interesting thing here. Kvm crashes during migrate, instantly. Freshly-built 0.12.4, with a simple idle guest (linux 2.6.32). Starting TCP receiver on the same host, so using exactly the same kvm binary. And it drops into shell with large diagnostics output from glibc: (qemu)

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

2010-05-10 Thread Cam Macdonell
On Mon, May 10, 2010 at 11:52 AM, Anthony Liguori anth...@codemonkey.ws wrote: On 05/10/2010 12:43 PM, Cam Macdonell wrote: On Mon, May 10, 2010 at 11:25 AM, Anthony Liguorianth...@codemonkey.ws  wrote: On 05/10/2010 11:59 AM, Avi Kivity wrote: On 05/10/2010 06:38 PM, Anthony Liguori

Re: network between host and guest

2010-05-10 Thread Thanasis
Probably it's slirp. The url you provided doesn't help much though. Thanks. -- 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 http://vger.kernel.org/majordomo-info.html

Re: migration fails with virtio-blk

2010-05-10 Thread Michael Tokarev
10.05.2010 13:49, Michael Tokarev пишет: Apparently there's an issue with migration when virtio-blk is in use at the time migration occurs. See Debian bug #580649 for details: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580649 In short: 2.6.26 (guest) + 0.12.3 + virtio-blk fails. 2.6.32

Re: migration fails with virtio-blk

2010-05-10 Thread Michael Tokarev
10.05.2010 22:38, Anthony Liguori wrote: On 05/10/2010 01:34 PM, Michael Tokarev wrote: In short: 2.6.26 (guest) + 0.12.3 + virtio-blk fails. 2.6.32 guest works, 0.11 works, non-virtio-blk works. It looks like a problem reported on qemu-devel list should fix the issue here:

Re: migration fails with virtio-blk

2010-05-10 Thread Anthony Liguori
On 05/10/2010 01:34 PM, Michael Tokarev wrote: 10.05.2010 13:49, Michael Tokarev пишет: Apparently there's an issue with migration when virtio-blk is in use at the time migration occurs. See Debian bug #580649 for details: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580649 In short:

[PATCH] pci: cleanly backout of pci_qdev_init()

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

Re: Keep index within boundaries in kvmppc_44x_emul_tlbwe()

2010-05-10 Thread Hollis Blanchard
On Sun, May 9, 2010 at 8:26 AM, Roel Kluin roel.kl...@gmail.com wrote: An index of KVM44x_GUEST_TLB_SIZE is already one too large. Signed-off-by: Roel Kluin roel.kl...@gmail.com Acked-by: Hollis Blanchard hol...@penguinppc.org Thanks Roel. -Hollis -- To unsubscribe from this list: send the

Re: Keep index within boundaries in kvmppc_44x_emul_tlbwe()

2010-05-10 Thread Alexander Graf
On 11.05.2010, at 00:58, Hollis Blanchard wrote: On Sun, May 9, 2010 at 8:26 AM, Roel Kluin roel.kl...@gmail.com wrote: An index of KVM44x_GUEST_TLB_SIZE is already one too large. Signed-off-by: Roel Kluin roel.kl...@gmail.com Acked-by: Hollis Blanchard hol...@penguinppc.org Acked-by:

[69/98] KVM: remove unused load_segment_descriptor_to_kvm_desct

2010-05-10 Thread Greg KH
2.6.32-stable review patch. If anyone has any objections, please let us know. -- From: Marcelo Tosatti mtosa...@redhat.com Commit 78ce64a384 in v2.6.32.12 introduced a warning due to unused load_segment_descriptor_to_kvm_desct helper, which has been opencoded by this commit.

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

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

Re: [SeaBIOS] About cpu_set, CPU hotplug and related subjects

2010-05-10 Thread Carl-Daniel Hailfinger
On 28.04.2010 12:45, Gleb Natapov wrote: On Wed, Apr 28, 2010 at 12:41:51PM +0200, Jes Sorensen wrote: The CPU declarations are particularly tricky as they get pretty big and complex and need to live in the DSDT, whereas a lot of other things we can shift off to separate SSDT tables and

Re: [PATCHv3] Support for booting from virtio disks

2010-05-10 Thread Kevin O'Connor
On Mon, May 10, 2010 at 11:36:37AM +0300, Gleb Natapov wrote: This patch adds native support for booting from virtio disks to Seabios. Signed-off-by: Gleb Natapov g...@redhat.com Thanks - commit 89acfa3f. The patch had some compile errors on gcc3.4 and gcc4.5 - I went ahead and committed an

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

2010-05-10 Thread Takuya Yoshikawa
(2010/05/11 2:33), Gleb Natapov wrote: On Mon, May 10, 2010 at 07:06:05PM +0300, Mohammed Gamal wrote: On Mon, May 10, 2010 at 1:25 PM, Gleb Natapovg...@redhat.com wrote: On Mon, May 10, 2010 at 11:16:56AM +0300, Gleb Natapov wrote: Do not kill VM when instruction emulation fails. Inject #UD

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

2010-05-10 Thread Xu, Dongxiao
Hi Avi, Do you have other comments on this version of patch? Thanks, Dongxiao Xu, Dongxiao wrote: Hi all, This is hosted VMM coexistence support v3. Main changes from v2: 1) Change vmm_coexistence to vmm_exclusive. 2) Some code structure changes. Split the original 3 patches to 4. 3)

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

2010-05-10 Thread Marcelo Tosatti
On Tue, May 04, 2010 at 10:08:21PM +0900, Takuya Yoshikawa wrote: Now that dirty bitmaps are accessible from user space, we export the addresses of these to achieve zero-copy dirty log check: KVM_GET_USER_DIRTY_LOG_ADDR We also need an API for triggering dirty bitmap switch to take the

Re: [RFC][PATCH RFC 10/12] KVM: move dirty bitmaps to user space

2010-05-10 Thread Marcelo Tosatti
On Tue, May 04, 2010 at 10:07:02PM +0900, Takuya Yoshikawa wrote: We move dirty bitmaps to user space. - Allocation and destruction: we use do_mmap() and do_munmap(). The new bitmap space is twice longer than the original one and we use the additional space for double buffering: this

[PATCH 2/4] KVM: Clean up duplicate assignment

2010-05-10 Thread Sheng Yang
mmu.free() already set root_hpa to INVALID_PAGE, no need to do it again in the destory_kvm_mmu(). kvm_x86_ops-set_cr4() and set_efer() already assign cr4/efer to vcpu-arch.cr4/efer, no need to do it again later. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/mmu.c |5 ++---

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

2010-05-10 Thread Sheng Yang
Only modifying some bits of CR0/CR4 needs paging mode switch. Add update_rsvd_bits_mask() to address EFER.NX bit updating for reserved bits. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c | 17 ++---

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

2010-05-10 Thread Sheng Yang
Modify EFER won't result in mode switch directly. After EFER.LME set, the following set CR0.PG would result in mode switch to IA32e. And the later action already covered by kvm_set_cr0(). Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |1 - 1 files changed, 0

[PATCH 1/4] KVM: x86: Check LMA bit before set_efer

2010-05-10 Thread Sheng Yang
kvm_x86_ops-set_efer() would execute vcpu-arch.efer = efer, so the checking of LMA bit didn't work. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

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

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

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-10 Thread Takuya Yoshikawa
Yes, I'm just using in kernel space: qemu has its own endian related helpers. So if you allow us to place this macro in asm-generic/bitops/* it will help us. No problem at all then. Thanks for the explanation. Acked-by: Arnd Bergmanna...@arndb.de Thanks you both. I will add your Acked-by

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

2010-05-10 Thread Avi Kivity
On 05/04/2010 03:56 PM, Takuya Yoshikawa wrote: [Performance test] We measured the tsc needed to the ioctl()s for getting dirty logs in kernel. Test environment AMD Phenom(tm) 9850 Quad-Core Processor with 8GB memory 1. GUI test (running Ubuntu guest in graphical mode) sudo

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

2010-05-10 Thread Takuya Yoshikawa
get.org get.opt switch.opt slots[7].len=32768 278379 66398 64024 slots[8].len=32768 181246 270 160 slots[7].len=32768 263961 64673 64494 slots[8].len=32768 181655 265 160 slots[7].len=32768 263736 64701 64610 slots[8].len=32768 182785 267 160 slots[7].len=32768 260925 65360 65042