Re: Questing regarding KVM Guest PMU
On Fri, Apr 06, 2012 at 10:43:17AM +0530, shashank rachamalla wrote: On Thu, Apr 5, 2012 at 8:11 PM, Gleb Natapov g...@redhat.com wrote: On Thu, Apr 05, 2012 at 05:38:40PM +0300, Avi Kivity wrote: On 04/05/2012 04:57 PM, Gleb Natapov wrote: May be it used NMI based profiling. We should ask oprofile developers. As I said I am almost sure my inability to run it on a host is probably PEBKAC, although I ran the same script exactly on the host and the guest (the script is from the first email of this thread) After upgrading the kernel to latest git from whatever it was there the same script works and counts CPU_CLK_UNHALT events. This is even while it violates the Intel guidelines? Yes, but who says the result is correct :) It seems that we handle global ctrl msr wrong. That is counter can be enabled either in global ctrl or in eventsel. Trying to confirm that. if that becomes true then will global ctrl msr have any significance ? When it is in use yes. -- Gleb. -- 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.html
Re: [PATCH V8 1/1] Guest stop notification
Am 06.04.2012 09:21, schrieb Raghavendra K T: From: Eric B Munson emun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munson emun...@mgebm.net Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Cc: Eric B Munson emun...@mgebm.net Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Anthony Liguori aligu...@us.ibm.com Cc: Jan Kiszka jan.kis...@siemens.com Cc: Andreas FÀrber afaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState Thanks, change looks right to me. Long-term I should probably consider supplying some cpu_foreach() macro to iterate over them, but that would still need manual declaration of a properly typed variable for the CPUArchState - CPUState switch. KVMCLOCK_GUEST_PAUSED changed to KVM_KVMCLOCK_CTRL Changes from V6: Remove unnecessary include Changes from V5: KVM_GUEST_PAUSED is now a per vm ioctl instead of per vcpu Changes from V4: Test if the guest paused capability is available before use Changes from V3: Collapse new state change notification function into existsing function. Correct whitespace issues Change ioctl name to KVMCLOCK_GUEST_PAUSED Use for loop to iterate vpcu's Changes from V2: Move ioctl into hw/kvmclock.c so as other arches can use it as it is implemented Changes from V1: Remove unnecessary encapsulating function --- diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 446bd62..c8a34a5 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -64,10 +64,28 @@ static int kvmclock_post_load(void *opaque, int version_id) static void kvmclock_vm_state_change(void *opaque, int running, RunState state) { +int ret; Minor nitpick: We usually assign opaque values first thing in the function, so maybe order ret last if you resend? KVMClockState *s = opaque; +CPUArchState *penv = first_cpu; +int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL); if (running) { s-clock_valid = false; + +if (!cap_clock_ctrl) { +return; +} +for (penv = first_cpu; penv != NULL; penv = penv-next_cpu) { +ret = kvm_vcpu_ioctl(penv, KVM_KVMCLOCK_CTRL, 0); +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, +kvmclock_vm_state_change: %s\n, +strerror(-ret)); I always recommend to use __func__. Otherwise looks okay to me. Andreas +} +return; +} +} } } -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- 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.html
Re: [PATCH V8 1/1] Guest stop notification
On 04/06/2012 02:29 PM, Andreas Färber wrote: Am 06.04.2012 09:21, schrieb Raghavendra K T: From: Eric B Munsonemun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munsonemun...@mgebm.net Signed-off-by: Raghavendra K Traghavendra...@linux.vnet.ibm.com Cc: Eric B Munsonemun...@mgebm.net Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Cc: Anthony Liguorialigu...@us.ibm.com Cc: Jan Kiszkajan.kis...@siemens.com Cc: Andreas FÀrberafaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState Thanks, change looks right to me. Long-term I should probably consider supplying some cpu_foreach() macro to iterate over them, but that would still need manual declaration of a properly typed variable for the CPUArchState - CPUState switch. KVMCLOCK_GUEST_PAUSED changed to KVM_KVMCLOCK_CTRL Changes from V6: Remove unnecessary include Changes from V5: KVM_GUEST_PAUSED is now a per vm ioctl instead of per vcpu Changes from V4: Test if the guest paused capability is available before use Changes from V3: Collapse new state change notification function into existsing function. Correct whitespace issues Change ioctl name to KVMCLOCK_GUEST_PAUSED Use for loop to iterate vpcu's Changes from V2: Move ioctl into hw/kvmclock.c so as other arches can use it as it is implemented Changes from V1: Remove unnecessary encapsulating function --- diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 446bd62..c8a34a5 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -64,10 +64,28 @@ static int kvmclock_post_load(void *opaque, int version_id) static void kvmclock_vm_state_change(void *opaque, int running, RunState state) { +int ret; Minor nitpick: We usually assign opaque values first thing in the function, so maybe order ret last if you resend? KVMClockState *s = opaque; +CPUArchState *penv = first_cpu; +int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL); if (running) { s-clock_valid = false; + +if (!cap_clock_ctrl) { +return; +} +for (penv = first_cpu; penv != NULL; penv = penv-next_cpu) { +ret = kvm_vcpu_ioctl(penv, KVM_KVMCLOCK_CTRL, 0); +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, +kvmclock_vm_state_change: %s\n, +strerror(-ret)); I always recommend to use __func__. Otherwise looks okay to me. Andreas +} +return; +} +} } } Thanks for Review. Sending with comments incorporated. --- diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 446bd62..a6aa6e4 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -65,9 +65,27 @@ static void kvmclock_vm_state_change(void *opaque, int running, RunState state) { KVMClockState *s = opaque; +CPUArchState *penv = first_cpu; +int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL); +int ret; if (running) { s-clock_valid = false; + +if (!cap_clock_ctrl) { +return; +} +for (penv = first_cpu; penv != NULL; penv = penv-next_cpu) { +ret = kvm_vcpu_ioctl(penv, KVM_KVMCLOCK_CTRL, 0); +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, + %s: %s\n, __FUNCTION__, +strerror(-ret)); +} +return; +} +} } } -- 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.html
Re: New git workflow
On Thu, 05 Apr 2012 20:02:44 +0300 Avi Kivity a...@redhat.com wrote: In a recent conversation, Linus persuaded me that it's time for change in our git workflow; the following will bring it in line with the current practices of most trees. The current 'master' branch will be abandoned (still available for reviewing history). The new branch structure will be as follows: Please update Documentation/virtual/kvm/review-checklist.txt as well: 2. Patches should be against kvm.git master branch. Thanks, Takuya -- 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.html
Re: [Qemu-devel] [PATCH V8 1/1] Guest stop notificationorry for rduplicate mail
On 04/06/2012 03:19 PM, Raghavendra K T wrote: On 04/06/2012 02:29 PM, Andreas Färber wrote: Am 06.04.2012 09:21, schrieb Raghavendra K T: From: Eric B Munsonemun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munsonemun...@mgebm.net Signed-off-by: Raghavendra K Traghavendra...@linux.vnet.ibm.com Cc: Eric B Munsonemun...@mgebm.net Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Cc: Anthony Liguorialigu...@us.ibm.com Cc: Jan Kiszkajan.kis...@siemens.com Cc: Andreas FÀrberafaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState Thanks, change looks right to me. I think I should have added Acked-by and resent full patch. So here is it. sorry for duplicate mail. --- From: Eric B Munson emun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Acked-by: Andreas Färber afaer...@suse.de Signed-off-by: Eric B Munson emun...@mgebm.net Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com Cc: Eric B Munson emun...@mgebm.net Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Anthony Liguori aligu...@us.ibm.com Cc: Jan Kiszka jan.kis...@siemens.com Cc: Andreas Färber afaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState KVMCLOCK_GUEST_PAUSED changed to KVM_KVMCLOCK_CTRL incorporated Andrea's comments (__FUNCTION__) etc Changes from V6: Remove unnecessary include Changes from V5: KVM_GUEST_PAUSED is now a per vm ioctl instead of per vcpu Changes from V4: Test if the guest paused capability is available before use Changes from V3: Collapse new state change notification function into existsing function. Correct whitespace issues Change ioctl name to KVMCLOCK_GUEST_PAUSED Use for loop to iterate vpcu's Changes from V2: Move ioctl into hw/kvmclock.c so as other arches can use it as it is implemented Changes from V1: Remove unnecessary encapsulating function --- diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 446bd62..a6aa6e4 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -65,9 +65,27 @@ static void kvmclock_vm_state_change(void *opaque, int running, RunState state) { KVMClockState *s = opaque; +CPUArchState *penv = first_cpu; +int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL); +int ret; if (running) { s-clock_valid = false; + +if (!cap_clock_ctrl) { +return; +} +for (penv = first_cpu; penv != NULL; penv = penv-next_cpu) { +ret = kvm_vcpu_ioctl(penv, KVM_KVMCLOCK_CTRL, 0); +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, + %s: %s\n, __FUNCTION__, +strerror(-ret)); +} +return; +} +} } } -- 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.html
Re: smp option of qemu-kvm
On Thu, Apr 5, 2012 at 1:52 PM, Steven wangwangk...@gmail.com wrote: Hi, Daniel, Thanks for your quick response. However, the ps -eLf show 4 threads for the VM and I checked 4 threads have the same tgid. But the VM I created is with -smp 2 option. Could you explain this? Thanks. info cpus in the QEMU monitor shell willshow you which thread ID corresponds to each vpu. Stuart -- 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.html
Re: [PATCH] Use clockevent multiplier and shifter for decrementer
On 04/04/2012 01:51 AM, Bharat Bhushan wrote: Time for which the hrtimer is started for decrementer emulation is calculated using tb_ticks_per_usec. While hrtimer uses the clockevent for DEC reprogramming (if needed) and which calculate timebase ticks using the multiplier and shifter mechanism implemented within clockevent layer. It was observed that this conversion (timebase-time-timebase) are not correct because the mechanism are not consistent. In our setup it adds 2% jitter. With this patch clockevent multiplier and shifter mechanism are used when starting hrtimer for decrementer emulation. Now the jitter is 0.5%. Signed-off-by: Bharat Bhushanbharat.bhus...@freescale.com --- arch/powerpc/include/asm/time.h |2 ++ arch/powerpc/kernel/time.c |6 ++ arch/powerpc/kvm/emulate.c |5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) Changes to arch/powerpc outside arch/powerpc/kvm need to Cc: linuxppc-...@lists.ozlabs.org diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h index 7eb10fb..6d631b2 100644 --- a/arch/powerpc/include/asm/time.h +++ b/arch/powerpc/include/asm/time.h @@ -202,6 +202,8 @@ extern u64 mulhdu(u64, u64); extern void div128_by_32(u64 dividend_high, u64 dividend_low, unsigned divisor, struct div_result *dr); +extern void get_clockevent_mult(u64 *multi, u64 *shift); + /* Used to store Processor Utilization register (purr) values */ struct cpu_usage { diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 567dd7c..d229edd 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -910,6 +910,12 @@ static void __init init_decrementer_clockevent(void) register_decrementer_clockevent(cpu); } +void get_clockevent_mult(u64 *multi, u64 *shift) +{ + *multi = decrementer_clockevent.mult; + *shift = decrementer_clockevent.shift; +} Maybe just make decrmenter_clockevent non-static? diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index afc9154..4bfcaa1 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -76,6 +76,7 @@ void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) { unsigned long dec_nsec; unsigned long long dec_time; + u64 mult, shift; pr_debug(mtDEC: %x\n, vcpu-arch.dec); hrtimer_try_to_cancel(vcpu-arch.dec_timer); @@ -103,9 +104,9 @@ void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) * host ticks. */ + get_clockevent_mult(mult,shift); dec_time = vcpu-arch.dec; - dec_time *= 1000; - do_div(dec_time, tb_ticks_per_usec); + dec_time = (dec_time shift) / mult; dec_nsec = do_div(dec_time, NSEC_PER_SEC); hrtimer_start(vcpu-arch.dec_timer, ktime_set(dec_time, dec_nsec), HRTIMER_MODE_REL); -Scott -- 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.html
Re: [Qemu-devel] [PATCH V8 1/1] Guest stop notificationorry for rduplicate mail
Am 06.04.2012 15:01, schrieb Raghavendra K T: On 04/06/2012 03:19 PM, Raghavendra K T wrote: On 04/06/2012 02:29 PM, Andreas Färber wrote: Am 06.04.2012 09:21, schrieb Raghavendra K T: From: Eric B Munsonemun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munsonemun...@mgebm.net Signed-off-by: Raghavendra K Traghavendra...@linux.vnet.ibm.com Cc: Eric B Munsonemun...@mgebm.net Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Cc: Anthony Liguorialigu...@us.ibm.com Cc: Jan Kiszkajan.kis...@siemens.com Cc: Andreas FÀrberafaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState Thanks, change looks right to me. I think I should have added Acked-by and resent full patch. So here is it. sorry for duplicate mail. No, it was not intended as such since I can't ack the ioctl. Resends are best done with git-send-email, i.e. a v9 with change log (whether as reply or not, opinions are divided) to make sure the right version gets applied in the end. --- From: Eric B Munson emun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Acked-by: Andreas Färber afaer...@suse.de Signed-off-by: Eric B Munson emun...@mgebm.net Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com *-bys should be added in chronological order, i.e. at the bottom. Cc: Eric B Munson emun...@mgebm.net Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Anthony Liguori aligu...@us.ibm.com Cc: Jan Kiszka jan.kis...@siemens.com Cc: Andreas Färber afaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState KVMCLOCK_GUEST_PAUSED changed to KVM_KVMCLOCK_CTRL incorporated Andrea's comments (__FUNCTION__) etc Changes from V6: Remove unnecessary include Changes from V5: KVM_GUEST_PAUSED is now a per vm ioctl instead of per vcpu Changes from V4: Test if the guest paused capability is available before use Changes from V3: Collapse new state change notification function into existsing function. Correct whitespace issues Change ioctl name to KVMCLOCK_GUEST_PAUSED Use for loop to iterate vpcu's Changes from V2: Move ioctl into hw/kvmclock.c so as other arches can use it as it is implemented Changes from V1: Remove unnecessary encapsulating function --- diff --git a/hw/kvm/clock.c b/hw/kvm/clock.c index 446bd62..a6aa6e4 100644 --- a/hw/kvm/clock.c +++ b/hw/kvm/clock.c @@ -65,9 +65,27 @@ static void kvmclock_vm_state_change(void *opaque, int running, RunState state) { KVMClockState *s = opaque; +CPUArchState *penv = first_cpu; +int cap_clock_ctrl = kvm_check_extension(kvm_state, KVM_CAP_KVMCLOCK_CTRL); +int ret; if (running) { s-clock_valid = false; + +if (!cap_clock_ctrl) { +return; +} +for (penv = first_cpu; penv != NULL; penv = penv-next_cpu) { +ret = kvm_vcpu_ioctl(penv, KVM_KVMCLOCK_CTRL, 0); +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, + %s: %s\n, __FUNCTION__, Is the whitespace before %s intentional? Wasn't there in v8. The GCC manual recommends __func__, like I suggested, saying it's C99. http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Names.html#Function-Names __FUNCTION__ usage is currently 432 vs. __func__ 579, so not wrong. If you want to leave it that way you can add my Reviewed-by: Andreas Färber afaer...@suse.de Andreas +strerror(-ret)); +} +return; +} +} } } -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- 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.html
HONG LEONG BANK (Malaysia)
Hello, I contacted you to assist in distributing the money left behind by my late client, Edward Cheah, Tele:+60146308549 Fax:+60(0)321784290 -- 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.html
Re: [Qemu-devel] [PATCH V8 1/1] Guest stop notificationorry for rduplicate mail ndreas
On 04/07/2012 02:39 AM, Andreas Färber wrote: Am 06.04.2012 15:01, schrieb Raghavendra K T: On 04/06/2012 03:19 PM, Raghavendra K T wrote: On 04/06/2012 02:29 PM, Andreas Färber wrote: Am 06.04.2012 09:21, schrieb Raghavendra K T: From: Eric B Munsonemun...@mgebm.net Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munsonemun...@mgebm.net Signed-off-by: Raghavendra K Traghavendra...@linux.vnet.ibm.com Cc: Eric B Munsonemun...@mgebm.net Cc: Avi Kivitya...@redhat.com Cc: Marcelo Tosattimtosa...@redhat.com Cc: Anthony Liguorialigu...@us.ibm.com Cc: Jan Kiszkajan.kis...@siemens.com Cc: Andreas FÀrberafaer...@suse.de --- Changes from V7: capabilty changed to KVM_CAP_KVMCLOCK_CTRL KVM_GUEST_PAUSED is pervcpu again CPUState renamed to CPUArchState Thanks, change looks right to me. I think I should have added Acked-by and resent full patch. So here is it. sorry for duplicate mail. No, it was not intended as such since I can't ack the ioctl. Resends are best done with git-send-email, i.e. a v9 with change log (whether as reply or not, opinions are divided) to make sure the right version gets applied in the end. Ok. Thanks Andreas. sending V9 shortly [...] +if (ret) { +if (ret != -EINVAL) { +fprintf(stderr, + %s: %s\n, __FUNCTION__, Is the whitespace before %s intentional? Wasn't there in v8. The GCC manual recommends __func__, like I suggested, saying it's C99. http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Names.html#Function-Names __FUNCTION__ usage is currently 432 vs. __func__ 579, so not wrong. will correct them. If you want to leave it that way you can add my Reviewed-by: Andreas Färberafaer...@suse.de Andreas +strerror(-ret)); +} +return; +} +} } } -- 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.html
Question about emulation of KVM?
Hi everyone, I try to use the x86_emulate_instruction() function. But it seems like that it fails to emulate some instruction. My program gets stuck in somewhere. It keeps emulating one instructions. Is there some instructions that this function can not emulate? R -- 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.html
Re: New git workflow
On Thu, 05 Apr 2012 20:02:44 +0300 Avi Kivity a...@redhat.com wrote: In a recent conversation, Linus persuaded me that it's time for change in our git workflow; the following will bring it in line with the current practices of most trees. The current 'master' branch will be abandoned (still available for reviewing history). The new branch structure will be as follows: Please update Documentation/virtual/kvm/review-checklist.txt as well: 2. Patches should be against kvm.git master branch. Thanks, Takuya -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] KVM: PPC: bookehv: Fix save/restore of guest accessible SPRGs.
On 04/04/2012 05:33 AM, b16...@freescale.com wrote: From: Varun Sethivarun.se...@freescale.com For Guest accessible SPRGs 4-7, save/restore must be handled differently for 64bit and non-64 bit case. The registers are maintained as 64 bit copies by KVM. While saving/restoring for the non-64 bit case we should always take the lower 4 bytes. Signed-off-by: Varun Sethivarun.se...@freescale.com --- arch/powerpc/kvm/bookehv_interrupts.S | 48 +++- 1 files changed, 40 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index 909e96e..c1c0bae 100644 --- a/arch/powerpc/kvm/bookehv_interrupts.S +++ b/arch/powerpc/kvm/bookehv_interrupts.S @@ -320,13 +320,29 @@ _GLOBAL(kvmppc_resume_host) PPC_STL r5, VCPU_LR(r4) mfspr r7, SPRN_SPRG5 PPC_STL r3, VCPU_VRSAVE(r4) - PPC_STL r6, VCPU_SHARED_SPRG4(r11) +#ifdef CONFIG_64BIT + std r6, VCPU_SHARED_SPRG4(r11) +#else + stw r6, (VCPU_SHARED_SPRG4 + 4)(r11) +#endif mfspr r8, SPRN_SPRG6 - PPC_STL r7, VCPU_SHARED_SPRG5(r11) +#ifdef CONFIG_64BIT + std r7, VCPU_SHARED_SPRG5(r11) +#else + stw r7, (VCPU_SHARED_SPRG5 + 4)(r11) +#endif mfspr r9, SPRN_SPRG7 - PPC_STL r8, VCPU_SHARED_SPRG6(r11) +#ifdef CONFIG_64BIT + std r8, VCPU_SHARED_SPRG6(r11) +#else + stw r8, (VCPU_SHARED_SPRG6 + 4)(r11) +#endif mfxer r3 - PPC_STL r9, VCPU_SHARED_SPRG7(r11) +#ifdef CONFIG_64BIT + std r9, VCPU_SHARED_SPRG7(r11) +#else + stw r9, (VCPU_SHARED_SPRG7 + 4)(r11) +#endif /* save guest MAS registers and restore host mas4 mas6 */ mfspr r5, SPRN_MAS0 @@ -549,13 +565,29 @@ lightweight_exit: * SPRGs, so we need to reload them here with the guest's values. */ lwz r3, VCPU_VRSAVE(r4) - lwz r5, VCPU_SHARED_SPRG4(r11) +#ifdef CONFIG_64BIT + ld r5, VCPU_SHARED_SPRG4(r11) +#else + lwz r5, (VCPU_SHARED_SPRG4 + 4)(r11) +#endif mtspr SPRN_VRSAVE, r3 - lwz r6, VCPU_SHARED_SPRG5(r11) +#ifdef CONFIG_64BIT + ld r6, VCPU_SHARED_SPRG5(r11) +#else + lwz r6, (VCPU_SHARED_SPRG5 + 4)(r11) +#endif mtspr SPRN_SPRG4W, r5 - lwz r7, VCPU_SHARED_SPRG6(r11) +#ifdef CONFIG_64BIT + ld r7, VCPU_SHARED_SPRG6(r11) +#else + lwz r7, (VCPU_SHARED_SPRG6 + 4)(r11) +#endif mtspr SPRN_SPRG5W, r6 - lwz r8, VCPU_SHARED_SPRG7(r11) +#ifdef CONFIG_64BIT + ld r8, VCPU_SHARED_SPRG7(r11) +#else + lwz r8, (VCPU_SHARED_SPRG7 + 4)(r11) +#endif mtspr SPRN_SPRG6W, r7 mtspr SPRN_SPRG7W, r8 Maybe introduce a macro for accesses of this form? -Scott -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html