Re: x86_64: vsyscall vs vdso

2007-09-17 Thread Francis Moreau
Hello Ulrich, Thanks for taking time to respond ! On 9/16/07, Ulrich Drepper <[EMAIL PROTECTED]> wrote: > On 9/16/07, Francis Moreau <[EMAIL PROTECTED]> wrote: >> I'm a bit puzzled because vdso doesn't seem to be used on my fedora 7: >> I just compiled a trivial program which just call gettimeofd

Re: Wasting our Freedom

2007-09-17 Thread Daniel Hazelton
On Monday 17 September 2007 02:43:50 Can E. Acar wrote: > Daniel Hazelton wrote: > > On Sunday 16 September 2007 23:00:09 Can E. Acar wrote: > > [snip] > > >> Theo summarized the latest situation here, some days ago: > >> > >> http://marc.info/?l=openbsd-misc&m=118963284332223&w=2 > >> > >> and h

Re: Wasting our Freedom

2007-09-17 Thread Helge Hafting
Jacob Meuser wrote: On Sun, Sep 16, 2007 at 05:12:08PM -0400, Theodore Tso wrote: reimplement them. Why don't you go and try asking NetApp for sources to WAFL, and claim that they have "moral" duty to give the code back, and see how quickly you get laughed out of the office? which is

[PATCH 1/5] Cleanup macros for distinguishing mandatory locks

2007-09-17 Thread Pavel Emelyanov
The combination of S_ISGID bit set and S_IXGRP bit unset is used to mark the inode as "mandatory lockable" and there's a macro for this check called MANDATORY_LOCK(inode). However, fs/locks.c and some filesystems still perform the explicit i_mode checking. Besides, Andrew pointed out, that this

[PATCH 2/5][GFS2] Cleanup explicit check for mandatory locks

2007-09-17 Thread Pavel Emelyanov
The __mandatory_lock(inode) function makes the same check, but makes the code more readable. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Cc: Steven Whitehouse <[EMAIL PROTECTED]> --- fs/gfs2/ops_file.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/op

[PATCH 3/5][9PFS] Cleanup explicit check for mandatory locks

2007-09-17 Thread Pavel Emelyanov
The __mandatory_lock(inode) macro makes the same check, but makes the code more readable. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Cc: Eric Van Hensbergen <[EMAIL PROTECTED]> Cc: Ron Minnich <[EMAIL PROTECTED]> Cc: Latchesar Ionkov <[EMAIL PROTECTED]> --- fs/9p/vfs_file.c |2 +- 1

[PATCH 4/5][AFS] Cleanup explicit check for mandatory locks

2007-09-17 Thread Pavel Emelyanov
The __mandatory_lock(inode) macro makes the same check, but makes the code more readable. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Cc: David Howells <[EMAIL PROTECTED]> --- fs/afs/flock.c |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/afs/flock.c b/fs/afs

[PATCH 5/5][NFS] Cleanup explicit check for mandatory locks

2007-09-17 Thread Pavel Emelyanov
The __mandatory_lock(inode) macro makes the same check, but makes the code more readable. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Cc: Trond Myklebust <[EMAIL PROTECTED]> --- fs/nfs/file.c |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfs/file.c b/fs/nfs

[PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-17 Thread Pavel Emelyanov
When the process is blocked on mandatory lock and someone changes the inode's permissions, so that the lock is no longer mandatory, nobody wakes up the blocked process, but probably should. Switched to use mandatory_lock() static inline function. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]

Re: printk format "%4.4s"

2007-09-17 Thread Benny Halevy
On Sep 17, 2007, 2:57 +0200, shinkoi2005a <[EMAIL PROTECTED]> wrote: > Hi, all > > I have a question about printk format. > > Can printk format use "%4.4s"? Yes it can. The precision part of the format determines the max number of characters to copy from the string. The 4 byte signature array mi

Re: Wasting our Freedom

2007-09-17 Thread J.C. Roberts
On Sunday 16 September 2007, Jeff Garzik wrote: > Daniel Hazelton wrote: > > If the OpenBSD developers want to attack the Linux Kernel community > > over patches that were *NEVER* *ACCEPTED* by said community, it > > should be just as fair for the Linux Kernel community to complain > > about those

[RFC -mm 1/2] i386/x86_64 boot: setup data

2007-09-17 Thread Huang, Ying
This patch add a field of 64-bit physical pointer to NULL terminated single linked list of struct setup_data to real-mode kernel header. This is used to define a more extensible boot parameters passing mechanism. Signed-off-by: Huang Ying <[EMAIL PROTECTED]> --- arch/i386/Kconfig|

[RFC -mm 2/2] i386/x86_64 boot: document for 32 bit boot protocol

2007-09-17 Thread Huang, Ying
This patch defines a 32-bit boot protocol and adds corresponding document. Signed-off-by: Huang Ying <[EMAIL PROTECTED]> --- boot.txt | 105 ++- 1 file changed, 104 insertions(+), 1 deletion(-) Index: linux-2.6.23-rc4/Documentation/i

[RFC -mm 0/2] i386/x86_64 boot: 32-bit boot protocol

2007-09-17 Thread Huang, Ying
For machine with some new BIOS other than legacy BIOS, such as EFI, LinuxBIOS, etc, and kexec, the 16-bit real mode setup code in kernel based on legacy BIOS can not be used, so a 32-bit boot protocol need to be defined. This patchset defines a 32-bit boot protocol for i386 and x86_64. A linked li

Re: [PATCH 1/1] pata_it821x: fix lost interrupt with atapi devices

2007-09-17 Thread Tejun Heo
[cc'ing Albert and linux-ide] Alan Cox wrote: > /from the media. */ >> > + if (qc->nbytes < 2048) >> > + return -EOPNOTSUPP; >> > + >> > /* No ATAPI DMA in smart mode */ >> > if (itdev->smart) >> > return -EOPNOTSUPP; >> > >> >> This looks like a gross hack. Aren't yo

Re: SYSFS: need a noncaching read

2007-09-17 Thread Tejun Heo
Greg KH wrote: > On Wed, Sep 12, 2007 at 07:32:07AM +0200, Robert Schwebel wrote: >> On Tue, Sep 11, 2007 at 11:43:17AM +0200, Heiko Schocher wrote: >>> I have developed a device driver and use the sysFS to export some >>> registers to userspace. >> Uuuh, uggly. Don't do that. Device drivers are th

[PATCH 002/104] KVM: SMP: Add vcpu_id field in struct vcpu

2007-09-17 Thread Avi Kivity
From: Qing He <[EMAIL PROTECTED]> This patch adds a `vcpu_id' field in `struct vcpu', so we can differentiate BSP and APs without pointer comparison or arithmetic. Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + driver

[PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Avi Kivity
From: Nguyen Anh Quynh <[EMAIL PROTECTED]> *nopage() in kvm_main.c should only store the type of mmap() fault if the pointers are not NULL. This patch fixes the problem. Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |

[PATCH 003/104] KVM: Future-proof the exit information union ABI

2007-09-17 Thread Avi Kivity
Note that as the size of struct kvm_run is not part of the ABI, we can add things at the end. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index e6edca8..b9

[PATCH 000/104] KVM patch queue for the 2.6.24 merge window

2007-09-17 Thread Avi Kivity
The following represents the patch queue for the 2.6.24, posted here for review. Most of the patches have already been on kvm-devel (and all of them on kvm-commits), but some folding has occured to merge fixes and to make the whole series bisect-friendly. A few patches are likely to change in the

[PATCH 004/104] KVM: In-kernel string pio write support

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Add string pio write support to support some version of Windows. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 48 +--- 1 files ch

[PATCH 005/104] KVM: Trivial: /dev/kvm interface is no longer experimental.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> KVM interface is no longer experimental. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm.h b

[PATCH 007/104] KVM: Trivial: Make decode_register() static

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL P

[PATCH 006/104] KVM: Trivial: Remove unused struct cpu_user_regs declaration

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/x86_emulate.h b/drivers/kvm/x86_emulate.h inde

[PATCH 009/104] KVM: Trivial: Avoid hardware_disable predeclaration

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Don't pre-declare hardware_disable: shuffle the reboot hook down. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 40 +++- 1 files changed, 19

[PATCH 010/104] KVM: Trivial: Use standard CR0 flags macros from asm/cpu-features.h

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> The kernel now has asm/cpu-features.h: use those macros instead of inventing our own. Also spell out definition of CR0_RESEVED_BITS (no code change) and fix typo. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]

[PATCH 013/104] KVM: Trivial: Use standard BITMAP macros, open-code userspace-exposed header

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Creating one's own BITMAP macro seems suboptimal: if we use manual arithmetic in the one place exposed to userspace, we can use standard macros elsewhere. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- dr

[PATCH 017/104] KVM: x86 emulator: fix faulty check for two-byte opcode

2007-09-17 Thread Avi Kivity
Right now, the bug is harmless as we never emulate one-byte 0xb6 or 0xb7. But things may change. Noted by the mysterious Gabriel C. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x8

[PATCH 019/104] KVM: Hoist kvm_mmu_reload() out of the critical section

2007-09-17 Thread Avi Kivity
From: Shaohua Li <[EMAIL PROTECTED]> vmx_cpu_run doesn't handle error correctly and kvm_mmu_reload might sleep with mutex changes, so I move it above. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |8 1 files change

[PATCH 027/104] KVM: add hypercall nr to kvm_run

2007-09-17 Thread Avi Kivity
From: Jeff Dike <[EMAIL PROTECTED]> Add the hypercall number to kvm_run and initialize it. This changes the ABI, but as this particular ABI was unusable before this no users are affected. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/

[PATCH 022/104] KVM: Remove dead code in the cmpxchg instruction emulation

2007-09-17 Thread Avi Kivity
From: Aurelien Jarno <[EMAIL PROTECTED]> The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) let some dead code in the cmpxchg instruction emulation. Remove it. Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.

[PATCH 020/104] KVM: Move gfn_to_page out of kmap/unmap pairs

2007-09-17 Thread Avi Kivity
From: Shaohua Li <[EMAIL PROTECTED]> gfn_to_page might sleep with swap support. Move it out of the kmap calls. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 +- drivers/kvm/kvm_main.c|7 ++-- drivers/kvm/m

[PATCH 032/104] KVM: Remove three magic numbers

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> There are several places where hardcoded numbers are used in place of the easily-available constant, which is poor form. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |2 +- dr

[PATCH 030/104] KVM: fx_init() needs preemption disabled while it plays with the FPU state

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Now that kvm generally runs with preemption enabled, we need to protect the fpu intialization sequence. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |3 +++ 1 files changed, 3

[PATCH 041/104] KVM: Don't assign vcpu->cr3 if it's invalid: check first, set last

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> sSigned-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 2be

[PATCH 039/104] KVM: kvm_vm_ioctl_get_dirty_log restore "nothing dirty" optimization

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> kvm_vm_ioctl_get_dirty_log scans bitmap to see it it's all zero, but doesn't use that information. Avi says: Looks like it was used to guard kvm_mmu_slot_remove_write_access(); optimizing the case where the guest just leaves the screen alone

[PATCH 042/104] KVM: Cleanup mark_page_dirty

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> For some reason, mark_page_dirty open-codes __gfn_to_memslot(). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 24 +++- 1 files changed, 7 insertions(+), 17

[PATCH 040/104] KVM: VMX: Add cpu consistency check

2007-09-17 Thread Avi Kivity
From: Yang, Sheng <[EMAIL PROTECTED]> All the physical CPUs on the board should support the same VMX feature set. Add check_processor_compatibility to kvm_arch_ops for the consistency check. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/

[PATCH 038/104] KVM: Use alignment properties of vcpu to simplify FPU ops

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Now we use a kmem cache for allocating vcpus, we can get the 16-byte alignment required by fxsave & fxrstor instructions, and avoid manually aligning the buffer. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[PATCH 037/104] KVM: Use kmem cache for allocating vcpus

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Avi wants the allocations of vcpus centralized again. The easiest way is to add a "size" arg to kvm_init_arch, and expose the thus-prepared cache to the modules. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[PATCH 045/104] KVM: Fix defined but not used warning in drivers/kvm/vmx.c

2007-09-17 Thread Avi Kivity
From: Gabriel C <[EMAIL PROTECTED]> move_msr_up() is used only on X86_64 and generates a warning on !X86_64 Signed-off-by: Gabriel Craciunescu <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff

[PATCH 047/104] KVM: Remove unneeded kvm_dev_open and kvm_dev_release functions.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Devices don't need open or release functions. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 12 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/dri

[PATCH 033/104] KVM: SVM: de-containization

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> container_of is wonderful, but not casting at all is better. This patch changes svm.c's internal functions to pass "struct vcpu_svm" instead of "struct kvm_vcpu" and using container_of. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Ki

[PATCH 025/104] KVM: Dynamically allocate vcpus

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> This patch converts the vcpus array in "struct kvm" to a pointer array, and changes the "vcpu_create" and "vcpu_setup" hooks into one "vcpu_create" call which does the allocation and initialization of the vcpu (calling back into the kvm_vcpu_init core helper

[PATCH 049/104] KVM: Use kmem_cache_free for kmem_cache_zalloc'ed objects

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> We use kfree in svm.c and vmx.c, and this works, but it could break at any time. kfree() is supposed to match up with kmalloc(). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c |4 ++

[PATCH 048/104] KVM: Add and use pr_unimpl for standard formatting of unimplemented features

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> All guest-invokable printks should be ratelimited to prevent malicious guests from flooding logs. This is a start. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |8 d

[PATCH 051/104] KVM: Remove useless assignment

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> Line 1809 of kvm_main.c is useless, value is overwritten in line 1815: 1809 now = min(count, PAGE_SIZE / size); 1810 1811 if (!down) 1812 in_page = PAGE_SIZE - offset_in_page(address); 1813 else 1814

[PATCH 053/104] KVM: Clean up kvm_setup_pio()

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> Split kvm_setup_pio() into two functions, one to setup in/out pio (kvm_emulate_pio()) and one to setup ins/outs pio (kvm_emulate_pio_string()). Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm

[PATCH 034/104] KVM: SVM: internal function name cleanup

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Changes some svm.c internal function names: 1) io_adress -> io_address (de-germanify the spelling) 2) kvm_reput_irq -> reput_irq (it's not a generic kvm function) 3) kvm_do_inject_irq -> (it's not a generic kvm function) Signed-off-by: Rusty Russell <[EMA

[PATCH 058/104] KVM: x86 emulator: Implement 'jmp rel short' instruction (opcode 0xeb)

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c i

[PATCH 065/104] KVM: Define and use cr8 access functions

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This patch is to wrap APIC base register and CR8 operation which can provide a unique API for user level irqchip and kernel irqchip. This is a preparation of merging lapic/ioapic patch. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi K

[PATCH 069/104] KVM: Protect in-kernel pio using kvm->lock

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> pio operation and IRQ_LINE kvm_vm_ioctl is not kvm->lock protected. Add lock to same with IOAPIC MMIO operations. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |6 ++ 1

[PATCH 068/104] KVM: Emulate hlt in the kernel

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> By sleeping in the kernel when hlt is executed, we simplify the in-kernel guest interrupt path considerably. Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[PATCH 071/104] KVM: Bypass irq_pending get/set when using in kernel irqchip

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> vcpu->irq_pending is saved in get/set_sreg IOCTL, but when in-kernel local APIC is used, doing this may occasionally overwrite vcpu->apic to an invalid value, as in the vm restore path. Signed-off-by: Qing He <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 2

[PATCH 070/104] KVM: Add get/set irqchip ioctls for in-kernel PIC live migration support

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented in this patch. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Av

[PATCH 064/104] KVM: Add support for in-kernel PIC emulation

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/Makefile |2 +- drivers/kvm/i8259.c| 442 drivers/kvm/irq.c | 61 +++ dri

[PATCH 073/104] KVM: in-kernel LAPIC save and restore support

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This patch adds a new vcpu-based IOCTL to save and restore the local apic registers for a single vcpu. The kernel only copies the apic page as a whole, extraction of registers is left to userspace side. On restore, the APIC timer is restarted from the initial c

[PATCH 067/104] KVM: In-kernel I/O APIC model

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This allows in-kernel host-side device drivers to raise guest interrupts without going to userspace. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/Makefile |2 +- drivers/kvm/ioapic.c

[PATCH 072/104] KVM: in-kernel IOAPIC save and restore support

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch adds support for in-kernel ioapic save and restore (to and from userspace). It uses the same get/set_irqchip ioctl as in-kernel PIC. Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Ki

[PATCH 063/104] KVM: VMX: Split segments reload in vmx_load_host_state()

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> vmx_load_host_state() bundles fs, gs, ldt, and tss reloading into one in the hope that it is infrequent. With smp guests, fs reloading is frequent due to fs being used by threads. Unbundle the reloads so reduce expensive gs reloads. Signed-off-by: Laurent

[PATCH 060/104] KVM: VMX: allow rmode_tss_base() to work with >2G of guest memory

2007-09-17 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index cd999c0..b400668 100644 ---

[PATCH 077/104] KVM: Migrate lapic hrtimer when vcpu moves to another cpu

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This reduces overhead by accessing cachelines from the wrong node, as well as simplifying locking. [Qing: fix for inactive or expired one-shot timer] Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-b

[PATCH 066/104] KVM: Emulate local APIC in kernel

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Because lightweight exits (exits which don't involve userspace) are many times faster than heavyweight exits, it makes sense to emulate high usage devices in the kernel. The local APIC is one such device, especially for Windows and for SMP, so we add an APIC m

[PATCH 061/104] KVM: Support more memory slots

2007-09-17 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> Needed for mapping memory at 4GB. Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h

[PATCH 078/104] KVM: disable tpr/cr8 sync when in-kernel APIC is used

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index f4cbd4f..a25dfc9

[PATCH 075/104] KVM: VMX: Use shadow TPR/cr8 for 64-bits guests

2007-09-17 Thread Avi Kivity
From: Yang, Sheng <[EMAIL PROTECTED]> This patch enables TPR shadow of VMX on CR8 access. 64bit Windows using CR8 access TPR frequently. The TPR shadow can improve the performance of access TPR by not causing vmexit. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong

[PATCH 079/104] KVM: deliver PIC interrupt only to vcpu0

2007-09-17 Thread Avi Kivity
From: Qing He <[EMAIL PROTECTED]> This patch changes the PIC interrupts delivery. Now it is only delivered to vcpu0 when either condition is met (on vcpu0): 1. local APIC is hardware disabled 2. LVT0 is unmasked and configured to delivery mode ExtInt It fixes the 2x faster wall clock on x86_6

[PATCH 076/104] KVM: Keep track of missed timer irq injections

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> APIC timer IRQ is set every time when a certain period expires at host time, but the guest may be descheduled at that time and thus the irq be overwritten by later fire. This patch keep track of firing irq numbers and decrease only when the IRQ is injected to g

[PATCH 080/104] KVM: round robin for APIC lowest priority delivery mode

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/lapic.c | 33 - 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/drivers/kvm/k

[PATCH 089/104] KVM: MMU: Don't do GFP_NOWAIT allocations

2007-09-17 Thread Avi Kivity
Before preempt notifiers, kvm needed to allocate memory with GFP_NOWAIT so as not to have to enable preemption and take a heavyweight exit. On oom, we'd fall back to a GFP_KERNEL allocation. With preemption notifiers, we can do a GFP_KERNEL allocation, and perform the heavyweight exit only if the

[PATCH 087/104] KVM: Simplify memory allocation

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> The mutex->splinlock convertion alllows us to make some code simplifications. As we can keep the lock longer, we don't have to release it and then have to check if the environment has not been modified before re-taking it. We can remove kvm->busy and kvm->m

[PATCH 090/104] KVM: VMX: Move vm entry failure handling to the exit handler

2007-09-17 Thread Avi Kivity
This will help moving the main loop to subarch independent code. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 57a6055..713f78a 100644 ---

[PATCH 088/104] KVM: Rename kvm_arch_ops to kvm_x86_ops

2007-09-17 Thread Avi Kivity
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch just renames the current (misnamed) _arch namings to _x86 to ensure better readability when a real arch layer takes place. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/k

[PATCH 098/104] KVM: x86 emulator: imlpement jump conditional relative

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: jump conditional rel opcodes: 0x0f 0x80 - 0x0f 0x8f Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 61 ++

[PATCH 100/104] KVM: x86 emulator: lea

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction lea r16/r32, m opcode: 0x8d: Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |5 - 1 files changed, 4 insertions(+), 1 deleti

[PATCH 101/104] KVM: x86 emulator: jmp abs

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: jump absolute r/m opcode: 0xff /4 Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |6 ++ 1 files changed, 6 insertions(+), 0

[PATCH 102/104] KVM: x86 emulator: fix src, dst value initialization

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Some operand fetches are less than the machine word size and can result in stale bits if used together with operands of different sizes. Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_em

[PATCH 103/104] KVM: x86 emulator: popf

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: popf opcode: 0x9d Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) di

[PATCH 099/104] KVM: X86 emulator: jump conditional short

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of more jump conditional instructions jcc shortrel opcodes: 0x70 - 0x7f Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 15 +-- 1 fil

[PATCH 097/104] KVM: x86 emulator: sort opcodes into ascending order

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 99 ++--- 1 files changed, 49 insertions(+), 50 deletions(-) diff --git a/drivers/kvm

[PATCH 096/104] KVM: Improve emulation failure reporting

2007-09-17 Thread Avi Kivity
Report failed opcodes from all locations. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 16 drivers/kvm/svm.c |2 +- drivers/kvm/vmx.c |2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff

[PATCH 095/104] KVM: x86 emulator: pushf

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction pushf opcode: 0x9c Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 11 +-- 1 files changed, 9 insertions(+), 2 del

[PATCH 094/104] KVM: x86 emulator: call near

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction opcode: 0xe8 call (near) Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 22 +- 1 files changed, 21 in

[PATCH 093/104] KVM: x86 emulator: push imm8

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement the instruction push imm8 opcode: 0x6a Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 17 ++--- 1 files changed, 14 insertions(+), 3

[PATCH 091/104] KVM: Move main vcpu loop into subarch independent code

2007-09-17 Thread Avi Kivity
This simplifies adding new code as well as reducing overall code size. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |9 +++- drivers/kvm/kvm_main.c | 124 +- drivers/kvm/svm.c | 142 +---

[PATCH 092/104] KVM: VMX: Fix exit qualification width on i386

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> According to Intel Software Developer's Manual, Vol. 3B, Appendix H.4.2, exit qualification should be of natural width. However, current code uses u64 as the data type for this register, which occasionally introduces invalid value to VMExit handling logics. This

[PATCH 086/104] KVM: Hoist SVM's get_cs_db_l_bits into core code.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> SVM gets the DB and L bits for the cs by decoding the segment. This is in fact the completely generic code, so hoist it for kvm-lite to use. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm

[PATCH 085/104] KVM: Keep control regs in sync

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> We don't update the vcpu control registers in various places. We should do so. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |8 1 files changed, 4 insertions(+), 4 d

[PATCH 081/104] KVM: enable in-kernel APIC INIT/SIPI handling

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch enables INIT/SIPI handling using in-kernel APIC by introducing a ->mp_state field to emulate the SMP state transition. [avi: remove smp_processor_id() warning] Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Xin Li <[EMAIL PROTECTED]> Signe

[PATCH 083/104] KVM: Remove the unused invlpg member of struct kvm_arch_ops.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 - drivers/kvm/svm.c |6 -- 2 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kv

[PATCH 084/104] KVM: Clean up unloved invlpg emulation

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> invlpg shouldn't fetch the "src" address, since it may not be valid, however SVM's "solution" which neuters emulation of all group 7 instruction is horrible and breaks kvm-lite. The simplest fix is to put a special check in for invlpg. Signed-off-by: Rusty

[PATCH 082/104] KVM: Set the ET flag in CR0 after initializing FX

2007-09-17 Thread Avi Kivity
From: Amit Shah <[EMAIL PROTECTED]> This was missed when moving stuff around in fbc4f2e Fixes Solaris guests and bug #1773613 Signed-off-by: Amit Shah <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |1 + 1 files changed, 1 insertions(+), 0 delet

[PATCH 074/104] KVM: pending irq save/restore

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Add in kernel irqchip save/restore support for pending vectors. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 ++ drivers/kvm/kv

[PATCH 062/104] KVM: X86 emulator: fix 'push reg' writeback

2007-09-17 Thread Avi Kivity
Pointed out by Rusty Russell. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index cf895aa..7439b34 100644 --- a/drivers/kvm/x86_emulate.c ++

[PATCH 059/104] KVM: x86 emulator: implement 'push reg' (opcodes 0x50-0x57)

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x

[PATCH 052/104] KVM: Cleanup string I/O instruction emulation

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> Both vmx and svm decode the I/O instructions, and both botch the job, requiring the instruction prefixes to be fetched in order to completely decode the instruction. So, if we see a string I/O instruction, use the x86 emulator to decode it, as it already h

[PATCH 057/104] KVM: x86 emulator: implement 'jmp rel' instruction (opcode 0xe9)

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x

[PATCH 055/104] KVM: Communicate cr8 changes to userspace

2007-09-17 Thread Avi Kivity
From: Yang, Sheng <[EMAIL PROTECTED]> This allows running 64-bit Windows. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |3 ++- include/linux/kvm.h |1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/d

[PATCH 056/104] KVM: x86 emulator: implement 'and $imm, %{al|ax|eax}'

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction and al imm8 (opcode 0x24) and ax/eax imm16/imm32 (opcode 0x25) Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 21

[PATCH 050/104] KVM: VMX: Remove a duplicated ia32e mode vm entry control

2007-09-17 Thread Avi Kivity
From: Li, Xin B <[EMAIL PROTECTED]> Remove a duplicated ia32e mode VM Entry control definition and use the proper one. Signed-off-by: Xin Li <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |8 drivers/kvm/vmx.h |3 --- 2 files changed, 4 i

  1   2   3   4   5   6   >