Re: [PATCH] kvm: fix poison overwritten caused by using wrong xstate size

2010-08-15 Thread H. Peter Anvin
Feel free to add my ack. "Avi Kivity" wrote: > On 08/14/2010 12:03 AM, H. Peter Anvin wrote: >> Avi, do you want to take this one or should I? > >I will, thanks. > >-- >error compiling committee.c: too many arguments to function > -- Sent from my mobile phone. Please pardon any lack of form

Re: [PATCH 1/2] KVM: x86 emulator: put register operand write back to a function

2010-08-15 Thread Wei Yongjun
> On 08/12/2010 04:38 PM, Wei Yongjun wrote: > >> Introduce function write_register_operand() to write back the >> register operand. >> >> >> >> +static void write_register_operand(struct operand *op, unsigned long val, >> + unsigned int bytes) >> +{ >> +/*

Re: [PATCH 0/7] AMD IOMMU emulation patches v3

2010-08-15 Thread Anthony Liguori
On 08/15/2010 02:27 PM, Eduard - Gabriel Munteanu wrote: Hi, Please have a look at these and merge if you wish. I hope I've addressed the issues people have raised. It's looking pretty good so far. I'm very happy with the modifications to the PCI layer. It looks like given the helpers

Re: [PATCH v6 3/3] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-08-15 Thread Xiao Guangrong
Hi Marcelo, Thanks for your review and sorry for the delay reply. Marcelo Tosatti wrote: >> +static struct kvm_memory_slot * >> +pte_prefetch_gfn_to_memslot(struct kvm_vcpu *vcpu, gfn_t gfn, bool >> no_dirty_log) >> +{ >> +struct kvm_memory_slot *slot; >> + >> +slot = gfn_to_memslot(vcp

RE: [qemu-kvm] build fail on i386 RHEL5u4

2010-08-15 Thread Hao, Xudong
Avi Kivity wrote: > On 08/11/2010 04:49 AM, Hao, Xudong wrote: >> Hi, >> Recently I build qemu-kvm on 32bit RHEL5u4/RHEL5u5, it will fail on >> fuction "vhost_dev_sync_region". But RHEL5u1 system is fine to >> build. Did anyone meet similar issue? >> >> qemu-kvm commit: 59d71ddb432db04b57ee2658

Re: KSM with Debian GNU/Linux

2010-08-15 Thread Daniel Bareiro
Hi, all! On Thursday, 12 August 2010 22:05:34 -0300, Daniel Bareiro wrote: > Keeping the kernel I had compiled and installing the qemu-kvm package > in Backports, now KSM is working: > > # cat /sys/kernel/mm/ksm/pages_sharing > 181406 Looking at the statistics of the values obtained running 15

Re: [RFC PATCH v3 0/4] Real mode interrupt injection

2010-08-15 Thread Mohammed Gamal
On Mon, Aug 16, 2010 at 12:46 AM, Mohammed Gamal wrote: > This patch introduces real mode interrupt injection for VMX. > It currently invokes the x86 emulator to emulate interrupts > instead of manually setting VMX controls. > > Needless to say, this is not meant for merging in its current state.

[RFC PATCH v3 4/4] VMX: Emulated real mode interrupt injection

2010-08-15 Thread Mohammed Gamal
Signed-off-by: Mohammed Gamal --- arch/x86/kvm/vmx.c | 65 --- 1 files changed, 6 insertions(+), 59 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 652d317..0f9e3e4 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c

[RFC PATCH v3 3/4] x86: Add kvm_inject_realmode_interrupt() wrapper

2010-08-15 Thread Mohammed Gamal
This adds a wrapper function kvm_inject_realmode_interrupt() around the emulator function emulate_int_real() to allow real mode interrupt injection. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/x86.c | 21 + arch/x86/kvm/x86.h |1 + 2 files changed, 22 insertions(+),

[RFC PATCH v3 2/4] x86: Separate emulation context initialization in a separate function

2010-08-15 Thread Mohammed Gamal
The code for initializing the emulation context is duplicated at two locations (emulate_instruction() and kvm_task_switch()). Separate it in a separate function and call it from there. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/x86.c | 54 ---

[RFC PATCH v3 1/4] x86 emulator: Expose emulate_int_real()

2010-08-15 Thread Mohammed Gamal
Signed-off-by: Mohammed Gamal --- arch/x86/include/asm/kvm_emulate.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index f22e5da..6a7cce0 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arc

[RFC PATCH v3 0/4] Real mode interrupt injection

2010-08-15 Thread Mohammed Gamal
This patch introduces real mode interrupt injection for VMX. It currently invokes the x86 emulator to emulate interrupts instead of manually setting VMX controls. Needless to say, this is not meant for merging in its current state. The emulator still needs some more work to get this completely ope

Relationship between libkvm and qemu-kvm.c

2010-08-15 Thread SHEN Hao
Hello, everyone, I am a little bit confusing with the qemu-kvm project in which I found some similar code in both libkvm and qemu-kvm.c. Is the libkvm really used by qemu? What's the relationship between them? Best regards, -- Hao Shen -- To unsubscribe from this list: send the line "unsubscribe

Re: [Qemu-devel] [PATCH 7/7] ac97: use the PCI memory access interface

2010-08-15 Thread malc
On Sun, 15 Aug 2010, Eduard - Gabriel Munteanu wrote: > This allows the device to work properly with an emulated IOMMU. Fine with me. [..snip..] -- mailto:av1...@comtv.ru -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org Mor

[PATCH 2/2] AMD IOMMU support

2010-08-15 Thread Eduard - Gabriel Munteanu
This initializes the AMD IOMMU and creates ACPI tables for it. Signed-off-by: Eduard - Gabriel Munteanu --- Makefile |2 +- src/acpi.c | 79 src/iommu.c| 64 + src/iommu.h

[PATCH 1/2] Split region allocation code from pci_bios_init_device()

2010-08-15 Thread Eduard - Gabriel Munteanu
pci_bios_alloc() can be used to allocate space in the PCI region for other purposes. This is needed by the AMD IOMMU support code. Signed-off-by: Eduard - Gabriel Munteanu --- src/pciinit.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/pciinit.c b/

[PATCH 7/7] ac97: use the PCI memory access interface

2010-08-15 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu --- hw/ac97.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 4319bc8..9ee4894 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -223,7 +223,

[PATCH 6/7] eepro100: use the PCI memory access interface

2010-08-15 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu --- hw/eepro100.c | 78 ++--- 1 files changed, 41 insertions(+), 37 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index 97afa2

[PATCH 5/7] rtl8139: use the PCI memory access interface

2010-08-15 Thread Eduard - Gabriel Munteanu
This allows the device to work properly with an emulated IOMMU. Signed-off-by: Eduard - Gabriel Munteanu --- hw/rtl8139.c | 99 - 1 files changed, 56 insertions(+), 43 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 72e2242..

[PATCH 3/7] AMD IOMMU emulation

2010-08-15 Thread Eduard - Gabriel Munteanu
This introduces emulation for the AMD IOMMU, described in "AMD I/O Virtualization Technology (IOMMU) Specification". Signed-off-by: Eduard - Gabriel Munteanu --- Makefile.target |2 + hw/amd_iommu.c | 688 +++ hw/pc.c |2 + hw

[PATCH 4/7] ide: use the PCI memory access interface

2010-08-15 Thread Eduard - Gabriel Munteanu
Emulated PCI IDE controllers now use the memory access interface. This also allows an emulated IOMMU to translate and check accesses. Map invalidation results in cancelling DMA transfers. Since the guest OS can't properly recover the DMA results in case the mapping is changed, this is a fairly goo

[PATCH 2/7] pci: memory access API and IOMMU support

2010-08-15 Thread Eduard - Gabriel Munteanu
PCI devices should access memory through pci_memory_*() instead of cpu_physical_memory_*(). This also provides support for translation and access checking in case an IOMMU is emulated. Memory maps are treated as remote IOTLBs (that is, translation caches belonging to the IOMMU-aware device itself)

[PATCH 1/7] pci: add range_covers_range()

2010-08-15 Thread Eduard - Gabriel Munteanu
This helper function allows map invalidation code to determine which maps must be invalidated. Signed-off-by: Eduard - Gabriel Munteanu --- hw/pci.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 4bd8a1a..5a6cdb5 100644 --- a/hw/pci.h

[PATCH 0/7] AMD IOMMU emulation patches v3

2010-08-15 Thread Eduard - Gabriel Munteanu
Hi, Please have a look at these and merge if you wish. I hope I've addressed the issues people have raised. Some changes from the previous RFC: - included and updated the other two device patches - moved map registration and invalidation management into PCI code - AMD IOMMU emulation is always en

Re: system_powerdown not working for qemu-kvm 0.12.4?

2010-08-15 Thread Teck Choon Giam
On Mon, Aug 16, 2010 at 12:19 AM, Avi Kivity wrote: >  On 08/15/2010 07:15 PM, Teck Choon Giam wrote: >> >> Let me know if I have done anything wrong about the bisecting... ... >> > > All looks fine, but what are the results?  git should say something like > 'x is first bad commit' which i

Re: [Qemu-devel] [PATCH 2/2] RESEND: Disable build of ivshmem on non-KVM systems

2010-08-15 Thread Blue Swirl
Thanks, applied. On Sat, Aug 14, 2010 at 11:47 PM, Cam Macdonell wrote: > Signed-off-by: Cam Macdonell > --- >  Makefile.target |    2 +- >  1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/Makefile.target b/Makefile.target > index b791492..c8281e9 100644 > --- a/Makefile.target

MegaSAS 8708EM2 qemu-kvm.git tree updated to v0.12.5

2010-08-15 Thread Nicholas A. Bellinger
Greetings Hannes, hch and Co, The lastest code from upstream qemu-kvm.git v0.12.5 has been merged into the megasas HBA emulation friendly qemu-kvm.git/master and scsi-bsg branches at: http://git.kernel.org/?p=virt/kvm/nab/qemu-kvm.git;a=summary The merge commitdiffs for master and scsi-bsg can b

Re: system_powerdown not working for qemu-kvm 0.12.4?

2010-08-15 Thread Avi Kivity
On 08/15/2010 07:15 PM, Teck Choon Giam wrote: Let me know if I have done anything wrong about the bisecting... ... All looks fine, but what are the results? git should say something like 'x is first bad commit' which is the interesting part. -- error compiling committee.c: too m

Re: [PATCH] kvm: fix poison overwritten caused by using wrong xstate size

2010-08-15 Thread Avi Kivity
On 08/14/2010 12:03 AM, H. Peter Anvin wrote: Avi, do you want to take this one or should I? I will, 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

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Avi Kivity
On 08/15/2010 07:11 PM, Gleb Natapov wrote: Neither are possible. We can have one cpu in big real mode and others in paged mode, so even in real mode we cannot rule out a spurious page fault due to shadow write protection. Correct, just checking X86EMUL_MODE_REAL is not enough due to smp, b

Re: hot plug memory in guest

2010-08-15 Thread Avi Kivity
On 08/10/2010 05:53 PM, Gu, Zhongshu wrote: Hi all: I want to dynamically register memory into the linux guest during runtime. I will compile linux kernel with sparse memory model support. Does kvm support that kind of function? I am not sure how linux detect physical memory and how doe

Re: [PATCH] test: add test for bsf/bsr instruction

2010-08-15 Thread Avi Kivity
On 08/09/2010 01:01 PM, Wei Yongjun wrote: > This patch add test for bsf/bsr instruction. > 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 Mo

Re: system_powerdown not working for qemu-kvm 0.12.4?

2010-08-15 Thread Teck Choon Giam
> > That's fine - you'll be running upstream qemu instead of qemu-kvm.  Just > remember to add -enable-kvm to the command line.  Use ./configure > --target-list=x86_64-softtmmu to cut down on compile time. Yes, I am doing so about the --target-list but missed out the -enable-kvm command option pri

Re: [RFC PATCH 0/3] Real mode interrupt injection

2010-08-15 Thread Mohammed Gamal
On Sun, Aug 15, 2010 at 3:23 PM, Avi Kivity wrote: >  On 08/12/2010 04:07 AM, Mohammed Gamal wrote: I was playing around with the non-atomic-injection branch. I decided to use e_i_g_s=1, and it's worth noting that I never experienced these faults with the switch enabled. >> >>

Re: [PATCH] kvm: destroy workqueue on kvm_create_pit() failures

2010-08-15 Thread Avi Kivity
On 08/13/2010 11:23 AM, Xiaotian Feng wrote: kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise after pit is freed, the workqueue is leaked. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "un

Re: [PATCH] Fix bug for vcpu hotplug

2010-08-15 Thread Avi Kivity
On 08/06/2010 06:36 AM, Liu, Jinsong wrote: Recently seabios implement vcpu hotplug infrastructure. During test, we found qemu-kvm has a bug result in guestos shutdown when vcpu hotadd. This patch is to fix the bug, mark bus->allow_hotplug as 1 after qdev_hotplug init done. Please copy qemu-

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Gleb Natapov
On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: > If emulation fails due to the instruction being unemulated. Return immediately > instead of restarting the instruction and infinitely trying to execute it. > This is already handled correctly as far as I can see. Sometimes instructi

Re: [PATCH] kvm: make mmu_shrink() fit shrinker's requirement

2010-08-15 Thread Avi Kivity
On 08/13/2010 11:10 PM, Dave Hansen wrote: On Thu, 2010-08-05 at 12:28 +0300, Avi Kivity wrote: On 08/04/2010 10:13 AM, Lai Jiangshan wrote: mmu_shrink() should attempt to free @nr_to_scan entries. This conflicts with Dave's patchset. Dave, what's going on with those patches? They're starti

Re: [RFC PATCH v2 0/4] Real mode interrupt injection

2010-08-15 Thread Avi Kivity
On 08/14/2010 03:09 AM, Mohammed Gamal wrote: This patch introduces real mode interrupt injection for VMX. It currently invokes the x86 emulator to emulate interrupts instead of manually setting VMX controls. Needless to say, this is not meant for merging in its current state. The emulator stil

Re: [RFC PATCH v2 4/4] x86 emulator: Eagerly commit emulation ctxt eip in emulate_int_real()

2010-08-15 Thread Avi Kivity
On 08/14/2010 03:19 AM, Mohammed Gamal wrote: emulate_int_real() is to be used outside the emulator. Hence, we shouldn't wait for writeback to write the eip value stored in the decode cache. Save it in emulation context eagerly instead. Signed-off-by: Mohammed Gamal --- arch/x86/kvm/emulate.c

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Gleb Natapov
On Sun, Aug 15, 2010 at 03:43:15PM +0300, Mohammed Gamal wrote: > 2010/8/15 Gleb Natapov : > > On Sun, Aug 15, 2010 at 03:40:00PM +0300, Mohammed Gamal wrote: > >> On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov wrote: > >> > On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: > >> >> I

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Gleb Natapov
On Sun, Aug 15, 2010 at 06:58:06PM +0300, Avi Kivity wrote: > On 08/15/2010 03:49 PM, Gleb Natapov wrote: > >> > >>True. Can we do it for real mode in general (i.e. X86EMUL_MODE_REAL)? > >If we flush all shadow pages when moving from paged mode to non paged > >checking for X86EMUL_MODE_REAL sounds

Re: [PATCH] kvm: fix poison overwritten caused by using wrong xstate size

2010-08-15 Thread Avi Kivity
On 08/13/2010 10:19 AM, Xiaotian Feng wrote: fpu.state is allocated from task_xstate_cachep, the size of task_xstate_cachep is xstate_size. xstate_size is set from cpuid instruction, which is often smaller than sizeof(struct xsave_struct). kvm is using sizeof(struct xsave_struct) to fill in/out

Re: [RFC PATCH v2 2/4] x86: Add inject_realmode_interrupt() wrapper

2010-08-15 Thread Gleb Natapov
On Sat, Aug 14, 2010 at 03:19:39AM +0300, Mohammed Gamal wrote: > This adds a wrapper function inject_realmode_interrupt() around the > emulator function emulate_int_real() to allow real mode interrupt injection. > > Signed-off-by: Mohammed Gamal > --- > arch/x86/kvm/x86.c | 33 +++

Re: system_powerdown not working for qemu-kvm 0.12.4?

2010-08-15 Thread Avi Kivity
On 08/15/2010 02:32 AM, Teck Choon Giam wrote: Can you try to bisect between qemu-kvm-0.12.3 and 0.12.4 to see which commit introduced the regression? Actually I am not so sure about how to do the bisecting as the below steps always produce different configure for me. Any pointers? # cd /usr

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Gleb Natapov
On Sun, Aug 15, 2010 at 03:40:00PM +0300, Mohammed Gamal wrote: > On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov wrote: > > On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: > >> If emulation fails due to the instruction being unemulated. Return > >> immediately > >> instead of rest

Re: [PATCH 1/2] KVM: x86 emulator: put register operand write back to a function

2010-08-15 Thread Avi Kivity
On 08/12/2010 04:38 PM, Wei Yongjun wrote: > Introduce function write_register_operand() to write back the > register operand. > > > > +static void write_register_operand(struct operand *op, unsigned long val, > +unsigned int bytes) > +{ > + /* The 4-byte case

Re: [RFC PATCH v2 2/4] x86: Add inject_realmode_interrupt() wrapper

2010-08-15 Thread Avi Kivity
On 08/14/2010 03:19 AM, Mohammed Gamal wrote: This adds a wrapper function inject_realmode_interrupt() around the emulator function emulate_int_real() to allow real mode interrupt injection. +EXPORT_SYMBOL_GPL(inject_realmode_interrupt); + Global symbols should start with kvm_. -- error comp

Re: Freebsd image from Qemu hangs on booting in KVM

2010-08-15 Thread Avi Kivity
On 08/05/2010 11:51 PM, Anjali Kulkarni wrote: Thanks Avi, I am trying to reproduce this on another setup, and do not see the issue. My understanding is to run KVM + Qemu, I only need to install KVM modules, and Qemu does not need to be modified. Is that correct? I see [r...@ipg-virt01 anjali]#

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Avi Kivity
On 08/15/2010 03:49 PM, Gleb Natapov wrote: True. Can we do it for real mode in general (i.e. X86EMUL_MODE_REAL)? If we flush all shadow pages when moving from paged mode to non paged checking for X86EMUL_MODE_REAL sounds enough to me, but Avi knows better. Or we can add is_big_real_mode() cal

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Avi Kivity
On 08/15/2010 03:43 PM, Mohammed Gamal wrote: 2010/8/15 Gleb Natapov: On Sun, Aug 15, 2010 at 03:40:00PM +0300, Mohammed Gamal wrote: On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov wrote: On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: If emulation fails due to the instructi

Re: [RFC PATCH v2 0/4] Real mode interrupt injection

2010-08-15 Thread Mohammed Gamal
On Sun, Aug 15, 2010 at 3:43 PM, Avi Kivity wrote: >  On 08/14/2010 03:09 AM, Mohammed Gamal wrote: >> >> This patch introduces real mode interrupt injection for VMX. >> It currently invokes the x86 emulator to emulate interrupts >> instead of manually setting VMX controls. >> >> Needless to say,

Re: [RFC PATCH 0/3] Real mode interrupt injection

2010-08-15 Thread Avi Kivity
On 08/12/2010 04:07 AM, Mohammed Gamal wrote: I was playing around with the non-atomic-injection branch. I decided to use e_i_g_s=1, and it's worth noting that I never experienced these faults with the switch enabled. Hate to spoil it. I did experience the faults again with e_i_g_s=1, although

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Mohammed Gamal
On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov wrote: > On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: >> If emulation fails due to the instruction being unemulated. Return >> immediately >> instead of restarting the instruction and infinitely trying to execute it. >> > This is a

Re: [PATCH 2/2] x86: Bail out on unemulated instructions

2010-08-15 Thread Mohammed Gamal
2010/8/15 Gleb Natapov : > On Sun, Aug 15, 2010 at 03:40:00PM +0300, Mohammed Gamal wrote: >> On Sun, Aug 15, 2010 at 10:32 AM, Gleb Natapov wrote: >> > On Sat, Aug 14, 2010 at 06:51:34PM +0300, Mohammed Gamal wrote: >> >> If emulation fails due to the instruction being unemulated. Return >> >> i

Re: [qemu-kvm] build fail on i386 RHEL5u4

2010-08-15 Thread Avi Kivity
On 08/11/2010 04:49 AM, Hao, Xudong wrote: Hi, Recently I build qemu-kvm on 32bit RHEL5u4/RHEL5u5, it will fail on fuction "vhost_dev_sync_region". But RHEL5u1 system is fine to build. Did anyone meet similar issue? qemu-kvm commit: 59d71ddb432db04b57ee2658ce50a3e35d7db97e build error: ...

Re: [Qemu-devel] [PATCH 1/2] RESEND: Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

2010-08-15 Thread Blue Swirl
Thanks, applied. On Sat, Aug 14, 2010 at 11:47 PM, Cam Macdonell wrote: > Signed-off-by: Cam Macdonell > --- >  kvm-stub.c |    5 + >  1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/kvm-stub.c b/kvm-stub.c > index 3378bd3..d45f9fa 100644 > --- a/kvm-stub.c > +++ b/kvm-stub