Re: [PATCH 1/2] kvm tools: Use '-c' for '--cpus', not '--console'

2011-05-12 Thread Ingo Molnar
* Asias He asias.he...@gmail.com wrote: On 05/12/2011 02:01 AM, Pekka Enberg wrote: This patch changes the '-c' command line option to specify the number of CPUs because it's used more often than console switching. I'd like to tune the command line option further. 1) Change

Re: [PATCH] kvm tools: Lookup symbol based on RIP for 'kill -3'

2011-05-12 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: To make debugging easier, look up symbol from guest kernel image based on RIP when user does 'kill -3' to the hypervisor. Example output looks as follows: Code: - rip: [812cb3a0] delay_loop+30

Re: [PATCH] kvm tools: Lookup symbol based on RIP for 'kill -3'

2011-05-12 Thread Ingo Molnar
Another suggestion: would anyone be interested in adding a 'kvm debug' command that does the kill -3 magic? Initially it could be something very simple like: int cmd_debug() { system(kill -3 $(pidof kvm)); } :-) as i always have to remember this

Re: [PATCH 1/3 V4] kvm tools: Add memory gap for larger RAM sizes

2011-05-12 Thread Ingo Molnar
* Asias He asias.he...@gmail.com wrote: On 05/11/2011 11:17 PM, levinsasha...@gmail.com wrote: From: Sasha Levin levinsasha...@gmail.com e820 is expected to leave a memory gap within the low 32 bits of RAM space. From the documentation of e820_setup_gap(): /* * Search for the

[PATCH] kvm tools: Use standardized style for the virtio/net.c driver

2011-05-12 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: Give proper names to vars named 'self'. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/8250-serial.c| 20 ++-- tools/kvm/cpuid.c |6 +- tools/kvm/disk-image.c | 78

Re: [PATCH 10/13] kvm/powerpc: Add support for Book3S processors in hypervisor mode

2011-05-12 Thread Avi Kivity
On 05/11/2011 01:44 PM, Paul Mackerras wrote: This adds support for KVM running on 64-bit Book 3S processors, specifically POWER7, in hypervisor mode. Using hypervisor mode means that the guest can use the processor's supervisor mode. That means that the guest can execute privileged

Re: [Qemu-devel] [PATCH] Add an isa device for SGA

2011-05-12 Thread Markus Armbruster
Glauber Costa glom...@redhat.com writes: This patch adds a dummy legacy ISA device whose responsibility is to deploy sgabios, an option rom for a serial graphics adapter. The proposal is that this device is always-on when -nographics, but can otherwise be enable in any setup when -device sga

Re: [PATCH 2/3] perf, x86: Use GO/HO bits in perf-ctr

2011-05-12 Thread Joerg Roedel
On Wed, May 11, 2011 at 03:58:34PM +0300, Avi Kivity wrote: On 05/10/2011 06:04 PM, Roedel, Joerg wrote: On Tue, May 10, 2011 at 10:48:20AM -0400, Peter Zijlstra wrote: On Tue, 2011-05-10 at 16:35 +0200, Joerg Roedel wrote: The AMD perf-counters support counting in guest or host-mode

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Wed, May 11, 2011 at 11:55:28AM -0400, Avi Kivity wrote: This not-for-merging patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can multiplex host-wide, host-user, and the guest on

Re: [PATCH 03/13] kvm/powerpc: Fix the build for 32-bit Book 3S (classic) processors

2011-05-12 Thread Alexander Graf
Am 11.05.2011 um 12:39 schrieb Paul Mackerras pau...@samba.org: Commits a5d4f3ad3a (powerpc: Base support for exceptions using HSRR0/1) and 673b189a2e (powerpc: Always use SPRN_SPRG_HSCRATCH0 when running in HV mode) cause compile and link errors for 32-bit classic Book 3S processors when

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Jan Kiszka
On 2011-05-12 11:33, Joerg Roedel wrote: On Wed, May 11, 2011 at 11:55:28AM -0400, Avi Kivity wrote: This not-for-merging patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can multiplex

Re: [Qemu-devel] [PATCH v4 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-12 Thread Ulrich Obergfell
Hi Zachary, 1. re.: +static void hpet_timer_driftfix_reset(HPETTimer *t) +{ +if (t-state-driftfix timer_is_periodic(t)) { +t-ticks_not_accounted = t-prev_period = t-period; This is rather confusing. Clearly, ticks_not_accounted isn't actually ticks not accounted, it's

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 12:33 PM, Joerg Roedel wrote: On Wed, May 11, 2011 at 11:55:28AM -0400, Avi Kivity wrote: This not-for-merging patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 12:47 PM, Jan Kiszka wrote: Anyway, I thought about a paravirt-approach instead of implementing a real PMU... But there are certainly good reasons for both. Paravirt is taking away the pressure from CPU vendors to do their virt extensions properly - and doesn't help with

Re: [PATCH 03/13] kvm/powerpc: Fix the build for 32-bit Book 3S (classic) processors

2011-05-12 Thread Paul Mackerras
On Thu, May 12, 2011 at 11:33:00AM +0200, Alexander Graf wrote: Am 11.05.2011 um 12:39 schrieb Paul Mackerras pau...@samba.org: diff --git a/arch/powerpc/kvm/book3s_rmhandlers.S b/arch/powerpc/kvm/book3s_rmhandlers.S index ae99af6..1a1b344 100644 ---

Re: [PATCH 03/13] kvm/powerpc: Fix the build for 32-bit Book 3S (classic) processors

2011-05-12 Thread Benjamin Herrenschmidt
On Thu, 2011-05-12 at 11:33 +0200, Alexander Graf wrote: Am 11.05.2011 um 12:39 schrieb Paul Mackerras pau...@samba.org: Commits a5d4f3ad3a (powerpc: Base support for exceptions using HSRR0/1) and 673b189a2e (powerpc: Always use SPRN_SPRG_HSCRATCH0 when running in HV mode) cause compile

Re: [PATCH 03/13] kvm/powerpc: Fix the build for 32-bit Book 3S (classic) processors

2011-05-12 Thread Alexander Graf
Am 12.05.2011 um 13:16 schrieb Benjamin Herrenschmidt b...@kernel.crashing.org: On Thu, 2011-05-12 at 11:33 +0200, Alexander Graf wrote: Am 11.05.2011 um 12:39 schrieb Paul Mackerras pau...@samba.org: Commits a5d4f3ad3a (powerpc: Base support for exceptions using HSRR0/1) and 673b189a2e

Re: CentOS 5.6 KVM

2011-05-12 Thread --[ UxBoD ]--
- Original Message - Hello all, Have built a CentOS 5.6 X86_64 server and wish to know which version of KVM I should install to achieve sound under Windows ? I have to create a custom kernel for Open-iSCSI so if the best approach is to compile from source then that is not a problem.

[PATCH] Avoid segmentation fault for qdev device not found

2011-05-12 Thread Glauber Costa
qdev_try_create will cope well with a NULL bus, since it will assume the main system bus by default. qdev_create, however, wants to print a message, in which it instantiates the bus name. That simple and at first inoffensive message will generate a segmentation found if the reason for failure is a

[PATCH v2] Add an isa device for SGA

2011-05-12 Thread Glauber Costa
This patch adds a dummy legacy ISA device whose responsibility is to deploy sgabios, an option rom for a serial graphics adapter. The proposal is that this device is always-on when -nographics, but can otherwise be enable in any setup when -device sga is used. [v2: suggestions on qdev by Markus ]

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Thu, May 12, 2011 at 12:51:11PM +0300, Avi Kivity wrote: On 05/12/2011 12:33 PM, Joerg Roedel wrote: Gaah, I was just about to submit a talk about PMU virtualization for KVM Forum :) Speed matters. I'll take that as an argument for paravirt pmu, because that one is certainly faster than

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Thu, May 12, 2011 at 11:47:51AM +0200, Jan Kiszka wrote: On 2011-05-12 11:33, Joerg Roedel wrote: Anyway, I thought about a paravirt-approach instead of implementing a real PMU... But there are certainly good reasons for both. Paravirt is taking away the pressure from CPU vendors to do

Re: [PATCH 1/2] kvm tools: Use '-c' for '--cpus', not '--console'

2011-05-12 Thread Asias He
On 05/12/2011 03:17 PM, Ingo Molnar wrote: * Asias He asias.he...@gmail.com wrote: On 05/12/2011 02:01 AM, Pekka Enberg wrote: This patch changes the '-c' command line option to specify the number of CPUs because it's used more often than console switching. I'd like to tune the command

[PATCH] KVM: Sanitize cpuid

2011-05-12 Thread Avi Kivity
Instead of blacklisting known-unsupported cpuid leaves, whitelist known- supported leaves. This is more conservative and prevents us from reporting features we don't support. Also whitelist a few more leaves while at it. Signed-off-by: Avi Kivity a...@redhat.com --- Joerg, if you can review

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Jan Kiszka
On 2011-05-12 15:11, Joerg Roedel wrote: On Thu, May 12, 2011 at 11:47:51AM +0200, Jan Kiszka wrote: On 2011-05-12 11:33, Joerg Roedel wrote: Anyway, I thought about a paravirt-approach instead of implementing a real PMU... But there are certainly good reasons for both. Paravirt is taking

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 04:11 PM, Joerg Roedel wrote: On Thu, May 12, 2011 at 11:47:51AM +0200, Jan Kiszka wrote: On 2011-05-12 11:33, Joerg Roedel wrote: Anyway, I thought about a paravirt-approach instead of implementing a real PMU... But there are certainly good reasons for both. Paravirt

[PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-12 Thread Dhaval Giani
Hi, As part of some of the work for my project, I have been looking at tracing some of the events in the guest from inside the host. In my usecase, I have been looking to co-relate the time of a network packet arrival with that in the host. ftrace makes such arbitrary use quite simple, so I went

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 04:06 PM, Joerg Roedel wrote: On Thu, May 12, 2011 at 12:51:11PM +0300, Avi Kivity wrote: On 05/12/2011 12:33 PM, Joerg Roedel wrote: Gaah, I was just about to submit a talk about PMU virtualization for KVM Forum :) Speed matters. I'll take that as an argument for

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Thu, May 12, 2011 at 03:23:39PM +0200, Jan Kiszka wrote: On 2011-05-12 15:11, Joerg Roedel wrote: Seriously, I think such decisions should be technical only and not political like that. The losers of such political decisions are always the users because they don't get useful features

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Thu, May 12, 2011 at 04:31:38PM +0300, Avi Kivity wrote: - when the cpu gains support for virtualizing the architectural feature, we transparently speed the guest up, including support for live migrating from a deployment that emulates the feature to a deployment that properly

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Joerg Roedel
On Thu, May 12, 2011 at 04:38:17PM +0300, Avi Kivity wrote: On 05/12/2011 04:06 PM, Joerg Roedel wrote: AMD processors don't implement that cpuid leaf. Right. But if an AMD processor were to implement that leaf, it would be in a compatible manner, yes? No official statement, but I guess

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 05:24 PM, Joerg Roedel wrote: Paravirtualizing does have its advantages. For the PMU, for example, we can have a single hypercall read and reprogram all counters, saving *many* exits. But I think we need to start from the architectural PMU and see exactly what the

Re: [PATCH v1 0/5] KVM in-guest performance monitoring

2011-05-12 Thread Avi Kivity
On 05/12/2011 05:37 PM, Avi Kivity wrote: I've considered something similar for mmio - use hypercalls for ordinary mmio to avoid calling into the emulator - but virtio uses pio which isn't emulated and we don't have massive consumers of mmio (except perhaps hpet). Say, enum {

Re: [Qemu-devel] [PATCH] Add an isa device for SGA

2011-05-12 Thread Gerd Hoffmann
On 05/11/11 19:11, Glauber Costa wrote: This patch adds a dummy legacy ISA device whose responsibility is to deploy sgabios, an option rom for a serial graphics adapter. The proposal is that this device is always-on when -nographics, but can otherwise be enable in any setup when -device sga is

Re: [PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-12 Thread Avi Kivity
On 05/12/2011 04:36 PM, Dhaval Giani wrote: Hi, As part of some of the work for my project, I have been looking at tracing some of the events in the guest from inside the host. In my usecase, I have been looking to co-relate the time of a network packet arrival with that in the host. ftrace

Re: [PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-12 Thread Dhaval Giani
On Thu, May 12, 2011 at 5:13 PM, Avi Kivity a...@redhat.com wrote: On 05/12/2011 04:36 PM, Dhaval Giani wrote: Hi, As part of some of the work for my project, I have been looking at tracing some of the events in the guest from inside the host. In my usecase, I have been looking to co-relate

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Nadav Har'El
On Wed, May 11, 2011, Gleb Natapov wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: On Mon, May 09, 2011 at 02:18:25PM +0300, Avi Kivity wrote: .. We can probably merge the next iteration if there aren't significant comments from others. .. The only worrying thing is the issue you raise

Re: [PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-12 Thread Avi Kivity
On 05/12/2011 06:39 PM, Dhaval Giani wrote: I think that one hypercall per trace is too expensive. Tracing is meant to be lightweight! I think the guest can log to a buffer, which is flushed on overflow or when a vmexit occurs. That gives us automatic serialization between a vcpu and

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Gleb Natapov
On Thu, May 12, 2011 at 06:42:28PM +0300, Nadav Har'El wrote: So I guess my question is, and Avi and Gleb I'd love your comments about this question: Is it really beneficial that I rewrite the ugly nested-VMX injection code to be somewhat-ugly in exactly the same way that nested-SVM injection

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Avi Kivity
On 05/12/2011 06:57 PM, Gleb Natapov wrote: On Thu, May 12, 2011 at 06:42:28PM +0300, Nadav Har'El wrote: So I guess my question is, and Avi and Gleb I'd love your comments about this question: Is it really beneficial that I rewrite the ugly nested-VMX injection code to be somewhat-ugly in

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Avi Kivity
On 05/12/2011 06:42 PM, Nadav Har'El wrote: Our second conclusion (and I hope that I'm not offending anyone here) is that the changes for L2 interrupt injection in both SVM and VMX are both ugly - they are just ugly in different ways. Both modified the non-nested code in strange places in

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Nadav Har'El
Hi, On Thu, May 12, 2011, Gleb Natapov wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: That is exactly what should be done and what I have in mind when I am asking to change VMX code to be SVM like. To achieve what you outlined above gradually we need to move common VMX and SVM logic into

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Gleb Natapov
On Thu, May 12, 2011 at 07:31:15PM +0300, Nadav Har'El wrote: Hi, On Thu, May 12, 2011, Gleb Natapov wrote about Re: [PATCH 0/30] nVMX: Nested VMX, v9: That is exactly what should be done and what I have in mind when I am asking to change VMX code to be SVM like. To achieve what you

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Avi Kivity
On 05/12/2011 07:51 PM, Gleb Natapov wrote: But if my interpretation of the code is correct, SVM isn't much closer than VMX to the goal of moving this logic to x86.c. When some logic is moved there, both SVM and VMX code will need to change - perhaps even considerably. So how will it be

Re: [PATCH 0/30] nVMX: Nested VMX, v9

2011-05-12 Thread Gleb Natapov
On Thu, May 12, 2011 at 07:08:59PM +0300, Avi Kivity wrote: On 05/12/2011 06:57 PM, Gleb Natapov wrote: On Thu, May 12, 2011 at 06:42:28PM +0300, Nadav Har'El wrote: So I guess my question is, and Avi and Gleb I'd love your comments about this question: Is it really beneficial that I

Re: [PATCH] kvm: log directly from the guest to the host kvm buffer

2011-05-12 Thread Eric Northup
On Thu, May 12, 2011 at 8:42 AM, Avi Kivity a...@redhat.com wrote: On 05/12/2011 06:39 PM, Dhaval Giani wrote:  I think that one hypercall per trace is too expensive.  Tracing is meant to  be lightweight!  I think the guest can log to a buffer, which is flushed on  overflow or

Video card passthrough success

2011-05-12 Thread Luke-Jr
Just thought I should pop a note out here that I have been using my Radeon 5850 for OpenCL inside KVM (fglrx) successfully for nearly a week now. Commit: c7b3e90e20c512a992865c38db03543a654e5d12 Motherboard: Intel DQ67SW CPU: Intel Core i5-2400 Host node: Linux 2.6.37-gentoo-r4 (untainted) ***

[PATCH 1/2] kvm tools: Bring VIRTIO_BLK_F_SEG_MAX feature back to virtio blk

2011-05-12 Thread Asias He
commit b764422bb0b46b00b896f6d4538ac3d3dde9e56b (kvm tools: Add support for multiple virtio-blk) removed the VIRTIO_BLK_F_SEG_MAX publishment to guest. There is no reason we should not support it. Just bring it back. Signed-off-by: Asias He asias.he...@gmail.com --- tools/kvm/virtio/blk.c |

[PATCH 2/2] kvm tools: Tune the command-line option

2011-05-12 Thread Asias He
With this patch we can have -c --cpus -m --mem -d --disk -k --kernel -i --initrd which is more consistent and easy to remember. The patch also frees up -s, -g option. Ingo suggestied ''' The debug options should probably be concentrated under a --debug