[COMMIT master] Fix softfloat build failure due to missing HOST_LONG_BITS

2009-11-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index 4c70b6c..b4b6784 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -5,6 +5,7 @@ #if defined(CONFIG_SOLARIS) #include fenv.h #endif

[COMMIT master] Merge branch 'master' of git://repo.or.cz/qemu-kvm/markmc

2009-11-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * 'master' of git://repo.or.cz/qemu-kvm/markmc: (218 commits) musicpal: intermediate merge fixup stellaris_enet: intermediate merge fixup xilinx_ethlite: intermediate merge fixup smc91c111: intermediate merge fixup eepro100: intermediate merge fixup

[COMMIT master] KVM: x86: disallow KVM_{SET, GET}_LAPIC without allocated in-kernel lapic

2009-11-02 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Otherwise kvm might attempt to dereference a NULL pointer. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 93bcd11..1cc51ca 100644 ---

error while loading state for instance 0x0 of device 'kvmclock'

2009-11-02 Thread Jan Kiszka
Hi, current qemu-kvm.git gives me the message qemu: warning: error while loading state for instance 0x0 of device 'kvmclock' when I run a simple savevm followed by a loadvm 1. What's broken here? Jan signature.asc Description: OpenPGP digital signature

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Ingo Molnar
* Gleb Natapov g...@redhat.com wrote: diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index f4cee90..14707dc 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -952,6 +952,9 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) int write; int

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

2009-11-02 Thread Alexander Graf
Am 02.11.2009 um 00:23 schrieb Michael Neuling mi...@neuling.org: 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

Re: [PATCH 04/11] Export __get_user_pages_fast.

2009-11-02 Thread Ingo Molnar
* Gleb Natapov g...@redhat.com wrote: Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/mm/gup.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index 71da1bc..cea0dfe 100644 --- a/arch/x86/mm/gup.c +++

Re: [PATCH 09/11] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-02 Thread Ingo Molnar
* Gleb Natapov g...@redhat.com wrote: Do not preempt kernel. Just maintain counter to know if task can sleep. Signed-off-by: Gleb Natapov g...@redhat.com --- include/linux/hardirq.h |6 ++ include/linux/preempt.h | 22 -- kernel/sched.c |6

Re: [PATCH 11/27] Add book3s_64 Host MMU handling

2009-11-02 Thread Alexander Graf
Am 02.11.2009 um 00:39 schrieb Michael Neuling mi...@neuling.org: snip +static void invalidate_pte(struct hpte_cache *pte) +{ +dprintk_mmu(KVM: Flushing SPT %d: 0x%llx (0x%llx) - 0x%llx\n, +i, pte-pte.eaddr, pte-pte.vpage, pte-host_va); + +ppc_md.hpte_invalidate(pte-slot,

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

2009-11-02 Thread Michael Neuling
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.

Re: [patch 0/3] ioctl fixes v3

2009-11-02 Thread Avi Kivity
On 10/29/2009 05:44 PM, Marcelo Tosatti wrote: Addressing comments. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info

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

2009-11-02 Thread Alexander Graf
Am 02.11.2009 um 10:39 schrieb Michael Neuling mi...@neuling.org: 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

Re: Impossible to compile kvm-88 on Redhat 5.4

2009-11-02 Thread Avi Kivity
On 10/30/2009 11:22 AM, Jan Kiszka wrote: Arnaud Maillet wrote: In RH 5.4 it's a 2.6.18 ! Hmm, and that's outside the support range of kvm-kmod today. I had a look at the conflicts: there are more than I can fix with reasonable effort ATM. It's 2.6.18 plus wild backports from

Re: error while loading state for instance 0x0 of device 'kvmclock'

2009-11-02 Thread Jan Kiszka
Jan Kiszka wrote: Hi, current qemu-kvm.git gives me the message qemu: warning: error while loading state for instance 0x0 of device 'kvmclock' when I run a simple savevm followed by a loadvm 1. What's broken here? OK, this is due to KVM: add flags to kvm_clock_data (958b0c5497): the flags

Re: [PULL REQUEST] merge latest upstream qemu networking bits

2009-11-02 Thread Avi Kivity
On 10/28/2009 04:19 PM, Mark McLoughlin wrote: Hey, Below is a pull request to merge latest qemu.git/master into qemu-kvm.git/next Pulled, thanks. The most notable thing here is that all our networking changes are now upstream - i.e. there are no longer qemu-kvm specific changes to

Re: [PULL REQUEST] merge latest upstream qemu networking bits

2009-11-02 Thread Mark McLoughlin
On Mon, 2009-11-02 at 12:36 +0200, Avi Kivity wrote: On 10/28/2009 04:19 PM, Mark McLoughlin wrote: The most notable thing here is that all our networking changes are now upstream - i.e. there are no longer qemu-kvm specific changes to net.[ch], net-queue.[ch], savevm.c and hw/virtio-net.c

Re: [PULL REQUEST] merge latest upstream qemu networking bits

2009-11-02 Thread Avi Kivity
On 11/02/2009 01:57 PM, Mark McLoughlin wrote: On Mon, 2009-11-02 at 12:36 +0200, Avi Kivity wrote: On 10/28/2009 04:19 PM, Mark McLoughlin wrote: The most notable thing here is that all our networking changes are now upstream - i.e. there are no longer qemu-kvm specific changes

Re: [PATCH 01/11] Add shared memory hypercall to PV Linux guest.

2009-11-02 Thread Avi Kivity
On 11/01/2009 01:56 PM, Gleb Natapov wrote: Add hypercall that allows guest and host to setup per cpu shared memory. Better to set this up as an MSR (with bit zero enabling, bits 1-5 features, and 64-byte alignment). This allows auto-reset on INIT and live migration using the existing

Re: [PATCH 03/11] Handle asynchronous page fault in a PV guest.

2009-11-02 Thread Avi Kivity
On 11/01/2009 01:56 PM, Gleb Natapov wrote: Asynchronous page fault notifies vcpu that page it is trying to access is swapped out by a host. In response guest puts a task that caused the fault to sleep until page is swapped in again. When missing page is brought back into the memory guest is

Re: [PATCH 06/11] Inject asynchronous page fault into a guest if page is swapped out.

2009-11-02 Thread Avi Kivity
On 11/01/2009 01:56 PM, Gleb Natapov wrote: If guest access swapped out memory do not swap it in from vcpu thread context. Setup slow work to do swapping and send async page fault to a guest. Allow async page fault injection only when guest is in user mode since otherwise guest may be in

Re: [PATCH 07/11] Retry fault before vmentry

2009-11-02 Thread Avi Kivity
On 11/01/2009 01:56 PM, Gleb Natapov wrote: When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. diff --git

Re: [PATCH 08/11] Add wait for page hypercall.

2009-11-02 Thread Avi Kivity
On 11/01/2009 01:56 PM, Gleb Natapov wrote: We want to be able to inject async pagefault into guest event if a guest is not executing userspace code. But in this case guest may receive async page fault in non-sleepable context. In this case it will be able to make wait for page hypercall vcpu

Re: [PATCH 5/5] Fix kdump under KVM.

2009-11-02 Thread Chris Lalancette
Avi Kivity wrote: On 10/30/2009 02:23 PM, Chris Lalancette wrote: In the meantime, I've gotten the set_irq from IRQ context that Avi suggested working, and the fixing up of this IOAPIC check is the last bit to actually get kdump working. There are two problems with that: -

Re: [PATCH 5/5] Fix kdump under KVM.

2009-11-02 Thread Avi Kivity
On 11/02/2009 03:22 PM, Chris Lalancette wrote: Avi Kivity wrote: On 10/30/2009 02:23 PM, Chris Lalancette wrote: In the meantime, I've gotten the set_irq from IRQ context that Avi suggested working, and the fixing up of this IOAPIC check is the last bit to actually get kdump

buildbot failure in qemu-kvm on default_i386_debian_5_0

2009-11-02 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_debian_5_0/builds/139 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

Re: error while loading state for instance 0x0 of device 'kvmclock'

2009-11-02 Thread Avi Kivity
On 11/02/2009 12:28 PM, Jan Kiszka wrote: Jan Kiszka wrote: Hi, current qemu-kvm.git gives me the message qemu: warning: error while loading state for instance 0x0 of device 'kvmclock' when I run a simple savevm followed by a loadvm 1. What's broken here? OK, this is due to KVM: add

Re: error while loading state for instance 0x0 of device 'kvmclock'

2009-11-02 Thread Marcelo Tosatti
On Mon, Nov 02, 2009 at 11:28:38AM +0100, Jan Kiszka wrote: Jan Kiszka wrote: Hi, current qemu-kvm.git gives me the message qemu: warning: error while loading state for instance 0x0 of device 'kvmclock' when I run a simple savevm followed by a loadvm 1. What's broken here? OK, this

Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Mark McLoughlin
On Fri, 2009-10-30 at 16:15 -0500, Dustin Kirkland wrote: On Thu, Oct 29, 2009 at 10:34 AM, Dustin Kirkland kirkl...@canonical.com wrote: whitelist host virtio networking features This patch is a followup to 8eca6b1bc770982595db2f7207c65051572436cb, fixing crashes when guests with 2.6.25

Re: [PATCH 08/11] Add wait for page hypercall.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 03:05:11PM +0200, Avi Kivity wrote: On 11/01/2009 01:56 PM, Gleb Natapov wrote: We want to be able to inject async pagefault into guest event if a guest is not executing userspace code. But in this case guest may receive async page fault in non-sleepable context. In

Re: [PATCH 08/11] Add wait for page hypercall.

2009-11-02 Thread Avi Kivity
On 11/02/2009 05:13 PM, Gleb Natapov wrote: On Mon, Nov 02, 2009 at 03:05:11PM +0200, Avi Kivity wrote: On 11/01/2009 01:56 PM, Gleb Natapov wrote: We want to be able to inject async pagefault into guest event if a guest is not executing userspace code. But in this case guest may

Re: error while loading state for instance 0x0 of device 'kvmclock'

2009-11-02 Thread Jan Kiszka
Avi Kivity wrote: On 11/02/2009 12:28 PM, Jan Kiszka wrote: Jan Kiszka wrote: Hi, current qemu-kvm.git gives me the message qemu: warning: error while loading state for instance 0x0 of device 'kvmclock' when I run a simple savevm followed by a loadvm 1. What's broken here? OK,

Re: [PATCH 06/11] Inject asynchronous page fault into a guest if page is swapped out.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 02:56:46PM +0200, Avi Kivity wrote: On 11/01/2009 01:56 PM, Gleb Natapov wrote: If guest access swapped out memory do not swap it in from vcpu thread context. Setup slow work to do swapping and send async page fault to a guest. Allow async page fault injection only

Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Anthony Liguori
Mark McLoughlin wrote: Canonical's Ubuntu Security Team will be filing a CVE on this issue, since there is a bit of an attack vector here, and since qemu-kvm-0.11.0 is generally available as an official release (and now part of Ubuntu 9.10). Guests running linux = 2.6.25 virtio-net (e.g Ubuntu

[PATCH] KVM: x86: Clear flags field on return from KVM_GET_CLOCK

2009-11-02 Thread Jan Kiszka
This field is supposed to indicate the availability of additional fields one day. There are none yet, so clear it - and drop the bogus check, too. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- This alone fixes the savevm/loadvm issue around kvmclock reported today. arch/x86/kvm/x86.c |

Re: [PATCH 03/11] Handle asynchronous page fault in a PV guest.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 02:38:30PM +0200, Avi Kivity wrote: On 11/01/2009 01:56 PM, Gleb Natapov wrote: Asynchronous page fault notifies vcpu that page it is trying to access is swapped out by a host. In response guest puts a task that caused the fault to sleep until page is swapped in again.

Re: pc-bios/linux_boot.bin and other pc-bios stuff

2009-11-02 Thread Anthony Liguori
Avi Kivity wrote: On 10/23/2009 06:30 PM, Michael Tokarev wrote: ..is this file needed in qemu-kvm-0.11.0? It looks like it's not used in the code, can't be rebuilt, and is a left-over from ancient times. Can it be removed? There's no linux_boot.bin in the qemu-kvm stable-0.11 source tree.

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index f4cee90..14707dc 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -952,6 +952,9 @@ do_page_fault(struct

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Ingo Molnar
* Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index f4cee90..14707dc 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c

Re: [PATCH 01/11] Add shared memory hypercall to PV Linux guest.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 02:18:54PM +0200, Avi Kivity wrote: On 11/01/2009 01:56 PM, Gleb Natapov wrote: Add hypercall that allows guest and host to setup per cpu shared memory. Better to set this up as an MSR (with bit zero enabling, bits 1-5 features, and 64-byte alignment). This allows

[PATCH v3 4/4] KVM: x86: Add VCPU substate for event states

2009-11-02 Thread Jan Kiszka
This new substate exports all yet user-invisible states related to exceptions, interrupts, and NMIs. Together with appropriate user space changes, this fixes sporadic problems of vmsave/restore, live migration and system reset. Signed-off-by: Jan Kiszka jan.kis...@siemens.com ---

[PATCH v3 3/4] KVM: x86: Add support for KVM_GET/SET_VCPU_STATE

2009-11-02 Thread Jan Kiszka
Add support for getting/setting MSRs, CPUID tree, and the LACPIC via the new VCPU state interface. Also in this case we convert the existing IOCTLs to use the new infrastructure internally. The MSR interface has to be extended to pass back the number of processed MSRs via the header structure

[PATCH v3 2/4] KVM: Add unified KVM_GET/SET_VCPU_STATE IOCTL

2009-11-02 Thread Jan Kiszka
Add a new IOCTL pair to retrieve or set the VCPU state in one chunk. More precisely, the IOCTL is able to process a list of substates to be read or written. This list is easily extensible without breaking the existing ABI, thus we will no longer have to add new IOCTLs when we discover a missing

[PATCH v3 1/4] KVM: Reorder IOCTLs in main kvm.h

2009-11-02 Thread Jan Kiszka
Obviously, people tend to extend this header at the bottom - more or less blindly. Ensure that deprecated stuff gets its own corner again by moving things to the top. Also add some comments and reindent IOCTLs to make them more readable and reduce the risk of number collisions. Signed-off-by: Jan

[PATCH v3 0/4] Extensible VCPU state IOCTL

2009-11-02 Thread Jan Kiszka
Next round of this series. This time I generalized the NMI substate to an event substate that covers missing states around exceptions, interrupts and NMIs. Moreover, I added KVM_CHECK_VCPU_STATES to query if certain substates are support (current user land will not make use of this as this base

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 05:12:48PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Ingo Molnar
* Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 05:12:48PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: diff --git

KVM - IO disk performance - strange behaviour - better performance in guest

2009-11-02 Thread Benoit Guguin
Hello, I'm currently testing some distribution with uptodate/new KVM : - Ubuntu Karmic 9.10 - Rhel 5.4 I'm using IoZone to test IO disk performance. For my test I have dedicated a LVM partition to the IoZone benchmark : iozone -a -U /mnt/bench/ -f /mnt/bench/test-file -R -b file.xls I have

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 05:29:41PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 05:12:48PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb

Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Dustin Kirkland
On Mon, Nov 2, 2009 at 8:38 AM, Mark McLoughlin mar...@redhat.com wrote: On Fri, 2009-10-30 at 16:15 -0500, Dustin Kirkland wrote: Canonical's Ubuntu Security Team will be filing a CVE on this issue, since there is a bit of an attack vector here, and since qemu-kvm-0.11.0 is generally

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Gleb Natapov
On Mon, Nov 02, 2009 at 05:29:41PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 05:12:48PM +0100, Ingo Molnar wrote: * Gleb Natapov g...@redhat.com wrote: On Mon, Nov 02, 2009 at 10:22:14AM +0100, Ingo Molnar wrote: * Gleb

Re: [Qemu-devel] Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Michael Tokarev
Jamie Lokier wrote: Anthony Liguori wrote: Mark McLoughlin wrote: Canonical's Ubuntu Security Team will be filing a CVE on this issue, since there is a bit of an attack vector here, and since qemu-kvm-0.11.0 is generally available as an official release (and now part of Ubuntu 9.10). Guests

Re: [Qemu-devel] Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Anthony Liguori
Jamie Lokier wrote: Anthony Liguori wrote: Mark McLoughlin wrote: Canonical's Ubuntu Security Team will be filing a CVE on this issue, since there is a bit of an attack vector here, and since qemu-kvm-0.11.0 is generally available as an official release (and now part of Ubuntu 9.10).

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Rik van Riel
On 11/02/2009 04:22 AM, Ingo Molnar wrote: * Gleb Natapovg...@redhat.com wrote: diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index f4cee90..14707dc 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -952,6 +952,9 @@ do_page_fault(struct pt_regs *regs, unsigned long

Re: [PATCH 05/11] Add get_user_pages() variant that fails if major fault is required.

2009-11-02 Thread Rik van Riel
On 11/01/2009 06:56 AM, Gleb Natapov wrote: This patch add get_user_pages() variant that only succeeds if getting a reference to a page doesn't require major fault. Signed-off-by: Gleb Natapovg...@redhat.com Reviewed-by: Rik van Riel r...@redhat.com -- All rights reversed. -- To unsubscribe

Re: [Qemu-devel] Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Dustin Kirkland
On Mon, 2009-11-02 at 12:55 -0600, Anthony Liguori wrote: They can exit qemu via an ACPI shutdown. I don't see the difference. An ACPI shutdown is triggered by an authenticated user inside of the guest. The present exit is triggered by any other anonymous user on the network, with the ability

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Avi Kivity
On 11/02/2009 09:03 PM, Rik van Riel wrote: This patch is not acceptable unless it's done cleaner. Currently we already have 3 callbacks in do_page_fault() (kmemcheck, mmiotrace, notifier), and this adds a fourth one. There's another alternative - add our own exception vector for async page

Re: [Qemu-devel] Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Jamie Lokier
Michael Tokarev wrote: If you want kvm to behave like this, wrap it into a trivial shell script that restarts the guest. True, kvm has enough crash-bugs elsewhere that I already have to deal with that. It'd be nice to distinguish kvm/qemu bugs from guest bugs, though :-) kvm/qemu also has

Re: vhost-net patches

2009-11-02 Thread Michael S. Tsirkin
On Thu, Oct 29, 2009 at 12:11:33AM -0700, Shirley Ma wrote: Hello Michael, I am able to get 63xxMb/s throughput with 10% less cpu utilization when I apply deferring skb patch on top of your most recent vhost patch. The userspace TCP_STREAM BW used to be 3xxxMb/s from upper stream git tree.

Re: [PATCH 0/9] S390x KVM support

2009-11-02 Thread Alexander Graf
Carsten Otte wrote: Avi Kivity wrote: So why not do it for this instruction as well? Instead of updating the psw, return a success/error code and let the kernel update psw. It's not a single instruction, but a set of reasons we need the psw in userspace: - for logging the instruction

Re: [Qemu-devel] Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-11-02 Thread Anthony Liguori
Dustin Kirkland wrote: On Mon, 2009-11-02 at 12:55 -0600, Anthony Liguori wrote: They can exit qemu via an ACPI shutdown. I don't see the difference. An ACPI shutdown is triggered by an authenticated user inside of the guest. The present exit is triggered by any other anonymous user

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

2009-11-02 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 20/28] Split init_new_context and destroy_context

2009-11-02 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 --- v6 - v7: - don't

[PATCH 27/28] Use hrtimers for the decrementer

2009-11-02 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 --- v6 - v7: - remove non-hrtimer export --- arch/powerpc/include/asm/kvm_host.h |6 --

[PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
When we want to create a full VirtIO based machine, we're still missing graphics output. Fortunately, Linux provides us with most of the frameworks to render text and everything, we only need to implement a transport. So this is a frame buffer backend written for VirtIO. Using this and my patch

Re: [Autotest] [PATCH] [RFC] KVM test: Major control file cleanup

2009-11-02 Thread Ryan Harper
* Michael Goldish mgold...@redhat.com [2009-10-31 16:02]: If I'm understanding things, we are talking about moving the large body of kvm_tests.cfg test definitions, guest definitions into a library, and then moving the requested test config (bottom on kvm_tests.cfg) into the

[PATCH 2/2] Add PCI virtio support for frame buffer

2009-11-02 Thread Alexander Graf
We now know how to use a frame buffer on VirtIO, but we still can't use it on x86. In order to leverage the power of VirtIO FB, we need to wrap it through virtio-pci. So let's add all the shiny wrappers and add a -vga option. Signed-off-by: Alexander Graf ag...@suse.de --- hw/pc.c |

[PATCH 1/2] Add emulation for VirtIO Frame Buffer device

2009-11-02 Thread Alexander Graf
Since Linux now understands how to talk to us graphics over VirtIO, let's add support for it in qemu. The good part about graphics over VirtIO is that you don't need PCI to use it. So if there's any platform out there trying to use graphics, but not capable of MMIO, it can use this one!

[PATCHv4 0/6] qemu-kvm: vhost net support

2009-11-02 Thread Michael S. Tsirkin
This adds support for vhost-net virtio kernel backend. This is not intented for merge. See vhost net patch description for details. This applies on top of commit 47e465f031fc43c53ea8f08fa55cc3482c6435c8 in Avi's tree. It won't apply to tree tip. TODO: rebase. The patchset also includes raw

[PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Michael S. Tsirkin
devices should have the final say over which virtio features they support. E.g. indirect entries may or may not make sense in the context of virtio-console. In particular, for vhost, we do not want to report to guest bits not supported by kernel backend. Move the common bits from virtio-pci to an

[PATCHv4 4/6] qemu/net: move typedef to qemu-common.h

2009-11-02 Thread Michael S. Tsirkin
Move typedef VLANClientState to qemu-common.h so that users can use forward-declared type without pulling in net.h Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net.h |2 -- qemu-common.h |1 + 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net.h b/net.h

[PATCHv4 5/6] qemu/raw: add API to get raw socket

2009-11-02 Thread Michael S. Tsirkin
Add API to get raw socket from vlanclient, so that we can connect it to frontend such as vhost. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net.c |8 net.h |2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 1fb2f2f..9168460

[PATCHv4 2/6] qemu/net: routines to get tap fd

2009-11-02 Thread Michael S. Tsirkin
vhost need tap fd, add API to get it from vlan client Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net.c | 10 ++ net.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 6a7f1c2..8ac639b 100644 --- a/net.c +++ b/net.c @@ -1472,6

[PATCHv4 3/6] qemu/net: add raw backend

2009-11-02 Thread Or Gerlitz
Add raw network backend option which uses a packet socket to provide raw networking access. Once the socket is opened it's bound to a provided host interface, such that packets received on the interface are delivered to the VM and packets sent by the VM are sent to the interface. This is

[PATCHv4 6/6] qemu-kvm: vhost-net implementation

2009-11-02 Thread Michael S. Tsirkin
This adds support for vhost-net virtio kernel backend. This patch is not intended to being merged yet. I'm posting it for the benefit of people testing the backend. Usage instructions: vhost currently requires MSI-X support in guest virtio. This means guests kernel version should be = 2.6.31.

[PATCHv6 0/3] vhost: a kernel-level virtio server

2009-11-02 Thread Michael S. Tsirkin
Rusty, ok, I think I've addressed your comments so far here. In particular I have added write logging for live migration, indirect buffers and virtio net header (enables gso). I'd like this to go into linux-next, through your tree, and hopefully 2.6.33. What do you think? --- This implements

[PATCHv6 2/3] mm: export use_mm/unuse_mm to modules

2009-11-02 Thread Michael S. Tsirkin
vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm. Export it to modules. Acked-by: Andrea Arcangeli aarca...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- mm/mmu_context.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff

[PATCHv6 1/3] tun: export underlying socket

2009-11-02 Thread Michael S. Tsirkin
Tun device looks similar to a packet socket in that both pass complete frames from/to userspace. This patch fills in enough fields in the socket underlying tun driver to support sendmsg/recvmsg operations, and message flags MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket to modules.

[PATCHv6 3/3] vhost_net: a kernel-level virtio server

2009-11-02 Thread Michael S. Tsirkin
What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced scope - uses eventfd for

Re: [PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Anthony Liguori
Michael S. Tsirkin wrote: devices should have the final say over which virtio features they support. E.g. indirect entries may or may not make sense in the context of virtio-console. In particular, for vhost, we do not want to report to guest bits not supported by kernel backend. Move the

Re: [PATCHv4 0/6] qemu-kvm: vhost net support

2009-11-02 Thread Anthony Liguori
Hi Michael, I'll reserve individual patch review until they're in a mergable state, but I do have some comments about the overall integration architecture. Generally speaking, I think the integration unnecessarily invasive. It adds things to the virtio infrastructure that shouldn't be there

Re: [Linux-fbdev-devel] [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
On 02.11.2009, at 23:42, Alexander Graf wrote: Am 02.11.2009 um 23:32 schrieb Ondrej Zajicek santi...@crfreenet.org: On Mon, Nov 02, 2009 at 11:09:19PM +0100, Alexander Graf wrote: When we want to create a full VirtIO based machine, we're still missing graphics output. Fortunately,

[KVM-AUTOTEST][PATCH] Fix kvm_config.py -f filename mode

2009-11-02 Thread Ryan Harper
kvm_config.py supports specifying a different filename for test config. This patch fixes the option parsing parameters. Currently it uses 'store_true' which stores the value True into the filename variable; we want the 'store' mode which will store the value of the option (aka, the filename) in

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Rik van Riel
On 11/02/2009 02:33 PM, Avi Kivity wrote: On 11/02/2009 09:03 PM, Rik van Riel wrote: This patch is not acceptable unless it's done cleaner. Currently we already have 3 callbacks in do_page_fault() (kmemcheck, mmiotrace, notifier), and this adds a fourth one. There's another alternative -

Re: [Linux-fbdev-devel] [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
On 03.11.2009, at 00:57, Ondrej Zajicek wrote: On Tue, Nov 03, 2009 at 12:24:15AM +0100, Alexander Graf wrote: Also, we still need to keep the local frame buffer copy in sync so we can mmap and read from it, right? So it's not really worth it probably... But then again we could just try

Re: [PATCHv6 3/3] vhost_net: a kernel-level virtio server

2009-11-02 Thread Daniel Walker
Random style issues below .. Part of this is just stuff checkpatch found. On Tue, 2009-11-03 at 00:29 +0200, Michael S. Tsirkin wrote: +static int move_iovec_hdr(struct iovec *from, struct iovec *to, + size_t len, int iov_count) +{ + int seg = 0; + size_t

Re: [Linux-fbdev-devel] [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Ondrej Zajicek
On Tue, Nov 03, 2009 at 12:24:15AM +0100, Alexander Graf wrote: Also, we still need to keep the local frame buffer copy in sync so we can mmap and read from it, right? So it's not really worth it probably... But then again we could just try to be closer to a real graphics card. What if

RE: vhost-net patches

2009-11-02 Thread Xin, Xiaohui
Hi, Michael, What's your deferring skb allocation patch mentioned here, may you elaborate it a little more detailed? Thanks Xiaohui -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Michael S. Tsirkin Sent: Tuesday, November 03, 2009

Re: [PATCH 02/11] Add handle page fault PV helper.

2009-11-02 Thread Avi Kivity
On 11/03/2009 01:35 AM, Rik van Riel wrote: We can't add an exception vector since all the existing ones are either taken or reserved. I believe some are reserved for operating system use. Table 6-1 says: 9 | | Coprocessor Segment Overrun (reserved) | Fault | No | Floating-point

Re: [PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Avi Kivity
On 11/03/2009 12:33 AM, Anthony Liguori wrote: Michael S. Tsirkin wrote: devices should have the final say over which virtio features they support. E.g. indirect entries may or may not make sense in the context of virtio-console. In particular, for vhost, we do not want to report to guest bits

Re: [PATCH 01/11] Add shared memory hypercall to PV Linux guest.

2009-11-02 Thread Avi Kivity
On 11/02/2009 06:18 PM, Gleb Natapov wrote: +#define KVM_PV_SHM_VERSION 1 versions = bad, feature bits = good I have both! Do you want me to drop version? Yes. Once a kernel is released you can't realistically change the version. Some documentation for this? Also, the

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Avi Kivity
On 11/03/2009 12:09 AM, Alexander Graf wrote: When we want to create a full VirtIO based machine, we're still missing graphics output. Fortunately, Linux provides us with most of the frameworks to render text and everything, we only need to implement a transport. So this is a frame buffer

Re: [PATCH 1/2] Add emulation for VirtIO Frame Buffer device

2009-11-02 Thread Avi Kivity
On 11/03/2009 12:11 AM, Alexander Graf wrote: Since Linux now understands how to talk to us graphics over VirtIO, let's add support for it in qemu. The good part about graphics over VirtIO is that you don't need PCI to use it. So if there's any platform out there trying to use graphics, but not

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
On 03.11.2009, at 07:21, Avi Kivity wrote: On 11/03/2009 12:09 AM, Alexander Graf wrote: When we want to create a full VirtIO based machine, we're still missing graphics output. Fortunately, Linux provides us with most of the frameworks to render text and everything, we only need to

Re: [PATCH 1/2] Add emulation for VirtIO Frame Buffer device

2009-11-02 Thread Alexander Graf
On 03.11.2009, at 07:22, Avi Kivity wrote: On 11/03/2009 12:11 AM, Alexander Graf wrote: Since Linux now understands how to talk to us graphics over VirtIO, let's add support for it in qemu. The good part about graphics over VirtIO is that you don't need PCI to use it. So if there's any

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Avi Kivity
On 11/03/2009 08:22 AM, Alexander Graf wrote: This is especially important on machines that can't do MMIO, as all current graphics implementations qemu emulates I'm aware of so far fail here. s390 virtual desktops? Well - have you ever tried installing SLES / RHEL on an S390? If not,

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
On 03.11.2009, at 07:24, Avi Kivity wrote: On 11/03/2009 08:22 AM, Alexander Graf wrote: This is especially important on machines that can't do MMIO, as all current graphics implementations qemu emulates I'm aware of so far fail here. s390 virtual desktops? Well - have you ever

[PATCH] Seperate smp from extra_params and add into default VM params

2009-11-02 Thread Yolkfull Chow
We may need leave smp as standalone parameter of VM. Reasons I can proposal: 1) memory is a standalone parameter, so is smp 2) smp parameter is needed in some test case, say VM params_verify Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample |3 ++-

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Avi Kivity
On 11/03/2009 08:27 AM, Alexander Graf wrote: How does it work today? You boot into a TERM=dumb line based emulation on 3270 (worst thing haunting people's nightmares ever), trying to get out of that mode as quickly as possible and off into SSH / VNC. Despite the coolness factor, IMO a

Re: [PATCH] Add VirtIO Frame Buffer Support

2009-11-02 Thread Alexander Graf
On 03.11.2009, at 07:34, Avi Kivity wrote: On 11/03/2009 08:27 AM, Alexander Graf wrote: How does it work today? You boot into a TERM=dumb line based emulation on 3270 (worst thing haunting people's nightmares ever), trying to get out of that mode as quickly as possible and off into

Re: [PATCH 01/11] Add shared memory hypercall to PV Linux guest.

2009-11-02 Thread Gleb Natapov
On Tue, Nov 03, 2009 at 07:15:10AM +0200, Avi Kivity wrote: On 11/02/2009 06:18 PM, Gleb Natapov wrote: +#define KVM_PV_SHM_VERSION 1 versions = bad, feature bits = good I have both! Do you want me to drop version? Yes. Once a kernel is released you can't realistically change the

  1   2   >