Re: [PATCH] disable interrupt shadow state for emulated instruction

2009-04-09 Thread Avi Kivity
H. Peter Anvin wrote: How does this logic work when the instruction emulated is an STI or MOV SS instruction? In particular, when does GUEST_INTERRUPTIBILITY_INFO sets set to reflect the *blocking* operation? The processor sets it when emulating an sti or mov ss instruction. We ought to

Re: [PATCH] disable interrupt shadow state for emulated instruction

2009-04-09 Thread Avi Kivity
Glauber Costa wrote: How does this logic work when the instruction emulated is an STI or MOV SS instruction? In particular, when does GUEST_INTERRUPTIBILITY_INFO sets set to reflect the *blocking* operation? mov ss is a non-issue, since it is executed natively. Except in big real

Re: [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages.

2009-04-09 Thread Marcelo Tosatti
On Tue, Mar 31, 2009 at 03:00:02AM +0300, Izik Eidus wrote: When using mmu notifiers, we are allowed to remove the page count reference tooken by get_user_pages to a specific page that is mapped inside the shadow page tables. This is needed so we can balance the pagecount against mapcount

Re: [PATCH 2/3] kvm: add SPTE_HOST_WRITEABLE flag to the shadow ptes.

2009-04-09 Thread Marcelo Tosatti
On Tue, Mar 31, 2009 at 03:00:03AM +0300, Izik Eidus wrote: this flag notify that the host physical page we are pointing to from the spte is write protected, and therefore we cant change its access to be write unless we run get_user_pages(write = 1). (this is needed for change_pte support in

Re: [patch 2/3] kvm: convert spin-locks to raw_spinlock_t

2009-04-09 Thread Marcelo Tosatti
Acked-by: Marcelo Tosatti mtosa...@redhat.com On Wed, Apr 08, 2009 at 01:58:55AM +0200, Jan Blunck wrote: This patch converts some KVM spin-locks to be of type raw_spinlock_t. Signed-off-by: Jan Blunck jblu...@suse.de --- arch/x86/kvm/i8254.h |2 +- arch/x86/kvm/irq.h |2 +- 2

Re: [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages.

2009-04-09 Thread Izik Eidus
Marcelo Tosatti wrote: On Tue, Mar 31, 2009 at 03:00:02AM +0300, Izik Eidus wrote: When using mmu notifiers, we are allowed to remove the page count reference tooken by get_user_pages to a specific page that is mapped inside the shadow page tables. This is needed so we can balance the

AW: AW: AW: KVM performance

2009-04-09 Thread BRAUN, Stefanie
Hello, now I was able to start the guest vmu with disk virtio, and some of the tests with disk involvement even improved a bit. But the test in which a logo is added to the video stream does not improve. I don't know why the performance is so bad? Subtest: Reading video locally, adding a logo

Re: 3525MB RAM Limit

2009-04-09 Thread Brian Jackson
I was thinking of a bug when using large pages, which may not be your problem. There have been other reports recently, with workarounds, that are similar, just not the exact same number you have. some subjects to look for: * Can't boot guest with more than 3585MB when using large pages There

Re: [PATCH] Add MCE support to KVM

2009-04-09 Thread Avi Kivity
Huang Ying wrote: Add MCE support to KVM. The related MSRs are emulated. A new vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation such as the mcg_cap. MCE is injected via vcpu ioctl command KVM_X86_SET_MCE. Extended machine-check state (MCG_EXT_P) and CMCI are not implemented.

Re: [kvm] Re: 3525MB RAM Limit

2009-04-09 Thread Alex Williamson
On Thu, 2009-04-09 at 10:39 -0500, Brian Jackson wrote: I was thinking of a bug when using large pages, which may not be your problem. There have been other reports recently, with workarounds, that are similar, just not the exact same number you have. some subjects to look for: * Can't

Virtio Queries

2009-04-09 Thread Kumar, Venkat
Hi, I am a few questions on Virtio, Hope somebody clarifies them 1. What is the address type that is put inside the vring descriptor in the virt queue while placing a request? Is it the guest virtual address or guest physical address? 2. If it is Guest physical address, how qemu converts it to

Re: [PATCH 2/2] The included file stropts.h does not exist in the source tree, so this line should be deleted.

2009-04-09 Thread Avi Kivity
Zhiyong Wu wrote: Signed-off-by: Zhiyong Wu zwu.ker...@gmail.com Applied both, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH] KVM: Make kvm header compile under g++.

2009-04-09 Thread Avi Kivity
nathan binkert wrote: Excellent. One of the things I'm trying hard to do is keep kvm from being a 'qemu accelerator' and generally useful for other projects. That is, I'm trying to keep the userspace interface neutral, and not to model exactly the hardware qemu provides but allow for other

Re: [patch 0/2] disable unsync global page optimization

2009-04-09 Thread Avi Kivity
Marcelo Tosatti wrote: Applied, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. -- 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

Re: 3525MB RAM Limit

2009-04-09 Thread Mauricio Villarroel
Thanks Brian, The kvm host with the problem is running: * Fedora release 10 (Cambridge) * kernel: 2.6.27 (the actual fedora package is 2.6.27.21-170.2.56.fc10.x86_64) * 4x Quad-Core AMD Opteron(tm) Processor 8347 HE * KVM version: 74 (the actual fedora package is (kvm-74-10.fc10.x86_64)

[RFC PATCH v2 01/19] shm-signal: shared-memory signals

2009-04-09 Thread Gregory Haskins
This interface provides a bidirectional shared-memory based signaling mechanism. It can be used by any entities which desire efficient communication via shared memory. The implementation details of the signaling are abstracted so that they may transcend a wide variety of locale boundaries (e.g.

[RFC PATCH v2 00/19] virtual-bus

2009-04-09 Thread Gregory Haskins
This is release v2. Changes since v1: *) Incorporated review feedback from Stephen Hemminger on vbus-enet driver *) Added support for connecting to vbus devices from userspace *) Added support for a virtio-vbus transport to allow virtio drivers to work with vbus (needs testing and backend

[RFC PATCH v2 03/19] vbus: add connection-client helper infrastructure

2009-04-09 Thread Gregory Haskins
We expect to have various types of connection-clients (e.g. userspace, kvm, etc), each of which is likely to have common access patterns and marshalling duties. Therefore we create a client API to simplify client development by helping with mundane tasks such as handle-2-pointer translation, etc.

[RFC PATCH v2 05/19] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-04-09 Thread Gregory Haskins
This will generally be used for hypervisors to publish any host-side virtual devices up to a guest. The guest will have the opportunity to consume any devices present on the vbus-proxy as if they were platform devices, similar to existing buses like PCI. Signed-off-by: Gregory Haskins

[RFC PATCH v2 04/19] vbus: add bus-registration notifiers

2009-04-09 Thread Gregory Haskins
We need to get hotswap events in environments which cannot use existing facilities (e.g. inotify). So we add a notifier-chain to allow client callbacks whenever an interface is {un}registered. Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/vbus.h | 15 +

[RFC PATCH v2 08/19] venet: add the ABI definitions for an 802.x packet interface

2009-04-09 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/venet.h | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) create mode 100644 include/linux/venet.h diff --git a/include/linux/venet.h b/include/linux/venet.h new file

[RFC PATCH v2 09/19] net: Add vbus_enet driver

2009-04-09 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/net/Kconfig | 13 + drivers/net/Makefile|1 drivers/net/vbus-enet.c | 680 +++ 3 files changed, 694 insertions(+), 0 deletions(-) create mode 100644 drivers/net/vbus-enet.c

[RFC PATCH v2 10/19] venet-tap: Adds a venet compatible tap device to VBUS

2009-04-09 Thread Gregory Haskins
This module is similar in concept to a tuntap. A tuntap module provides a netif() interface on one side, and a char-dev interface on the other. Packets that ingress on one interface, egress on the other (and vice versa). This module offers a similar concept, except that it substitues the

[RFC PATCH v2 12/19] venettap: add scatter-gather support

2009-04-09 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/vbus/devices/venet-tap.c | 235 +- 1 files changed, 228 insertions(+), 7 deletions(-) diff --git a/drivers/vbus/devices/venet-tap.c b/drivers/vbus/devices/venet-tap.c index 148e2c8..a1f2dc6

[RFC PATCH v2 14/19] kvm: add a reset capability

2009-04-09 Thread Gregory Haskins
We need a way to detect if a VM is reset later in the series, so lets add a capability for userspace to signal a VM reset down to the kernel. Signed-off-by: Gregory Haskins ghask...@novell.com --- arch/x86/kvm/x86.c |1 + include/linux/kvm.h |2 ++ include/linux/kvm_host.h |

[RFC PATCH v2 15/19] kvm: add dynamic IRQ support

2009-04-09 Thread Gregory Haskins
This patch provides the ability to dynamically declare and map an interrupt-request handle to an x86 8-bit vector. Problem Statement: Emulated devices (such as PCI, ISA, etc) have interrupt routing done via standard PC mechanisms (MP-table, ACPI, etc). However, we also want to support a new

[RFC PATCH v2 16/19] kvm: Add VBUS support to the host

2009-04-09 Thread Gregory Haskins
This patch adds support for guest access to a VBUS assigned to the same context as the VM. It utilizes a IOQ+IRQ to move events from host-guest, and provides a hypercall interface to move events guest-host. Signed-off-by: Gregory Haskins ghask...@novell.com --- arch/x86/include/asm/kvm_para.h

[RFC PATCH v2 17/19] kvm: Add guest-side support for VBUS

2009-04-09 Thread Gregory Haskins
This adds a driver to interface between the host VBUS support, and the guest-vbus bus model. Signed-off-by: Gregory Haskins ghask...@novell.com --- arch/x86/Kconfig|9 + drivers/Makefile|1 drivers/vbus/proxy/Makefile |2 drivers/vbus/proxy/kvm.c| 726

[RFC PATCH v2 13/19] x86: allow the irq-vector translation to be determined outside of ioapic

2009-04-09 Thread Gregory Haskins
The ioapic code currently privately manages the mapping between irq and vector. This results in some layering violations as the support for certain MSI operations need this info. As a result, the MSI code itself was moved to the ioapic module. This is not really optimal. We now have another

[RFC PATCH v2 11/19] venet: add scatter-gather support

2009-04-09 Thread Gregory Haskins
Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/net/vbus-enet.c | 249 +-- include/linux/venet.h | 39 +++ 2 files changed, 275 insertions(+), 13 deletions(-) diff --git a/drivers/net/vbus-enet.c b/drivers/net/vbus-enet.c index

[RFC PATCH v2 07/19] ioq: add vbus helpers

2009-04-09 Thread Gregory Haskins
It will be common to map an IOQ over the VBUS shared-memory interfaces, so lets generalize their setup so we can reuse the pattern. Signed-off-by: Gregory Haskins ghask...@novell.com --- include/linux/vbus_device.h |7 +++ include/linux/vbus_driver.h |7 +++ kernel/vbus/Kconfig

[RFC PATCH v2 06/19] ioq: Add basic definitions for a shared-memory, lockless queue

2009-04-09 Thread Gregory Haskins
We can map these over VBUS shared memory (or really any shared-memory architecture if it supports shm-signals) to allow asynchronous communication between two end-points. Memory is synchronized using pure barriers (i.e. lockless), so IOQs are friendly in many contexts, even if the memory is

Re: [RFC PATCH v2 09/19] net: Add vbus_enet driver

2009-04-09 Thread Stephen Hemminger
On Thu, 09 Apr 2009 12:31:29 -0400 Gregory Haskins ghask...@novell.com wrote: Signed-off-by: Gregory Haskins ghask...@novell.com --- drivers/net/Kconfig | 13 + drivers/net/Makefile|1 drivers/net/vbus-enet.c | 680 +++ 3

Re: [RFC PATCH v2 00/19] virtual-bus

2009-04-09 Thread Gregory Haskins
Avi, Gregory Haskins wrote: Todo: *) Develop some kind of hypercall registration mechanism for KVM so that we can use that as an integration point instead of directly hooking kvm hypercalls What would you like to see here? I now remember why I removed the original patch I had for

[PATCH] handle -smp 16 more cleanly

2009-04-09 Thread Bruce Rogers
The x86 kvm kernel module limits guest cpu count to 16, but theuserspace pc definition says 255 still, so kvm_create_vcpu will fail for that reason with -smp 16 specified. This patch causes qemu-kvm to exit in that case. Without this patch other errors get reported down the road and finally

how to convert manual vm to libvirtd management

2009-04-09 Thread Riccardo Veraldi
Hello, I have always created my VM under kvm manually starting them from a .sh script: for example machine called abbone # abbone.sh screen qemu-kvm -nographic -hda ./abbone.img -m 512 -net nic,model=e1000,macaddr=00:16:3e:05:00:07 -net tap -name abbone -vnc :0 I use screen so that I am

Re: how to convert manual vm to libvirtd management

2009-04-09 Thread Daniel P. Berrange
On Thu, Apr 09, 2009 at 07:02:02PM +0200, Riccardo Veraldi wrote: Hello, I have always created my VM under kvm manually starting them from a .sh script: for example machine called abbone # abbone.sh screen qemu-kvm -nographic -hda ./abbone.img -m 512 -net

Re: 3525MB RAM Limit

2009-04-09 Thread Brian Jackson
Hi, Thanks for the response. I have read through the archives (I also did so before posting :) ) but I haven't been able to find any information about this. Do you know where I can find it? I tried searching for 4GB and 3525MB and various combinations. Do you know if a specific limit is

Re: [kvm] Re: 3525MB RAM Limit

2009-04-09 Thread Daniel Scott
Brian, Alex, 2009/4/9 Alex Williamson alex.william...@hp.com: On Thu, 2009-04-09 at 10:39 -0500, Brian Jackson wrote: some subjects to look for: * Can't boot guest with more than 3585MB when using large pages There was a patch from Marcelo that was supposed to fix it. * kvm-84 and guests

Re: [kvm] Re: 3525MB RAM Limit

2009-04-09 Thread Sterling Windmill
Is this a problem in the latest (kvm-84) or just in an older version that Fedora 10 provides? - Original Message - From: Daniel Scott djsc...@mit.edu To: Alex Williamson alex.william...@hp.com Cc: Brian Jackson i...@theiggy.com, kvm@vger.kernel.org Sent: Thursday, April 9, 2009

Re: [RFC PATCH v2 09/19] net: Add vbus_enet driver

2009-04-09 Thread Greg KH
On Thu, Apr 09, 2009 at 09:37:10AM -0700, Stephen Hemminger wrote: +static int tx_ringlen = 256; +module_param(tx_ringlen, int, 0444); + +#undef PDEBUG /* undef it, just in case */ +#ifdef VBUS_ENET_DEBUG +# define PDEBUG(fmt, args...) printk(KERN_DEBUG vbus_enet: fmt, ##

[PATCH 2/2] Finish HPET implementation for KVM

2009-04-09 Thread Beth Kon
Signed-off-by: Beth Kon e...@us.ibm.com diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl index 06ab25d..84697db 100755 --- a/bios/acpi-dsdt.dsl +++ b/bios/acpi-dsdt.dsl @@ -307,6 +307,24 @@ DefinitionBlock ( ,, , AddressRangeMemory, TypeStatic) }) }

[PATCH 1/2] Make BIOS irq0-inti2 override configurable from userspace

2009-04-09 Thread Beth Kon
These patches resolve the irq0-inti2 override issue, and get the hpet working on kvm with and without -no-kvm-irqchip (i.e., when hpet takes over, it disables userspace or in-kernel pit as appropriate). The irq0-inti2 override will always be used unless the kernel cannot do irq routing (i.e.,

kvm-84: Nested virtualization, crashes, and kvm binary name

2009-04-09 Thread Mihail Panev
Hello, I'm currently writing my bachelor's thesis on the KVM and ran a series of benchmarks, partly home grown on it. This was a few months ago. I used the kvm package from the Debian sid repository (kvm-72) with kernel 2.6.26, which at the time were both almost up-to-date :-) (upstream KVM

Re: [PATCH] Add MCE support to KVM

2009-04-09 Thread Huang Ying
On Thu, 2009-04-09 at 23:50 +0800, Avi Kivity wrote: Huang Ying wrote: +int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) +{ + switch (msr) { + case MSR_EFER: + set_efer(vcpu, data); break; case MSR_IA32_DEBUGCTLMSR: if

Re: [patch 0/3] Patches for KVM RT

2009-04-09 Thread Carsten Emde
Jan, Here are some patches that are necessary to get KVM running with the -rt4 patchset. Thanks a lot. Unfortunaately, there is still a last one at kernel/smp.c:288 /* Can deadlock when called with interrupts disabled */ WARN_ON_ONCE(irqs_disabled() !oops_in_progress); Do we