Re: Time and KVM - best practices

2010-03-22 Thread Alexander Graf
On 22.03.2010, at 10:15, Dor Laor wrote: On 03/21/2010 01:29 PM, Thomas Løcke wrote: Hey, What is considered best practice when running a KVM host with a mixture of Linux and Windows guests? Currently I have ntpd running on the host, and I start my guests using -rtc

[PATCH] Bail out when VCPU_CREATE fails

2010-03-22 Thread Alexander Graf
something breaks. Also give the user a hint on why the VCPU_CREATE might have failed. This fixes a segmentation fault with -smp VCPU_MAX in the host kernel. Signed-off-by: Alexander Graf ag...@suse.de Reported-by: Michael Tokarev m...@tls.msk.ru --- Please also commit this to the -stable branch

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-22 Thread Alexander Graf
On 22.03.2010, at 12:14, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: On 03/21/2010 11:54 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: On 03/21/2010 10:55 PM, Ingo Molnar wrote: Of course you could say the following: ' Thanks, I'll mark this for v2.6.36

Re: [PATCH v2 0/8] Miscellaneous x86 emulator fixes

2010-03-22 Thread Alexander Graf
On 10.02.2010, at 13:21, Gleb Natapov wrote: X86 emulator fails to do permission/correctness checking like real CPU does for some instruction. This patch series fixes some of those discrepancies. Changelog: v1-v2 - move IOPL permission checking functions into emulate.c - rename them

Re: [PATCH v2 0/8] Miscellaneous x86 emulator fixes

2010-03-22 Thread Alexander Graf
On 22.03.2010, at 16:48, Alexander Graf wrote: On 10.02.2010, at 13:21, Gleb Natapov wrote: X86 emulator fails to do permission/correctness checking like real CPU does for some instruction. This patch series fixes some of those discrepancies. Changelog: v1-v2 - move IOPL permission

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-22 Thread Alexander Graf
On 22.03.2010, at 20:31, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:15:35PM -0500, Anthony Liguori wrote: On 03/22/2010 12:55 PM, Avi Kivity wrote: Lets look at the ${HOME}/.qemu/qmp/ enumeration method suggested by Anthony. There's numerous ways that this can break: I don't

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-22 Thread Alexander Graf
On 22.03.2010, at 20:54, Ingo Molnar wrote: * Alexander Graf ag...@suse.de wrote: Yes. I think the point was that every layer in between brings potential slowdown and loss of features. Exactly. The more 'fragmented' a project is into sub-projects, without a single, unified

Re: [PATCH 0/3] KVM: VMX: Support hosted VMM coexsitence.

2010-03-23 Thread Alexander Graf
On 23.03.2010, at 09:58, Avi Kivity wrote: On 03/23/2010 10:33 AM, Xu, Dongxiao wrote: Did you measure workloads that exit to userspace very often? Also, what about future processors? My understanding is that the manual recommends keeping things cached, the above description is for

Re: [PATCH] Bail out when VCPU_CREATE fails

2010-03-24 Thread Alexander Graf
On 24.03.2010, at 10:32, Avi Kivity wrote: On 03/22/2010 12:49 PM, Alexander Graf wrote: When we fail to create a VCPU we have no way to tell our callers that something failed. So the caller happily uses a completely broken state. This code should become deprecated in the process

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-24 Thread Alexander Graf
Avi Kivity wrote: On 03/24/2010 02:50 PM, Joerg Roedel wrote: You can always provide the kernel and module paths as command line parameters. It just won't be transparently usable, but if you're using qemu from the command line, presumably you can live with that. I don't want the tool

Re: [KVM PATCH] pci passthrough: zap option rom scanning.

2010-03-24 Thread Alexander Graf
Marcelo Tosatti wrote: On Wed, Jan 20, 2010 at 11:58:48AM +0100, Gerd Hoffmann wrote: Nowdays (qemu 0.12) seabios loads option roms from pci rom bars. So there is no need any more to scan for option roms and have qemu load them. Zap the code. Signed-off-by: Gerd Hoffmann

Re: [RFC] Unify KVM kernel-space and user-space code into a single project

2010-03-24 Thread Alexander Graf
Avi Kivity wrote: On 03/24/2010 03:53 PM, Alexander Graf wrote: Someone needs to know about the new guest to fetch its symbols. Or do you want that part in the kernel too? How about we add a virtio guest file system access device? The guest would then expose its own file system

[PATCH 03/21] KVM: PPC: Make DSISR 32 bits wide

2010-03-24 Thread Alexander Graf
DSISR is only defined as 32 bits wide. So let's reflect that in the structs too. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |2 +- arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerpc/kvm/book3s_64_interrupts.S |2 +- 3 files

[PATCH 05/21] KVM: PPC: Split instruction reading out

2010-03-24 Thread Alexander Graf
The current check_ext function reads the instruction and then does the checking. Let's split the reading out so we can reuse it for different functions. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c | 24 1 files changed, 16 insertions(+), 8

[PATCH 15/21] KVM: PPC: Make build work without CONFIG_VSX/ALTIVEC

2010-03-24 Thread Alexander Graf
-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index d6105d9..7912d72 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c

[PATCH 16/21] KVM: PPC: Fix dcbz emulation

2010-03-24 Thread Alexander Graf
up dcbz emulation by an order of magnitude by using kmap. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c| 56 + arch/powerpc/kvm/book3s_64_emulate.c | 19 +-- 2 files changed, 37 insertions(+), 38 deletions(-) diff

[PATCH 20/21] KVM: PPC: Make bools bitfields

2010-03-24 Thread Alexander Graf
Bool defaults to at least byte width. We usually only want to waste a single bit on this. So let's move all the bool values to bitfields, potentially saving memory. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h | 28 ++-- arch

[PATCH 18/21] KVM: PPC: Add check if pte was mapped secondary

2010-03-24 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu_host.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c index 25bd4ed..a01e9c5 100644 --- a/arch/powerpc/kvm

[PATCH 21/21] KVM: PPC: Disable MSR_FEx for Cell hosts

2010-03-24 Thread Alexander Graf
Cell can't handle MSR_FE0 and MSR_FE1 too well. It gets dog slow. So let's just override the guest whenever we see one of the two and mask them out. See commit ddf5f75a16b3e7460ffee881795aa168dffcd0cf for reference. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |4

[PATCH 17/21] KVM: PPC: Add emulation for dcba

2010-03-24 Thread Alexander Graf
Mac OS X uses the dcba instruction. According to the specification it doesn't guarantee any functionality, so let's just emulate it as nop. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_emulate.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff

[PATCH 14/21] KVM: PPC: Add OSI hypercall interface

2010-03-24 Thread Alexander Graf
MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is MOL. Signed-off-by: Alexander Graf ag

[PATCH 13/21] KVM: Add support for enabling capabilities per-vcpu

2010-03-24 Thread Alexander Graf
for this purpose. That way features we don't want in all guests or userspace configurations can just not be enabled and we're good. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - Add flags to enable_cap - Update documentation for kvm_enable_cap v2 - v3: - Add CAP for ENABLE_CAP - Improve

[PATCH 09/21] KVM: PPC: Implement BAT reads

2010-03-24 Thread Alexander Graf
BATs can't only be written to, you can also read them out! So let's implement emulation for reading BAT values again. While at it, I also made BAT setting flush the segment cache, so we're absolutely sure there's no MMU state left when writing BATs. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 10/21] KVM: PPC: Make XER load 32 bit

2010-03-24 Thread Alexander Graf
We have a 32 bit value in the PACA to store XER in. We also do an stw when storing XER in there. But then we load it with ld, completely screwing it up on every entry. Welcome to the Big Endian world. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_slb.S |2 +- 1

[PATCH 04/21] KVM: PPC: Book3S_32 guest MMU fixes

2010-03-24 Thread Alexander Graf
This patch makes the VSID of mapped pages always reflecting all special cases we have, like split mode. It also changes the tlbie mask to 0x0000 according to the spec. The mask we used before was incorrect. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm

[PATCH 19/21] KVM: PPC: Use ULL for big numbers

2010-03-24 Thread Alexander Graf
Some constants were bigger than ints. Let's mark them as such so we don't accidently truncate them. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm

[PATCH 07/21] KVM: PPC: Load VCPU for register fetching

2010-03-24 Thread Alexander Graf
When trying to read or store vcpu register data, we should also make sure the vcpu is actually loaded, so we're 100% sure we get the correct values. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff

[PATCH 12/21] KVM: PPC: Implement alignment interrupt

2010-03-24 Thread Alexander Graf
), the 970 declares this as an optional feature. So we need to reconstruct DSISR and DAR manually. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - add emulation for stfs, stfd, lfd - add DAR emulation --- arch/powerpc/include/asm/kvm_book3s.h |2 + arch/powerpc/kvm/book3s.c

[PATCH 00/21] KVM: PPC: MOL bringup patches v3

2010-03-24 Thread Alexander Graf
for Cell hosts (PS3 speedup) Alexander Graf (21): KVM: PPC: Ensure split mode works KVM: PPC: Allow userspace to unset the IRQ line KVM: PPC: Make DSISR 32 bits wide KVM: PPC: Book3S_32 guest MMU fixes KVM: PPC: Split instruction reading out KVM: PPC: Don't reload FPU with invalid values

[PATCH 02/21] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-24 Thread Alexander Graf
Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to tell us if we want to raise or lower the interrupt line. Signed-off-by: Alexander Graf ag

[PATCH 01/21] KVM: PPC: Ensure split mode works

2010-03-24 Thread Alexander Graf
supposed to. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |9 +++--- arch/powerpc/kvm/book3s.c | 46 +--- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_book3s.h b

[PATCH 08/21] KVM: PPC: Implement mfsr emulation

2010-03-24 Thread Alexander Graf
We emulate the mfsrin instruction already, that passes the SR number in a register value. But we lacked support for mfsr that encoded the SR number in the opcode. So let's implement it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_emulate.c | 13 + 1

[PATCH 11/21] KVM: PPC: Implement emulation for lbzux and lhax

2010-03-24 Thread Alexander Graf
We get MMIOs with the weirdest instructions. But every time we do, we need to improve our emulator to implement them. So let's do that - this time it's lbzux and lhax's round. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 20 1 files changed

[PATCH 06/21] KVM: PPC: Don't reload FPU with invalid values

2010-03-24 Thread Alexander Graf
is enabled already and if so just doesn't bother activating it, making FPU operations survive guest context switches. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. Why? What's wrong with SET_MEM_REGION? Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH 1/2] KVM: Document KVM_SET_USER_MEMORY_REGION

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 12:49 schrieb Avi Kivity a...@redhat.com: On 03/25/2010 01:10 PM, Alexander Graf wrote: Am 25.03.2010 um 11:31 schrieb Avi Kivity a...@redhat.com: +It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. Why? What's wrong with SET_MEM_REGION

Re: KVM on MIPS?

2010-03-25 Thread Alexander Graf
Am 25.03.2010 um 22:04 schrieb Avi Kivity a...@redhat.com: On 03/25/2010 06:54 PM, Dale Farnsworth wrote: I'm beginning to look at implementing KVM on MIPS. I've tried to search for any work-in-progress on this but haven't found much at all. Google comes up with some hits, but nothing

Re: [PATCH] KVM: PPC: E500 compile fix

2010-03-26 Thread Alexander Graf
On 26.03.2010, at 08:15, Bruce Majia wrote: On Sun, Jan 17, 2010 at 03:06:11PM +0200, Avi Kivity wrote: On 01/10/2010 07:01 PM, Alexander Graf wrote: While trying to compile an E500 vmlinux, I stumbled across a compilation bug that was obviously there before I touched any of the code

Re: [PATCH] KVM: PPC: fix build error for un-initialised var

2010-03-26 Thread Alexander Graf
makes compiler to distinguish warnings as errors. So un-initialised variables should be eliminated to avoid build errors. Signed-off-by: Bruce Majia bruce.ma...@gmail.com Acked-by: Alexander Graf ag...@suse.de Please also queue for 2.6.34. Alex -- To unsubscribe from this list: send the line

Re: [RFC] GSoC 2010: Memory Compression for Virtualized Environments

2010-03-27 Thread Alexander Graf
On 27.03.2010, at 08:38, Nitin Gupta wrote: Hi, I will be applying to GSoC 2010 under The Linux Foundation as mentoring organization (Virtualization working group). Below is the application for my planned project: Memory Compression for Virtualized Environments (according to LF template).

Re: KVM guest interrupts, traps, and, exceptions

2010-03-27 Thread Alexander Graf
On 27.03.2010, at 17:42, Pekka Enberg wrote: Hi Alexander, Alexander Graf wrote: I'm continuing my journey through the KVM API documentation and I'm now scratching my head on how interrupts, traps, and exceptions are supported by the API. I see KVM_CREATE_IRQCHIP and KVM_IRQ_LINE

Re: MSI-X not enabled for ixgbe device-passthrough

2010-03-29 Thread Alexander Graf
Am 29.03.2010 um 18:46 schrieb Chris Wright chr...@sous-sol.org: * Hannes Reinecke (h...@suse.de) wrote: Ah. So I'll have to shout at Alex Graf. No problems there :-) I like that, when in doubt, shout at Alex ;-) Yep, whenever in doubt, just shout at me :). Alex -- To unsubscribe

Re: PCI passthrough resource remapping

2010-03-29 Thread Alexander Graf
On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through to KVM. In order to do that, I'm reading that the PCI memory region must be 4K-page

Re: PCI passthrough resource remapping

2010-03-29 Thread Alexander Graf
On 30.03.2010, at 01:00, Kenni Lund wrote: 2010/3/29 Alexander Graf ag...@suse.de: On 29.03.2010, at 19:23, Kenni Lund wrote: 2010/1/9 Alexander Graf ag...@suse.de: On 09.01.2010, at 03:45, Ryan C. Underwood wrote: I have a multifunction PCI device that I'd like to pass through

Re: PCI passthrough resource remapping

2010-03-30 Thread Alexander Graf
On 31.03.2010, at 00:27, Kenni Lund wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19,

qemu-kvm.git stable requests

2010-03-31 Thread Alexander Graf
: Alexander Graf ag...@suse.de Date: Thu Dec 17 16:04:44 2009 +0100 commit be5a9efb3359cac07217d477b44f6bd0e17658f0 Author: Michael S. Tsirkin m...@redhat.com Date: Wed Dec 23 12:07:47 2009 +0200 While at it, I realized that the friendly help output if a device is currently in use by a driver

Re: PCI passthrough resource remapping

2010-03-31 Thread Alexander Graf
Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like the ivtv tuner and the USB card) and they share an IRQ, if I then assign BOTH of

Re: PCI passthrough resource remapping

2010-03-31 Thread Alexander Graf
Chris Wright wrote: * Alexander Graf (ag...@suse.de) wrote: Kenni Lund wrote: 2010/3/31 Kenni Lund ke...@kelu.dk: Booting the guest and tuning to a DVB-T channel _works_ !!! :-D Thanks a lot for your help...I have one more question, though: If I have two devices (like

Re: [PATCH 13/21] KVM: Add support for enabling capabilities per-vcpu

2010-04-01 Thread Alexander Graf
On 01.04.2010, at 10:51, Avi Kivity wrote: On 03/24/2010 10:48 PM, Alexander Graf wrote: Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next patch. In order to have a generic mechanism in how

[PATCH 1/2] KVM: PPC: Only use QPRs when available

2010-04-01 Thread Alexander Graf
BookE KVM doesn't know about QPRs, so let's not try to access then. This fixes a build error on BookE KVM. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/powerpc.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch

[PATCH 2/2] KVM: PPC: Don't export Book3S symbols on BookE

2010-04-01 Thread Alexander Graf
Book3S knows how to convert floats to doubles and vice versa. BookE doesn't. So let's make sure we don't export them on BookE. This fixes a link error on BookE with CONFIG_KVM=y. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/ppc_ksyms.c |2 ++ 1 files changed, 2

Re: ppc build failure

2010-04-01 Thread Alexander Graf
Avi Kivity wrote: I get this on a 32-bit build test: arch/powerpc/kvm/powerpc.c: In function 'kvmppc_complete_mmio_load': arch/powerpc/kvm/powerpc.c:338: error: 'struct kvm_vcpu_arch' has no member named 'qpr' arch/powerpc/kvm/powerpc.c:342: error: 'struct kvm_vcpu_arch' has no member named

Re: [GSoC 2010][RESEND] Completing Nested VMX

2010-04-05 Thread Alexander Graf
On 05.04.2010, at 21:37, Luiz Capitulino wrote: On Mon, 5 Apr 2010 20:34:26 +0200 Mohammed Gamal m.gamal...@gmail.com wrote: Hello All, I'm interested in adding nested VMX support to KVM in GSoC 2010 (among other things). I see that Orit Wasserman has done some work in this area, but it

Re: [Qemu-devel] KVM call agenda for Apr 6

2010-04-06 Thread Alexander Graf
Chris Wright wrote: Please send in any agenda items you are interested in covering. Management stack discussion (again :)) Alex -- 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

[PATCH] [PPC] Add dequeue for external on BookE

2010-04-07 Thread Alexander Graf
Commit a0abee86af2d1f048dbe99d2bcc4a2cefe685617 introduced unsetting of the IRQ line from userspace. This added a new core specific callback that I apparently forgot to add for BookE. So let's add the callback for BookE as well, making it build again. Signed-off-by: Alexander Graf ag...@suse.de

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:07, Andre Przywara wrote: On SVM we set the instruction length of skipped instructions to hard-coded, well known values, which could be wrong when (bogus, but valid) prefixes (REX, segment override) are used. Newer AMD processors (Fam10h 45nm and better, aka. PhenomII or

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:40, Alexander Graf wrote: /* Either adds offset n to the instruction counter or takes the next instruction pointer from the vmcb if the CPU supports it */ static u64 svm_next_rip(struct kvm_vcpu *vcpu, int add) { if (svm-vmcb-control.next_rip != 0

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 11.04.2010, at 23:51, Andre Przywara wrote: Alexander Graf wrote: On 11.04.2010, at 23:40, Alexander Graf wrote: /* Either adds offset n to the instruction counter or takes the next instruction pointer from the vmcb if the CPU supports it */ static u64 svm_next_rip(struct kvm_vcpu

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-11 Thread Alexander Graf
On 12.04.2010, at 00:13, Andre Przywara wrote: Alexander Graf wrote: On 11.04.2010, at 23:51, Andre Przywara wrote: Alexander Graf wrote: On 11.04.2010, at 23:40, Alexander Graf wrote: /* Either adds offset n to the instruction counter or takes the next instruction pointer from the vmcb

Re: [Qemu-devel] [GSoC 2010] Pass-through filesystem support.

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 10:15, Mohammed Gamal wrote: On Mon, Apr 12, 2010 at 12:29 AM, Jamie Lokier ja...@shareable.org wrote: Javier Guerra Giraldez wrote: On Sat, Apr 10, 2010 at 7:42 AM, Mohammed Gamal m.gamal...@gmail.com wrote: On Sat, Apr 10, 2010 at 2:12 PM, Jamie Lokier

Re: [PATCH] svm: implement NEXTRIPsave SVM feature

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 12:20, Avi Kivity wrote: On 04/12/2010 12:07 AM, Andre Przywara wrote: On SVM we set the instruction length of skipped instructions to hard-coded, well known values, which could be wrong when (bogus, but valid) prefixes (REX, segment override) are used. Newer AMD

Re: [PATCH] KVM: fix the handling of dirty bitmaps to avoid overflows

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 12:35, Takuya Yoshikawa wrote: This patch fixes a bug found by Avi during the review process of my dirty bitmap related work. To ppc and ia64 people: The fix is really simple but touches all architectures using dirty bitmaps. So please check this will not suffer your

Re: [Qemu-devel] [GSoC 2010] Pass-through filesystem support.

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 14:04, Jamie Lokier wrote: Alexander Graf wrote: Also since -net user does support samba exporting already, This I'm interested in. Last time I tried to use it, the smb= option didn't work because Samba refused to run when launched with qemu's mini config file

[PATCH 00/27] Book3S_32 (PPC32) KVM support

2010-04-15 Thread Alexander Graf
haven't tried yet. As far as the path I took goes, I tried to merge as much functionality and code as possible with the 64 bit host support. So whenever code was reusable, it gets reused. Alexander Graf (27): KVM: PPC: Name generic 64-bit code generic KVM: PPC: Add host MMU Support KVM: PPC

[PATCH 10/27] KVM: PPC: Use KVM_BOOK3S_HANDLER

2010-04-15 Thread Alexander Graf
over. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_asm.h |4 ++-- arch/powerpc/include/asm/paca.h |2 +- arch/powerpc/kvm/Kconfig |4 arch/powerpc/kvm/Makefile |2 +- 4 files changed, 8 insertions

[PATCH 23/27] KVM: PPC: Export MMU variables

2010-04-15 Thread Alexander Graf
Our shadow MMU code needs to know where the HTAB is located and how big it is. So we need some variables from the kernel exported to module space if KVM is built as a module. CC: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel

[PATCH 25/27] KVM: PPC: Check max IRQ prio

2010-04-15 Thread Alexander Graf
We have a define on what the highest bit of IRQ priorities is. So we can just as well use it in the bit checking code and avoid invalid IRQ values to be triggered. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |2 +- 1 files changed, 1 insertions(+), 1 deletions

[PATCH 26/27] KVM: PPC: Add KVM intercept handlers

2010-04-15 Thread Alexander Graf
Herrenschmidt b...@kernel.crashing.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/head_32.S | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index e025e89..98c4b29 100644

[PATCH 24/27] PPC: Export SWITCH_FRAME_SIZE

2010-04-15 Thread Alexander Graf
We need the SWITCH_FRAME_SIZE define on Book3S_32 now too. So let's export it unconditionally. CC: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[PATCH 21/27] KVM: PPC: Emulate segment fault

2010-04-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index b917b97..178ddd4 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm

[PATCH 05/27] PPC: Split context init/destroy functions

2010-04-15 Thread Alexander Graf
We need to reserve a context from KVM to make sure we have our own segment space. While we did that split for Book3S_64 already, 32 bit is still outstanding. So let's split it now. Signed-off-by: Alexander Graf ag...@suse.de CC: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc

[PATCH 03/27] KVM: PPC: Add SR swapping code

2010-04-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_32_sr.S | 143 +++ 1 files changed, 143 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/book3s_32_sr.S diff --git a/arch/powerpc/kvm/book3s_32_sr.S b/arch/powerpc/kvm/book3s_32_sr.S

[PATCH 04/27] KVM: PPC: Add generic segment switching code

2010-04-15 Thread Alexander Graf
if necessary, to speed up that path. The new thing about this file is that it makes use of generic long load and store functions and calls a macro to fill in the actual segment switching code. That still needs to be done differently for book3s_32 and book3s_64. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 12/27] PPC: Add STLU

2010-04-15 Thread Alexander Graf
For assembly code there are several long load and store defines already. The one that's missing is the typical stack store, stdu/stwu. So let's add that define as well, making my KVM code happy. CC: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 27/27] KVM: PPC: Enable Book3S_32 KVM building

2010-04-15 Thread Alexander Graf
Now that we have all the bits and pieces in place, let's enable building of the Book3S_32 target. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig | 18 ++ arch/powerpc/kvm/Makefile | 12 2 files changed, 30 insertions(+), 0 deletions

[PATCH 18/27] KVM: PPC: Release clean pages as clean

2010-04-15 Thread Alexander Graf
When we mapped a page as read-only, we can just release it as clean to KVM's page claim mechanisms, because we're pretty sure it hasn't been touched. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu_host.c |6 +- 1 files changed, 5 insertions(+), 1 deletions

[PATCH 20/27] KVM: PPC: Add SVCPU to Book3S_32

2010-04-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/processor.h |3 +++ arch/powerpc/kernel/asm-offsets.c|3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 221ba62..7492fe8

[PATCH 09/27] KVM: PPC: Improve indirect svcpu accessors

2010-04-15 Thread Alexander Graf
of the now in the svcpu struct fields to inline function calls. While at it, it also moves the definition of those inline function calls to respective header files for booke and book3s, greatly improving readability. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h

[PATCH 22/27] KVM: PPC: Add Book3S compatibility code

2010-04-15 Thread Alexander Graf
. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c| 26 +- arch/powerpc/kvm/book3s_32_mmu.c |3 +++ arch/powerpc/kvm/book3s_emulate.c|4 arch/powerpc/kvm/book3s_rmhandlers.S |4 ++-- 4 files changed, 34

[PATCH 16/27] KVM: PPC: Make highmem code generic

2010-04-15 Thread Alexander Graf
Since we now have several fields in the shadow VCPU, we also change the internal calling convention between the different entry/exit code layers. Let's reflect that in the IR=1 code and make sure we use long defines for long field access. Signed-off-by: Alexander Graf ag...@suse.de --- arch

[PATCH 19/27] KVM: PPC: Remove fetch fail code

2010-04-15 Thread Alexander Graf
When instruction fetch failed, the inline function hook automatically detects that and starts the internal guest memory load function. So whenever we access kvmppc_get_last_inst(), we're sure the result is sane. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c |4

[PATCH 11/27] KVM: PPC: Use CONFIG_PPC_BOOK3S define

2010-04-15 Thread Alexander Graf
Upstream recently added a new name for PPC64: Book3S_64. So instead of using CONFIG_PPC64 we should use CONFIG_PPC_BOOK3S consotently. That makes understanding the code easier (I hope). Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |8 arch

[PATCH 07/27] KVM: PPC: Add kvm_book3s_32.h

2010-04-15 Thread Alexander Graf
In analogy to the 64 bit specific header file, this is the 32 bit pendant. With this in place we can just always call to_svcpu and be assured we get the right pointer anywhere. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_32.h | 42

[PATCH 06/27] KVM: PPC: Add kvm_book3s_64.h

2010-04-15 Thread Alexander Graf
for a subarch specific header file. Here we can put anything that needs to be different between those two. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_64.h | 28 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644

[PATCH 08/27] KVM: PPC: Add fields to shadow vcpu

2010-04-15 Thread Alexander Graf
will remove the originals from the vcpu and paca. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_asm.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc

[PATCH 17/27] KVM: PPC: Make SLB switching code the new segment framework

2010-04-15 Thread Alexander Graf
We just introduced generic segment switching code that only needs to call small macros to do the actual switching, but keeps most of the entry / exit code generic. So let's move the SLB switching code over to use this new mechanism. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 15/27] KVM: PPC: Make real mode handler generic

2010-04-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_rmhandlers.S | 119 +- 1 files changed, 88 insertions(+), 31 deletions(-) diff --git a/arch/powerpc/kvm/book3s_rmhandlers.S b/arch/powerpc/kvm/book3s_rmhandlers.S index bd08535..0c8d331 100644 --- a/arch/powerpc

[PATCH 13/27] KVM: PPC: Use now shadowed vcpu fields

2010-04-15 Thread Alexander Graf
The shadow vcpu now contains some fields we don't use from the vcpu anymore. Access to them happens using inline functions that happily use the shadow vcpu fields. So let's now ifdef them out to booke only and add asm-offsets. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include

[PATCH 14/27] KVM: PPC: Extract MMU init

2010-04-15 Thread Alexander Graf
The host shadow mmu code needs to get initialized. It needs to fetch a segment it can use to put shadow PTEs into. That initialization code was in generic code, which is icky. Let's move it over to the respective MMU file. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm

[PATCH 02/27] KVM: PPC: Add host MMU Support

2010-04-15 Thread Alexander Graf
In order to support 32 bit Book3S, we need to add code to enable our shadow MMU to actually add shadow PTEs. This is the module enabling that support. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_32_mmu_host.c | 480 + 1 files changed

[PATCH] KVM: PPC: Convert u64 - ulong

2010-04-15 Thread Alexander Graf
There are quite some pieces in the code that I overlooked that still use u64s instead of longs. This has two side effects: 1) Slowness 2) Breakage This patch fixes both, enabling me to successfully run a Debian guest on a G4 iBook in KVM. Signed-off-by: Alexander Graf ag...@suse.de

Re: [PATCH 23/27] KVM: PPC: Export MMU variables

2010-04-16 Thread Alexander Graf
On 16.04.2010, at 08:47, Benjamin Herrenschmidt wrote: On Fri, 2010-04-16 at 00:11 +0200, Alexander Graf wrote: Our shadow MMU code needs to know where the HTAB is located and how big it is. So we need some variables from the kernel exported to module space if KVM is built as a module

Re: [PATCH 23/27] KVM: PPC: Export MMU variables

2010-04-16 Thread Alexander Graf
On 16.04.2010, at 11:22, Benjamin Herrenschmidt wrote: On Fri, 2010-04-16 at 11:07 +0200, Alexander Graf wrote: On 16.04.2010, at 08:47, Benjamin Herrenschmidt wrote: On Fri, 2010-04-16 at 00:11 +0200, Alexander Graf wrote: Our shadow MMU code needs to know where the HTAB is located

Re: [PATCH 23/27] KVM: PPC: Export MMU variables

2010-04-16 Thread Alexander Graf
On 16.04.2010, at 11:25, Alexander Graf wrote: On 16.04.2010, at 11:22, Benjamin Herrenschmidt wrote: On Fri, 2010-04-16 at 11:07 +0200, Alexander Graf wrote: On 16.04.2010, at 08:47, Benjamin Herrenschmidt wrote: On Fri, 2010-04-16 at 00:11 +0200, Alexander Graf wrote: Our shadow MMU

Re: [PATCH 23/27] KVM: PPC: Export MMU variables

2010-04-16 Thread Alexander Graf
On 16.04.2010, at 11:31, Alexander Graf wrote: On 16.04.2010, at 11:25, Alexander Graf wrote: On 16.04.2010, at 11:22, Benjamin Herrenschmidt wrote: Well, I did look into reusing the existing functions for HTAB modification, but they're incredibly tightly coupled to Linux PTEs

Re: [PATCH] KVM: PPC: Convert u64 - ulong

2010-04-16 Thread Alexander Graf
On 16.04.2010, at 01:00, Alexander Graf wrote: There are quite some pieces in the code that I overlooked that still use u64s instead of longs. This has two side effects: 1) Slowness 2) Breakage This patch fixes both, enabling me to successfully run a Debian guest on a G4 iBook in KVM

[PATCH 2/8] KVM: PPC: Make Performance Counters work

2010-04-18 Thread Alexander Graf
running. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c|3 +++ arch/powerpc/kvm/book3s_interrupts.S |2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index a7de709..a03163b 100644

[PATCH 4/8] KVM: PPC: Make Alignment interrupts work again

2010-04-18 Thread Alexander Graf
In the process of merging Book3S_32 and 64 I somehow ended up having the alignment interrupt handler take last_inst, but the fetching code not fetching it. So we ended up with stale last_inst values. Let's just enable last_inst fetching for alignment interrupts too. Signed-off-by: Alexander Graf

[PATCH 6/8] KVM: PPC: Set VSID_PR also for Book3S_64

2010-04-18 Thread Alexander Graf
Book3S_64 didn't set VSID_PR when we're in PR=1. This lead to pretty bad behavior when searching for the shadow segment, as part of the code relied on VSID_PR being set. This patch fixes booting Book3S_64 guests. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu.c

[PATCH 0/8] Post-PPC32 series

2010-04-18 Thread Alexander Graf
. Ignore the two patches in between. Alexander Graf (8): KVM: PPC: Convert u64 - ulong KVM: PPC: Make Performance Counters work KVM: PPC: Improve split mode KVM: PPC: Make Alignment interrupts work again KVM: PPC: Be more informative on BUG KVM: PPC: Set VSID_PR also for Book3S_64 KVM

  1   2   3   4   5   6   7   8   9   10   >