Re: [RFC PATCH v3 2/7] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-21 Thread Marcelo
On Thu, Sep 22, 2016 at 12:18:46AM +0800, hejianet wrote: > Hi Marcelo > > sorry for the late, just came back from a vacation. Hi, no problem. Hope your batteries are recharged now :-) > > On 9/14/16 7:55 PM, Marcelo wrote: > > Hi Jia, > > > > On Wed,

Re: [RFC PATCH v3 2/7] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-14 Thread Marcelo
Hi Jia, On Wed, Sep 14, 2016 at 01:58:42PM +0800, hejianet wrote: > Hi Marcelo > > > On 9/13/16 2:57 AM, Marcelo wrote: > > On Fri, Sep 09, 2016 at 02:33:57PM +0800, Jia He wrote: > > > This is to use the generic interface snmp_get_cpu_field{,64}_batch to > &

Re: [PATCH] sctp: Remove some redundant code

2016-09-15 Thread Marcelo
On Sun, Sep 04, 2016 at 11:38:13AM +0200, Christophe JAILLET wrote: > In commit 311b21774f13 ("sctp: simplify sk_receive_queue locking"), a call > to 'skb_queue_splice_tail_init()' has been made explicit. Previously it was > hidden in 'sctp_skb_list_tail()' > > Now, the code around it looks redund

Re: [PATCH] sctp: Remove some redundant code

2016-09-15 Thread Marcelo
On Thu, Sep 15, 2016 at 09:32:18PM +0200, Christophe JAILLET wrote: > Le 15/09/2016 à 19:34, Marcelo a écrit : > > On Sun, Sep 04, 2016 at 11:38:13AM +0200, Christophe JAILLET wrote: > > > In commit 311b21774f13 ("sctp: simplify sk_receive_queue loc

Re: KASAN: use-after-free Read in sctp_packet_transmit

2018-01-06 Thread Marcelo
Em 6 de janeiro de 2018 15:09:45 BRST, Dmitry Vyukov escreveu: >On Sat, Jan 6, 2018 at 6:02 PM, Marcelo Ricardo Leitner > wrote: >> On Fri, Jan 05, 2018 at 02:07:01PM -0800, syzbot wrote: >>> Hello, >>> >>> syzkaller hit the following crash on >&

Re: [LKP] [ipv4,ipv6] baf606d9c9b: INFO: possible circular locking dependency detected ]

2015-03-20 Thread Marcelo
19.816665][] SyS_setsockopt+0x78/0x99 > [ 19.816665][] system_call_fastpath+0x12/0x17 > [ 19.816665] ... Missed this syscall, sorry. Will fix this. Marcelo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.or

Re: [PATCH 4.4 14/20] sctp: avoid BUG_ON on sctp_wait_for_sndbuf

2017-02-21 Thread Marcelo
Em 21 de fevereiro de 2017 13:08:44 BRT, Ben Hutchings escreveu: >On Thu, 2017-02-16 at 09:53 -0800, Greg Kroah-Hartman wrote: >> 4.4-stable review patch.  If anyone has any objections, please let me >know. >> >> ------ >> >> From: Marcelo Ri

Re: [RFC PATCH v3 2/7] proc: Reduce cache miss in {snmp,netstat}_seq_show

2016-09-12 Thread Marcelo
On Fri, Sep 09, 2016 at 02:33:57PM +0800, Jia He wrote: > This is to use the generic interface snmp_get_cpu_field{,64}_batch to > aggregate the data by going through all the items of each cpu sequentially. > Then snmp_seq_show and netstat_seq_show are split into 2 parts to avoid build > warning "t

Re: [RFC PATCH v3 3/7] proc: Reduce cache miss in snmp6_seq_show

2016-09-12 Thread Marcelo
On Fri, Sep 09, 2016 at 02:33:58PM +0800, Jia He wrote: > This is to use the generic interface snmp_get_cpu_field{,64}_batch to > aggregate the data by going through all the items of each cpu sequentially. > > Signed-off-by: Jia He > --- > net/ipv6/proc.c | 32 +++- >

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-26 Thread Marcelo Tosatti
On Tue, Nov 20, 2012 at 07:59:10AM +0800, Xiao Guangrong wrote: > Currently, reexecute_instruction refused to retry all instructions. If > nested npt is used, the emulation may be caused by shadow page, it can > be fixed by dropping the shadow page > > Signed-off-by: Xiao Guangrong > --- > arch/

Re: Re: Re: Re: Re: [RFC PATCH 0/2] kvm/vmx: Output TSC offset

2012-11-26 Thread Marcelo Tosatti
On Mon, Nov 26, 2012 at 08:05:10PM +0900, Yoshihiro YUNOMAE wrote: > >>>500h. event tsc_write tsc_offset=-3000 > >>> > >>>Then a guest trace containing events with a TSC timestamp. > >>>Which tsc_offset to use? > >>> > >>>(that is the problem, which unless i am mistaken can only be solved > >>>easi

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-26 Thread Marcelo Tosatti
On Tue, Nov 20, 2012 at 07:59:53AM +0800, Xiao Guangrong wrote: > The current reexecute_instruction can not well detect the failed instruction > emulation. It allows guest to retry all the instructions except it accesses > on error pfn. > > For example, some cases are nested-write-protect - if the

Re: [PATCH 0/4] AER-KVM: Error containment of PCI pass-thru devices assigned to KVM guests

2012-11-26 Thread Marcelo Tosatti
On Tue, Nov 20, 2012 at 02:09:46PM +, Pandarathil, Vijaymohan R wrote: > > > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > > Sent: Tuesday, November 20, 2012 5:41 AM > > To: Pandarathil, Vijaymohan R > > Cc: k...@vger.kernel.org; linux-...@vger.kernel.or

Re: [PATCH] x86, kvm: Remove incorrect redundant assembly constraint

2012-11-26 Thread Marcelo Tosatti
;=&r" (_tmp), \ > >> "+a" (*rax), "+d" (*rdx), "+qm"(_ex) \ > >> - : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val), \ > >> -"a&q

Re: [PATCH] x86, kvm: Remove incorrect redundant assembly constraint

2012-11-26 Thread Marcelo Tosatti
On Mon, Nov 26, 2012 at 03:49:36PM -0800, H. Peter Anvin wrote: > On 11/26/2012 03:48 PM, Marcelo Tosatti wrote: > >> > >> Gleb, Marcelo: are you going to apply this or would you prefer I took it > >> in x86/urgent? > >> > >>-hpa > > >

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-27 Thread Marcelo Tosatti
On Mon, Nov 26, 2012 at 02:36:24PM -0600, Michael Wolf wrote: > In the case of where you have a system that is running in a > capped or overcommitted environment the user may see steal time > being reported in accounting tools such as top or vmstat. The definition of stolen time is 'time during wh

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-27 Thread Marcelo Tosatti
On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: > On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: > > >> > >> - return false; > >> +again: > >> + page_fault_count = ACCESS_ONCE(vcpu->kvm->arch.page_fault_count); > >>

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-27 Thread Marcelo Tosatti
gt; > >> - if (tdp_enabled) > >> + if (!ACCESS_ONCE(vcpu->kvm->arch.indirect_shadow_pages)) > >>return false; > > > > How is indirect_shadow_pages protected? Why is ACCESS_ONCE() being used > > to read it? > > Hi Marcelo, > > I

Re: [PATCH 0/5] Alter steal time reporting in KVM

2012-11-27 Thread Marcelo Tosatti
On Tue, Nov 27, 2012 at 09:24:42PM -0200, Marcelo Tosatti wrote: > On Mon, Nov 26, 2012 at 02:36:24PM -0600, Michael Wolf wrote: > > In the case of where you have a system that is running in a > > capped or overcommitted environment the user may see steal time > > being r

Re: [PATCH V3 RFC 2/2] kvm: Handle yield_to failure return code for potential undercommit case

2012-11-27 Thread Marcelo Tosatti
Don't understand the reasoning behind why 3 is a good choice. On Mon, Nov 26, 2012 at 05:38:04PM +0530, Raghavendra K T wrote: > From: Raghavendra K T > > yield_to returns -ESRCH, When source and target of yield_to > run queue length is one. When we see three successive failures of > yield_to w

Re: [PATCH] KVM: MMU: lazily drop large spte

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 01:27:38PM +0800, Xiao Guangrong wrote: > On 11/18/2012 11:00 AM, Marcelo Tosatti wrote: > map gfn 4? See corrected step 7 above. > >> > >> Ah, this is a real bug, and unfortunately, it exists in current > >> code. I will make a separ

Re: [PATCH 2/3] KVM: x86: let reexecute_instruction work for tdp

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 10:55:26PM +0800, Xiao Guangrong wrote: > On 11/28/2012 10:01 PM, Gleb Natapov wrote: > > On Wed, Nov 28, 2012 at 11:15:13AM +0800, Xiao Guangrong wrote: > >> On 11/28/2012 07:32 AM, Marcelo Tosatti wrote: > >>> On Tue, Nov 27, 2012 at 11:13:11

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: > On 11/28/2012 10:12 PM, Gleb Natapov wrote: > > On Tue, Nov 27, 2012 at 11:30:24AM +0800, Xiao Guangrong wrote: > >> On 11/27/2012 06:41 AM, Marcelo Tosatti wrote: > >> > >>>> &

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Thu, Nov 29, 2012 at 06:40:51AM +0800, Xiao Guangrong wrote: > On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: > > On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: > >> On 11/28/2012 10:12 PM, Gleb Natapov wrote: > >>> On Tue, Nov 27, 2012 at 11:30:24

Re: [PATCH 1/2] KVM: VMX: fix invalid cpu passed to smp_call_function_single

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 08:53:15PM +0800, Xiao Guangrong wrote: > In loaded_vmcs_clear, loaded_vmcs->cpu is the fist parameter passed to > smp_call_function_single, if the target cpu is downing (doing cpu hot remove), > loaded_vmcs->cpu can become -1 then -1 is passed to smp_call_function_single >

Re: [PATCH 2/2] KVM: VMX: fix memory order between loading vmcs and clearing vmcs

2012-11-28 Thread Marcelo Tosatti
On Wed, Nov 28, 2012 at 08:54:14PM +0800, Xiao Guangrong wrote: > vmcs->cpu indicates whether it exists on the target cpu, -1 means the vmcs > does not exist on any vcpu > > If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu > list. The list can be corrupted if the cpu

Re: [PATCH 3/3] KVM: x86: improve reexecute_instruction

2012-11-28 Thread Marcelo Tosatti
On Thu, Nov 29, 2012 at 07:16:50AM +0800, Xiao Guangrong wrote: > On 11/29/2012 06:40 AM, Xiao Guangrong wrote: > > On 11/29/2012 05:57 AM, Marcelo Tosatti wrote: > >> On Wed, Nov 28, 2012 at 10:59:35PM +0800, Xiao Guangrong wrote: > >>> On 11/28/2012 10:12 PM, Gle

Re: Re: Re: Re: Re: Re: [RFC PATCH 0/2] kvm/vmx: Output TSC offset

2012-11-29 Thread Marcelo Tosatti
On Tue, Nov 27, 2012 at 07:53:47PM +0900, Yoshihiro YUNOMAE wrote: > Hi Marcelo, > > (2012/11/27 8:16), Marcelo Tosatti wrote: > >On Mon, Nov 26, 2012 at 08:05:10PM +0900, Yoshihiro YUNOMAE wrote: > >>>>>500h. event tsc_write tsc_offset=-3000 > >>>&

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-18 Thread Marcelo Tosatti
On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > walk and zap all shadow pages one by one, also it need to zap all guest > page's rmap and all shadow page's parent spte list. Particularly, things > become wors

Re: [PATCH] KVM: allow host header to be included even for !CONFIG_KVM

2013-03-18 Thread Marcelo Tosatti
On Thu, Mar 14, 2013 at 05:13:46PM -0700, Kevin Hilman wrote: > The new context tracking subsystem unconditionally includes kvm_host.h > headers for the guest enter/exit macros. This causes a compile > failure when KVM is not enabled. > > Fix by adding an IS_ENABLED(CONFIG_KVM) check to kvm_host

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 11:06:35AM +0800, Xiao Guangrong wrote: > On 03/19/2013 04:46 AM, Marcelo Tosatti wrote: > > On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: > >> The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > >> walk and

[GIT PULL] KVM fixes for 3.9-rc3

2013-03-19 Thread Marcelo Tosatti
functions (CVE-2013-1797) KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798) Kevin Hilman (1): KVM: allow host header to be included even for !CONFIG_KVM Marcelo Tosatti (1): KVM: x86: fix deadlock in clock-in-progress request handling arch/x86/include

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-19 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 11:37:38PM +0800, Xiao Guangrong wrote: > On 03/19/2013 10:40 PM, Marcelo Tosatti wrote: > > > > > I misunderstood the benefit of your idea (now i got it: zap root > > and flush TLB guarantees vcpus will refault). What i'd like to avoid is >

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-20 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: > On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > >> +/* > >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > >> + * generation, the bits of bits 52 ~ bit 61 are used as >

Re: [PATCH] x86: correctly initialize the CS base on reset

2013-03-20 Thread Marcelo Tosatti
On Tue, Mar 19, 2013 at 04:30:26PM +0100, Paolo Bonzini wrote: > The CS base was initialized to 0 on VMX (wrong, but usually overridden > by userspace before starting) or 0xf on SVM. The correct value is > 0x, and VMX is able to emulate it now, so use it. > > Signed-off-by: Paolo Bonz

Re: [PATCH v3] KVM: MMU: lazily drop large spte

2013-02-06 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:11:09PM +0800, Xiao Guangrong wrote: > Currently, kvm zaps the large spte if write-protected is needed, the later > read can fault on that spte. Actually, we can make the large spte readonly > instead of making them un-present, the page fault caused by read access can > b

Re: [PATCH v12 rebased 2/8] start vm after resetting it

2013-02-07 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 03:19:23PM +0800, Hu Tao wrote: > From: Wen Congyang > > The guest should run after resetting it, but it does not run if its > old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. > > We don't set runstate to RUN_STATE_PAUSED when resetting the guest, > so the runst

Re: [PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-02-07 Thread Marcelo Tosatti
Hi, On Wed, Jan 23, 2013 at 03:19:21PM +0800, Hu Tao wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such feature on kvm. > > Another purpose of this feature is: management app(for example: > libvirt) can do auto dump when the guest is panicked. If mana

Re: [PATCH v12 rebased 1/8] preserve cpu runstate

2013-02-07 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 03:19:22PM +0800, Hu Tao wrote: > This patch enables preservation of cpu runstate during save/load vm. > So when a vm is restored from snapshot, the cpu runstate is restored, > too. > > See following example: > > # save two vms: one is running, the other is paused > (qemu)

Re: [PATCH v3 5/5] KVM: MMU: fast drop all spte on the pte_list

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 04:55:37PM +0800, Xiao Guangrong wrote: > If a shadow page is being zapped or a host page is going to be freed, kvm > will drop all the reverse-mappings on the shadow page or the gfn. Currently, > it drops the reverse-mapping one by one - it deletes the first reverse > mapp

Re: [PATCH v3 0/3] KVM: MMU: simple cleanups

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:26:21PM +0800, Xiao Guangrong wrote: > There are the simple cleanups for MMU, no function / logic changed. > > Marcelo, Gleb, please apply them after applying > "[PATCH v3] KVM: MMU: lazily drop large spte" > > Changelog: > no change, ju

Re: [PATCH v3 1/5] KVM: MMU: introduce mmu_spte_establish

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 04:53:19PM +0800, Xiao Guangrong wrote: > There is little different between walking parent pte and walking ramp: > all spte in rmap must be present but this is not true on parent pte list, > in kvm_mmu_alloc_page, we always link the parent list before set the spte > to prese

Re: [PATCH v2 03/12] KVM: MMU: simplify mmu_set_spte

2013-01-28 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 06:05:29PM +0800, Xiao Guangrong wrote: > In order to detecting spte remapping, we can simply check whether the > spte has already been pointing to the pfn even if the spte is not the > last spte, for middle spte is pointing to the kernel pfn which can not > be mapped to use

Re: [PATCH v2 06/12] KVM: MMU: introduce a static table to map guest access to spte access

2013-01-28 Thread Marcelo Tosatti
On Fri, Jan 25, 2013 at 10:46:31AM +0800, Xiao Guangrong wrote: > On 01/25/2013 08:15 AM, Marcelo Tosatti wrote: > > On Wed, Jan 23, 2013 at 06:07:20PM +0800, Xiao Guangrong wrote: > >> It makes set_spte more clean and reduces branch prediction > >> > &g

Re: [PATCH v2 06/12] KVM: MMU: introduce a static table to map guest access to spte access

2013-01-29 Thread Marcelo Tosatti
On Mon, Jan 28, 2013 at 10:07:15PM -0200, Marcelo Tosatti wrote: > On Fri, Jan 25, 2013 at 10:46:31AM +0800, Xiao Guangrong wrote: > > On 01/25/2013 08:15 AM, Marcelo Tosatti wrote: > > > On Wed, Jan 23, 2013 at 06:07:20PM +0800, Xiao Guangrong wrote: > > >> It

Re: [PATCH v2 03/12] KVM: MMU: simplify mmu_set_spte

2013-01-29 Thread Marcelo Tosatti
On Tue, Jan 29, 2013 at 10:55:24AM +0800, Xiao Guangrong wrote: > On 01/29/2013 08:21 AM, Marcelo Tosatti wrote: > > On Wed, Jan 23, 2013 at 06:05:29PM +0800, Xiao Guangrong wrote: > >> In order to detecting spte remapping, we can simply check whether the > >> spte has a

[GIT PULL] KVM fixes for 3.8-rc4

2013-01-24 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Alexander Graf (1): KVM: PPC: Emulate dcbf arch/powerpc/kvm/emulate.c |2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH v2 06/12] KVM: MMU: introduce a static table to map guest access to spte access

2013-01-24 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 06:07:20PM +0800, Xiao Guangrong wrote: > It makes set_spte more clean and reduces branch prediction > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c | 37 ++--- > 1 files changed, 26 insertions(+), 11 deletions(-) Don't see

Re: [PATCH] kvm: Fix irqfd resampler list walk

2013-01-28 Thread Marcelo Tosatti
On Mon, Jan 28, 2013 at 08:25:00AM -0700, Alex Williamson wrote: > On Mon, 2012-12-10 at 18:16 -0200, Marcelo Tosatti wrote: > > On Thu, Dec 06, 2012 at 02:44:59PM -0700, Alex Williamson wrote: > > > Typo for the next pointer means we're walking random data here. > >

Re: [Bisected][-next-20130204+] [x86/kvm] udevd:[97]: segfault at ffffffffff5fd020 ip 00007fff069e277f sp 00007fff068c9ef8 error d

2013-02-27 Thread Marcelo Tosatti
On Sun, Feb 24, 2013 at 04:23:44PM -0500, Peter Hurley wrote: > On Tue, 2013-02-19 at 10:26 +0200, Gleb Natapov wrote: > > On Mon, Feb 18, 2013 at 08:12:21PM -0500, Peter Hurley wrote: > > > On Mon, 2013-02-18 at 19:59 -0300, Marcelo Tosatti wrote: > > > > On Wed, Fe

Re: [Bisected][-next-20130204+] [x86/kvm] udevd:[97]: segfault at ffffffffff5fd020 ip 00007fff069e277f sp 00007fff068c9ef8 error d

2013-02-18 Thread Marcelo Tosatti
On Wed, Feb 13, 2013 at 06:57:09AM -0500, Peter Hurley wrote: > On Wed, 2013-02-13 at 12:51 +0200, Gleb Natapov wrote: > > On Tue, Feb 12, 2013 at 04:39:03PM -0800, H. Peter Anvin wrote: > > > On 02/12/2013 04:26 PM, Peter Hurley wrote: > > > > With -next-20130204+ in ubuntu 12.10 VM (so the 80x25

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-18 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:49:41PM -0600, Michael Wolf wrote: > Add a helper routine to scheduler/core.c to allow the kvm module > to retrieve the cpu hardlimit settings. The values will be used > to set up a timer that is used to separate the consigned from the > steal time. 1) Can you please de

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-02-18 Thread Marcelo Tosatti
On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic Weisbecker wrote: > 2013/2/5 Michael Wolf : > > In the case of where you have a system that is running in a > > capped or overcommitted environment the user may see steal time > > being reported in accounting tools such as top or vmstat. This can

[GIT PULL] KVM updates for the 3.9 merge window

2013-02-20 Thread Marcelo Tosatti
n Kiszka (1): KVM: nVMX: Remove redundant get_vmcs12 from nested_vmx_exit_handled_msr Jesse Larrew (1): x86: kvm_para: fix typo in hypercall comments Marcelo Tosatti (3): KVM: VMX: fix incorrect cached cpl value with real/v8086 modes x86: pvclock kvm: align allocation size to page size

Re: sched: Fix signedness bug in yield_to()

2013-02-21 Thread Marcelo Tosatti
t; > > > The current kenel/sched/core.c doesn't have the code from the > > associated patch https://patchwork.kernel.org/patch/2016651/ > > As per the lkml discussion that one was supposed to go upstream > via the KVM tree. Marcelo? commit c3c186403c6abd32e719f005f0af

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-13 Thread Marcelo Tosatti
On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > walk and zap all shadow pages one by one, also it need to zap all guest > page's rmap and all shadow page's parent spte list. Particularly, things > become wors

Re: [PATCH 6/6] KVM: MMU: fast zap all shadow pages

2013-03-13 Thread Marcelo Tosatti
On Wed, Mar 13, 2013 at 10:07:06PM -0300, Marcelo Tosatti wrote: > On Wed, Mar 13, 2013 at 12:59:12PM +0800, Xiao Guangrong wrote: > > The current kvm_mmu_zap_all is really slow - it is holding mmu-lock to > > walk and zap all shadow pages one by one, also it need to zap all guest

Re: [PATCH] KVM: VMX: invalidate vpid for invlpg instruction

2012-08-31 Thread Marcelo Tosatti
On Fri, Aug 31, 2012 at 06:10:48PM +0200, Davidlohr Bueso wrote: > For processors that support VPIDs we should invalidate the page table entry > specified by the lineal address. For this purpose add support for individual > address invalidations. Not necessary - a single context invalidation is pe

[GIT PULL] KVM fixes for 3.6-rc3

2012-08-31 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Alan Cox (1): kvm: Fix nonsense handling of compat ioctl Michael S. Tsirkin (1): KVM: x86: fix KVM_GET_MSR for PV EOI arch/x86/kvm/x86.c |3 +++ virt/kvm/kvm

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-11 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > > The same can happen with slot deletion, for example. > > > > Userspace (which performed the modification which can result in faults > > to non-existant/read-only/.../new-tag memslot), must handle the faults > > properly or avoid the

Re: qemu-kvm loops after kernel udpate

2012-09-11 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 08:11:36PM +0200, Jiri Slaby wrote: > Hi, > > it looks like an update from next-20120824 to next-20120910 makes kvm > defunct. When I try to run qemu, it loops forever without printing > anything on the monitor. > > -no-kvm makes it indeed work. > > Cmdline I use: > qemu-

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-12 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 11:39:01AM -0300, Marcelo Tosatti wrote: > On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > > > The same can happen with slot deletion, for example. > > > > > > Userspace (which performed the modification which can result in fau

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-12 Thread Marcelo Tosatti
On Wed, Sep 12, 2012 at 06:34:33PM +0300, Avi Kivity wrote: > On 09/11/2012 05:39 PM, Marcelo Tosatti wrote: > > On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > >> > The same can happen with slot deletion, for example. > >> > > >> > User

Re: Qemu & KVM bug

2008-02-13 Thread Marcelo Tosatti
On Wed, Feb 13, 2008 at 04:24:53PM +0100, Jiri Kosina wrote: > On Wed, 13 Feb 2008, Zdenek Kabelac wrote: > > > I get this bug in my log whenever I start qemu-kvm - I do not use kqemu > > module - so it's with plain kernel modules. If more details are needed - > > just ask. (Cpu; C2D) > > BUG: s

[GIT PULL] KVM fixes for 3.7-rc3

2012-10-31 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Xiao Guangrong (1): KVM: x86: fix vcpu->mmio_fragments overflow arch/x86/kvm/x86.c | 60 ++- include/linux/kvm_host.h

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-10-31 Thread Marcelo Tosatti
On Tue, Oct 30, 2012 at 10:30:02PM -0400, Sasha Levin wrote: > On Tue, Oct 30, 2012 at 9:48 PM, Wen Congyang wrote: > > At 10/31/2012 09:12 AM, Marcelo Tosatti Wrote: > >> It has been asked earlier why a simple virtio device is not usable > >> for this (with no response

Re: [PATCH] emulator test: add "rep ins" mmio access test

2012-10-31 Thread Marcelo Tosatti
On Fri, Oct 19, 2012 at 03:39:08PM +0800, Xiao Guangrong wrote: > Add the test to trigger the bug that "rep ins" causes vcpu->mmio_fragments > overflow overflow while move large data from ioport to MMIO > > Signed-off-by: Xiao Guangrong > --- > x86/emulator.c | 14 ++ > 1 files cha

Re: [PATCH 2/2] kvm, svm: Update MAINTAINERS entry

2012-10-31 Thread Marcelo Tosatti
On Mon, Oct 29, 2012 at 07:08:21PM +0100, Joerg Roedel wrote: > I have no access to my AMD email address anymore. Update > entry in MAINTAINERS to the new address. > > Cc: Avi Kivity > Cc: Marcelo Tosatti > Signed-off-by: Joerg Roedel > --- > MAINTAINERS |4 +

Re: [PATCH v5 2/6] KVM: MMU: remove mmu_is_invalid

2012-10-29 Thread Marcelo Tosatti
On Wed, Oct 17, 2012 at 04:40:32PM +0200, Avi Kivity wrote: > On 10/16/2012 02:08 PM, Xiao Guangrong wrote: > > Remove mmu_is_invalid and use is_invalid_pfn instead > > > Applied 2-5 to next; 6 depends on 1, so will wait until it is merged > upstream. Applied 6. -- To unsubscribe from this list

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-10-30 Thread Marcelo Tosatti
On Thu, Oct 25, 2012 at 11:42:32AM +0800, Hu Tao wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such feature on kvm. > > Another purpose of this feature is: management app(for example: > libvirt) can do auto dump when the guest is panicked. If managemen

Re: [PATCH 1/2] x86/kexec: VMCLEAR vmcss on all cpus if necessary

2012-10-30 Thread Marcelo Tosatti
On Fri, Oct 19, 2012 at 01:44:31PM +0800, Zhang Yanfei wrote: > This patch provides a way to VMCLEAR vmcss related to guests > on all cpus before executing the VMXOFF when doing kdump. This > is used to ensure the VMCSs in the vmcore updated and > non-corrupted. > > Signed-off-by: zhangyanfei > -

Re: [PATCH 03/10] crypto: nx - fix limits to sg lists for AES-CBC

2013-08-29 Thread Marcelo Cerri
On Thu, Aug 29, 2013 at 02:42:22PM +1000, Herbert Xu wrote: > On Fri, Aug 23, 2013 at 05:01:07PM -0300, Marcelo Cerri wrote: > > This patch updates the nx-aes-cbc implementation to perform several > > hyper calls if needed in order to always respect the length limits for > >

[PATCH v2 01/10] crypto: nx - add offset to nx_build_sg_lists()

2013-08-29 Thread Marcelo Cerri
This patch includes one more parameter to nx_build_sg_lists() to skip the given number of bytes from beginning of each sg list. This is needed in order to implement the fixes for the AES modes to make them able to process larger chunks of data. Reviewed-by: Joy Latten Signed-off-by: Marcelo

[PATCH v2 07/10] crypto: nx - fix limits to sg lists for AES-CCM

2013-08-29 Thread Marcelo Cerri
From: Fionnuala Gunter This patch updates the NX driver to perform several hyper calls when necessary so that the length limits of scatter/gather lists are respected. Reviewed-by: Marcelo Cerri Signed-off-by: Joy Latten Signed-off-by: Fionnuala Gunter --- drivers/crypto/nx/nx-aes-ccm.c

[PATCH v2 06/10] crypto: nx - fix limits to sg lists for AES-XCBC

2013-08-29 Thread Marcelo Cerri
From: Fionnuala Gunter This patch updates the NX driver to perform several hyper calls when necessary so that the length limits of scatter/gather lists are respected. Reviewed-by: Joy Latten Reviewed-by: Marcelo Cerri Signed-off-by: Fionnuala Gunter --- drivers/crypto/nx/nx-aes-xcbc.c | 107

[PATCH v2 08/10] crypto: nx - fix XCBC for zero length messages

2013-08-29 Thread Marcelo Cerri
place it with an implementation based on the RFC 3566 using ECB. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-xcbc.c | 84 + 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/nx/nx-aes-xcb

[PATCH v2 10/10] crypto: nx - fix SHA-2 for chunks bigger than block size

2013-08-29 Thread Marcelo Cerri
than the block size. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-sha256.c | 2 +- drivers/crypto/nx/nx-sha512.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/nx/nx-sha256.c b/drivers/crypto/nx/nx-sha256.c index 6547a71

[PATCH v2 09/10] crypto: nx - fix GCM for zero length messages

2013-08-29 Thread Marcelo Cerri
atten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-gcm.c | 132 ++--- 1 file changed, 112 insertions(+), 20 deletions(-) diff --git a/drivers/crypto/nx/nx-aes-gcm.c b/drivers/crypto/nx/nx-aes-gcm.c index 9e89bdf..025d9a8 100644 --- a/drivers/crypto/nx/n

[PATCH v2 02/10] crypto: nx - fix limits to sg lists for AES-ECB

2013-08-29 Thread Marcelo Cerri
bm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-ecb.c | 48 ++

[PATCH v2 04/10] crypto: nx - fix limits to sg lists for AES-CTR

2013-08-29 Thread Marcelo Cerri
bm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-ctr.c | 50 ++

[PATCH v2 05/10] crypto: nx - fix limits to sg lists for AES-GCM

2013-08-29 Thread Marcelo Cerri
bm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-gcm.c | 202 +++--

[PATCH v2 00/10] Series of fixes for NX driver

2013-08-29 Thread Marcelo Cerri
for AES-CCM Marcelo Cerri (8): crypto: nx - add offset to nx_build_sg_lists() crypto: nx - fix limits to sg lists for AES-ECB crypto: nx - fix limits to sg lists for AES-CBC crypto: nx - fix limits to sg lists for AES-CTR crypto: nx - fix limits to sg lists for AES-GCM crypto: nx - fix

[PATCH v2 03/10] crypto: nx - fix limits to sg lists for AES-CBC

2013-08-29 Thread Marcelo Cerri
bm,max-sync-cop": - The total number of bytes that a scatter/gather list can hold. - The maximum number of elements that a scatter/gather list can have. Reviewed-by: Joy Latten Signed-off-by: Marcelo Cerri --- drivers/crypto/nx/nx-aes-cbc.c | 50 +-

[PATCH] remove sched notifier for cross-cpu migrations

2013-07-10 Thread Marcelo Tosatti
is increased whenever underlying CPU changes. Which is sufficient to guarantee nanoseconds counter is calculated properly. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index 109a9dd..be8269b 100644 --- a/arch/x86/include/asm

Re: [PATCH] remove sched notifier for cross-cpu migrations

2013-07-12 Thread Marcelo Tosatti
On Thu, Jul 11, 2013 at 11:10:25AM +0300, Gleb Natapov wrote: > On Wed, Jul 10, 2013 at 10:21:57PM -0300, Marcelo Tosatti wrote: > > > > Linux as a guest on KVM hypervisor, the only user of the pvclock > > vsyscall interface, does not require notification on task m

Lightweight type analysis for memory safety through verification of API uses

2013-09-17 Thread Marcelo Sousa
al feedback and suggestions of analysis. In particular, I'm thinking on using this approach to verify the DMA API, and I'm looking for known bugs that could be used for validation. Kind regards, Marcelo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

[patch 1/3] hung_task: add method to reset detector

2013-10-07 Thread Marcelo Tosatti
In certain occasions it is possible for a hung task detector positive to be false: continuation from a paused VM, for example. Add a method to reset detection, similar as is done with other kernel watchdogs. Signed-off-by: Marcelo Tosatti Index: kvm/kernel/hung_task.c

[patch 2/3] pvclock: detect watchdog reset at pvclock read

2013-10-07 Thread Marcelo Tosatti
Implement reset of kernel watchdogs at pvclock read time. This avoids adding special code to every watchdog. This is possible for watchdogs which measure time based on sched_clock() or ktime_get() variants. Suggested by Don Zickus. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kernel

[patch 3/3] 01-hung-task-watchdog-reset 02-kvmclock-touch-watchdog-on-kvmclock-read series

2013-10-07 Thread Marcelo Tosatti
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [patch 3/3] 01-hung-task-watchdog-reset 02-kvmclock-touch-watchdog-on-kvmclock-read series

2013-10-07 Thread Marcelo Tosatti
Please ignore patch 3/3 - there is none. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[patch 0/3] generic kernel watchdog reset at pvclock read

2013-10-07 Thread Marcelo Tosatti
See individual patches for details. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-07 Thread Marcelo Tosatti
On Thu, Sep 05, 2013 at 06:29:15PM +0800, Xiao Guangrong wrote: > It is easy if the handler is in the vcpu context, in that case we can use > walk_shadow_page_lockless_begin() and walk_shadow_page_lockless_end() that > disable interrupt to stop shadow page being freed. But we are on the ioctl > con

Re: [patch 2/3] pvclock: detect watchdog reset at pvclock read

2013-10-08 Thread Marcelo Tosatti
On Tue, Oct 08, 2013 at 09:37:05AM -0400, Don Zickus wrote: > On Mon, Oct 07, 2013 at 10:05:17PM -0300, Marcelo Tosatti wrote: > > Implement reset of kernel watchdogs at pvclock read time. This avoids > > adding special code to every watchdog. > > > > This is possible

Re: [patch 2/3] pvclock: detect watchdog reset at pvclock read

2013-10-08 Thread Marcelo Tosatti
On Tue, Oct 08, 2013 at 11:58:10AM +0200, Paolo Bonzini wrote: > Il 08/10/2013 03:05, Marcelo Tosatti ha scritto: > > +void pvclock_touch_watchdogs(void) > > +{ > > + touch_softlockup_watchdog_sync(); > > + clocksource_touch_watchdog();

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-08 Thread Marcelo Tosatti
On Tue, Oct 08, 2013 at 12:02:32PM +0800, Xiao Guangrong wrote: > > Hi Marcelo, > > On Oct 8, 2013, at 9:23 AM, Marcelo Tosatti wrote: > > >> > >> + if (kvm->arch.rcu_free_shadow_page) { > >> + kvm_mmu_isolate_pages(invalid_list); >

Re: [patch 2/3] pvclock: detect watchdog reset at pvclock read

2013-10-09 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 09:55:19AM -0400, Don Zickus wrote: > On Tue, Oct 08, 2013 at 07:08:11PM -0300, Marcelo Tosatti wrote: > > On Tue, Oct 08, 2013 at 09:37:05AM -0400, Don Zickus wrote: > > > On Mon, Oct 07, 2013 at 10:05:17PM -0300, Marcelo Tosatti wrote: > > >

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-09 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 06:45:47PM +0800, Xiao Guangrong wrote: > On 10/09/2013 09:56 AM, Marcelo Tosatti wrote: > > On Tue, Oct 08, 2013 at 12:02:32PM +0800, Xiao Guangrong wrote: > >> > >> Hi Marcelo, > >> > >> On Oct 8, 2013, at 9:23 AM, Marcelo T

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Marcelo Tosatti
On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: > On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: > > > >> Gleb has a idea that uses RCU_DESTORY to protect the shadow page table > > > >> and encodes the page-level into th

Re: [PATCH v2 12/15] KVM: MMU: allow locklessly access shadow page table out of vcpu thread

2013-10-10 Thread Marcelo Tosatti
On Thu, Oct 10, 2013 at 10:16:46PM +0300, Gleb Natapov wrote: > On Thu, Oct 10, 2013 at 01:42:22PM -0300, Marcelo Tosatti wrote: > > On Thu, Oct 10, 2013 at 03:08:45PM +0300, Gleb Natapov wrote: > > > On Wed, Oct 09, 2013 at 10:47:10PM -0300, Marcelo Tosatti wrote: > >

Re: [PATCH v2 02/15] KVM: MMU: properly check last spte in fast_page_fault()

2013-09-30 Thread Marcelo Tosatti
On Thu, Sep 05, 2013 at 06:29:05PM +0800, Xiao Guangrong wrote: > Using sp->role.level instead of @level since @level is not got from the > page table hierarchy > > There is no issue in current code since the fast page fault currently only > fixes the fault caused by dirty-log that is always on th

  1   2   3   4   5   6   7   8   9   10   >