[PATCH] kvm: external module: compatibility for svm related msrs and cpuid bits

2008-12-15 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h index b5e11e2..17cae87 100644 --- a/kernel/x86/external-module-compat.h +++ b/kernel/x86/external-module-compat.h @@ -22,6 +22,25 @@

[PATCH] kvm: external module: add msr-index.h, now needed by kvm_host.h

2008-12-15 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/include-compat/asm-x86/msr-index.h b/kernel/include-compat/asm-x86/msr-index.h new file mode 100644 index 000..e7625b1 --- /dev/null +++ b/kernel/include-compat/asm-x86/msr-index.h @@ -0,0 +1,339

[PATCH] KVM: SVM: Implement GIF, clgi and stgi

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This patch implements the GIF flag and the clgi and stgi instructions that set this flag. Only if the flag is set (default), interrupts can be received by the CPU. To keep the information about that somewhere, this patch adds a new hidden flags vector. that is

[PATCH] KVM: SVM: Clean up VINTR setting

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de The current VINTR intercept setters don't look clean to me. To make the code easier to read and enable the possibilty to trap on a VINTR set, this uses a helper function to set the VINTR intercept. v2 uses two distinct functions for setting and clearing the bit

[PATCH] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2008-12-15 Thread Avi Kivity
From: Avi Kivity a...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] KVM: SVM: Add VMLOAD and VMSAVE handlers

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This implements the VMLOAD and VMSAVE instructions, that usually surround the VMRUN instructions. Both instructions load / restore the same elements, so we only need to implement them once. v2 fixes CPL checking and replaces memcpy by assignments v3 makes use

[PATCH] KVM: SVM: Implement hsave

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Implement the hsave MSR, that gives the VCPU a GPA to save the old guest state in. v2 allows userspace to save/restore hsave v4 dummys out the hsave MSR, so we use a host page v6 remembers the guest's hsave and exports the MSR Acked-by: Joerg Roedel

[PATCH] KVM: SVM: Allow read access to MSR_VM_VR

2008-12-15 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com KVM tries to read the VM_CR MSR to find out if SVM was disabled by the BIOS. So implement read support for this MSR to make nested SVM running. Signed-off-by: Joerg Roedel joerg.roe...@amd.com Signed-off-by: Alexander Graf ag...@suse.de Signed-off-by: Avi

[PATCH] KVM: SVM: Accelerate nested SVM by emulating parts of GIF=0

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Until this patch we bounced between the VM and the VMM for a couple of instructions after CLGI, only to find out that yet another SVM instruction follows. Since roundtrips are really expensive, it's a lot faster to emulate these few instructions. Now we can

[PATCH] KVM: SVM: Allow setting the SVME bit

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Normally setting the SVME bit in EFER is not allowed, as we did not support SVM. Not since we do, we should also allow enabling SVM mode. v2 comes as last patch, so we don't enable half-ready code v4 introduces a module option to enable SVM v6 warns that

[PATCH] KVM: SVM: Add VMRUN handler

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de This patch implements VMRUN. VMRUN enters a virtual CPU and runs that in the same context as the normal guest CPU would run. So basically it is implemented the same way, a normal CPU would do it. We also prepare all intercepts that get OR'ed with the original

[PATCH] KVM: SVM: Only allow setting of EFER_SVME when CPUID SVM is set

2008-12-15 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Userspace has to tell the kernel module somehow that nested SVM should be used. The easiest way that doesn't break anything I could think of is to implement if (cpuid svm) allow write to efer else deny write to efer Old userspaces mask the SVM

Re: [PATCH] AF_VMCHANNEL address family for guest-host communication.

2008-12-15 Thread David Miller
From: Gleb Natapov g...@redhat.com Date: Mon, 15 Dec 2008 09:48:19 +0200 On Sun, Dec 14, 2008 at 10:44:36PM -0800, David Miller wrote: You guys really need to rethink this. Either a stream protocol is a workable solution to your problem, or it isn't. Stream protocol is workable solution

Re: [PATCH] KVM: use modern cpumask primitives, no cpumask_t on stack

2008-12-15 Thread Rusty Russell
On Friday 12 December 2008 03:21:24 Hollis Blanchard wrote: This patch breaks uniprocessor builds, because smp_call_function_many() is only defined for CONFIG_SMP. Good catch. I missed it because it's fixed as a side-effect of a later patch in my series (before I convert users). Linus, can

[PATCH] new monitor func status

2008-12-15 Thread Philipp Wehrheim
Hey, attached is a small patch that adds the new info subcommand - status. The status indicates if the VM is running or paused this info makes life for (stateless) KVM frontends easier. Since the info is available inside kvm why not make it available? Please consider applying. flip -- diff

Re: [Qemu-devel] [PATCH] Vmchannel PCI device.

2008-12-15 Thread Dan Kenigsberg
On Sun, Dec 14, 2008 at 04:52:20PM -0600, Anthony Liguori wrote: Gleb Natapov wrote: On Sun, Dec 14, 2008 at 01:15:42PM -0600, Anthony Liguori wrote: I don't know why do you think that we are going to use that for closed code or something. It will be used by libvirt and it is open source

Re: [Qemu-devel] [PATCH] Vmchannel PCI device.

2008-12-15 Thread Daniel P. Berrange
On Sun, Dec 14, 2008 at 08:03:39PM -0600, Anthony Liguori wrote: Daniel P. Berrange wrote: On Sun, Dec 14, 2008 at 04:56:49PM -0600, Anthony Liguori wrote: Daniel P. Berrange wrote: On Sun, Dec 14, 2008 at 01:15:42PM -0600, Anthony Liguori wrote: One non-QEMU backend I can see

Re: Poor write- and overall performance

2008-12-15 Thread Henrik Holst
mån 2008-12-15 klockan 12:26 +0200 skrev Avi Kivity: Henrik Holst wrote: Now I haven't tried kvm-81 but scsi with 4GB of RAM or more is severely broken in QEMU for all other tested KVM versions (80 and downwards). kvm-81 contains this: Add 40-bit DMA support to LSI scsi

Re: Poor write- and overall performance

2008-12-15 Thread Henrik Holst
mån 2008-12-15 klockan 08:38 +0200 skrev Avi Kivity: Arne Kepp wrote: Hi, I'm testing KVM 80 (prepackaged from lfarkas.org) on CentOS 5.2 (both guest and host) and comparing against Xen 3.3.0. The only modification I've really made is that I've set noatime on both guest and host. The

Re: [PATCH] [PATCH] qemu: report issues causing the kvm probe to fail

2008-12-15 Thread Avi Kivity
Christian Ehrhardt wrote: I ran into the issue of a failign KVM Probe of the qemu configure script three times this week always needing set -x, inserting an exit, masking the cleanup trap and compiling the c file by hand until I knew what the reason is. I think we could make easier for

Re: [PATCH] AF_VMCHANNEL address family for guest-host communication.

2008-12-15 Thread Anthony Liguori
David Miller wrote: From: Gleb Natapov g...@redhat.com Date: Sun, 14 Dec 2008 13:50:55 +0200 It is undesirable to use TCP/IP for this purpose since network connectivity may not exist between host and guest and if it exists the traffic can be not routable between host and guest for security

Re: [ANNOUNCE] kvm-81 release

2008-12-15 Thread Farkas Levente
Avi Kivity wrote: Farkas Levente wrote: Avi Kivity wrote: This release fixes a bunch of display regressions, and restores userspace/kernel compatibility with older kernel modules. There are a few other goodies hidden in there, for example scsi is now enabled on 4G guests.

[PATCH 1/3] KVM: pci passthrough un-page-aligned mmio device on machines w/o VT-d

2008-12-15 Thread 刘晓建
the following patches apply to KVM-79. however, just now I viewed the code in KVM-81, and saw the problem remains. when assigning a pci device to guest os, the qemu can not guarantee the device's virtual iomem address has the same page offset with the real one. for example: in native linux, the

[PATCH 2/3] KVM: pci passthrough un-page-aligned mmio device on machines w/o VT-d

2008-12-15 Thread 刘晓建
KVM doesn't permit the device's iomem size smaller than 1 page. In fact, this is not necessary. For my via-rhine nic, the size of iomem is only 0x200, but we can still use pci passthrough. And, because un-page-aligned iomem is permitted, sanity check should be adjusted too. --- diff -uNr

Re: [ANNOUNCE] kvm-81 release

2008-12-15 Thread Avi Kivity
Farkas Levente wrote: You shouldn't use --with-patched-kernel, that's useful only if your host kernel is kvm.git, not a vendor kernel. Use ./configure --prefix=/usr --audio-drv-list=oss,alsa my host kernel or my host's kvm kernel module use vendor's kernel's kvm module? since we build

[RFC PATCH] x86 emulator: emulate CPUID instruction

2008-12-15 Thread Guillaume Thouvenin
This patch emulates CPUID instruction. It should work but when I'm testing it in kvm-userspace, the cpuid instruction seems to have no effect (I mean eax == ebx == ecx == edx == 0x0). Should kvm_cpuid_emulate() be modified? Is cpuid instruction correctly implemented? Regards, Signed-off-by:

Re: [Qemu-devel] [PATCH] Vmchannel PCI device.

2008-12-15 Thread Dan Kenigsberg
On Sun, Dec 14, 2008 at 04:52:20PM -0600, Anthony Liguori wrote: Gleb Natapov wrote: On Sun, Dec 14, 2008 at 01:15:42PM -0600, Anthony Liguori wrote: I don't know why do you think that we are going to use that for closed code or something. It will be used by libvirt and it is open source

Re: Poor write- and overall performance

2008-12-15 Thread Avi Kivity
Henrik Holst wrote: Now I haven't tried kvm-81 but scsi with 4GB of RAM or more is severely broken in QEMU for all other tested KVM versions (80 and downwards). kvm-81 contains this: Add 40-bit DMA support to LSI scsi emulation (Ryan Harper) This patch fixes Linux machines

[PATCH v3 0/5] KVM: Improved guest debugging / debug register emulation

2008-12-15 Thread Jan Kiszka
This is the kernel part of the guest debugging / debug register emulation patch series. Changes since last round (was v1, skipped v2 to remain in sync with user space series): - Reworked patch 3 (single-stepping over STI / MOV SS on VMX) - Rebased over latest git Meanwhile basic tests on a SVM

Re: [PATCH] new monitor func status

2008-12-15 Thread Avi Kivity
Philipp Wehrheim wrote: Hey, attached is a small patch that adds the new info subcommand - status. The status indicates if the VM is running or paused this info makes life for (stateless) KVM frontends easier. Since the info is available inside kvm why not make it available? Please post

Re: [PATCH 00/12] Add support for nested SVM (kernel) v7

2008-12-15 Thread Avi Kivity
Alexander Graf wrote: The current generation of virtualization extensions only supports one VM layer. While we can't change that, it is pretty easy to emulate the CPU's behavior and implement the virtualization opcodes ourselves. This patchset does exactly this for SVM. Using it, KVM can run

[PATCH v3 4/5] KVM: x86: Virtualize debug registers

2008-12-15 Thread Jan Kiszka
So far KVM only had basic x86 debug register support, once introduced to realize guest debugging that way. The guest itself was not able to use those registers. This patch now adds (almost) full support for guest self-debugging via hardware registers. It refactors the code, moving generic parts

RE: [PATCH] AF_VMCHANNEL address family for guest-host communication.

2008-12-15 Thread Itamar Heim
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Jeremy Fitzhardinge The trouble is that it presumes that the host and guest (or whoever the endpoints are) are on the same physical machine and will remain that way. Given that live

Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO

2008-12-15 Thread Blue Swirl
On 12/15/08, Anthony Liguori anth...@codemonkey.ws wrote: Avi Kivity wrote: Anthony Liguori wrote: I've thought quite a bit about it, and I'm becoming less convinced that this sort of API is going to be helpful. I was thinking that we need to make one minor change to the map API I

Re: [PATCH] AF_VMCHANNEL address family for guest-host communication.

2008-12-15 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Each of these sockets are going to be connected to a backend (to implement guest=copy/paste for instance). We want to implement those backends in userspace and preferably in QEMU. Using some raw protocol over ethernet means you don't have reliability. If you use

Re: [PATCH] AF_VMCHANNEL address family for guest-host communication.

2008-12-15 Thread David Miller
From: Anthony Liguori anth...@codemonkey.ws Date: Mon, 15 Dec 2008 09:02:23 -0600 There is already an AF_IUCV for s390. This is a scarecrow and irrelevant to this discussion. And this is exactly why I asked that any arguments in this thread avoid talking about virtualization technology and why

[PATCH] Refresh TLB only when switch vcpu for powerpc

2008-12-15 Thread Liu Yu
Some work such as TLB put/load on E500 is not necessary at every process switch, which may take place frequently when host workload is heavy. This patch add a refresh interface for powerpc. These kind of work can use it to refresh at vcpu switch. Signed-off-by: Liu Yu yu@freescale.com ---

RE: [PATCH] Refresh TLB only when switch vcpu for powerpc

2008-12-15 Thread Liu Yu
Not sure 44x needs it... -Original Message- From: Liu Yu-B13201 Sent: Monday, December 15, 2008 5:55 PM To: kvm-ppc@vger.kernel.org Cc: Liu Yu-B13201 Subject: [PATCH] Refresh TLB only when switch vcpu for powerpc Some work such as TLB put/load on E500 is not necessary at every

[PATCH] Keep shadow pid equal to guest pid on E500

2008-12-15 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_emulate.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index ae3b249..ecb3f55 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++

[PATCH] [PATCH] kvm-userspace: ppc: fix compatfd build decision v2

2008-12-15 Thread Christian Ehrhardt
# HG changeset patch # User Christian Ehrhardt ehrha...@linux.vnet.ibm.com # Date 1229345133 -3600 # Node ID b48b9d560f80037ab4e12eae128022622c7ccb34 # Parent 4b0ad05490115e4c6f31d2419c0e5b628040f90b [PATCH] kvm-userspace: ppc: fix compatfd build decision v2 From: Christian Ehrhardt

[PATCH 2/8] Rename ppc405_sdram_init() to ppc4xx_sdram_init()

2008-12-15 Thread Hollis Blanchard
The SDRAM controller is shared across almost all 405 and 440 embedded processors, with some slight differences such as the sizes supported for each memory bank. Rename only; no functional changes. Signed-off-by: Hollis Blanchard holl...@us.ibm.com --- hw/ppc405_uc.c |4 ++-- hw/ppc4xx.h

[PATCH 1/8] Move PPC4xx SDRAM controller emulation from ppc405_uc.c to ppc4xx_devs.c

2008-12-15 Thread Hollis Blanchard
The SDRAM controller is shared across almost all 405 and 440 embedded processors, with some slight differences such as the sizes supported for each memory bank. Code movement only; no functional changes. Signed-off-by: Hollis Blanchard holl...@us.ibm.com --- I think all device emulation should

[PATCH 4/8] kvm: sync vcpu state during initialization

2008-12-15 Thread Hollis Blanchard
Currently on x86, qemu initializes CPUState but KVM ignores it and does its own vcpu initialization. However, PowerPC KVM needs to be able to set the initial register state to support the -kernel and -append options. Signed-off-by: Hollis Blanchard holl...@us.ibm.com --- kvm-all.c | 15

[PATCH 5/8] Implement device tree support needed for Bamboo emulation

2008-12-15 Thread Hollis Blanchard
To implement the -kernel, -initrd, and -append options, 4xx board emulation must load the guest kernel as if firmware had loaded it. Where u-boot would be the firmware, we must load the flat device tree into memory and set key fields such as /chosen/bootargs. This patch introduces a dependency on

[PATCH 7/8] PowerPC 440EP SoC emulation

2008-12-15 Thread Hollis Blanchard
Wire up the system-on-chip devices present on 440EP chips. This patch is a little unusual in that qemu doesn't actually emulate the 440 core, but we use this board code with KVM (which does). If/when 440 core emulation is supported, the kvm_enabled() hack can be removed. Signed-off-by: Hollis

[PATCH 8/8] IBM PowerPC 440EP Bamboo reference board emulation

2008-12-15 Thread Hollis Blanchard
Since most IO devices are integrated into the 440EP chip, Bamboo support mostly entails implementing the -kernel, -initrd, and -append options. These options are implemented by loading the guest as if u-boot had done it, i.e. loading a flat device tree, updating it to hold initrd addresses, ram

Re: [Qemu-devel] [PATCH 8/8] IBM PowerPC 440EP Bamboo reference board emulation

2008-12-15 Thread Paul Brook
On Monday 15 December 2008, Hollis Blanchard wrote: + * Qemu PowerPC 440 board emulation Is this emulating an actual board, or something you invented. I'm guessing the latter, inwhich case you should say which one. Paul -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the

Re: [PATCH 1 of 6] [PATCH] kvm-userspace: ppc: fix compatfd build decision

2008-12-15 Thread Christian Ehrhardt
Avi Kivity wrote: qemu-kvm.c uses qemu_eventfd/qemu_signalfd. The code of compatfd takes care if CONFIG_eventfd/CONFIG_signalfd is really enabled. But currently compatfd is not build if --disable-aio is set. This patch lets compatfd.c build if USE_KVM is set to allow qemu-kvm to be linked in

Re: [Qemu-devel] [PATCH 1/8] Move PPC4xx SDRAM controller emulation from ppc405_uc.c to ppc4xx_devs.c

2008-12-15 Thread Aurelien Jarno
On Mon, Dec 15, 2008 at 10:44:12AM -0600, Hollis Blanchard wrote: The SDRAM controller is shared across almost all 405 and 440 embedded processors, with some slight differences such as the sizes supported for each memory bank. Code movement only; no functional changes. Signed-off-by:

Re: [Qemu-devel] [PATCH 3/8] Create a helper function to allow more flexible RAM allocation for PPC 4xx

2008-12-15 Thread Aurelien Jarno
On Mon, Dec 15, 2008 at 10:44:14AM -0600, Hollis Blanchard wrote: The 4xx SDRAM controller supports a small number of banks, and each bank must be one of a small set of sizes. The number of banks and the supported sizes varies by SoC. This function uses the user-specified RAM size to fill in