Re: [kvm-devel] [patch 3/2] hotadd: lsi_scsi_init can fail

2008-04-21 Thread Avi Kivity
Chris Wright wrote: > During hotadd of SCSI devices lsi_scsi_init() handles failed > pci_device_register(), but qemu_system_hot_add_storage() will try and > attach a drive any way. Handle this error case rather the generating > SEGV. > > Cc: Marcelo Tosatti <[EMAIL PROTECTED]> > Signed-off-by: Chr

[kvm-devel] [patch 3/2] hotadd: lsi_scsi_init can fail

2008-04-21 Thread Chris Wright
During hotadd of SCSI devices lsi_scsi_init() handles failed pci_device_register(), but qemu_system_hot_add_storage() will try and attach a drive any way. Handle this error case rather the generating SEGV. Cc: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Chris Wright <[EMAIL PROTECTED]> ---

Re: [kvm-devel] [patch 2/2] [PATCH] virtio-blk: virtio_pci_init can fail

2008-04-21 Thread Chris Wright
* Marcelo Tosatti ([EMAIL PROTECTED]) wrote: > > Looks good. Does SCSI handle pci_register_device() failure too? Yeah, but it missed actually checking the return value from lsi_scsi_init. Patch to follow. thanks, -chris -

Re: [kvm-devel] [PATCH 1 of 9] Lock the entire mm to prevent any mmu related operation to happen

2008-04-21 Thread Rusty Russell
On Wednesday 09 April 2008 01:44:04 Andrea Arcangeli wrote: > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1050,6 +1050,15 @@ > unsigned long addr, unsigned long len, > unsigned long flags, struct page **pages); > > +str

Re: [kvm-devel] What kernel options do I need to properly enable virtio net driver

2008-04-21 Thread Jerone Young
What I am asking is do I have all the proper options in my kernel config set to use it? On Mon, 2008-04-21 at 17:13 -0500, Anthony Liguori wrote: > Jerone Young wrote: > > virtio net device does not appear to show itself in the guest. I'm > > curious of what options I may be missing. Here is my co

[kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-21 Thread Rusty Russell
[Christian, Hollis, how much is this ABI breakage going to hurt you?] A recent proposed feature addition to the virtio block driver revealed some flaws in the API, in particular how easy it is to break big endian machines. The virtio config space was originally chosen to be little-endian, because

Re: [kvm-devel] [patch 2/2] [PATCH] virtio-blk: virtio_pci_init can fail

2008-04-21 Thread Marcelo Tosatti
Looks good. Does SCSI handle pci_register_device() failure too? Acked-by: Marcelo Tosatti <[EMAIL PROTECTED]> On Mon, Apr 21, 2008 at 04:02:49PM -0700, Chris Wright wrote: > The pci_device_register() call in virtio_pci_init() can fail. > Handle this error condition instead of generating a SEGV.

Re: [kvm-devel] Using -kernel .. with -drive ...

2008-04-21 Thread Nguyen Anh Quynh
On Tue, Apr 22, 2008 at 12:59 AM, Damjan <[EMAIL PROTECTED]> wrote: > > > If I try > > > $ qemu -kernel minimal-kernel -drive file=jeos-devel.img,if=virtio > > > I get the following error: > > > A disk image must be given for 'hda' when booting a Linux kernel > > > is this neccesseary? > >

Re: [kvm-devel] [kvm-ppc-devel] [PATCH 1/5]Add some trace markers and exposeinterfaces in kernel for tracing

2008-04-21 Thread Liu, Eric E
Hollis Blanchard wrote: > On Sunday 20 April 2008 00:38:32 Liu, Eric E wrote: >> Christian Ehrhardt wrote: >>> Liu, Eric E wrote: Hollis Blanchard wrote: > On Wednesday 16 April 2008 01:45:34 Liu, Eric E wrote: [...] > Actually... we could have kvmtrace itself insert the metadata, so >

[kvm-devel] [patch 2/2] [PATCH] virtio-blk: virtio_pci_init can fail

2008-04-21 Thread Chris Wright
The pci_device_register() call in virtio_pci_init() can fail. Handle this error condition instead of generating a SEGV. Cc: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Chris Wright <[EMAIL PROTECTED]> --- qemu/hw/virtio-blk.c |2 ++ 1 file changed, 2 insertions(+) --- a/qemu/hw/virtio

[kvm-devel] [patch 0/2] pci_register_device can fail

2008-04-21 Thread Chris Wright
The pci hotadd patches make it easy to trigger segfaults when adding more devices than a single PCI bus can handle. The following 2 patches fix the pci nic devices and virtio-blk device. Now the following the following: OK bus 0, slot 31, function 0 (devfn 248) (qemu) pci_add 0 nic model=vir

[kvm-devel] [patch 1/2] [PATCH] pci nic: pci_register_device can fail

2008-04-21 Thread Chris Wright
The pci_register_device() call in PCI nic initialization routines can fail. Handle this failure and propagate a meaningful error message to the user instead of generating a SEGV. Cc: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Chris Wright <[EMAIL PROTECTED]> --- qemu/hw/e1000.c |

Re: [kvm-devel] What kernel options do I need to properly enable virtio net driver

2008-04-21 Thread Anthony Liguori
Jerone Young wrote: > virtio net device does not appear to show itself in the guest. I'm > curious of what options I may be missing. Here is my config You'll have to be more specific about what "does not appear to show itself" means. What's the output of lspci? Regards, Anthony Liguori >

Re: [kvm-devel] [kvm-ppc-devel] [PATCH 1/5]Add some trace markers and exposeinterfaces in kernel for tracing

2008-04-21 Thread Hollis Blanchard
On Sunday 20 April 2008 00:38:32 Liu, Eric E wrote: > Christian Ehrhardt wrote: > > Liu, Eric E wrote: > >> Hollis Blanchard wrote: > >>> On Wednesday 16 April 2008 01:45:34 Liu, Eric E wrote: [...] > >>> Actually... we could have kvmtrace itself insert the metadata, so > >>> there would be no chan

[kvm-devel] What kernel options do I need to properly enable virtio net driver

2008-04-21 Thread Jerone Young
virtio net device does not appear to show itself in the guest. I'm curious of what options I may be missing. Here is my config # # Automatically generated make config: don't edit # Linux kernel version: 2.6.25-rc9 # Mon Apr 21 15:52:50 2008 # # CONFIG_PPC64 is not set # # Processor support # # CON

[kvm-devel] WARNING: at /usr/src/modules/kvm/mmu.c:390 account_shadowed()

2008-04-21 Thread Thomas Cataldo
Hi, I am running kvm-66 on top of a debian sid host with 2.6.24 (intel 32bit host). Got the following in my logs today : Apr 21 17:55:01 buffy kernel: WARNING: at /usr/src/modules/kvm/mmu.c:390 account_shadowed() Apr 21 17:55:01 buffy kernel: Pid: 21416, comm: kvm Tainted: P 2.6.24-1-686 #1 Apr

Re: [kvm-devel] KVM console dying

2008-04-21 Thread Marcelo Tosatti
On Mon, Apr 21, 2008 at 01:24:00PM -0500, Anthony Liguori wrote: > Marcelo Tosatti wrote: > >From: Alan Pevec <[EMAIL PROTECTED]> > > > > > >>- add serial console, workaround for F9 livecd KVM guest dying with > >>standard console only. > >> VNC console will go blank but node will continue to bo

Re: [kvm-devel] KVM console dying

2008-04-21 Thread Anthony Liguori
Marcelo Tosatti wrote: > From: Alan Pevec <[EMAIL PROTECTED]> > > >> - add serial console, workaround for F9 livecd KVM guest dying with >> standard console only. >> VNC console will go blank but node will continue to boot >> > > With only console=tty qemu-kvm dies when, AFAICT from udevd

[kvm-devel] KVM console dying

2008-04-21 Thread Marcelo Tosatti
From: Alan Pevec <[EMAIL PROTECTED]> > - add serial console, workaround for F9 livecd KVM guest dying with > standard console only. > VNC console will go blank but node will continue to boot With only console=tty qemu-kvm dies when, AFAICT from udevdebug output, start_udev is processing conso

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-21 Thread David S. Ahern
host: 2.6.25-rc8, x86_64, kvm-66 1 dual-core Xeon(R) CPU 3050 @ 2.13GHz 6 GB RAM (This behavior also occurs on a larger server with 2 dual-core Xeon(R) CPU 5140 @ 2.33GHz, 4 GB RAM. Same kernel and kvm versions.) guest: RHEL3 U8 (2.4.21-47.ELsmp), 2 vcpus, 2 GB RAM As usual,

Re: [kvm-devel] Using -kernel .. with -drive ...

2008-04-21 Thread Damjan
> > If I try > > $ qemu -kernel minimal-kernel -drive file=jeos-devel.img,if=virtio > > I get the following error: > > A disk image must be given for 'hda' when booting a Linux kernel > > is this neccesseary? > Hi, i don't know if it is always needed (I saw some patches to avoid > that) but yo

[kvm-devel] [patch] qemu/ia64 include prototype for qemu_mallocz

2008-04-21 Thread Jes Sorensen
Hi, This one fixes a segfault problem I am seeing on ia64 due to the malloc'ed address being truncated to 32 bit. Cheers, Jes Include qemu-common.h for the prototype for qemu_mallocz to avoid the being truncated to 32 bit. Signed-off-by: Jes Sorensen <[EMAIL PROTECTED]> --- target-ia64/op_he

Re: [kvm-devel] 32-bit binaries failing in 64 bit guests after using vmport

2008-04-21 Thread Soren Hansen
On Mon, Apr 21, 2008 at 08:51:17AM -0500, Anthony Liguori wrote: >> We're releasing on Thursday, and I needed a quick fix, so I reverted >> the calls to kvm_{save,load}_registers in vmport_ioport_read to the >> old code that simply saved the eax, ebx, ecx, edx, esi, and edi >> registers, but I'm su

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-21 Thread Guillaume Thouvenin
On Fri, 18 Apr 2008 10:25:15 -0500 Anthony Liguori <[EMAIL PROTECTED]> wrote: > I'd prefer you not do an emulate_instruction loop at all. Just emulate > one instruction on vmentry failure and let VT tell you what instructions > you need to emulate. > > It's only four instructions so I don't th

[kvm-devel] Some FAQ questions

2008-04-21 Thread Damjan
I have some questions for the FAQ, about the configuration of Linux guests: a) is swap needed in the guest (I'd say no, but..) b) what filesystem is best for a guest c) what io scheduler in the guest (noop? or cfq) d) are there any runtime kernel tweaks for the guest (/proc/sys)? e) suggested

[kvm-devel] Using -kernel .. with -drive ...

2008-04-21 Thread Damjan
If I try $ qemu -kernel minimal-kernel -drive file=jeos-devel.img,if=virtio I get the following error: A disk image must be given for 'hda' when booting a Linux kernel is this neccesseary? -- damjan | дамјан This is my jabber ID --> [EMAIL PROTECTED] -- not my mail address, it's a

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-21 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: > Gerd Hoffmann wrote: >> Not really. There are only two calls, one in clocksource_read() and one >> in the init path. The later is superfluous I think because >> clocksource_read() is the only user of the shadowed time info. > > Hm. It doesn't look like shadow_time n

[kvm-devel] Get up stronger and harder

2008-04-21 Thread nathalie
Be permanently bigger and stronger, stop being the weakling you are today. http://www.yunabhel.com/ - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still tim

Re: [kvm-devel] 32-bit binaries failing in 64 bit guests after using vmport

2008-04-21 Thread Anthony Liguori
Soren Hansen wrote: > Esteemed kvm developers! > > I've been trying to debug this bug > > https://bugs.launchpad.net/ubuntu/+source/kvm/+bug/219165 > > It originally revealed itself by failing to run grub (which is a 32 bit > binary) when installing Ubuntu from our live cd. It turned out to be

Re: [kvm-devel] [ RfC / patch ] kvmclock fixes

2008-04-21 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > +cycle_t pvclock_clocksource_read(struct kvm_vcpu_time_info *src) > +{ > + struct pvclock_shadow_time *shadow; > + cycle_t ret; > + unsigned version; > + > + shadow = &get_cpu_var(shadow_time); > + do { > + version = pvclock_get_time_values(sha

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-21 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > Jeremy Fitzhardinge wrote: > >> Xen could change the parameters in the instant after get_time_values(). >> That change could be as a result of suspend-resume, so the parameters >> and the tsc could be wildly different. >> > > Ah, ok, forgot the rdtsc in the picture.

Re: [kvm-devel] [ RfC / patch ] kvmclock fixes

2008-04-21 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: > Gerd Hoffmann wrote: >> +cycle_t pvclock_clocksource_read(struct kvm_vcpu_time_info *src) >> +{ >> +struct pvclock_shadow_time *shadow = &get_cpu_var(shadow_time); >> +cycle_t ret; >> + >> +pvclock_get_time_values(shadow, src); >> +ret = shadow->system_t

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-21 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: > Xen could change the parameters in the instant after get_time_values(). > That change could be as a result of suspend-resume, so the parameters > and the tsc could be wildly different. Ah, ok, forgot the rdtsc in the picture. With that in mind I fully agree that the

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-21 Thread Jamie Lokier
Avi Kivity wrote: > >At such a tiny difference, I'm wondering why Linux-AIO exists at all, > >as it complicates the kernel rather a lot. I can see the theoretical > >appeal, but if performance is so marginal, I'm surprised it's in > >there. > > Linux aio exists, but that's all that can be said fo

[kvm-devel] [PATCH/trivial] kvm: remove long -> void *user -> long cast

2008-04-21 Thread Christian Borntraeger
Avi, kvm_dev_ioctl casts the arg value to void __user *, just to recast it again to long. This seems unnecessary. According to objdump the binary code on x86 is unchanged by this patch. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c |3 +-- 1 file changed, 1

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-21 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > Hmm, I somehow fail to see a case where it could be non-atomic ... > > get_time_values() copies a consistent snapshot, thus > xen_clocksource_read() doesn't race against xen updating the fields. > The snapshot is in a per-cpu variable, thus it doesn't race against > other gue

[kvm-devel] [PATCH 16/31] KVM: x86 emulator: initialize src.val and dst.val for register operands

2008-04-21 Thread Avi Kivity
This lets us treat the case where mod == 3 in the same manner as other cases. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index f59ed9

[kvm-devel] [PATCH 26/31] KVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> If the CR8 write intercept is disabled the V_TPR field of the VMCB needs to be synced with the TPR field in the local apic. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c | 12 +

[kvm-devel] [PATCH 18/31] KVM: x86 emulator: fix lea to really get the effective address

2008-04-21 Thread Avi Kivity
We never hit this, since there is currently no reason to emulate lea. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 46ef78f..2ca08

[kvm-devel] [PATCH 20/31] ppc: Export tlb_44x_hwater for KVM

2008-04-21 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> PowerPC 440 KVM needs to know how many TLB entries are used for the host kernel linear mapping (it does not modify these mappings when switching between guest and host execution). Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Acked-by: Josh Boyer <

[kvm-devel] [PATCH 22/31] KVM: Add MAINTAINERS entry for PowerPC KVM

2008-04-21 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Acked-by: Paul Mackerras <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- MAINTAINERS |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MA

[kvm-devel] [PATCH 24/31] KVM: SVM: sync TPR value to V_TPR field in the VMCB

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> This patch adds syncing of the lapic.tpr field to the V_TPR field of the VMCB. With this change we can safely remove the CR8 read intercept. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c

[kvm-devel] [PATCH 28/31] KVM: SVM: remove now obsolete FIXME comment

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> With the usage of the V_TPR field this comment is now obsolete. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git

[kvm-devel] [PATCH 30/31] KVM: ppc: Kconfig fixes

2008-04-21 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Don't allow building as a module (asm-offsets dependencies). Also, automatically select KVM_BOOKE_HOST until we better separate the guest and host layers. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 25/31] KVM: export kvm_lapic_set_tpr() to modules

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> This patch exports the kvm_lapic_set_tpr() function from the lapic code to modules. It is required in the kvm-amd module to optimize CR8 intercepts. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/k

[kvm-devel] [PATCH 27/31] KVM: SVM: disable CR8 intercept when tpr is not masking interrupts

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> This patch disables the intercept of CR8 writes if the TPR is not masking interrupts. This reduces the total number CR8 intercepts to below 1 percent of what we have without this patch using Windows 64 bit guests. Signed-off-by: Joerg Roedel <[EMAIL PROTECTE

[kvm-devel] [PATCH 17/31] KVM: x86 emulator: fix smsw and lmsw with a memory operand

2008-04-21 Thread Avi Kivity
lmsw and smsw were implemented only with a register operand. Extend them to support a memory operand as well. Fixes Windows running some display compatibility test on AMD hosts. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c | 29 + 1

[kvm-devel] [PATCH 12/31] KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_*

2008-04-21 Thread Avi Kivity
We wish to export it to userspace, so move it into the kvm namespace. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/ia64/kvm/kvm-ia64.c| 26 +- arch/x86/kvm/i8254.c|2 +- arch/x86/kvm/lapic.c| 16 arch/x86/kvm/x86.c

[kvm-devel] [PATCH 15/31] KVM: SVM: force a new asid when initializing the vmcb

2008-04-21 Thread Avi Kivity
Shutdown interception clears the vmcb, leaving the asid at zero (which is illegal. so force a new asid on vmcb initialization. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/

[kvm-devel] [PATCH 29/31] KVM: SVM: remove selective CR0 comment

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> There is not selective cr0 intercept bug. The code in the comment sets the CR0.PG bit. But KVM sets the CR4.PG bit for SVM always to implement the paged real mode. So the 'mov %eax,%cr0' instruction does not change the CR0.PG bit. Selective CR0 intercepts onl

[kvm-devel] [PATCH 19/31] KVM: Rename debugfs_dir to kvm_debugfs_dir

2008-04-21 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> It's a globally exported symbol now. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm_host.h |2 +- virt/kvm/kvm_main.c |8 virt/kvm/kvm_trace.c |4 ++--

[kvm-devel] [PATCH 21/31] KVM: ppc: Add DCR access information to struct kvm_run

2008-04-21 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Device Control Registers are essentially another address space found on PowerPC 4xx processors, analogous to PIO on x86. DCRs are always 32 bits, and can be identified by a 32-bit number. We forward most DCR accesses to userspace for emulation (with the e

[kvm-devel] [PATCH 09/31] KVM: Add kvm trace userspace interface

2008-04-21 Thread Avi Kivity
From: Feng(Eric) Liu <[EMAIL PROTECTED]> This interface allows user a space application to read the trace of kvm related events through relayfs. Signed-off-by: Feng (Eric) Liu <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/Kconfig | 11 ++ arch/x86/kvm/M

[kvm-devel] [PATCH 10/31] KVM: SVM: do not intercept task switch with NPT

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> When KVM uses NPT there is no reason to intercept task switches. This patch removes the intercept for it in that case. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |1 + 1 files cha

[kvm-devel] [PATCH 06/31] KVM: Add trace markers

2008-04-21 Thread Avi Kivity
From: Feng (Eric) Liu <[EMAIL PROTECTED]> Trace markers allow userspace to trace execution of a virtual machine in order to monitor its performance. Signed-off-by: Feng (Eric) Liu <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 35

[kvm-devel] [PATCH 07/31] KVM: s390: Stub out kvmtrace

2008-04-21 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/s390/kvm/Kconfig |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig index 2489b34..1761b74 100644 --- a/arch/s390/kvm/Kconfig +++ b/arch/s390/kvm/Kconfig @@ -36,6 +36,9 @@ c

[kvm-devel] [PATCH 11/31] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-21 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> Timers that fire between guest hlt and vcpu_block's add_wait_queue() are ignored, possibly resulting in hangs. Also make sure that atomic_inc and waitqueue_active tests happen in the specified order, otherwise the following race is open: CPU0

[kvm-devel] [PATCH 13/31] KVM: add ioctls to save/store mpstate

2008-04-21 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> So userspace can save/restore the mpstate during migration. [avi: export the #define constants describing the value] [christian: add s390 stubs] [avi: ditto for ia64] Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger

[kvm-devel] [PATCH 31/31] KVM: MMU: kvm_pv_mmu_op should not take mmap_sem

2008-04-21 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> kvm_pv_mmu_op should not take mmap_sem. All gfn_to_page() callers down in the MMU processing will take it if necessary, so as it is it can deadlock. Apparently a leftover from the days before slots_lock. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 14/31] KVM: fix kvm_vcpu_kick vs __vcpu_run race

2008-04-21 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> There is a window open between testing of pending IRQ's and assignment of guest_mode in __vcpu_run. Injection of IRQ's can race with __vcpu_run as follows: CPU0CPU1 kvm_x86_ops->run() vcpu->guest_mode = 0SE

[kvm-devel] [PATCH 08/31] KVM: ia64: Stub out kvmtrace

2008-04-21 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/ia64/kvm/Kconfig |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/ia64/kvm/Kconfig b/arch/ia64/kvm/Kconfig index d2e54b9..7914e48 100644 --- a/arch/ia64/kvm/Kconfig +++ b/arch/ia64/kvm/Kconfig @@ -43,4 +43,7 @@ c

[kvm-devel] [PATCH 05/31] KVM: SVM: add intercept for machine check exception

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> To properly forward a MCE occured while the guest is running to the host, we have to intercept this exception and call the host handler by hand. This is implemented by this patch. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EM

[kvm-devel] [PATCH 03/31] KVM: SVM: indent svm_set_cr4 with tabs instead of spaces

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> The svm_set_cr4 function is indented with spaces. This patch replaces them with tabs. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |8 1 files changed, 4 insertions(+), 4 d

[kvm-devel] [PATCH 01/31] KVM: MMU: Don't assume struct page for x86

2008-04-21 Thread Avi Kivity
From: Anthony Liguori <[EMAIL PROTECTED]> This patch introduces a gfn_to_pfn() function and corresponding functions like kvm_release_pfn_dirty(). Using these new functions, we can modify the x86 MMU to no longer assume that it can always get a struct page for any given gfn. We don't want to elim

[kvm-devel] [PATCH 02/31] KVM: Register ioctl range

2008-04-21 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- Documentation/ioctl-number.txt |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index c18363b..240ce7a 100644 --- a/Documentation/ioctl-number.txt +++ b/Docume

[kvm-devel] [PATCH 04/31] KVM: SVM: align shadow CR4.MCE with host

2008-04-21 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> This patch aligns the host version of the CR4.MCE bit with the CR4 active in the guest. This is necessary to get MCE exceptions when the guest is running. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch

[kvm-devel] [PATCH 00/31] KVM updates for the 2.6.26 merge window (part IV, last)

2008-04-21 Thread Avi Kivity
Fourth and final batch of the pending kvm updates. This one contains the ppc port in addition to x86 updates. Documentation/ioctl-number.txt |2 + Documentation/powerpc/kvm_440.txt | 41 ++ MAINTAINERS |7 + arch/ia64/kvm/Kconfig |3 + a

Re: [kvm-devel] [ RfC / patch ] kvmclock fixes

2008-04-21 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > * Host: make kvm pv clock really compatible with xen pv clock. > * Guest/xen: factor out some xen clock code into a separate >source file (pvclock.[ch]), so kvm can reuse it. > * Guest/kvm: make kvm clock compatible with xen clock by using >

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-21 Thread Avi Kivity
David S. Ahern wrote: > I added the traces and captured data over another apparent lockup of the > guest. > This seems to be representative of the sequence (pid/vcpu removed). > > (+4776) VMEXIT [ exitcode = 0x, rip = 0x c016127c ] > (+ 0) PAGE_FAULT [ errorcode = 0

[kvm-devel] Booting with lilo after kvm upgrade to kvm-64

2008-04-21 Thread Tomas Rusnak
Hello everybody After I update to KVM-66 (from 65), I have problem to boot guests with lilo installed. Boot sequence always stop with "LIL" output. With kvm-65 everythink works great. I have also windows XP guest, which boot without problem. With -no-kvm guests boot ok. Processor: AMD Opteron

[kvm-devel] Правильно оформить договор

2008-04-21 Thread Бухгалтерия
Бухгалтеру о договорной работе организации - правовые основы и налоговый аспект 7 мая 2008, г. Мoсква Прoграмма семинара Программа семинара 1. Как правильно оформить договор, обязательные и дополнительные условия договоров. Когда можно считать соблюденной простую письменную форму договора. К

[kvm-devel] [ RfC / patch ] kvmclock fixes

2008-04-21 Thread Gerd Hoffmann
Gerd Hoffmann wrote: > Marcelo Tosatti wrote: >> Haven't seen Gerd's guest patches ? > > I'm still busy cooking them up. I've mentioned them in a mail, but they > didn't ran over the list (yet). Stay tuned ;) It compiles, ship it! This time as all-in one patch (both guest and host side). Al

[kvm-devel] KVM Test result, kernel 6cf5973.., userspace 4320192.. -- One Issue Fixed

2008-04-21 Thread Yunfeng Zhao
Hi All, This is today's KVM test result against kvm.git 6cf59734fc9bc89954d0157524eea156c2f9a5ab and kvm-userspace.git 43201923a67647913b67da255ca60f0269a3e34a. One Issue Fixed 1.Can't boot smp guests on ia32e host https://sourceforge.net/tracker

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-21 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: > Gerd Hoffmann wrote: >> I'm looking at the guest side of the issue right now, trying to identify >> common code, and while doing so noticed that xen does the >> version-check-loop in both get_time_values_from_xen(void) and >> xen_clocksource_read(void), and I can't see

Re: [kvm-devel] paravirt clock stil causing hangs in kvm-65

2008-04-21 Thread Gerd Hoffmann
Marcelo Tosatti wrote: >> >From what me and marcelo discussed, I think there's a possibility that >> it has marginally something to do with precision of clock calculation. >> Gerd's patches address that issues. Can somebody test this with those >> patches (both guest and host), while I'm off ? > >

[kvm-devel] 32-bit binaries failing in 64 bit guests after using vmport

2008-04-21 Thread Soren Hansen
Esteemed kvm developers! I've been trying to debug this bug https://bugs.launchpad.net/ubuntu/+source/kvm/+bug/219165 It originally revealed itself by failing to run grub (which is a 32 bit binary) when installing Ubuntu from our live cd. It turned out to be a more general problem of 32 bit