RE: Do I set up separate bridges for each guest?

2009-10-21 Thread Thomas Besser
Neil Aggarwal wrote: Dor: The simplest thing is to use a single bridge for all - The physical nic should be part of it and supply the outside world connection. The physical nic doesn't need an IP and the bridge should own it. All vms can use this bridge. I want to assign a static IP to

[PATCH] Make sure get_user_desc() doesn't sign extend.

2009-10-21 Thread Chris Lalancette
The current implementation of get_user_desc() sign extends the return value because of integer promotion rules. For the most part, this doesn't matter, because the top bit of base2 is usually 0. If, however, that bit is 1, then the entire value will be 0x... which is probably not what the

Re: [ANNOUNCE] Sheepdog: Distributed Storage System for KVM

2009-10-21 Thread Nikolai K. Bochev
Hello, I am getting the following error trying to compile sheepdog on Ubuntu 9.10 ( 2.6.31-14 x64 ) : cd shepherd; make make[1]: Entering directory `/home/shiny/Packages/sheepdog-2009102101/shepherd' cc -c -g -O2 -Wall -Wstrict-prototypes -I../include -D_GNU_SOURCE shepherd.c -o shepherd.o

RE: [ANNOUNCE] Sheepdog: Distributed Storage System for KVM

2009-10-21 Thread Dietmar Maurer
Quite interesting. But would it be possible to use corosync for the cluster communication? The point is that we need corosync anyways for pacemaker, it is written in C (high performance) and seem to implement the feature you need? -Original Message- From: kvm-ow...@vger.kernel.org

Re: [PATCH] Make sure get_user_desc() doesn't sign extend.

2009-10-21 Thread Paolo Bonzini
On 10/21/2009 09:40 AM, Chris Lalancette wrote: The current implementation of get_user_desc() sign extends the return value because of integer promotion rules. For the most part, this doesn't matter, because the top bit of base2 is usually 0. If, however, that bit is 1, then the entire value

Re: [Autotest] [PATCH] Test 802.1Q vlan of nic

2009-10-21 Thread Amos Kong
On Mon, Oct 19, 2009 at 10:22:21AM +0200, Dor Laor wrote: On 10/15/2009 11:48 AM, Amos Kong wrote: Test 802.1Q vlan of nic, config it by vconfig command. 1) Create two VMs 2) Setup guests in different vlan by vconfig and test communication by ping using hard-coded ip address

Re: [Autotest] [PATCH] Test 802.1Q vlan of nic

2009-10-21 Thread Amos Kong
On Tue, Oct 20, 2009 at 09:19:50AM -0400, Michael Goldish wrote: See comments below. Hi all, Thanks for your reply. - Dor Laor dl...@redhat.com wrote: On 10/15/2009 11:48 AM, Amos Kong wrote: Test 802.1Q vlan of nic, config it by vconfig command. 1) Create two VMs 2)

RE: [PATCH 2/2] kvm-kmod: Document the build process

2009-10-21 Thread Dietmar Maurer
+ Before the kvm module can be built, the linux submodule must be initialised + and populated. The required sequence of commands is + + git submodule init + git submodule update + ./configure + make sync + make + + Notice that you can also specify an existing Linux tree for the

[no subject]

2009-10-21 Thread Junaid Arshad
subscribe kvm -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: kvm88 compile errors with 2.6.31.1

2009-10-21 Thread Jorge Lucángeli Obes
On Wed, Oct 21, 2009 at 9:08 AM, Benjamin Budts mail...@gigaspeeds.be wrote: Hi, a one-off question, when I compile kvm88 with kernel 2.6.31.1 I get the following make errors : In file included from /tmp/tgz/kvm-88/kvm/kernel/x86/mmutrace.h:220,                from

Re: [Autotest] [PATCH] Test 802.1Q vlan of nic

2009-10-21 Thread Michael Goldish
- Amos Kong ak...@redhat.com wrote: On Tue, Oct 20, 2009 at 09:19:50AM -0400, Michael Goldish wrote: See comments below. Hi all, Thanks for your reply. - Dor Laor dl...@redhat.com wrote: On 10/15/2009 11:48 AM, Amos Kong wrote: Test 802.1Q vlan of nic, config it

Re: kvm88 compile errors with 2.6.31.1

2009-10-21 Thread Michael Tokarev
Jorge Lucángeli Obes wrote: [] See this thread: http://www.mail-archive.com/kvm@vger.kernel.org/msg22775.html I believe the patches have already been applied, but there have not been any releases since then. qemu-kvm-0.11.0 is out for a long time. /mjt -- To unsubscribe from this list: send

Re: [PATCH 3/5] Nested VMX patch 3 implements vmptrld and vmptrst

2009-10-21 Thread Orit Wasserman
Gleb Natapov g...@redhat.com wrote on 19/10/2009 13:17:41: From: Gleb Natapov g...@redhat.com To: Orit Wasserman/Haifa/i...@ibmil Cc: kvm@vger.kernel.org, Ben-Ami Yassour1/Haifa/i...@ibmil, Abel Gordon/ Haifa/i...@ibmil, Muli Ben-Yehuda/Haifa/i...@ibmil, aligu...@us.ibm.com,

Re: [PATCH 3/5] Nested VMX patch 3 implements vmptrld and vmptrst

2009-10-21 Thread Orit Wasserman
Gleb Natapov g...@redhat.com wrote on 19/10/2009 14:59:53: From: Gleb Natapov g...@redhat.com To: Orit Wasserman/Haifa/i...@ibmil Cc: kvm@vger.kernel.org, Ben-Ami Yassour1/Haifa/i...@ibmil, Abel Gordon/ Haifa/i...@ibmil, Muli Ben-Yehuda/Haifa/i...@ibmil, aligu...@us.ibm.com,

Re: [PATCH 4/5] Nested VMX patch 4 implements vmread and vmwrite

2009-10-21 Thread Orit Wasserman
Gleb Natapov g...@redhat.com wrote on 19/10/2009 15:17:20: From: Gleb Natapov g...@redhat.com To: Orit Wasserman/Haifa/i...@ibmil Cc: kvm@vger.kernel.org, Ben-Ami Yassour1/Haifa/i...@ibmil, Abel Gordon/ Haifa/i...@ibmil, Muli Ben-Yehuda/Haifa/i...@ibmil, aligu...@us.ibm.com,

Re: [Autotest] [PATCH] Test 802.1Q vlan of nic

2009-10-21 Thread Uri Lublin
On 10/21/2009 12:37 PM, Amos Kong wrote: On Tue, Oct 20, 2009 at 09:19:50AM -0400, Michael Goldish wrote: - Dor Laordl...@redhat.com wrote: On 10/15/2009 11:48 AM, Amos Kong wrote: For the sake of safety maybe we should start both VMs with -snapshot. Dor, what do you think? Is it safe

[PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-21 Thread Alexander Graf
From: Arnd Bergmann a...@arndb.de With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer interpreted correctly, we thus need Arnd's patch to implement a compat

Re: [PATCH 2/2] kvm-kmod: Document the build process

2009-10-21 Thread Wolfgang Mauerer
Hio, Dietmar Maurer wrote: + Before the kvm module can be built, the linux submodule must be initialised + and populated. The required sequence of commands is + + git submodule init + git submodule update + ./configure + make sync + make + + Notice that you can also specify an

[KVM PATCH 0/2] irqfd enhancements

2009-10-21 Thread Gregory Haskins
(Applies to kvm.git/master:11b06403) The following patches are cleanups/enhancements for IRQFD now that we have lockless interrupt injection. For more details, please see the patch headers. These patches pass checkpatch, and are fully tested. Please consider for merging. They are an

[KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd

2009-10-21 Thread Gregory Haskins
IRQFD currently uses a deferred workqueue item to execute the injection operation. It was originally designed this way because kvm_set_irq() required the caller to hold the irq_lock mutex, and the eventfd callback is invoked from within a non-preemptible critical section. With the advent of

[KVM PATCH 2/2] KVM: Remove unecessary irqfd-cleanup-wq

2009-10-21 Thread Gregory Haskins
We originally created the irqfd-cleanup-wq so that we could safely implement a shutdown that blocked on outstanding injection-requests that may have been in flight. We couldn't reuse something like kevent to shutdown since the injection path was also using kevent and that may have caused a

Re: Nested VMX support v3

2009-10-21 Thread Orit Wasserman
Avi Kivity a...@redhat.com wrote on 20/10/2009 05:30:34: From: Avi Kivity a...@redhat.com To: Orit Wasserman/Haifa/i...@ibmil Cc: kvm@vger.kernel.org, Ben-Ami Yassour1/Haifa/i...@ibmil, Abel Gordon/ Haifa/i...@ibmil, Muli Ben-Yehuda/Haifa/i...@ibmil, aligu...@us.ibm.com,

[PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5

2009-10-21 Thread Alexander Graf
KVM for PowerPC only supports embedded cores at the moment. While it makes sense to virtualize on small machines, it's even more fun to do so on big boxes. So I figured we need KVM for PowerPC64 as well. This patchset implements KVM support for Book3s_64 hosts and guest support for Book3s_64 and

[PATCH 06/27] Add Book3s_64 intercept helpers

2009-10-21 Thread Alexander Graf
We need to intercept interrupt vectors. To do that, let's add a file we can always include which only activates the intercepts when we have then configured. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_64_asm.h | 58 ++ 1 files

[PATCH 09/27] Add interrupt handling code

2009-10-21 Thread Alexander Graf
Getting from host state to the guest is only half the story. We also need to return to our host context and handle whatever happened to get us out of the guest. On PowerPC every guest exit is an interrupt. So all we need to do is trap the host's interrupt handlers and get into our #VMEXIT code to

[PATCH 01/27] Move dirty logging code to sub-arch

2009-10-21 Thread Alexander Graf
PowerPC code handles dirty logging in the generic parts atm. While this is great for return -ENOTSUPP, we need to be rather target specific when actually implementing it. So let's split it to implementation specific code, so we can implement it for book3s. Signed-off-by: Alexander Graf

[PATCH 10/27] Add book3s.c

2009-10-21 Thread Alexander Graf
This adds the book3s core handling file. Here everything that is generic to desktop PowerPC cores is handled, including interrupt injections, MSR settings, etc. It basically takes over the same role as booke.c for embedded PowerPCs. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: -

[PATCH 26/27] Use Little Endian for Dirty Bitmap

2009-10-21 Thread Alexander Graf
We currently use host endian long types to store information in the dirty bitmap. This works reasonably well on Little Endian targets, because the u32 after the first contains the next 32 bits. On Big Endian this breaks completely though, forcing us to be inventive here. So Ben suggested to

[PATCH 25/27] Fix trace.h

2009-10-21 Thread Alexander Graf
It looks like the variable pc is defined. At least the current code always failed on me stating that pc is already defined somewhere else. Let's use _pc instead, because that doesn't collide. Is this the right approach? Does it break on 440 too? If not, why not? Signed-off-by: Alexander Graf

[PATCH 21/27] Export KVM symbols for module

2009-10-21 Thread Alexander Graf
To be able to keep KVM as module, we need to export the SLB trampoline addresses to the module, so it knows where to jump to. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_exports.c | 24 1 files changed, 24 insertions(+), 0 deletions(-)

[PATCH 03/27] Add Book3s definitions

2009-10-21 Thread Alexander Graf
We need quite a bunch of new constants for KVM on Book3s, so let's define them now. These constants will be used in later patches. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4 - remove old kernel compat code --- arch/powerpc/include/asm/kvm_asm.h | 39

[PATCH 22/27] Add fields to PACA

2009-10-21 Thread Alexander Graf
For KVM we need to store some information in the PACA, so we need to extend it. This patch adds KVM SLB shadow related entries to the PACA and a field that indicates if we're inside a guest. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/paca.h |9 + 1

[PATCH 20/27] Split init_new_context and destroy_context

2009-10-21 Thread Alexander Graf
For KVM we need to allocate a new context id, but don't really care about all the mm context around it. So let's split the alloc and destroy functions for the context id, so we can grab one without allocating an mm context. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c

2009-10-21 Thread Alexander Graf
We need to access some VCPU fields from assembly code. In order to get the proper offsets, we have to define them in asm-offsets.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff

[PATCH 15/27] Add mfdec emulation

2009-10-21 Thread Alexander Graf
We support setting the DEC to a certain value right now. Doing that basically triggers the CPU local timer. But there's also an mfdec command that enabled the OS to read the decrementor. This is required at least by all desktop and server PowerPC Linux kernels. It can't really hurt to allow

[PATCH 17/27] Make head_64.S aware of KVM real mode code

2009-10-21 Thread Alexander Graf
We need to run some KVM trampoline code in real mode. Unfortunately, real mode only covers 8MB on Cell so we need to squeeze ourselves as low as possible. Also, we need to trap interrupts to get us back from guest state to host state without telling Linux about it. This patch adds interrupt

[PATCH 13/27] Add book3s_32 guest MMU

2009-10-21 Thread Alexander Graf
This patch adds an implementation for a G3/G4 MMU, so we can run G3 and G4 guests in KVM on Book3s_64. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_32_mmu.c | 354 ++ 1 files changed, 354 insertions(+), 0 deletions(-) create mode

[PATCH 14/27] Add book3s_64 specific opcode emulation

2009-10-21 Thread Alexander Graf
There are generic parts of PowerPC that can be shared across all implementations and specific parts that only apply to BookE or desktop PPCs. This patch adds emulation for desktop specific opcodes that don't apply to BookE CPUs. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 11/27] Add book3s_64 Host MMU handling

2009-10-21 Thread Alexander Graf
We designed the Book3S port of KVM as modular as possible. Most of the code could be easily used on a Book3S_32 host as well. The main difference between 32 and 64 bit cores is the MMU. To keep things well separated, we treat the book3s_64 MMU as one possible compile option. This patch adds all

[PATCH 02/27] Pass PVR in sregs

2009-10-21 Thread Alexander Graf
Right now sregs is unused on PPC, so we can use it for initialization of the CPU. KVM on BookE always virtualizes the host CPU. On Book3s we go a step further and take the PVR from userspace that tells us what kind of CPU we are supposed to virtualize, because we support Book3s_32 and Book3s_64

[PATCH 19/27] Export symbols for KVM module

2009-10-21 Thread Alexander Graf
We want to be able to build KVM as a module. To enable us doing so, we need some more exports from core Linux parts. This patch exports all functions and variables that are required for KVM. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - don't export switch_slb - don't export

[PATCH 12/27] Add book3s_64 guest MMU

2009-10-21 Thread Alexander Graf
To be able to run a guest, we also need to implement a guest MMU. This patch adds MMU handling for Book3s_64 guests. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu.c | 469 ++ 1 files changed, 469 insertions(+), 0 deletions(-)

[PATCH 07/27] Add book3s_64 highmem asm code

2009-10-21 Thread Alexander Graf
This is the of entry / exit code. In order to switch between host and guest context, we need to switch register state and call the exit code handler on exit. This assembly file does exactly that. To finally enter the guest it calls into book3s_64_slb.S. On exit it gets jumped at from

[PATCH 08/27] Add SLB switching code for entry/exit

2009-10-21 Thread Alexander Graf
This is the really low level of guest entry/exit code. Book3s_64 has an SLB, which stores all ESID - VSID mappings we're currently aware of. The segments in the guest differ from the ones on the host, so we need to switch the SLB to tell the MMU that we're in a new context. So we store a shadow

[PATCH 04/27] Add Book3s fields to vcpu structs

2009-10-21 Thread Alexander Graf
We need to store more information than we currently have for vcpus when running on Book3s. So let's extend the internal struct definitions. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - use context_id instead of mm_context v4 - v5: - always include pvr in vcpu struct ---

[PATCH 05/27] Add asm/kvm_book3s.h

2009-10-21 Thread Alexander Graf
This adds the book3s specific header file that contains structs that are only valid on book3s specific code. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - use context_id instead of mm_alloc --- arch/powerpc/include/asm/kvm_book3s.h | 136 + 1

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5

2009-10-21 Thread Alexander Graf
On 21.10.2009, at 17:03, Alexander Graf wrote: KVM for PowerPC only supports embedded cores at the moment. While it makes sense to virtualize on small machines, it's even more fun to do so on big boxes. So I figured we need KVM for PowerPC64 as well. This patchset implements KVM support

Re: [KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd

2009-10-21 Thread Gleb Natapov
On Wed, Oct 21, 2009 at 10:34:53AM -0400, Gregory Haskins wrote: IRQFD currently uses a deferred workqueue item to execute the injection operation. It was originally designed this way because kvm_set_irq() required the caller to hold the irq_lock mutex, and the eventfd callback is invoked

Re: [KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd

2009-10-21 Thread Gregory Haskins
Gleb Natapov wrote: On Wed, Oct 21, 2009 at 10:34:53AM -0400, Gregory Haskins wrote: IRQFD currently uses a deferred workqueue item to execute the injection operation. It was originally designed this way because kvm_set_irq() required the caller to hold the irq_lock mutex, and the eventfd

Re: [KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd

2009-10-21 Thread Gleb Natapov
On Wed, Oct 21, 2009 at 11:34:51AM -0400, Gregory Haskins wrote: Gleb Natapov wrote: On Wed, Oct 21, 2009 at 10:34:53AM -0400, Gregory Haskins wrote: IRQFD currently uses a deferred workqueue item to execute the injection operation. It was originally designed this way because kvm_set_irq()

Re: [KVM PATCH 1/2] KVM: Directly inject interrupts via irqfd

2009-10-21 Thread Gregory Haskins
Gleb Natapov wrote: On Wed, Oct 21, 2009 at 11:34:51AM -0400, Gregory Haskins wrote: Gleb Natapov wrote: On Wed, Oct 21, 2009 at 10:34:53AM -0400, Gregory Haskins wrote: IRQFD currently uses a deferred workqueue item to execute the injection operation. It was originally designed this way

Re: kvm88 compile errors with 2.6.31.1

2009-10-21 Thread Jorge Lucángeli Obes
2009/10/21 Michael Tokarev m...@tls.msk.ru: Jorge Lucángeli Obes wrote: [] See this thread: http://www.mail-archive.com/kvm@vger.kernel.org/msg22775.html I believe the patches have already been applied, but there have not been any releases since then. qemu-kvm-0.11.0 is out for a long

Re: [Autotest] [PATCH] Test 802.1Q vlan of nic

2009-10-21 Thread Dor Laor
On 10/21/2009 03:46 PM, Uri Lublin wrote: On 10/21/2009 12:37 PM, Amos Kong wrote: On Tue, Oct 20, 2009 at 09:19:50AM -0400, Michael Goldish wrote: - Dor Laordl...@redhat.com wrote: On 10/15/2009 11:48 AM, Amos Kong wrote: For the sake of safety maybe we should start both VMs with

kvm-88 build error on CentOS 5.3 x86_64, kernel 2.6.18-164.2.1.el5.plus

2009-10-21 Thread Jon .
Hi all, I am attempting to build kvm-88 on CentOS 5.3 and encounter the error below while running make. Is the kernel included with CentOS too old? Has any one been able to successfully build and run kvm-88 on CentOS 5.3? Thanks!   CC [M]  /home/jon/src/kvm-88/kvm/ kernel/x86/svm.o In file

Re: vhost-net patches

2009-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2009 at 12:59:50PM -0700, Shirley Ma wrote: Hello Micahel, I have set up guest kernel 2.6.32-rc5 with MSI configured. Here are errors what I have got: 1. First, qemu complained extboot.bin not found, I copied the file from optionrom/ dir to pc-bios/ dir, this problem is

RE: Q: Stopped VM still using host cpu CPU ?

2009-10-21 Thread Daniel Schwager
Hi Avi, so, setup with opcontrol --deinit; modprobe oprofile timer=1; opcontrol --start Use 'opreport -l'. Make sure your qemu isn't stripped. All VM's are in paused state: top - 22:08:15 up 2 days, 12:18, 8 users, load average: 0.12, 0.19, 0.14 Tasks: 185 total, 1

Re: kvm88 compile errors with 2.6.31.1

2009-10-21 Thread Michael Tokarev
Jorge Lucángeli Obes wrote: 2009/10/21 Michael Tokarev m...@tls.msk.ru: Jorge Lucángeli Obes wrote: [] See this thread: http://www.mail-archive.com/kvm@vger.kernel.org/msg22775.html I believe the patches have already been applied, but there have not been any releases since then.

[PATCH 1/3] KVM test: Add new utility functions to kvm_utils

2009-10-21 Thread Lucas Meneghel Rodrigues
Some distributors ship CD and DVD files with SHA1 hash sums instead of MD5 hash sums, so let's extend the kvm_utils functions to evaluate and compare SHA1 hashes: * sha1sum_file(): Calculate SHA1 sum for file * unmap_url_cache(): Reimplementation of a function present on autotest utils that

[PATCH 2/3] KVM test: Daily DVD test control file

2009-10-21 Thread Lucas Meneghel Rodrigues
This control file is a proof of concept of a control file that downloads a iso DVD image produced on a daily basis to the isos directory, gets the hash sums for the DVD images and verifies the integrity of the download. Makes use of the utility functions introduced on previous patches.

[PATCH 3/3] KVM test: Extend VM.create() method to support SHA1 check

2009-10-21 Thread Lucas Meneghel Rodrigues
Also, change variable names and messages to be more generic. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/kvm_vm.py | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

[PATCH 1/2] KVM test: Adding Fedora nightly host (example)

2009-10-21 Thread Lucas Meneghel Rodrigues
This is an example Fedora nightly host definition. It lacks CD hashes because they will be verified as the DVD isos are downloaded. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 17 + 1 files changed, 17 insertions(+), 0

[PATCH 2/2] KVM test: Adding new Fedora-nightly.ks unattended file

2009-10-21 Thread Lucas Meneghel Rodrigues
Also, make a tiny change on Fedora-11.ks file by setting up completely automated disk partitioning. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/unattended/Fedora-11.ks |7 ++-- client/tests/kvm/unattended/Fedora-nightly.ks | 39

[ kvm-Bugs-2883570 ] KVM needs easier network bridging support

2009-10-21 Thread SourceForge.net
Bugs item #2883570, was opened at 2009-10-21 15:16 Message generated for change (Tracker Item Submitted) made by dmitryb77 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2883570group_id=180599 Please note that this message will contain a full copy of the

[PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-21 Thread Alexander Graf
From: Arnd Bergmann a...@arndb.de With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer interpreted correctly, we thus need Arnd's patch to implement a compat

[PATCH 09/27] Add interrupt handling code

2009-10-21 Thread Alexander Graf
Getting from host state to the guest is only half the story. We also need to return to our host context and handle whatever happened to get us out of the guest. On PowerPC every guest exit is an interrupt. So all we need to do is trap the host's interrupt handlers and get into our #VMEXIT code to

[PATCH 27/27] Use hrtimers for the decrementer

2009-10-21 Thread Alexander Graf
Following S390's good example we should use hrtimers for the decrementer too! This patch converts the timer from the old mechanism to hrtimers. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |6 -- arch/powerpc/kvm/emulate.c | 18

[PATCH 26/27] Use Little Endian for Dirty Bitmap

2009-10-21 Thread Alexander Graf
We currently use host endian long types to store information in the dirty bitmap. This works reasonably well on Little Endian targets, because the u32 after the first contains the next 32 bits. On Big Endian this breaks completely though, forcing us to be inventive here. So Ben suggested to

[PATCH 03/27] Add Book3s definitions

2009-10-21 Thread Alexander Graf
We need quite a bunch of new constants for KVM on Book3s, so let's define them now. These constants will be used in later patches. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4 - remove old kernel compat code --- arch/powerpc/include/asm/kvm_asm.h | 39

[PATCH 20/27] Split init_new_context and destroy_context

2009-10-21 Thread Alexander Graf
For KVM we need to allocate a new context id, but don't really care about all the mm context around it. So let's split the alloc and destroy functions for the context id, so we can grab one without allocating an mm context. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 17/27] Make head_64.S aware of KVM real mode code

2009-10-21 Thread Alexander Graf
We need to run some KVM trampoline code in real mode. Unfortunately, real mode only covers 8MB on Cell so we need to squeeze ourselves as low as possible. Also, we need to trap interrupts to get us back from guest state to host state without telling Linux about it. This patch adds interrupt

[PATCH 15/27] Add mfdec emulation

2009-10-21 Thread Alexander Graf
We support setting the DEC to a certain value right now. Doing that basically triggers the CPU local timer. But there's also an mfdec command that enabled the OS to read the decrementor. This is required at least by all desktop and server PowerPC Linux kernels. It can't really hurt to allow

[PATCH 14/27] Add book3s_64 specific opcode emulation

2009-10-21 Thread Alexander Graf
There are generic parts of PowerPC that can be shared across all implementations and specific parts that only apply to BookE or desktop PPCs. This patch adds emulation for desktop specific opcodes that don't apply to BookE CPUs. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 13/27] Add book3s_32 guest MMU

2009-10-21 Thread Alexander Graf
This patch adds an implementation for a G3/G4 MMU, so we can run G3 and G4 guests in KVM on Book3s_64. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_32_mmu.c | 354 ++ 1 files changed, 354 insertions(+), 0 deletions(-) create mode

[PATCH 02/27] Pass PVR in sregs

2009-10-21 Thread Alexander Graf
Right now sregs is unused on PPC, so we can use it for initialization of the CPU. KVM on BookE always virtualizes the host CPU. On Book3s we go a step further and take the PVR from userspace that tells us what kind of CPU we are supposed to virtualize, because we support Book3s_32 and Book3s_64

[PATCH 24/27] Include Book3s_64 target in buildsystem

2009-10-21 Thread Alexander Graf
Now we have everything in place to be able to build KVM, so let's add it as config option and in the Makefile. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig | 17 + arch/powerpc/kvm/Makefile | 27 +++ 2 files changed, 40

[PATCH 16/27] Add desktop PowerPC specific emulation

2009-10-21 Thread Alexander Graf
Little opcodes behave differently on desktop and embedded PowerPC cores. In order to reflect those differences, let's add some #ifdef code to emulate.c. We could probably also handle them in the core specific emulation files, but I would prefer to reuse as much code as possible. Signed-off-by:

[PATCH 04/27] Add Book3s fields to vcpu structs

2009-10-21 Thread Alexander Graf
We need to store more information than we currently have for vcpus when running on Book3s. So let's extend the internal struct definitions. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - use context_id instead of mm_context v4 - v5: - always include pvr in vcpu struct ---

[PATCH 08/27] Add SLB switching code for entry/exit

2009-10-21 Thread Alexander Graf
This is the really low level of guest entry/exit code. Book3s_64 has an SLB, which stores all ESID - VSID mappings we're currently aware of. The segments in the guest differ from the ones on the host, so we need to switch the SLB to tell the MMU that we're in a new context. So we store a shadow

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5

2009-10-21 Thread Alexander Graf
On 21.10.2009, at 17:03, Alexander Graf wrote: KVM for PowerPC only supports embedded cores at the moment. While it makes sense to virtualize on small machines, it's even more fun to do so on big boxes. So I figured we need KVM for PowerPC64 as well. This patchset implements KVM support