Re: KVM PMU virtualization

2010-03-01 Thread Zhang, Yanmin
On Fri, 2010-02-26 at 10:17 +0100, Ingo Molnar wrote: > * Joerg Roedel wrote: > > > On Fri, Feb 26, 2010 at 10:55:17AM +0800, Zhang, Yanmin wrote: > > > On Thu, 2010-02-25 at 18:34 +0100, Joerg Roedel wrote: > > > > On Thu, Feb 25, 2010 at 04:04:28PM +0100, Jes Sorensen wrote: > > > > > > > > >

[PATCH -v2] Add savevm/loadvm support for MCE

2010-03-01 Thread Huang Ying
MCE registers are saved/load into/from CPUState in kvm_arch_save/load_regs. To simulate the MCG_STATUS clearing upon reset, MSR_MCG_STATUS is set to 0 for KVM_PUT_RESET_STATE. v2: - Rebased on new CPU registers save/load framework. Signed-off-by: Huang Ying --- qemu-kvm-x86.c | 43 +

Re: [PATCH 02/10] Provide ioapic-kvm

2010-03-01 Thread Marcelo Tosatti
On Fri, Feb 26, 2010 at 05:12:13PM -0300, Glauber Costa wrote: > This patch provides the file ioapic-kvm.c, which implements a schim over > the kvm in-kernel IO APIC. > > Signed-off-by: Glauber Costa > --- > Makefile.target |2 + > hw/ioapic-kvm.c | 89 > ++

Re: [PATCH 09/10] Initialize in-kernel irqchip

2010-03-01 Thread Marcelo Tosatti
On Fri, Feb 26, 2010 at 05:12:20PM -0300, Glauber Costa wrote: > Now that we have all devices set up, this patch initializes the irqchip. > This is dependant on the io-thread, since we need someone to pull ourselves > out of the halted state. I don't understand why - it should work without iothrea

Re: [PATCH 08/10] Add -kvm option

2010-03-01 Thread Marcelo Tosatti
On Fri, Feb 26, 2010 at 05:12:19PM -0300, Glauber Costa wrote: > This option deprecates --enable-kvm. It is a more flexible option, > that makes use of qemu-opts, and allow us to pass on options to enable or > disable kernel irqchip, for example. > > Signed-off-by: Glauber Costa Really have to r

Re: KVM usability

2010-03-01 Thread Dustin Kirkland
On Mon, 2010-03-01 at 15:59 -0600, Anthony Liguori wrote: > On 03/01/2010 03:12 PM, Dustin Kirkland wrote: > > kvm -m 512 -cdrom > > /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive > > file=/home/kirkland/.cache/testdrive/img/testdrive-disk-0086OD.img,if=virtio,index=0,boot=on >

Re: KVM call agenda for Mar 2

2010-03-01 Thread Anthony Liguori
On 03/01/2010 06:46 PM, Chris Wright wrote: - Shared memory transport - Ram area allocations - Request for 0.13 feature review/update [1] [1] http://wiki.qemu.org/Features/0.13 Regards, Anthony Liguori Please send in any additional agenda items you are interested in covering. thanks,

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 03/01/2010 08:34 PM, Alexander Graf wrote: On 01.03.2010, at 22:59, Anthony Liguori wrote: On 03/01/2010 03:12 PM, Dustin Kirkland wrote: kvm -m 512 -cdrom /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive file=/home/kirkland/.cache/testdrive/img/testdrive-disk-00

Re: KVM usability

2010-03-01 Thread Alexander Graf
On 01.03.2010, at 22:59, Anthony Liguori wrote: > On 03/01/2010 03:12 PM, Dustin Kirkland wrote: >> kvm -m 512 -cdrom >> /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive >> file=/home/kirkland/.cache/testdrive/img/testdrive-disk-0086OD.img,if=virtio,index=0,boot=on >> -usb -usbd

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 03/01/2010 06:30 PM, Ingo Molnar wrote: IMO that's a bug, not a feature. There should be a lot more interaction between kvm-qemu and KVM: for example Qemu should have a feature to install paravirt drivers in the guest, this would be helped by living in the kernel repo. Not in the slighte

[ kvm-Bugs-2960363 ] KVM_GET_SREGS ioctl fails due to "Invalid Argument" in glibc

2010-03-01 Thread SourceForge.net
Bugs item #2960363, was opened at 2010-02-27 12:09 Message generated for change (Comment added) made by zsalwasser You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2960363&group_id=180599 Please note that this message will contain a full copy of the commen

Re: (qemu)info registers -- Not working for me.

2010-03-01 Thread Zachery Salwasser
Thank you for the prompt reply, you were correct, and I was able to resolve the issue by being a little more careful with my header files. I will close the issue on sourceforge. On Sun, Feb 28, 2010 at 1:27 PM, Jan Kiszka wrote: > Zachery Salwasser wrote: >> I have been having trouble with read

Re: KVM usability

2010-03-01 Thread Dustin Kirkland
On Mon, Mar 1, 2010 at 9:14 AM, Anthony Liguori wrote: > On 02/27/2010 04:56 AM, Ingo Molnar wrote: >>  - But i'm a more advanced user so i dont need help screens, i knew that >> the >>    "go full screen" hotkey is: >> >>            LeftCtrl-LeftALT-F >> >>    ... except that it is a one-way road

KVM call agenda for Mar 2

2010-03-01 Thread Chris Wright
- Shared memory transport Please send in any additional agenda items you are interested in covering. thanks, -chris -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info

Re: KVM usability

2010-03-01 Thread Ingo Molnar
* Zachary Amsden wrote: > On 03/01/2010 11:45 AM, Anthony Liguori wrote: > >On 03/01/2010 02:56 PM, Ingo Molnar wrote: > > > >> - Code distribution is easy: it comes with the kernel. This > >>spreads the code > >>far and wide. It's easy for kernel developers to jump in and > >>help out, the

Re: KVM usability

2010-03-01 Thread Ingo Molnar
* Anthony Liguori wrote: > On 03/01/2010 02:56 PM, Ingo Molnar wrote: > >Here's our experience with tools/perf/. Hosting the project in the kernel > >proper helped its quality immensely: > > > > - It's much easier to synchronize new features on the kernel side and on > > the > >user-space

Re: [PATCH 2/4] KVM: Rework VCPU state writeback API

2010-03-01 Thread Marcelo Tosatti
On Mon, Mar 01, 2010 at 07:10:30PM +0100, Jan Kiszka wrote: > This grand cleanup drops all reset and vmsave/load related > synchronization points in favor of four(!) generic hooks: > > - cpu_synchronize_all_states in qemu_savevm_state_complete > (initial sync from kernel before vmsave) > - cpu_s

Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-03-01 Thread Marcelo Tosatti
On Mon, Mar 01, 2010 at 08:25:08PM -0300, Marcelo Tosatti wrote: > Hi Paul, > > Thank you for reviewing. > > On Sun, Feb 28, 2010 at 01:28:16AM +, Paul Brook wrote: > > IMHO it would be better to check the mem_path != NULL here, rather that > > burying the check in file_ram_alloc. > > > > >

Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-03-01 Thread Marcelo Tosatti
Hi Paul, Thank you for reviewing. On Sun, Feb 28, 2010 at 01:28:16AM +, Paul Brook wrote: > IMHO it would be better to check the mem_path != NULL here, rather that > burying the check in file_ram_alloc. > > >+if (memory < hpagesize) { > >+return NULL; > >+} > > Ah, so it's

Re: KVM usability

2010-03-01 Thread Zachary Amsden
On 03/01/2010 11:45 AM, Anthony Liguori wrote: On 03/01/2010 02:56 PM, Ingo Molnar wrote: - Code distribution is easy: it comes with the kernel. This spreads the code far and wide. It's easy for kernel developers to jump in and help out, the latest devel code is always there, a singl

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 03/01/2010 03:12 PM, Dustin Kirkland wrote: kvm -m 512 -cdrom /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive file=/home/kirkland/.cache/testdrive/img/testdrive-disk-0086OD.img,if=virtio,index=0,boot=on -usb -usbdevice tablet -net nic,model=virtio -net user -soundhw es1370

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 03/01/2010 02:56 PM, Ingo Molnar wrote: Here's our experience with tools/perf/. Hosting the project in the kernel proper helped its quality immensely: - It's much easier to synchronize new features on the kernel side and on the user-space side. The two go hand in hand - they are often i

Re: KVM usability

2010-03-01 Thread Dustin Kirkland
On Sat, Feb 27, 2010 at 4:56 AM, Ingo Molnar wrote: > Here's my experience with it: > >  - qemu-kvm starts up with a miniature resolution by default. 640x480 - on my >   1680x1050 laptop screen. It's so small that initially i even overlooked >   that i started it. It should multiplex pixels up to

Re: KVM usability

2010-03-01 Thread Ingo Molnar
* Zachary Amsden wrote: > > I guess there is some misunderstanding here, the tools/ directory that > > lives in the kernel _sources_, has no kernel source, its all userspace > > stuff. > > Yeah, no morning coffee :=) > > So instead we are advocating forking qemu into the kernel. That makes

Re: [PATCH v4 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-03-01 Thread Marcelo Tosatti
On Mon, Mar 01, 2010 at 06:17:19PM +0100, Jan Kiszka wrote: > Rebased over latest master. > > Pull URL is > > git://git.kiszka.org/qemu-kvm.git queues/queues-kvm-merge > > Jan Kiszka (10): > qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness > qemu-kvm: Rework VCPU state writeback A

Re: KVM PMU virtualization

2010-03-01 Thread Zachary Amsden
On 02/26/2010 05:55 AM, Peter Zijlstra wrote: On Fri, 2010-02-26 at 17:11 +0200, Avi Kivity wrote: On 02/26/2010 05:08 PM, Peter Zijlstra wrote: That's 7 more than what we support now, and 7 more than what we can guarantee without it. Again, what windows software uses only

Re: KVM PMU virtualization

2010-03-01 Thread Zachary Amsden
On 02/26/2010 03:37 AM, Jes Sorensen wrote: On 02/26/10 14:31, Ingo Molnar wrote: You are missing two big things wrt. compatibility here: 1) The first upgrade overhead a one time overhead only. 2) Once a Linux guest has upgraded, it will work in the future, with _any_ future CPU - _

[PATCH] Support an inter-vm shared memory device that maps a shared-memory object

2010-03-01 Thread Cam Macdonell
This device now creates a qemu character device and sends 1-bytes messages to trigger interrupts. Writes are trigger by writing to the "Doorbell" register on the shared memory PCI device. The lower 8-bits of the value written to this register are sent as the 1-byte message so different meanings o

[PATCH] Driver to support shared memory device with inerrupts

2010-03-01 Thread Cam Macdonell
This driver allows the guest VM to access shared memory between other guest that is a POSIX shared memory object on the host. The driver can also send interrupts by writing to the DoorBell register. With interrupts, the ioctl must specify the ID of the VM to receive the interrupt or '255' for bro

Re: KVM PMU virtualization

2010-03-01 Thread Joerg Roedel
On Mon, Mar 01, 2010 at 06:17:40PM +0100, Peter Zijlstra wrote: > On Mon, 2010-03-01 at 12:11 +0100, Joerg Roedel wrote: > > > > 1. Enhance perf to count pmu events only when cpu is in guest mode. > > No enhancements needed, only hardware support for Intel doesn't provide > this iirc. At least t

Re: KVM usability

2010-03-01 Thread Zachary Amsden
On 03/01/2010 07:41 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Mar 01, 2010 at 06:48:07AM -1000, Zachary Amsden escreveu: On 02/27/2010 07:25 AM, Ingo Molnar wrote: I'm not talking about moving it into a kernel _module_ - albeit that alone is a worthwile thing to do for any performan

Re: KVM PMU virtualization

2010-03-01 Thread Peter Zijlstra
On Mon, 2010-03-01 at 12:11 +0100, Joerg Roedel wrote: > > 1. Enhance perf to count pmu events only when cpu is in guest mode. No enhancements needed, only hardware support for Intel doesn't provide this iirc. > 2. For every emulated performance counter the guest activates kvm >allocates a p

Re: KVM ivshmem enquiry

2010-03-01 Thread Cam Macdonell
Hi Khaled, On Sun, Feb 28, 2010 at 1:20 PM, Khaled Ibrahim wrote: > > Cam,I am interested in the shared memory support you developed on >  KVM, but the whole process is not very clear to me. I patched the kernel on > the >  guest OSs and used the samples codes found in > http://www.mail-archive

Another VNC crash, qemu-kvm-0.12.3

2010-03-01 Thread Chris Webb
We've just seen another VNC related qemu-kvm crash, this time an arithmetic exception at vnc.c:1424 in the newly release qemu-kvm 0.12.3. [...] 1423 if (vs->absolute) { 1424 kbd_mouse_event(x * 0x7FFF / (ds_get_width(vs->ds) - 1), 1425 y * 0x7FFF / (ds_

Introducing ConVirt 2.0 !

2010-03-01 Thread jd
Hi    We are very pleased to introduce ConVirt 2.0 – the next major step up in open source virtualization management. The ConVirt 2.0 generation combines a flexible, open architecture, the highest level of management capabilities, and the industry’s most flexible pricing model.  Built on a brand

[PATCH 2/4] KVM: Rework VCPU state writeback API

2010-03-01 Thread Jan Kiszka
This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload)

[PATCH 3/4] KVM: x86: Restrict writeback of VCPU state

2010-03-01 Thread Jan Kiszka
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go through a reset. And TSC as well as KVM wallclocks should only be written on full sync, otherwise we risk to drop some time on state read-modify-write. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 32

[PATCH 4/4] x86: Extend validity of bsp_to_cpu

2010-03-01 Thread Jan Kiszka
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, bsp_to_cpu can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka --- hw/pc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

[PATCH 1/4] KVM: Rework of guest debug state writing

2010-03-01 Thread Jan Kiszka
So far we synchronized any dirty VCPU state back into the kernel before updating the guest debug state. This was a tribute to a deficite in x86 kernels before 2.6.33. But as this is an arch-dependent issue, it is better handle in the x86 part of KVM and remove the writeback point for generic code.

[PATCH 0/4] [uq/master] VCPU writeback rework and related bits

2010-03-01 Thread Jan Kiszka
This is the corresponding uq/master series to [1]. Should allow smooth re-sync with upstream once merged. Pull URL is git://git.kiszka.org/qemu-kvm.git queues/kvm-upstream [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/47706 Jan Kiszka (4): KVM: Rework of guest debug state

[ kvm-Bugs-2961405 ] [Windows Virtio Net] repeatable lockup

2010-03-01 Thread SourceForge.net
Bugs item #2961405, was opened at 2010-03-01 11:56 Message generated for change (Tracker Item Submitted) made by iggy_cav You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2961405&group_id=180599 Please note that this message will contain a full copy of the

Re: PCI hotplug broken?

2010-03-01 Thread Alexander Graf
On 01.03.2010, at 18:51, Marcelo Tosatti wrote: > On Fri, Feb 26, 2010 at 03:53:48PM +0100, Alexander Graf wrote: >> >> On 26.02.2010, at 15:12, Alexander Graf wrote: >> >>> Hi list, >>> >>> While trying to upgrade some internal infrastructure to qemu-kvm-0.12 I >>> stumbled across this reall

Re: PCI hotplug broken?

2010-03-01 Thread Marcelo Tosatti
On Fri, Feb 26, 2010 at 03:53:48PM +0100, Alexander Graf wrote: > > On 26.02.2010, at 15:12, Alexander Graf wrote: > > > Hi list, > > > > While trying to upgrade some internal infrastructure to qemu-kvm-0.12 I > > stumbled across this really weird problem that I see with current qemu-kvm > > g

Re: KVM usability

2010-03-01 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 01, 2010 at 06:48:07AM -1000, Zachary Amsden escreveu: > On 02/27/2010 07:25 AM, Ingo Molnar wrote: >> I'm not talking about moving it into a kernel _module_ - albeit that >> alone is a worthwile thing to do for any performance sensitive hw >> component. >> >> I was talking about the op

Re: KVM PMU virtualization

2010-03-01 Thread Zachary Amsden
On 02/26/2010 01:42 AM, Ingo Molnar wrote: * Jes Sorensen wrote: On 02/26/10 11:44, Ingo Molnar wrote: Direct access to counters is not something that is a big issue. [ Given that i sometimes can see KVM redraw the screen of a guest OS real-time i doubt this is the biggest of perfor

Re: [PATCH v4 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-03-01 Thread Jan Kiszka
Jan Kiszka wrote: > Rebased over latest master. Oh, and I added that TSC issue workaround to patch 7. My memory... Jan > > Pull URL is > > git://git.kiszka.org/qemu-kvm.git queues/queues-kvm-merge > > Jan Kiszka (10): > qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness > qemu-kv

[PATCH v4 06/10] qemu-kvm: Use VCPU event state for reset and vmsave/load

2010-03-01 Thread Jan Kiszka
Push reading/writing of vcpu_events into kvm_arch_load/save_regs to avoid KVM-specific hooks in generic code. Signed-off-by: Jan Kiszka --- kvm.h |2 -- qemu-kvm-x86.c|6 -- target-i386/kvm.c |4 ++-- target-i386/machine.c |6 -- 4 files change

[PATCH v4 08/10] qemu-kvm: Clean up KVM's APIC hooks

2010-03-01 Thread Jan Kiszka
The APIC is part of the VCPU state, so trigger its readout and writeback from kvm_arch_save/load_regs. Thanks to the transparent sync on reset and vmsave/load, we can also drop explicit sync code, reducing the diff to upstream. Signed-off-by: Jan Kiszka --- hw/apic.c | 37 +---

[PATCH v4 10/10] qemu-kvm: Bring qemu_init_vcpu back home

2010-03-01 Thread Jan Kiszka
There is no need for the this hack anymore, initialization is now robust against reordering as it doesn't try to write the VCPU state on its own. Signed-off-by: Jan Kiszka --- hw/pc.c |5 - target-i386/helper.c |2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) dif

[PATCH v4 04/10] qemu-kvm: Clean up mpstate synchronization

2010-03-01 Thread Jan Kiszka
Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, properly synchronize with halted in the accessor functions. At this chance, drop the special reset of interrupt_request and halted in kvm_arch_cpu_reset. The former is done via memset in cpu_reset, the latter in apic_init_reset

[PATCH v4 05/10] KVM: x86: Restrict writeback of VCPU state

2010-03-01 Thread Jan Kiszka
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go through a reset. And TSC as well as KVM wallclocks should only be written on full sync, otherwise we risk to drop some time on during state read-modify-write. Signed-off-by: Jan Kiszka --- kvm.h |2 +- q

[PATCH v4 02/10] qemu-kvm: Rework VCPU state writeback API

2010-03-01 Thread Jan Kiszka
This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload)

[PATCH v4 09/10] qemu-kvm: Move kvm_set_boot_cpu_id

2010-03-01 Thread Jan Kiszka
Setting the boot CPU ID is arch-specific KVM stuff. So push it where it belongs to. Signed-off-by: Jan Kiszka --- hw/pc.c|3 --- qemu-kvm-x86.c |3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 58c32ea..d819fca 100644 --- a/hw/pc.c +++

[PATCH v4 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-03-01 Thread Jan Kiszka
Drop kvm_load_tsc in favor of level-dependent writeback in kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and should therefore only be written back on full sync. Signed-off-by: Jan Kiszka --- qemu-kvm-x86.c| 27 +-- qemu-kvm.h|

[PATCH v4 03/10] x86: Extend validity of cpu_is_bsp

2010-03-01 Thread Jan Kiszka
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, cpu_is_bsp can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka --- hw/pc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

[PATCH v4 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-03-01 Thread Jan Kiszka
Rebased over latest master. Pull URL is git://git.kiszka.org/qemu-kvm.git queues/queues-kvm-merge Jan Kiszka (10): qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness qemu-kvm: Rework VCPU state writeback API x86: Extend validity of cpu_is_bsp qemu-kvm: Clean up mpstate synchro

[PATCH v4 01/10] qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness

2010-03-01 Thread Jan Kiszka
This add-on patch to recent guest debugging refactorings adds the requested awareness for KVM_CAP_X86_ROBUST_SINGLESTEP to both the upstream as well as qemu-kvm's own code. Fortunately, code sharing increased once again. Signed-off-by: Jan Kiszka --- kvm-all.c | 12 ++ kvm.h

Re: KVM usability

2010-03-01 Thread Zachary Amsden
On 02/27/2010 07:25 AM, Ingo Molnar wrote: * Zachary Amsden wrote: [...] Second, it's not over-modularized. The modules are the individual components of the architecture. How would you propose to put it differently. They really can't naturally combine. And with the code quality of qemu

[GIT PULL] KVM updates for 2.6.34

2010-03-01 Thread Marcelo Tosatti
Linus, please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.34 To receive the following updates: Alexander Graf (23): KVM: powerpc: Move vector to irqprio resolving to separate function KVM: powerpc: Improve DEC handling KVM: powerpc: Remove AGGRESS

Re: KVM usability

2010-03-01 Thread Daniel P. Berrange
On Mon, Mar 01, 2010 at 09:14:02AM -0600, Anthony Liguori wrote: > On 02/27/2010 04:56 AM, Ingo Molnar wrote: > > The other type of user we target is power virtualization/emulation > users. We certainly could do better for this type of user but it's > never going to fit what your expectation of

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 03/01/2010 03:25 AM, Ingo Molnar wrote: * Zachary Amsden wrote: Here's my experience with it: - qemu-kvm starts up with a miniature resolution by default. 640x480 - on my 1680x1050 laptop screen. It's so small that initially i even overlooked that i started it. It should mult

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 02/27/2010 11:25 AM, Ingo Molnar wrote: * Zachary Amsden wrote: [...] Second, it's not over-modularized. The modules are the individual components of the architecture. How would you propose to put it differently. They really can't naturally combine. And with the code quality of qemu

Re: KVM usability

2010-03-01 Thread Anthony Liguori
On 02/27/2010 04:56 AM, Ingo Molnar wrote: * Avi Kivity wrote: On 02/26/2010 01:17 PM, Ingo Molnar wrote: Nobody is really 'in charge' of how KVM gets delivered to the user. You isolated the fun kernel part for you and pushed out the boring bits to user-space. So if mundane things l

Re: [PATCH 00/10] uq/master: irqchip-in-kernel support

2010-03-01 Thread Marcelo Tosatti
On Sat, Feb 27, 2010 at 11:28:04AM +0100, Jan Kiszka wrote: > Glauber Costa wrote: > > Hi guys, > > > > This is the same in-kernel irqchip support already posted to qemu-devel, > > just rebased, retested, etc. It passes my basic tests, so it seem to be > > still in good shape. > > > > It is provi

[PATCH 3/7] KVM: SVM: Introduce direct access msr list

2010-03-01 Thread Joerg Roedel
This patch introduces a list with all msrs a guest might have direct access to and changes the svm_vcpu_init_msrpm function to use this list. It also adds a check to set_msr_interception which triggers a warning if a developer changes a msr intercept that is not in the list. Signed-off-by: Joerg R

[PATCH 7/7] KVM: SVM: Ignore lower 12 bit of nested msrpm_pa

2010-03-01 Thread Joerg Roedel
These bits are ignored by the hardware too. Implement this for nested svm too. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index eb3bfa4..def4877 100644 --- a/arch/x86/kvm/svm

[PATCH 4/7] KVM: SVM: Optimize nested svm msrpm merging

2010-03-01 Thread Joerg Roedel
This patch optimizes the way the msrpm of the host and the guest are merged. The old code merged the 2 msrpm pages completly. This code needed to touch 24kb of memory for that operation. The optimized variant this patch introduces merges only the parts where the host msrpm may contain zero bits. Th

[PATCH 5/7] KVM: SVM: Use svm_msrpm_offset in nested_svm_exit_handled_msr

2010-03-01 Thread Joerg Roedel
There is a generic function now to calculate msrpm offsets. Use that function in nested_svm_exit_handled_msr() remove the duplicate logic (which had a bug anyway). Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 47 +-- 1 files changed, 17 inser

[PATCH 2/7] KVM: SVM: Move msrpm offset calculation to seperate function

2010-03-01 Thread Joerg Roedel
The algorithm to find the offset in the msrpm for a given msr is needed at other places too. Move that logic to its own function. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 53 --- 1 files changed, 37 insertions(+), 16 deletions(-) dif

[PATCH 1/7] KVM: SVM: Return correct values in nested_svm_exit_handled_msr

2010-03-01 Thread Joerg Roedel
The nested_svm_exit_handled_msr() returned an bool which is a bug. I worked by accident because the exected integer return values match with the true and false values. This patch changes the return value to int and let the function return the correct values. Signed-off-by: Joerg Roedel --- arch/

[PATCH 0/7 v3] Rework of msrpm optimization and additional fixes for nested svm

2010-03-01 Thread Joerg Roedel
Hi, this is the third round of the msrpm merge optimization patches for nested svm. The change to the previous post it the introduction of an direc_access_msrs list which contains all msrs that a guest might directly access. This list is used to initialize the msrpm bitmaps and the msrpm_offset t

[PATCH 6/7] KVM; SVM: Add correct handling of nested iopm

2010-03-01 Thread Joerg Roedel
This patch adds the correct handling of the nested io permission bitmap. Old behavior was to not lookup the port in the iopm but only reinject an io intercept to the guest. Signed-off-by: Joerg Roedel --- arch/x86/kvm/svm.c | 25 + 1 files changed, 25 insertions(+), 0 d

[PATCH] fix realmode.c emulator test

2010-03-01 Thread Gleb Natapov
IO test doesn't clobber EAX register between out and in so if they do nothing test succeed where it should fail. Fix that. Enlarge space for tested code from 16 bytes to 32 bytes since now some tests are longer then 16 bytes. Change ".pushsection .text" (which does nothing since we are already in

[PATCH] Add io port to test device.

2010-03-01 Thread Gleb Natapov
Needed by emulator test. Signed-off-by: Gleb Natapov diff --git a/hw/testdev.c b/hw/testdev.c index ad34e43..a8c49a3 100644 --- a/hw/testdev.c +++ b/hw/testdev.c @@ -34,6 +34,18 @@ static void test_device_irq_line(void *opaque, uint32_t addr, uint32_t data) qemu_set_irq(ioapic_irq_hack[addr

Re: KVM: x86 emulator: cleanup and tiny fix of pio emulation

2010-03-01 Thread Gleb Natapov
On Mon, Mar 01, 2010 at 10:50:53PM +0900, Takuya Yoshikawa wrote: > Cannot_emulate includes "c->eip = saved_eip". So the execution > of this after kvm_emulate_pio() is redundant. Let's remove this. > Others are trivial cleanups. > I am looking into this now. Emulation of in/out is completely broke

KVM: x86 emulator: cleanup and tiny fix of pio emulation

2010-03-01 Thread Takuya Yoshikawa
Cannot_emulate includes "c->eip = saved_eip". So the execution of this after kvm_emulate_pio() is redundant. Let's remove this. Others are trivial cleanups. Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/emulate.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --g

Re: [PATCH 3/5] KVM: SVM: Use svm_msrpm_offset in nested_svm_exit_handled_msr

2010-03-01 Thread Joerg Roedel
On Fri, Feb 26, 2010 at 12:30:40PM +0200, Avi Kivity wrote: > On 02/25/2010 07:15 PM, Joerg Roedel wrote: > >There is a generic function now to calculate msrpm offsets. > >Use that function in nested_svm_exit_handled_msr() remove > >the duplicate logic. > > > > Hm, if the function would also calcu

Re: KVM PMU virtualization

2010-03-01 Thread Joerg Roedel
On Mon, Mar 01, 2010 at 09:44:50AM +0100, Ingo Molnar wrote: > There's a world of a difference between "will not use in certain usecases" > and > "cannot use at all because we've designed it so". By doing the latter we > guarantee that sane shared usage of the PMU will never occur - which is ba

Re: KVM usability

2010-03-01 Thread Ingo Molnar
* Zachary Amsden wrote: > > Here's my experience with it: > > > > - qemu-kvm starts up with a miniature resolution by default. 640x480 - on > > my > >1680x1050 laptop screen. It's so small that initially i even overlooked > >that i started it. It should multiplex pixels up to a reasona

RE: Nested virtualization without nested vmx

2010-03-01 Thread Dong, Eddie
The goal of HVM virtualization is to provide an exact same with native platform to guest in KVM guest and Xen HVM guest, however for some reason, it is not strictly followed in today's virtualization solution. VMMs normally take shortcut to make commodity OS happen for performance etc. That brin

Re: KVM PMU virtualization

2010-03-01 Thread Ingo Molnar
* Joerg Roedel wrote: > On Mon, Mar 01, 2010 at 09:39:04AM +0100, Ingo Molnar wrote: > > > What do you mean by software events? > > > > Things like: > > > > aldebaran:~> perf stat -a sleep 1 > > > > Performance counter stats for 'sleep 1': > > > >15995.719133 task-clock-msecs #

Re: KVM PMU virtualization

2010-03-01 Thread Joerg Roedel
On Mon, Mar 01, 2010 at 09:39:04AM +0100, Ingo Molnar wrote: > > What do you mean by software events? > > Things like: > > aldebaran:~> perf stat -a sleep 1 > > Performance counter stats for 'sleep 1': > >15995.719133 task-clock-msecs # 15.981 CPUs >5787 context-

Re: PCI Videocard passthrough

2010-03-01 Thread Kenni Lund
2010/2/27 Jan Češčut : > Has anyone already tried passing through to a certain VM a pci videocard > (using Intel VT-d) ? I have a VguardCard for videocontrolle which should run > inside a VM (Windows XP). Go give it a try, only NICs are officially supported by KVM, but other devices should work

Re: KVM PMU virtualization

2010-03-01 Thread Ingo Molnar
* Joerg Roedel wrote: > On Fri, Feb 26, 2010 at 02:44:00PM +0100, Ingo Molnar wrote: > > - A paravirt event driver is more compatible and more transparent in the > > long > >run: it allows hardware upgrade and upgraded PMU functionality (for > > Linux) > >without having to upgrade t

Re: KVM PMU virtualization

2010-03-01 Thread Ingo Molnar
* Joerg Roedel wrote: > > - It's more secure: the host can have a finegrained policy about what > > kinds of > >events it exposes to the guest. It might chose to only expose software > >events for example. > > What do you mean by software events? Things like: aldebaran:~> perf stat