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 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 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 v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-14 Thread Marcelo Tosatti
On Fri, Oct 12, 2012 at 05:49:30PM +0800, Xiao Guangrong wrote: > On 10/11/2012 10:31 PM, Marcelo Tosatti wrote: > > On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote: > >> On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > >> > >>> > >&g

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-11 Thread Marcelo Tosatti
On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote: > On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > > > > > Why does is_error_pfn() return true for mmio spte? Its not an "error", > > after all. > > > > Please kill is_invalid_pfn and

Re: [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails

2012-10-10 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 06:36:11PM -0600, Shuah Khan wrote: > Change existing kernel error message to include return value from > iommu_attach_device() when it fails. This will help debug device > assignment failures more effectively. > > Signed-off-by: Shuah Khan Applied, thanks. -- To unsubsc

Re: [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails

2012-10-10 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 06:36:11PM -0600, Shuah Khan wrote: > Change existing kernel error message to include return value from > iommu_attach_device() when it fails. This will help debug device > assignment failures more effectively. > > Signed-off-by: Shuah Khan > --- > virt/kvm/iommu.c |6

Re: [PATCH v4 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-10-10 Thread Marcelo Tosatti
On Sun, Oct 07, 2012 at 08:05:11PM +0800, Xiao Guangrong wrote: > The only difference between FNAME(update_pte) and FNAME(pte_prefetch) > is that the former is allowed to prefetch gfn from dirty logged slot, > so introduce a common function to prefetch spte > > Signed-off-by: Xiao Guangrong > ---

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-10 Thread Marcelo Tosatti
On Sun, Oct 07, 2012 at 08:01:34PM +0800, Xiao Guangrong wrote: > We can not directly call kvm_release_pfn_clean to release the pfn > since we can meet noslot pfn which is used to cache mmio info into > spte > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |3 +-- > virt/kvm/kvm

Re: [Qemu-devel] [PATCH v10] kvm: notify host when the guest is panicked

2012-10-01 Thread Marcelo Tosatti
On Mon, Oct 01, 2012 at 03:57:40PM -0300, Luiz Capitulino wrote: > On Wed, 29 Aug 2012 13:18:54 +0800 > Wen Congyang wrote: > > > We can know the guest is panicked when the guest runs on xen. > > But we do not have such feature on kvm. > > What's the status of this series? > > It got lost in my

Re: [PATCH v8 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-09-20 Thread Marcelo Tosatti
On Mon, Sep 17, 2012 at 07:58:57AM -0700, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 17, 2012 at 04:31:13PM +0800, Dong Hao escreveu: > > From: Xiao Guangrong > > > > Exporting KVM exit information to userspace to be consumed by perf. > > > > [ Dong Hao : rebase it on acme's git tree ] > > Si

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-19 Thread Marcelo Tosatti
On Tue, Sep 18, 2012 at 04:15:32PM +0800, Xiao Guangrong wrote: > On 09/15/2012 11:25 PM, Marcelo Tosatti wrote: > > On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > >> Wrap the common operations into these two functions > >> > >> Signed-off

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > Wrap the common operations into these two functions > > Signed-off-by: Xiao Guangrong Why? I think people are used to spin_lock(lock) sequence spin_unlock(lock) So its easy to verify whether access to data structures are protec

Re: [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 06:13:11PM +0800, Xiao Guangrong wrote: > On 09/14/2012 05:59 PM, Xiao Guangrong wrote: > > > + return FNAME(prefetch_gpte)(vcpu, sp, spte, gptep[i], true); > > Sorry, this was wrong. Update this patch. > > [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

Re: [PATCH v2 1/5] KVM: MMU: release noslot pfn on the fail path properly

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 05:57:22PM +0800, Xiao Guangrong wrote: > We can not directly call kvm_release_pfn_clean to release the pfn > since we can meet noslot pfn which is used to cache mmio info into > spte > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |6 -- > ar

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: [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: 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-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: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-10 Thread Marcelo Tosatti
On Fri, Sep 07, 2012 at 05:56:39PM +0800, Xiao Guangrong wrote: > On 09/06/2012 10:09 PM, Avi Kivity wrote: > > On 08/22/2012 03:47 PM, Xiao Guangrong wrote: > >> On 08/22/2012 08:06 PM, Avi Kivity wrote: > >>> On 08/21/2012 06:03 AM, Xiao Guangrong wrote: > Introduce write_readonly_mem in mmi

[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] 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

Re: [PATCH for-3.6] kvm: fix KVM_GET_MSR for PV EOI

2012-08-27 Thread Marcelo Tosatti
On Mon, Aug 27, 2012 at 05:47:42PM -0300, Marcelo Tosatti wrote: > On Sun, Aug 26, 2012 at 06:00:29PM +0300, Michael S. Tsirkin wrote: > > KVM_GET_MSR was missing support for PV EOI, > > which is needed for migration. > > > > Signed-off-by: Michael S. Tsirkin >

Re: [PATCH for-3.6] kvm: fix KVM_GET_MSR for PV EOI

2012-08-27 Thread Marcelo Tosatti
On Sun, Aug 26, 2012 at 06:00:29PM +0300, Michael S. Tsirkin wrote: > KVM_GET_MSR was missing support for PV EOI, > which is needed for migration. > > Signed-off-by: Michael S. Tsirkin > --- > > Please consider this bugfix patch for 3.6. > Thanks! > > arch/x86/kvm/x86.c | 3 +++ > 1 file chang

Re: [PATCHv2] kvm: Fix nonsense handling of compat ioctl

2012-08-27 Thread Marcelo Tosatti
On Wed, Aug 22, 2012 at 02:34:11PM +0100, Alan Cox wrote: > From: Alan Cox > > KVM_SET_SIGNAL_MASK passed a NULL argument leaves the on stack signal > sets uninitialized. It then passes them through to > kvm_vcpu_ioctl_set_sigmask. > > We should be passing a NULL in this case not translated garb

Re: [GIT PULL] KVM fixes for 3.6-rc3

2012-08-24 Thread Marcelo Tosatti
On Thu, Aug 23, 2012 at 09:54:43PM -0700, Linus Torvalds wrote: > On Thu, Aug 23, 2012 at 12:30 AM, Marcelo Tosatti wrote: > > > > Please pull from > > > > git://git.kernel.org/pub/scm/virt/kvm/kvm.git master > > > > To receive the following KVM bug fixes

Re: [PATCH] KVM: trace the events of mmu_notifier

2012-08-23 Thread Marcelo Tosatti
On Thu, Aug 23, 2012 at 08:30:15PM +0800, Xiao Guangrong wrote: > On 08/23/2012 05:24 PM, Marcelo Tosatti wrote: > > On Tue, Aug 21, 2012 at 05:51:35PM +0800, Xiao Guangrong wrote: > >> mmu_notifier is the interface to broadcast the mm events to KVM, the > >> tracepoin

Re: [PATCH] KVM: trace the events of mmu_notifier

2012-08-23 Thread Marcelo Tosatti
On Tue, Aug 21, 2012 at 05:51:35PM +0800, Xiao Guangrong wrote: > mmu_notifier is the interface to broadcast the mm events to KVM, the > tracepoints introduced in this patch can trace all these events, it is > very helpful for us to notice and fix the bug caused by mm > > Signed-off-by: Xiao Guang

[GIT PULL] KVM fixes for 3.6-rc3

2012-08-23 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): ppc: e500_tlb memset clears nothing Alexander Graf (1): KVM: PPC: Add cache flush on page map Avi Kivity (1): KVM: x86 emulator: use stack siz

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 01:49:11PM +0800, Xiao Guangrong wrote: > On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: > > On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: > >> On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: > >>> On Sat, Aug 11, 2012 at 11

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 12:03:01PM +0300, Avi Kivity wrote: > On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: > > On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: > >> On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: > >> >> > >> >> Userspa

Re: [PATCH V2] KVM: x86: disable stealtime on reboot to avoid mem corruption

2012-08-15 Thread Marcelo Tosatti
On Wed, Aug 15, 2012 at 04:00:40PM +0200, Florian Westphal wrote: > else, host continues to update stealtime after reboot, > which can corrupt e.g. initramfs area. > found when tracking down initramfs unpack error on initial reboot > (with qemu-kvm -smp 2, no problem with single-core). > > Signed-

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-15 Thread Marcelo Tosatti
On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: > On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: > >> > >> Userspace may want to modify the ROM (for example, when programming a > >> flash device). It is also possible to map an hva range rw through one &g

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked\

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:59:06PM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > On Tue, Aug 14, 2012 at 02:35:34PM -0500, Anthony Liguori wrote: > >> Marcelo Tosatti writes: > >> > >> > On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anth

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 02:35:34PM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: > >> Marcelo Tosatti writes: > >> > >> > On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vu

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 01:53:01PM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: > >> > >> On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: > >> > >> > On 2012-08

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:00:33PM +0300, Avi Kivity wrote: > On 08/10/2012 09:14 PM, Marcelo Tosatti wrote: > > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > >> Changelog: > >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > >> - in

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

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 05:55:54PM +0300, Yan Vugenfirer wrote: > > On Aug 14, 2012, at 1:42 PM, Jan Kiszka wrote: > > > On 2012-08-14 10:56, Daniel P. Berrange wrote: > >> On Mon, Aug 13, 2012 at 03:21:32PM -0300, Marcelo Tosatti wrote: > >>> On Wed, A

Re: [PATCH] kvm: disable stealtime via reboot notifier to avoid mem corruption

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 11:15:06AM +0200, Florian Westphal wrote: > Marcelo Tosatti wrote: > > On Fri, Aug 10, 2012 at 12:36:22PM +0200, Florian Westphal wrote: > > > --- a/arch/x86/kernel/kvmclock.c > > > +++ b/arch/x86/kernel/kvmclock.c > > > @@ -191,7 +191

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: > On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: > > On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: > >> On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > >>> On Tue, Aug 07, 2012 at 05

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-14 Thread Marcelo Tosatti
On Tue, Aug 14, 2012 at 10:47:48AM +0300, Gleb Natapov wrote: > On Mon, Aug 13, 2012 at 05:24:52PM -0300, Marcelo Tosatti wrote: > > On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: > > > On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: > > > > On Wed, Au

Re: [PATCH repost] kvm: drop parameter validation

2012-08-13 Thread Marcelo Tosatti
On Mon, Aug 13, 2012 at 05:30:53PM +0300, Gleb Natapov wrote: > On Mon, Aug 13, 2012 at 01:43:58PM +0300, Michael S. Tsirkin wrote: > > We validate irq pin number when routing is setup, so > > code handling illegal irq # in pic and ioapic on each injection > > is never called. > > Drop it. > > > I

Re: [PATCH] kvm: disable stealtime via reboot notifier to avoid mem corruption

2012-08-13 Thread Marcelo Tosatti
On Fri, Aug 10, 2012 at 12:36:22PM +0200, Florian Westphal wrote: > else, we get memory corruption on reboot; found when tracking down > initramfs unpack error on initial reboot (with qemu-kvm -smp 2, > no problem with single-core). > > problem with doing it via kvm_shutdown() is that this file >

Re: [PATCH 0/3] Documentation : hypercalls

2012-08-13 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 01:09:46PM +0530, Raghavendra K T wrote: > This is the hypercall documentation patch series > First patch covers KVM specific hypercall information. > > second patch is has typo fix for vmcall instruction > comment in kvm_para.h > > Third patch includes a veryful documenta

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-13 Thread Marcelo Tosatti
On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: > On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: > > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > >> We can know the guest is panicked when the guest runs on xen. > >> But we do n

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

2012-08-13 Thread Marcelo Tosatti
On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang 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 man

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-13 Thread Marcelo Tosatti
On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: > On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > >> Changelog: > >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > >

Re: [PATCH v5 11/12] KVM: x86: introduce set_mmio_exit_info

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:54:42PM +0800, Xiao Guangrong wrote: > Introduce set_mmio_exit_info to cleanup the common code > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/x86.c | 33 + > 1 files changed, 17 insertions(+), 16 deletions(-) > > diff --git a/

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > Changelog: > - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > - introduce KVM_HVA_ERR_BAD and optimize error hva indicators > > The test case can be found at: > http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/mig

Re: [PATCH v5 05/12] KVM: reorganize hva_to_pfn

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:51:05PM +0800, Xiao Guangrong wrote: > We do too many things in hva_to_pfn, this patch reorganize the code, > let it be better readable > > Signed-off-by: Xiao Guangrong > --- > virt/kvm/kvm_main.c | 159 > +++ > 1 file

Re: [PATCH v5 03/12] KVM: introduce gfn_to_pfn_memslot_atomic

2012-08-09 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:49:36PM +0800, Xiao Guangrong wrote: > It can instead of hva_to_pfn_atomic > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |5 + > include/linux/kvm_host.h |3 ++- > virt/kvm/kvm_main.c | 14 -- > 3 files changed, 11 in

Re: [PATCH 0/3] Documentation : hypercalls

2012-08-09 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 01:09:46PM +0530, Raghavendra K T wrote: > This is the hypercall documentation patch series > First patch covers KVM specific hypercall information. > > second patch is has typo fix for vmcall instruction > comment in kvm_para.h > > Third patch includes a veryful documenta

Re: [PATCH v5 02/12] KVM: hide KVM_MEMSLOT_INVALID from userspace

2012-08-09 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:48:49PM +0800, Xiao Guangrong wrote: > Quote Avi's comment: > | KVM_MEMSLOT_INVALID is actually an internal symbol, not used by > | userspace. Please move it to kvm_host.h. > > Also, move KVM_MEMSLOT_INVALID to the highest bit > > Signed-off-by: Xiao Guangrong > --- >

Re: [PATCH v2 01/10] KVM: iommu: fix releasing unmapped page

2012-08-03 Thread Marcelo Tosatti
On Fri, Aug 03, 2012 at 03:36:52PM +0800, Xiao Guangrong wrote: > There are two bugs: > - the 'error page' is forgot to be released > [ it is unneeded after commit a2766325cf9f9, for backport, we > still do kvm_release_pfn_clean for the error pfn ] > > - guest pages are always released regar

[GIT PULL] KVM fixes for 3.6-rc2

2012-08-03 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_: - Fix DS/ES segment register corruption on x86_32. - Fix kvmclock wallclock migration offset. - Fix PIT interrupt ACK vs system reset logic bug. Avi Kivity (1): KV

Re: [PATCH 7/9] KVM: define kvm_bad_page statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:16:28PM +0800, Xiao Guangrong wrote: > It is used to eliminate the overload of function call and cleanup > the code > > Signed-off-by: Xiao Guangrong > --- > include/linux/kvm_host.h |9 +++-- > virt/kvm/async_pf.c |2 +- > virt/kvm/kvm_main.c |

Re: [PATCH 2/9] KVM: define kvm_fault_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:12:58PM +0800, Xiao Guangrong wrote: > After that, the exported and un-inline function, get_fault_pfn, > can be removed > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |2 +- > include/linux/kvm_host.h |3 ++- > virt/kvm/kvm_main.c | 1

Re: [PATCH 4/9] KVM: define kvm_bad_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:14:25PM +0800, Xiao Guangrong wrote: > Then, remove get_bad_pfn > > Signed-off-by: Xiao Guangrong > --- > include/linux/kvm_host.h |1 + > virt/kvm/kvm_main.c |7 +-- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/include/linux/kv

Re: [PATCH 8/9] KVM: do not release the error pfn

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:18:58PM +0800, Xiao Guangrong wrote: > After commit a2766325cf9f9, the error pfn is replaced by the > error code, it need not be released anymore > > [ The patch is compiling tested for powerpc ] > > Signed-off-by: Xiao Guangrong > --- > arch/powerpc/kvm/e500_tlb.c |

Re: [PATCH 3/9] KVM: define kvm_hwpoison_pfn statically

2012-08-02 Thread Marcelo Tosatti
On Sun, Jul 29, 2012 at 04:13:41PM +0800, Xiao Guangrong wrote: > Then, get_hwpoison_pfn and is_hwpoison_pfn can be removed > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |2 +- > include/linux/kvm_host.h |4 ++-- > virt/kvm/kvm_main.c | 13 + > 3 f

Re: [PATCH] Documentation/kvm : Add documentation on Hypercalls

2012-08-01 Thread Marcelo Tosatti
On Wed, Aug 01, 2012 at 04:19:01PM +0530, Raghavendra K T wrote: > On 08/01/2012 08:37 AM, Marcelo Tosatti wrote: > >On Tue, Jul 24, 2012 at 02:23:59PM +0530, Raghavendra K T wrote: > >>From: Raghavendra K T > >> > >>Thanks Alex for KVM_HC_FEATURES inputs and J

Re: [RFC PATCH] KVM: Only print vcpu_unimpl when DEBUG is set

2012-07-31 Thread Marcelo Tosatti
On Thu, Jul 26, 2012 at 02:22:48PM +0200, Markus Trippelsdorf wrote: > Every time I start qemu-kvm on my system the following line is added to > the syslog: > > vcpu0 unhandled rdmsr: 0xc0010001 > > AFAICS all calls to vcpu_unimpl only contain debugging info with little > or no value for the end

Re: [PATCH] Documentation/kvm : Add documentation on Hypercalls

2012-07-31 Thread Marcelo Tosatti
On Tue, Jul 24, 2012 at 02:23:59PM +0530, Raghavendra K T wrote: > From: Raghavendra K T > > Thanks Alex for KVM_HC_FEATURES inputs and Jan for VAPIC_POLL_IRQ, > and Peter (HPA) for suggesting hypercall ABI addition. > > Signed-off-by: Raghavendra K T > --- > Please have a closer look at Hyperc

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-20 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 09:15:44PM +0800, Xiao Guangrong wrote: > On 07/20/2012 06:58 PM, Marcelo Tosatti wrote: > > On Fri, Jul 20, 2012 at 10:17:36AM +0800, Xiao Guangrong wrote: > >> On 07/20/2012 07:58 AM, Marcelo Tosatti wrote: > >> > >>>>

Re: [PATCH] kvm: drop parameter validation

2012-07-20 Thread Marcelo Tosatti
On Thu, Jul 19, 2012 at 02:13:13PM +0300, Michael S. Tsirkin wrote: > We validate irq pin number when routing is setup, so > code handling illegal irq # in pic and ioapic on each injection > is never called. > Drop it. > > Signed-off-by: Michael S. Tsirkin > --- > > Note: this is on top of >

Re: [PATCHv2] kvm: fix race with level interrupts

2012-07-20 Thread Marcelo Tosatti
On Thu, Jul 19, 2012 at 01:45:20PM +0300, Michael S. Tsirkin wrote: > When more than 1 source id is in use for the same GSI, we have the > following race related to handling irq_states race: > > CPU 0 clears bit 0. CPU 0 read irq_state as 0. CPU 1 sets level to 1. > CPU 1 calls kvm_ioapic_set_irq(

Re: [PATCH RFC V5 0/3] kvm: Improving directed yield in PLE handler

2012-07-20 Thread Marcelo Tosatti
9/32 > > Raghavendra K T (3): >config: Add config to support ple or cpu relax optimzation >kvm : Note down when cpu relax intercepted or pause loop exited >kvm : Choose a better candidate for directed yield > --- > arch/s390/kvm/Kconfig|1 + > arch/x86/kv

Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-20 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 10:34:28AM +0800, Xiao Guangrong wrote: > On 07/20/2012 08:39 AM, Marcelo Tosatti wrote: > > On Tue, Jul 17, 2012 at 09:53:29PM +0800, Xiao Guangrong wrote: > >> If it have no indirect shadow pages we need not protect any gfn, > >> this is always

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-20 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 10:17:36AM +0800, Xiao Guangrong wrote: > On 07/20/2012 07:58 AM, Marcelo Tosatti wrote: > > >> - } > >> + rc = ctxt->ops->read_emulated(ctxt, addr, mc->data + mc->end, size, > >> +&ctx

Re: [PATCH 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-20 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 11:45:59AM +0800, Xiao Guangrong wrote: > BTW, they are some bug fix patches on -master branch, but > it is not existed on -next branch: > commit: f411930442e01f9cf1bf4df41ff7e89476575c4d > commit: 85b7059169e128c57a3a8a3e588fb89cb2031da1 > > It causes code conflict if we d

Re: [PATCH 4/9] KVM: MMU: track the refcount when unmap the page

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:52:52PM +0800, Xiao Guangrong wrote: > It will trigger a WARN_ON if the page has been freed but it is still > used in mmu, it can help us to detect mm bug early > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |8 > 1 files changed, 8 insertion

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:51:34PM +0800, Xiao Guangrong wrote: > No need split mmio read region into 8-bits pieces since we do it in > emulator_read_write_onepage > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/emulate.c | 29 - > 1 files changed, 12 inserti

Re: [PATCH 1/9] KVM: x86: remvoe unnecessary mark_page_dirty

2012-07-19 Thread Marcelo Tosatti
Applied all patches except 2, 3 and 5, thanks. -- 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 5/9] KVM: MMU: fask check write-protect for direct mmu

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:53:29PM +0800, Xiao Guangrong wrote: > If it have no indirect shadow pages we need not protect any gfn, > this is always true for direct mmu without nested > > Signed-off-by: Xiao Guangrong Xiao, What is the motivation? Numbers please. In fact, what case was the orig

Re: [PATCH 3/9] KVM: x86: introduce set_mmio_exit_info

2012-07-19 Thread Marcelo Tosatti
On Tue, Jul 17, 2012 at 09:52:13PM +0800, Xiao Guangrong wrote: > Introduce set_mmio_exit_info to cleanup the common code > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/x86.c | 33 + > 1 files changed, 17 insertions(+), 16 deletions(-) This makes the co

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Marcelo Tosatti
On Wed, Jul 18, 2012 at 02:28:34PM -0600, Alex Williamson wrote: > > turn on lockdep to remember why I couldn't sleep there. > > switching to a mutex results in: > > BUG: sleeping function called from invalid context at kernel/mutex.c:269 > in_atomic(): 1, irqs_disabled(): 0, pid: 30025, name: qe

Re: [PATCH] x86, hyper: fix build with !CONFIG_KVM_GUEST

2012-07-18 Thread Marcelo Tosatti
On Wed, Jul 18, 2012 at 11:48:50AM +0300, Avi Kivity wrote: > Signed-off-by: Avi Kivity > --- > arch/x86/kernel/cpu/hypervisor.c | 2 ++ > 1 file changed, 2 insertions(+) Applied to next, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH 0/8] KVM: Optimize MMU notifier's THP page invalidation -v4

2012-07-18 Thread Marcelo Tosatti
On Mon, Jul 02, 2012 at 05:52:39PM +0900, Takuya Yoshikawa wrote: > v3->v4: Resolved trace_kvm_age_page() issue -- patch 6,7 > v2->v3: Fixed intersection calculations. -- patch 3, 8 > > Takuya > > Takuya Yoshikawa (8): > KVM: MMU: Use __gfn_to_rmap() to clean up kvm_handle_hva() > KVM:

Re: [PATCH v5 1/4] kvm: Extend irqfd to support level interrupts

2012-07-18 Thread Marcelo Tosatti
On Wed, Jul 18, 2012 at 06:58:24PM +0300, Michael S. Tsirkin wrote: > > > > > > Back to original point though current > > > > > > situation is that calling kvm_set_irq() under spinlock is not worse > > > > > > for > > > > > > scalability than calling it not under one. > > > > > > > > > > Yes. Sti

Re: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-07-06 Thread Marcelo Tosatti
On Tue, Jun 19, 2012 at 04:51:04PM -0400, Rik van Riel wrote: > On Wed, 20 Jun 2012 01:50:50 +0530 > Raghavendra K T wrote: > > > > > In ple handler code, last_boosted_vcpu (lbv) variable is > > serving as reference point to start when we enter. > > > Also statistical analysis (below) is showin

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

[PATCH] fill in missing pv_mmu_ops entries for PAGETABLE_LEVELS >= 3

2008-01-19 Thread Marcelo Tosatti
specific for PARAVIRT, and it's actually > preventing the whole tree from booting. > And the following allows PARAVIRT kernels to boot on x86_64. - Fill in missing pagetable manipulation entries in pv_mmu_ops for PAGETABLE_LEVELS >= 3. Signed-off-by: Marcelo Tosatti <[EM

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-15 Thread Marcelo Tosatti
On Wed, Jan 16, 2008 at 10:57:16AM +0900, KOSAKI Motohiro wrote: > Hi Pavel > > > > err = poll(&pollfds, 1, -1); // wake up at low memory > > > > > > ... > > > > > > > Nice, this is really needed for openmoko, zaurus, etc > > > > But this changelog needs to go into Documentation/

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-15 Thread Marcelo Tosatti
Hi Alan, On Tue, Jan 15, 2008 at 11:20:27AM +, Alan Cox wrote: > On Tue, 15 Jan 2008 19:59:02 +0900 > KOSAKI Motohiro <[EMAIL PROTECTED]> wrote: > > > > > > > the core of this patch series. > > > > add /dev/mem_notify device for notification low memory to user process. > > > > > > As you on

OOM notifications

2007-10-18 Thread Marcelo Tosatti
Hi, AIX contains the SIGDANGER signal to notify applications to free up some unused cached memory: http://www.ussg.iu.edu/hypermail/linux/kernel/0007.0/0901.html There have been a few discussions on implementing such an idea on Linux, but nothing concrete has been achieved. On the kernel side

OOM notifications

2007-10-18 Thread Marcelo Tosatti
Hi, AIX contains the SIGDANGER signal to notify applications to free up some unused cached memory: http://www.ussg.iu.edu/hypermail/linux/kernel/0007.0/0901.html There have been a few discussions on implementing such an idea on Linux, but nothing concrete has been achieved. On the kernel side R

Re: [PATCH0/4] Various bug fixes

2007-09-24 Thread Marcelo Tosatti
Paul, please apply. On Sun, Sep 23, 2007 at 10:16:48PM +0200, Jochen Friedrich wrote: > Here is a series fixing some bugs for 8xx powerpc CPUs. > > 1. [POWERPC] Fix copy'n'paste typo in commproc.c > 2. [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem > 3. [PPC] Compile fix for 8xx

Re: [PATCH] timekeeping: Prevent time going backwards on resume

2007-09-11 Thread Marcelo Tosatti
Patch below fixes the problem we were seeing (negative delta calculated in tick_do_update_jiffies64). Thanks again Thomas! On Wed, Sep 12, 2007 at 12:36:34AM +0200, Thomas Gleixner wrote: > Timekeeping resume adjusts xtime by adding the slept time in seconds and > resets the reference value of

Re: [PATCH] ppc32/8xx: Fix r3 trashing due to 8MB TLB page instantiation

2007-08-29 Thread Marcelo Tosatti
ted to linuxppc-embedded by Marcelo Tosatti > <[EMAIL PROTECTED]>, but only an incomplete version of the patch > has been applied in c51e078f82096a7d35ac8ec2416272e843a0e1c4. > This patch adds the rest of the fix. > > Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>

Re: Please pull 'revert-libertas' branch of wireless-2.6

2007-05-08 Thread Marcelo Tosatti
On Tue, May 08, 2007 at 06:40:54PM -0400, Jeff Garzik wrote: > Dan Williams wrote: > >I'll audit the list of ioctls and remove ones that may be objectionable, > >and we'll go back through them after 2.6.22 and add back in ones that > >are actually required. Keep the API/ABI small and expand if nec

Re: [PATCH] use movntq version of fast_clear_page/fast_copy_page on Geode

2007-02-15 Thread Marcelo Tosatti
On Wed, Feb 14, 2007 at 09:16:46PM +, Alan wrote: > On Wed, 14 Feb 2007 17:08:39 -0200 > Marcelo Tosatti <[EMAIL PROTECTED]> wrote: > > > > > movntq instruction is supported by Geode CPU's, so use > > fast_clear_page/fast_copy_page versions that have it

Re: [PATCH] use movntq version of fast_clear_page/fast_copy_page on Geode

2007-02-14 Thread Marcelo Tosatti
On Wed, Feb 14, 2007 at 02:55:46PM -0500, Dave Jones wrote: > On Wed, Feb 14, 2007 at 05:08:39PM -0200, Marcelo Tosatti wrote: > > > > movntq instruction is supported by Geode CPU's, so use > > fast_clear_page/fast_copy_page versions that have it. > > it'

[PATCH] use movntq version of fast_clear_page/fast_copy_page on Geode

2007-02-14 Thread Marcelo Tosatti
movntq instruction is supported by Geode CPU's, so use fast_clear_page/fast_copy_page versions that have it. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> diff --git a/arch/i386/lib/mmx.c b/arch/i386/lib/mmx.c index 28084d2..ddc1421 100644 --- a/arch/i386/lib/mmx.c +++ b/ar

[PATCH] use movntq version of fast_clear_page/fast_copy_page on Geode

2007-02-14 Thread Marcelo Tosatti
movntq instruction is supported by Geode CPU's, so use fast_clear_page/fast_copy_page versions that have it. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> diff --git a/arch/i386/lib/mmx.c b/arch/i386/lib/mmx.c index 28084d2..ddc1421 100644 --- a/arch/i386/lib/mmx.c +++ b/ar

[PATCH] introduce config option to disable DMA zone on i386

2006-12-28 Thread Marcelo Tosatti
Hi, The following patch adds a config option to get rid of the DMA zone on i386. Architectures with devices that have no addressing limitations (eg. PPC) already work this way. This is useful for custom kernel builds where the developer is certain that there are no address limitations. For exa

Re: [PATCH] MPC8xx PCMCIA driver

2005-09-01 Thread Marcelo Tosatti
Thu, Sep 01, 2005 at 10:53:19AM +0200, Dominik Brodowski wrote: > Hi, > > On Mon, Aug 29, 2005 at 11:48:40PM -0300, Marcelo Tosatti wrote: > > Russell: The driver is using pccard_nonstatic_ops for card window > > management, even though the driver its marked SS_STAT

Re: Telecom Clock driver for MPCBL0010 ATCA compute blade.

2005-08-30 Thread Marcelo Tosatti
Mark, Please fix identation accordingly to CodingStyle and repost, it looks quite ugly at the moment. On Tue, Aug 30, 2005 at 11:59:33AM -0700, Mark Gross wrote: > The following is a driver I would like to see included in the base kernel. > > It allows OS controll of a device that synchronizes

Re: [PATCH] MPC8xx PCMCIA driver

2005-08-30 Thread Marcelo Tosatti
Hi Paul, Jeff, On Tue, Aug 30, 2005 at 02:32:29PM +1000, Paul Mackerras wrote: > Marcelo Tosatti writes: > > > The memory map structure which contains device configuration/registers > > is _always_ directly mapped with pte's (the 8xx is a chip with builtin > > U

Re: [PATCH] MPC8xx PCMCIA driver

2005-08-29 Thread Marcelo Tosatti
On Mon, Aug 29, 2005 at 11:39:02PM -0400, Jeff Garzik wrote: > Marcelo Tosatti wrote: > >+static int voltage_set(int slot, int vcc, int vpp) > >+{ > >+u_int reg = 0; > >+ > >+switch(vcc) { > >+case 0: break; > >+case 33: > >+

[PATCH] MPC8xx PCMCIA driver

2005-08-29 Thread Marcelo Tosatti
Hi, Here goes the 8xx PCMCIA driver, originally written by Magnus Damm, with several improvements and fixes. The driver was merged in v2.4 but never forward ported to v2.6. Please review, comments are welcome (including aesthetic enhancements). Russell: The driver is using pccard_nonstatic_ops

<    4   5   6   7   8   9   10   11   12   13   >