[kvm-devel] [PATCH 3/3] propagate errors from ioport registering up to pci level

2008-04-16 Thread Glauber de Oliveira Costa
From: Glauber Costa <[EMAIL PROTECTED]> In situations like pci-passthrough, the ioport registering can fail, because another device is already present and in charge for an io address. The current state would crash qemu, but we can propagate the errors up to the pci layer, avoiding it. Signed-off-

[kvm-devel] [PATCH 1/3] don't exit on errors while registering ioports

2008-04-16 Thread Glauber de Oliveira Costa
From: Glauber Costa <[EMAIL PROTECTED]> Currently, any error in register_ioports make qemu abort through hw_error(). But there are situations in which those errors are not fatal. Just return < 0 instead Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/vl.c | 12 +++- 1 files c

[kvm-devel] [PATCH 2/3] map regions as registered

2008-04-16 Thread Glauber de Oliveira Costa
From: Glauber Costa <[EMAIL PROTECTED]> map which io registers where already sucessfuly registered Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/hw/pci.c |5 +++-- qemu/hw/pci.h |3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu/hw/pci.c b/qemu/hw/pci

[kvm-devel] [PATCH 0/3] Qemu crashes with pci passthrough

2008-04-16 Thread Glauber de Oliveira Costa
Hi, I've got some qemu crashes while trying to passthrough an ide device to a kvm guest. After some investigation, it turned out that register_ioport_{read/write} will abort on errors instead of returning a meaningful error. However, even if we do return an error, the asynchronous nature of pci

Re: [kvm-devel] [PATCH] kvm: move kvmclock initialization inside kvm_guest_init

2008-04-16 Thread Glauber de Oliveira Costa
Glauber Costa wrote: > It makes no sense for the clock initialization to be > hanging around in setup_32.c when we have a generic kvm guest > initialization function available. So, we move kvmclock_init() > inside such a function, leading to a cleaner code. > > Signed-off-by: Glauber Costa <[EMAIL

[kvm-devel] [PATCH] call write_guest_time as soon as we register the paravirt clock.

2008-02-21 Thread Glauber de Oliveira Costa
From: Glauber Costa <[EMAIL PROTECTED]> In situations, like, cpu hotplugging, a cpu can arrive later on the game and register its paravirt clock while everything else is already running, which will lead to breakage, since the time readings will return bogus values. To prevent this, we write syste

[kvm-devel] [PATCH 2/2] [PATCH] kvmclock implementation, the guest part.

2008-02-15 Thread Glauber de Oliveira Costa
lock driver. A clocksource implementation +Copyright (C) 2008 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 o

[kvm-devel] [PATCH 0/2 -v(many)] kvmclock

2008-02-15 Thread Glauber de Oliveira Costa
I think this version addresses avi's last comments. I'm not resending userspace since it is unchanged - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com

[kvm-devel] [PATCH 1/2] [PATCH] kvmclock - the host part.

2008-02-15 Thread Glauber de Oliveira Costa
. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 96 include/asm-x86/kvm_host.h |7 +++ include/asm-x86/kvm_para.h | 25 +++ include/linux/kvm.h|1 4 files changed, 128 inse

[kvm-devel] [PATCH 2/2] fill cpuid with clock information

2008-02-11 Thread Glauber de Oliveira Costa
we advertise the presence of our paravirt clock through cpuid, if it is defined in headers Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm

[kvm-devel] [PATCH 1/2] add kvm_para.h header to qemu-kvm-x86.c

2008-02-11 Thread Glauber de Oliveira Costa
With this, functions such as cpuid can make use of paravirt definitions Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 037abb1..4

[kvm-devel] [PATCH 0/2] kvm clock : userspace part

2008-02-11 Thread Glauber de Oliveira Costa
- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ kvm-devel mailing li

[kvm-devel] [PATCH 2/2] kvmclock implementation, the guest part.

2008-02-11 Thread Glauber de Oliveira Costa
lock driver. A clocksource implementation +Copyright (C) 2008 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 o

[kvm-devel] [PATCH 1/2] kvmclock - the host part.

2008-02-11 Thread Glauber de Oliveira Costa
. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 95 include/asm-x86/kvm_host.h |7 +++ include/asm-x86/kvm_para.h | 24 +++ include/linux/kvm.h|1 4 files changed, 126 inse

[kvm-devel] [PATCH 0/2] kvm clock - merge last comments

2008-02-11 Thread Glauber de Oliveira Costa
Here's a new version that merges last comments from avi. Also, it makes it available to x86_64 as well. Userspace part will follow shortly - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visu

[kvm-devel] Fwd: [PATCH] boot a linux kernel from non-ide device

2008-02-08 Thread Glauber de Oliveira Costa
Reposting to kvm-devel, since aliguori notices that I'm relying on non-upstream features of qemu -- Forwarded message -- From: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Date: Feb 8, 2008 5:05 AM Subject: [PATCH] boot a linux kernel from non-ide device To: [EMAI

Re: [kvm-devel] [PATCH 2/2] kvmclock implementation, the guest part.

2008-01-17 Thread Glauber de Oliveira Costa
Gerd Hoffmann wrote: >> +struct shared_info shared_info __attribute__((__aligned__(PAGE_SIZE))); > > leftover from old version? > >> +unsigned long kvm_get_wallclock(void) >> +{ >> +u32 wc_sec, wc_nsec; >> +u64 delta, last_tsc; >> +struct timespec ts; >> +int version, nsec, cpu =

Re: [kvm-devel] [PATCH 1/2] kvmclock - the host part.

2008-01-16 Thread Glauber de Oliveira Costa
Anthony Liguori wrote: > Glauber de Oliveira Costa wrote: >> This is the host part of kvm clocksource implementation. As it does >> not include clockevents, it is a fairly simple implementation. We >> only have to register a per-vcpu area, and start writting to it >> p

[kvm-devel] RFC: qemu acpi hotplug

2008-01-16 Thread Glauber de Oliveira Costa
ack magic that keeps changing its scroll is needed to really put the processors logically off/on after the notify (acpi code itself will never call cpu_up/down) Just let me tell you what you think. >From c45432c0cec8241dbcd6ed6cf38c953b17a6f826 Mon Sep 17 00:00:00 2001 From: Glauber de Oliv

[kvm-devel] [PATCH 2/2] kvmclock implementation, the guest part.

2008-01-16 Thread Glauber de Oliveira Costa
+/* KVM paravirtual clock driver. A clocksource implementation +Copyright (C) 2008 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Fo

[kvm-devel] [PATCH 1/2] kvmclock - the host part.

2008-01-16 Thread Glauber de Oliveira Costa
. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 98 +++- include/asm-x86/kvm_host.h |6 +++ include/asm-x86/kvm_para.h | 24 +++ include/linux/kvm.h|1 + 4 files changed, 128 inse

[kvm-devel] [PATCH 0/2] kvm clock - xen compatible by accident

2008-01-16 Thread Glauber de Oliveira Costa
I think I've misunderstood what you guys wanted to achieve with "xen compatible", but now I get it. It's something that's kvm specific, but happens to be able to communicate with xen guests, provided they do a kvm-aware initialization. So, here's the two patches for it, using two msrs and non-xe

[kvm-devel] [PATCH 2/2] fill cpuid with clocksource information

2008-01-15 Thread Glauber de Oliveira Costa
In this patch, we probe the host checking for clocksource capabilities. In case it is found, it is advertised to the guest through the appropriate cpuid mechanism Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |7 ++- 1 files changed, 6 inse

[kvm-devel] [PATCH 1/2] include kvm_para.h

2008-01-15 Thread Glauber de Oliveira Costa
have qemu-kvm to include kvm_para, allowing access to paravirt definitions Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index c

[kvm-devel] [PATCH 0/2] kvm clock - userspace with patches

2008-01-15 Thread Glauber de Oliveira Costa
userspace, with patches attached. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ _

[kvm-devel] [PATCH 3/3] [PATCH] kvmclock implementation, the guest part.

2008-01-15 Thread Glauber de Oliveira Costa
+/* KVM paravirtual clock driver. A clocksource implementation +Copyright (C) 2008 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Fo

[kvm-devel] [PATCH 2/3] kvmclock - the host part.

2008-01-15 Thread Glauber de Oliveira Costa
. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 79 +++- include/asm-x86/kvm_host.h |4 ++ include/asm-x86/kvm_para.h | 37 include/linux/kvm.h|1 + 4 files change

[kvm-devel] [PATCH 0/3] kvm clock - with the patches this time

2008-01-15 Thread Glauber de Oliveira Costa
The 3 patches should be attached now. userspace follows - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ __

[kvm-devel] [PATCH 1/3] put kvm_para.h include outside __KERNEL__

2008-01-15 Thread Glauber de Oliveira Costa
kvm_para.h potentially contains definitions that are to be used by kvm-userspace, so it should not be included inside the __KERNEL__ block. To protect its own data structures, kvm_para.h already includes its own __KERNEL__ block. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTEC

Re: [kvm-devel] [PATCH 0/3] kvm clock, next iteration

2008-01-15 Thread Glauber de Oliveira Costa
Avi Kivity wrote: > Glauber de Oliveira Costa wrote: >> Here's a new version, with some comments addressed. >> I'm using only one msr instead of two as avi sugested. >> >> Reason is that, following another comentary of avi, >> I'm doing kmap_atomi

[kvm-devel] [PATCH 0/2] kvm clock - userspace

2008-01-14 Thread Glauber de Oliveira Costa
Here are the two patches of the userspace part of the series. First patch is unchanged. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http:/

[kvm-devel] [PATCH 0/3] kvm clock, next iteration

2008-01-14 Thread Glauber de Oliveira Costa
Here's a new version, with some comments addressed. I'm using only one msr instead of two as avi sugested. Reason is that, following another comentary of avi, I'm doing kmap_atomic's instead of kvm_write. however, as all the information is part of the same page, both kmaps end up pointing to the s

Re: [kvm-devel] [PATCH 1/2] include kvm_para.h

2008-01-14 Thread Glauber de Oliveira Costa
Avi Kivity wrote: > Glauber de Oliveira Costa wrote: >> have qemu-kvm to include kvm_para, allowing access to paravirt >> definitions >> >> Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> >> --- >> qemu/qemu-kvm-x86.c |1 + >

Re: [kvm-devel] [PATCH 3/3] [PATCH] kvmclock implementation, the guest part.

2008-01-11 Thread Glauber de Oliveira Costa
Gerd Hoffmann wrote: > Hi, > >> diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c >> index d083ff5..7728b87 100644 >> --- a/arch/x86/xen/time.c >> +++ b/arch/x86/xen/time.c >> -static cycle_t xen_clocksource_read(void); >> +cycle_t xen_clocksource_read(void); > > Huh? You kill the static,

[kvm-devel] [PATCH 2/2] fill cpuid with clocksource information

2008-01-11 Thread Glauber de Oliveira Costa
In this patch, we probe the host checking for clocksource capabilities. In case it is found, it is advertised to the guest through the appropriate cpuid mechanism Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |6 +- 1 files changed, 5 inse

[kvm-devel] [PATCH 1/2] include kvm_para.h

2008-01-11 Thread Glauber de Oliveira Costa
have qemu-kvm to include kvm_para, allowing access to paravirt definitions Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index c

[kvm-devel] [PATCH 0/2] KVM clock - userspace part

2008-01-11 Thread Glauber de Oliveira Costa
These are pretty straightforward. Just probe the host, and advertise the guest - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubl

[kvm-devel] [PATCH 3/3] [PATCH] kvmclock implementation, the guest part.

2008-01-11 Thread Glauber de Oliveira Costa
/kernel/kvmclock.c @@ -0,0 +1,160 @@ +/* KVM paravirtual clock driver. A clocksource implementation +Copyright (C) 2007 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as

[kvm-devel] [PATCH 2/3] [PATCH] kvmclock - the host part.

2008-01-11 Thread Glauber de Oliveira Costa
. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 64 +++- include/asm-x86/kvm_host.h |5 +++ include/asm-x86/kvm_para.h |5 +++ include/linux/kvm.h|1 + 4 files changed, 74 insertions

[kvm-devel] [PATCH 1/3] put kvm_para.h include outside __KERNEL__

2008-01-11 Thread Glauber de Oliveira Costa
kvm_para.h potentially contains definitions that are to be used by kvm-userspace, so it should not be included inside the __KERNEL__ block. To protect its own data structures, kvm_para.h already includes its own __KERNEL__ block. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTEC

[kvm-devel] [PATCH 0/3] KVM clock, new iteration

2008-01-11 Thread Glauber de Oliveira Costa
Hi folks, A lot of time has been elapsed since I last sent a version of kvm clock, with a lot of things in the middle, including my vacations and a nasty bug in the clock itself ;-) Here it is a new version. I'm following avi's last suggestion of using an msr to make it more migration-proof. If i

Re: [kvm-devel] [PATCH/RFC 0/2] CPU hotplug virtio driver

2008-01-09 Thread Glauber de Oliveira Costa
Christian Borntraeger wrote: > Am Mittwoch, 9. Januar 2008 schrieb Glauber de Oliveira Costa: >> I'm sending a first draft of my proposed cpu hotplug driver for kvm/virtio >> The first patch is the kernel module, while the second, the userspace pci > device. > > I

Re: [kvm-devel] [PATCH/RFC 0/2] CPU hotplug virtio driver

2008-01-09 Thread Glauber de Oliveira Costa
Avi Kivity wrote: > Glauber de Oliveira Costa wrote: >> I'm sending a first draft of my proposed cpu hotplug driver for >> kvm/virtio >> The first patch is the kernel module, while the second, the userspace >> pci device. >> >> The host boots with the

[kvm-devel] [PATCH] cpu hotplug driver: userspace back end

2008-01-09 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/Makefile.target |2 +- qemu/hw/pc.c |4 +- qemu/hw/pc.h |3 + qemu/hw/virtio-hotplug.c | 111 ++ qemu/monitor.c | 11 +

[kvm-devel] [PATCH] cpu hotplug driver: kernel module

2008-01-09 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/virtio/Kconfig |6 + drivers/virtio/Makefile |1 + drivers/virtio/virtio_cpu.c | 226 +++ drivers/virtio/virtio_pci.c |1 + kernel/cpu.c

[kvm-devel] [PATCH/RFC 0/2] CPU hotplug virtio driver

2008-01-09 Thread Glauber de Oliveira Costa
I'm sending a first draft of my proposed cpu hotplug driver for kvm/virtio The first patch is the kernel module, while the second, the userspace pci device. The host boots with the maximum cpus it should ever use, through the -smp parameter. Due to real machine constraints (which qemu copies), i

Re: [kvm-devel] Guest kernel hangs in smp kvm for older kernels prior to tsc sync cleanup

2007-12-20 Thread Glauber de Oliveira Costa
On Dec 19, 2007 1:41 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: > Glauber de Oliveira Costa wrote: > > Changes in rate does not sound good. It's possibly what's screwing up > > my paravirt clock implementation in smp. > > > > You should renew the time

Re: [kvm-devel] Guest kernel hangs in smp kvm for older kernels prior to tsc sync cleanup

2007-12-19 Thread Glauber de Oliveira Costa
es. Now if the vcpu that started running later probes the time first, we'll se the time going backwards. A constant tsc rate is the only way around my limited mind sees around the problem (besides, obviously, _not_ making the system time per-vcpu). -- Glauber de Oliveira Costa. "Free as

Re: [kvm-devel] [PATCH] fix -kernel option

2007-12-10 Thread Glauber de Oliveira Costa
Dor Laor wrote: > Glauber de Oliveira Costa wrote: >> >> Currently, the -kernel option is not working. >> >> Reason is, because we're registering chunks for regions 0-0xa and >> 0x10-ram_size, the phys_ram_addr + PA is broken. >> The real fix sh

[kvm-devel] [PATCH] fix -kernel option

2007-12-07 Thread Glauber de Oliveira Costa
c - the beginning of extended memory - makes it work again Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/hw/pc.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index 6c71b09..e4a5f2d 100644 --- a/q

Re: [kvm-devel] [PATCH 24/24] make vsmp a paravirt client

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andi Kleen escreveu: >> The vsmp_64.c file is now compiled unconditionally, according to which >> me and kiran agreed to. The detection code is always run, but will only >> trigger when a suitable box is found. Accordingly, the paravirt structs >> are

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dong, Eddie escreveu: >> +static void kvm_write_guest_time(struct kvm_vcpu *vcpu) +{ >> +struct timespec ts; >> +int r; >> + >> +if (!vcpu->clock_gpa) >> +return; >> + >> +/* Updates version to the next odd number, indicatin

Re: [kvm-devel] [PATCH 0/24] paravirt_ops for unified x86 - that's me again!

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amit Shah escreveu: > On Saturday 10 November 2007 00:12:41 Glauber de Oliveira Costa wrote: >> Hey folks, >> >> Here's a new spin of the pvops64 patch series. >> We didn't get that many comments from the last tim

Re: [kvm-devel] [PATCH 24/24] make vsmp a paravirt client

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andi Kleen escreveu: > On Fri, Nov 09, 2007 at 04:43:05PM -0200, Glauber de Oliveira Costa wrote: >> This patch makes vsmp a paravirt client. It now uses the whole >> infrastructure provided by pvops. When we detect we're runni

Re: [kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-13 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Avi Kivity escreveu: > Glauber de Oliveira Costa wrote: >> This is the host part of kvm clocksource implementation. As it does >> not include clockevents, it is a fairly simple implementation. We >> only have to register a per

Re: [kvm-devel] [PATCH 5/24] smp x86 consolidation

2007-11-09 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Glauber de Oliveira Costa wrote: >> This patch consolidates part of the pieces of smp for both architectures. >> (i386 and x86_64). It makes part the calls go through smp_ops, and shares >> code f

Re: [kvm-devel] [PATCH 1/24] mm/sparse-vmemmap.c: make sure init_mm is included

2007-11-09 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Glauber de Oliveira Costa wrote: >> mm/sparse-vmemmap.c uses init_mm in some places. However, it is not >> present in any of the headers currently included in the file. >> >> init_mm is defin

[kvm-devel] [PATCH 6/24] Add debugreg/load_rsp native hooks

2007-11-09 Thread Glauber de Oliveira Costa
This patch adds native hooks for debugreg handling functions, and for the native load_rsp0 function. The later also have its call sites patched. There's some room for consolidation in the processor*.h headers, and it is done, for paravirt related functions Signed-off-by: Glauber de Oliveira

[kvm-devel] [PATCH 24/24] make vsmp a paravirt client

2007-11-09 Thread Glauber de Oliveira Costa
This patch makes vsmp a paravirt client. It now uses the whole infrastructure provided by pvops. When we detect we're running a vsmp box, we change the irq-related paravirt operations (and so, it have to happen quite early), and the patching function Signed-off-by: Glauber de Oliveira

[kvm-devel] [PATCH 20/24] tweak io_64.h for paravirt.

2007-11-09 Thread Glauber de Oliveira Costa
We need something here because we can't call in and out instructions directly. However, we have to be careful, because no indirections are allowed in misc_64.c , and paravirt_ops is a kind of one. So just call it directly there Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]

[kvm-devel] [PATCH 18/24] export cpu_gdt_descr

2007-11-09 Thread Glauber de Oliveira Costa
With paravirualization, hypervisors needs to handle the gdt, that was right to this point only used at very early inialization code. Hypervisors (lguest being the current case) are commonly modules, so make it an export Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-

[kvm-devel] [PATCH 16/24] add native functions for descriptors handling

2007-11-09 Thread Glauber de Oliveira Costa
to be patched. We also patch call sites that now needs a typecast. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- include/asm-x86/desc.h | 59 +++

[kvm-devel] [PATCH 21/24] native versions for page table entries values

2007-11-09 Thread Glauber de Oliveira Costa
This patch turns the page operations (set and make a page table) into native_ versions. The operations itself will be later overriden by paravirt. It uses unsigned long long for consistency with 32-bit. So we have to fix fault_64.c to get rid of warnings. Signed-off-by: Glauber de Oliveira Costa

[kvm-devel] [PATCH 22/24] prepare x86_64 architecture initialization for paravirt

2007-11-09 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel/e820_64.c |9 +++-- arch/x86/kernel/setup_64.c | 28 +++- inclu

[kvm-devel] [PATCH 17/24] This patch add provisions for time related functions so they

2007-11-09 Thread Glauber de Oliveira Costa
by i386. Paravirt guests can set a function to do their own initialization this way. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kerne

[kvm-devel] [PATCH 19/24] turn priviled operation into a macro in head_64.S

2007-11-09 Thread Glauber de Oliveira Costa
under paravirt, read cr2 cannot be issued directly anymore. So wrap it in a macro, defined to the operation itself in case paravirt is off, but to something else if we have paravirt in the game Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt &

[kvm-devel] [PATCH 15/24] native versions for set pagetables

2007-11-09 Thread Glauber de Oliveira Costa
are moved to below the #ifdef CONFIG_PARAVIRT site, as they are users of the newly defined set_* macros. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- include/as

[kvm-devel] [PATCH 5/24] smp x86 consolidation

2007-11-09 Thread Glauber de Oliveira Costa
ff-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel/Makefile_32|2 +- arch/x86/kernel/Makefile_64|2 +- arch/x86/kerne

[kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-09 Thread Glauber de Oliveira Costa
This patch goes one step forward in consolidating the msr.h header. It shares code between i386 and x86_64, instead of duplicating the code for tsc reading, msr reading/writing, etc. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL

[kvm-devel] [PATCH 13/24] report ring kernel is running without paravirt

2007-11-09 Thread Glauber de Oliveira Costa
When paravirtualization is disabled, the kernel is always running at ring 0. So report it in the appropriate macro Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --

[kvm-devel] [PATCH 14/24] export math_state_restore

2007-11-09 Thread Glauber de Oliveira Costa
Export math_state_restore symbol, so it can be used for hypervisors. They are commonly loaded as modules (lguest being an example). Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[

[kvm-devel] [PATCH 3/24] consolidate spinlock.h

2007-11-09 Thread Glauber de Oliveira Costa
The cli and sti instructions need to be replaced by paravirt hooks. For the i386 architecture, this is already done. The code requirements aren't much different from x86_64 POV, so this part is consolidated in the common header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]

[kvm-devel] [PATCH 11/24] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-09 Thread Glauber de Oliveira Costa
This patch introduces, and patch callers when needed, native versions for read/write_crX functions, clts and wbinvd. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 8/24] consolidate system.h

2007-11-09 Thread Glauber de Oliveira Costa
This patch consolidates system.h header. For i386, it adds functions read/write_cr8 that ain't really needed, but will also not hurt. If they are used somewhere in i386 code, there's a bug anyway, and should be fixed. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]&g

[kvm-devel] [PATCH 12/24] provide native irq initialization function

2007-11-09 Thread Glauber de Oliveira Costa
: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel/i8259_64.c |7 +-- include/asm-x86/irq_64.h |3 +++ 2 files changed, 8 insertions(+), 2 deletion

[kvm-devel] [PATCH 9/24] Wipe out traditional opt from x86_64 Makefile

2007-11-09 Thread Glauber de Oliveira Costa
4 box without -traditional. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel/Makefile_64 |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff

[kvm-devel] [PATCH 10/24] paravirt hooks at entry functions.

2007-11-09 Thread Glauber de Oliveira Costa
Those are the hooks needed for paravirt at entry_64.S In general, they follow the way of i386. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel

[kvm-devel] [PATCH 4/24] tlb functions consolidation

2007-11-09 Thread Glauber de Oliveira Costa
This patch consolidates part of the tlb handling functions for the x86 architecture. In this approach, we start by the parts actually used for paravirt in i386. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acke

[kvm-devel] [PATCH 1/24] mm/sparse-vmemmap.c: make sure init_mm is included

2007-11-09 Thread Glauber de Oliveira Costa
pmd_populate_kernel() are usually macros that expand to simpler variants that does not use the first parameter at all. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- m

[kvm-devel] [PATCH 0/24] paravirt_ops for unified x86 - that's me again!

2007-11-09 Thread Glauber de Oliveira Costa
Hey folks, Here's a new spin of the pvops64 patch series. We didn't get that many comments from the last time, so it should be probably almost ready to get in. Heya! >From the last version, the most notable changes are: * consolidation of system.h, merging jeremy's comments about ordering conce

[kvm-devel] [PATCH 2/24] irqflags consolidation

2007-11-09 Thread Glauber de Oliveira Costa
, irq_enable_sysexit, has a very specific i386 naming, and its name is then changed to a more general one. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/ker

[kvm-devel] [PATCH 2/3] kvmclock - the host part.

2007-11-08 Thread Glauber de Oliveira Costa
This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drive

[kvm-devel] [PATCH 3/3] kvmclock implementation, the guest part.

2007-11-08 Thread Glauber de Oliveira Costa
@@ -0,0 +1,171 @@ +/* KVM paravirtual clock driver. A clocksource implementation +Copyright (C) 2007 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +th

[kvm-devel] [PATCH 1/3] include files for kvmclock

2007-11-08 Thread Glauber de Oliveira Costa
This patch introduces the include files for kvm clock. They'll be needed for both guest and host part. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/kvm_para.h | 25 + include/linux/kvm.h|1 + include/linux

[kvm-devel] [PATCH 0/3] Kvm clocksource, new spin

2007-11-08 Thread Glauber de Oliveira Costa
Hi folks, Here's a new spin of the clocksource implementation. In this new version: * followed avi's suggestion of: - letting the cpu itself register its memory area. - using a gfn instead of a phys addr as a parameter, to be sure we can cover the whole memory area - write guest time at

Re: [kvm-devel] kvmclock - the host part.

2007-11-07 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Avi Kivity escreveu: > Glauber de Oliveira Costa wrote: >> This is the host part of kvm clocksource implementation. As it does >> not include clockevents, it is a fairly simple implementation. We >> only have to register a per

Re: [kvm-devel] include files for kvmclock

2007-11-07 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Akio Takebe escreveu: > Hi, Glauber > > This is interesting facility. :-) > >> +#define KVM_HCALL_REGISTER_CLOCK1 >> + >> +union kvm_hv_clock { >> +struct { >> +u64 tsc_mult; >> +u64 now_ns; >> +/* That's t

Re: [kvm-devel] include files for kvmclock

2007-11-07 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Avi Kivity wrote: >> Glauber de Oliveira Costa wrote: >> >>>> +union kvm_hv_clock { >>>> + struct { >>>> + u64 tsc_mult; >>>> +

Re: [kvm-devel] include files for kvmclock

2007-11-06 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Glauber de Oliveira Costa wrote: >> This patch introduces the include files for kvm clock. >> They'll be needed for both guest and host part. >> >> Signed-off-by: Glauber de

Re: [kvm-devel] include files for kvmclock

2007-11-06 Thread Glauber de Oliveira Costa
On 11/6/07, Glauber de Oliveira Costa <[EMAIL PROTECTED]> wrote: > This patch introduces the include files for kvm clock. > They'll be needed for both guest and host part. And of course, this was my test files by mistake ;-) Oh god... ;-) Patches aren't numbered but this on

[kvm-devel] kvmclock implementation, the guest part.

2007-11-06 Thread Glauber de Oliveira Costa
+/* KVM paravirtual clock driver. A clocksource implementation +Copyright (C) 2007 Glauber de Oliveira Costa, Red Hat Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software

[kvm-devel] include files for kvmclock

2007-11-06 Thread Glauber de Oliveira Costa
This patch introduces the include files for kvm clock. They'll be needed for both guest and host part. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- include/asm-x86/kvm_para.h | 23 +++ include/linux/kvm.h|1 + include/linux

[kvm-devel] kvmclock - the host part.

2007-11-06 Thread Glauber de Oliveira Costa
This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- drivers/kvm

[kvm-devel] KVM paravirt clocksource - Take 3 out of

2007-11-06 Thread Glauber de Oliveira Costa
This is a new version of kvm paravirt clock implementation This time, the clockevents part was completely wiped out. Not that I'm dropping it: As said in my last message, I'm starting to take the path of having a specialized irq chip, as for avi-san's suggestion. However, last iteration made cloc

Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Keir Fraser escreveu: > On 1/11/07 15:30, "Jeremy Fitzhardinge" <[EMAIL PROTECTED]> wrote: > >> Glauber de Oliveira Costa wrote: >>> I in fact have seen bugs with mixed reads and writes to the same cr, >>&

Re: [kvm-devel] [PATCH 11/16] turn priviled operation into a macro in head_64.S

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Glauber de Oliveira Costa wrote: >> under paravirt, read cr2 cannot be issued directly anymore. >> So wrap it in a macro, defined to the operation itself in case >> paravirt is off, but to some

Re: [kvm-devel] [PATCH 3/16] read/write_crX, clts and wbinvd for 64-bit paravirt

2007-11-01 Thread Glauber de Oliveira Costa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Fitzhardinge escreveu: > Glauber de Oliveira Costa wrote: >> This patch introduces, and patch callers when needed, native >> versions for read/write_crX functions, clts and wbinvd. >> >> Signed-off-by: Glaube

[kvm-devel] [PATCH 16/16] make vsmp a paravirt client

2007-10-31 Thread Glauber de Oliveira Costa
This patch makes vsmp a paravirt client. It now uses the whole infrastructure provided by pvops. When we detect we're running a vsmp box, we change the irq-related paravirt operations (and so, it have to happen quite early), and the patching function Signed-off-by: Glauber de Oliveira

[kvm-devel] [PATCH 14/16] prepare x86_64 architecture initialization for paravirt

2007-10-31 Thread Glauber de Oliveira Costa
Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> Acked-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]> --- arch/x86/kernel/e820_64.c |9 +++-- arch/x86/kernel/setup_64.c | 28 +++- inclu

[kvm-devel] [PATCH 12/16] tweak io_64.h for paravirt.

2007-10-31 Thread Glauber de Oliveira Costa
We need something here because we can't call in and out instructions directly. However, we have to be careful, because no indirections are allowed in misc_64.c , and paravirt_ops is a kind of one. So just call it directly there Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]

  1   2   >