* [PATCH] [11/23] KVM: Fix KVM_SET_SIGNAL_MASK
[not found] <20100610110.764742110@firstfloor.org>
@ 2010-06-10 11:10 ` Andi Kleen
2010-06-10 14:16 ` Avi Kivity
2010-06-10 11:10 ` [PATCH] [19/23] KVM: Fix unused but set warnings Andi Kleen
1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2010-06-10 11:10 UTC (permalink / raw)
To: avi, kvm, akpm, linux-kernel
Real bug fix.
When the user passed in a NULL mask pass this on from the ioctl
handler.
Found by gcc 4.6's new warnings.
Cc: avi@redhat.com
Cc: kvm@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
virt/kvm/kvm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.35-rc2-gcc/virt/kvm/kvm_main.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/virt/kvm/kvm_main.c
+++ linux-2.6.35-rc2-gcc/virt/kvm/kvm_main.c
@@ -1520,7 +1520,7 @@ out_free2:
goto out;
p = &sigset;
}
- r = kvm_vcpu_ioctl_set_sigmask(vcpu, &sigset);
+ r = kvm_vcpu_ioctl_set_sigmask(vcpu, p);
break;
}
case KVM_GET_FPU: {
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] [19/23] KVM: Fix unused but set warnings
[not found] <20100610110.764742110@firstfloor.org>
2010-06-10 11:10 ` [PATCH] [11/23] KVM: Fix KVM_SET_SIGNAL_MASK Andi Kleen
@ 2010-06-10 11:10 ` Andi Kleen
2010-06-10 14:19 ` Avi Kivity
1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2010-06-10 11:10 UTC (permalink / raw)
To: avi, kvm, akpm, linux-kernel
No real bugs in this one, the real bug I found is in a separate
patch.
Cc: avi@redhat.com
Cc: kvm@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/kvm/paging_tmpl.h | 1 +
arch/x86/kvm/vmx.c | 3 +--
virt/kvm/assigned-dev.c | 2 --
3 files changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6.35-rc2-gcc/arch/x86/kvm/paging_tmpl.h
===================================================================
--- linux-2.6.35-rc2-gcc.orig/arch/x86/kvm/paging_tmpl.h
+++ linux-2.6.35-rc2-gcc/arch/x86/kvm/paging_tmpl.h
@@ -442,6 +442,7 @@ static int FNAME(page_fault)(struct kvm_
kvm_mmu_free_some_pages(vcpu);
sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault,
level, &write_pt, pfn);
+ (void)sptep;
pgprintk("%s: shadow pte %p %llx ptwrite %d\n", __func__,
sptep, *sptep, write_pt);
Index: linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/arch/x86/kvm/vmx.c
+++ linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c
@@ -1624,10 +1624,9 @@ static void enter_pmode(struct kvm_vcpu
static gva_t rmode_tss_base(struct kvm *kvm)
{
if (!kvm->arch.tss_addr) {
- struct kvm_memslots *slots;
gfn_t base_gfn;
- slots = kvm_memslots(kvm);
+ kvm_memslots(kvm);
base_gfn = kvm->memslots->memslots[0].base_gfn +
kvm->memslots->memslots[0].npages - 3;
return base_gfn << PAGE_SHIFT;
Index: linux-2.6.35-rc2-gcc/virt/kvm/assigned-dev.c
===================================================================
--- linux-2.6.35-rc2-gcc.orig/virt/kvm/assigned-dev.c
+++ linux-2.6.35-rc2-gcc/virt/kvm/assigned-dev.c
@@ -58,12 +58,10 @@ static int find_index_from_host_irq(stru
static void kvm_assigned_dev_interrupt_work_handler(struct work_struct *work)
{
struct kvm_assigned_dev_kernel *assigned_dev;
- struct kvm *kvm;
int i;
assigned_dev = container_of(work, struct kvm_assigned_dev_kernel,
interrupt_work);
- kvm = assigned_dev->kvm;
spin_lock_irq(&assigned_dev->assigned_dev_lock);
if (assigned_dev->irq_requested_type & KVM_DEV_IRQ_HOST_MSIX) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [11/23] KVM: Fix KVM_SET_SIGNAL_MASK
2010-06-10 11:10 ` [PATCH] [11/23] KVM: Fix KVM_SET_SIGNAL_MASK Andi Kleen
@ 2010-06-10 14:16 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-06-10 14:16 UTC (permalink / raw)
To: Andi Kleen; +Cc: kvm, akpm, linux-kernel
On 06/10/2010 02:10 PM, Andi Kleen wrote:
> Real bug fix.
>
> When the user passed in a NULL mask pass this on from the ioctl
> handler.
>
> Found by gcc 4.6's new warnings.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [19/23] KVM: Fix unused but set warnings
2010-06-10 11:10 ` [PATCH] [19/23] KVM: Fix unused but set warnings Andi Kleen
@ 2010-06-10 14:19 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2010-06-10 14:19 UTC (permalink / raw)
To: Andi Kleen; +Cc: kvm, akpm, linux-kernel
On 06/10/2010 02:10 PM, Andi Kleen wrote:
> No real bugs in this one, the real bug I found is in a separate
> patch.
>
>
> Index: linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c
> ===================================================================
> --- linux-2.6.35-rc2-gcc.orig/arch/x86/kvm/vmx.c
> +++ linux-2.6.35-rc2-gcc/arch/x86/kvm/vmx.c
> @@ -1624,10 +1624,9 @@ static void enter_pmode(struct kvm_vcpu
> static gva_t rmode_tss_base(struct kvm *kvm)
> {
> if (!kvm->arch.tss_addr) {
> - struct kvm_memslots *slots;
> gfn_t base_gfn;
>
> - slots = kvm_memslots(kvm);
> + kvm_memslots(kvm);
> base_gfn = kvm->memslots->memslots[0].base_gfn +
> kvm->memslots->memslots[0].npages - 3;
> return base_gfn<< PAGE_SHIFT;
>
I think the base_gfn assignment below needs to use slots to get the rcu
dereference correct. I'll apply the patch without this hunk and fix it
independently.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-10 14:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100610110.764742110@firstfloor.org>
2010-06-10 11:10 ` [PATCH] [11/23] KVM: Fix KVM_SET_SIGNAL_MASK Andi Kleen
2010-06-10 14:16 ` Avi Kivity
2010-06-10 11:10 ` [PATCH] [19/23] KVM: Fix unused but set warnings Andi Kleen
2010-06-10 14:19 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox