[PATCH 3.12 02/91] MIPS: KVM: Fix ASID restoration logic

2016-01-05 Thread Jiri Slaby
t. Fixes: b680f70fc111 ("KVM/MIPS32: Entry point for trampolining to...") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan Signed-off-by: Jiri Slaby

[PATCH 3.12 04/91] MIPS: KVM: Uninit VCPU in vcpu_create error path

2016-01-05 Thread Jiri Slaby
g Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 2cb24788a8a6..7e7de1f2b8ed 1

[PATCH 3.12 03/91] MIPS: KVM: Fix CACHE immediate offset sign extension

2016-01-05 Thread Jiri Slaby
ni Signed-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index c76f297b7149..33085819cd89 100644 --- a/arch/mips/kvm/kvm_mips_emul.c

[patch added to the 3.12 stable tree] MIPS: KVM: Uninit VCPU in vcpu_create error path

2016-01-05 Thread Jiri Slaby
ux-m...@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 2cb24788

[patch added to the 3.12 stable tree] MIPS: KVM: Fix CACHE immediate offset sign extension

2016-01-05 Thread Jiri Slaby
ned-off-by: Paolo Bonzini Signed-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index c76f297b7149..33085819cd89 100644 --- a/arc

[patch added to the 3.12 stable tree] MIPS: KVM: Fix ASID restoration logic

2016-01-05 Thread Jiri Slaby
ed in the guest. Fixes: b680f70fc111 ("KVM/MIPS32: Entry point for trampolining to...") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan Signed

Re: [PATCH backport v3.12..v3.14 2/4] MIPS: KVM: Fix ASID restoration logic

2015-12-14 Thread Jiri Slaby
On 12/11/2015, 06:06 PM, James Hogan wrote: > commit 002374f371bd02df864cce1fe85d90dc5b292837 upstream. Applied 2/4 -- 4/4 to 3.12. Thanks. -- js suse labs -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info

[PATCH 3.12 108/111] MIPS: KVM: Do not sign extend on unsigned MMIO load

2015-06-10 Thread Jiri Slaby
-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index e75ef8219caf..c76f297b7149 100644 --- a/arch/mips/kvm/kvm_mips_emul.c +++ b/arch/mips/kvm/kvm_mips_emul.c

[patch added to the 3.12 stable tree] MIPS: KVM: Do not sign extend on unsigned MMIO load

2015-06-10 Thread Jiri Slaby
: Ralf Baechle Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index e75ef8219caf..c76f297b7149 100644 --- a/arch/mips/kvm/kvm_mips_emul.c +++ b/arch/mips

Re: [PATCH] MIPS: KVM: do not sign extend on unsigned MMIO load

2015-06-10 Thread Jiri Slaby
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/08/2015, 10:33 AM, James Hogan wrote: > Hi stable folk, > > On 08/05/15 15:16, James Hogan wrote: >> On 07/05/15 13:47, Nicholas Mc Guire wrote: >>> Fix possible unintended sign extension in unsigned MMIO loads >>> by casting to uint16_t in th

Re: copy_huge_page: unable to handle kernel NULL pointer dereference at 0000000000000008

2015-03-31 Thread Jiri Slaby
On 03/29/2015, 01:25 AM, Hugh Dickins wrote: > But you are very appositely mistaken: copy_huge_page() used to make > the same mistake, and Dave Hansen fixed it back in v3.13, but the fix > never went to the stable trees. > > Your report was on an Ubuntu "3.11.0-15" kernel: I think Ubuntu have > di

[PATCH 3.12 022/175] MIPS: KVM: Deliver guest interrupts after local_irq_disable()

2015-03-17 Thread Jiri Slaby
Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 3f3e5b2b2f38..016f163b42da 100644 --- a/arch/mips/kvm/kvm_mips.c +++ b/arch/mips/kvm

[PATCH 3.12 110/175] KVM: MIPS: Fix trace event to save PC directly

2015-03-17 Thread Jiri Slaby
-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Marcelo Tosatti Cc: Gleb Natapov Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org Acked-by: Steven Rostedt Signed-off-by: Marcelo Tosatti Signed-off-by: Jiri Slaby --- arch/mips/kvm/trace.

[PATCH 3.12 048/175] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-17 Thread Jiri Slaby
mes Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_locore.S | 2 +- arch/mips/kvm/kvm_mips.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S index bbace092ad0a..03a2db58b22d 100644 --- a/arch/mips/kvm/kvm_locor

[PATCH 3.12 070/175] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-03-17 Thread Jiri Slaby
so as not to break the Octeon build which excludes FPU support. KVM depends on MIPS32r2 anyway.] Signed-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kernel/mips_ksyms.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/m

[patch added to the 3.12 stable tree] KVM: MIPS: Fix trace event to save PC directly

2015-03-12 Thread Jiri Slaby
or KVM") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Marcelo Tosatti Cc: Gleb Natapov Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-m...@linux-mips.org Cc: kvm@vger.kernel.org Acked-by: Steven Rostedt Signed-off-by: Marcelo Tosatti Signed-off-by: Jiri Slaby --- a

Re: [PATCH stable 3.10, 3.12, 3.14] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-03-07 Thread Jiri Slaby
On 03/05/2015, 05:08 PM, James Hogan wrote: > [ Upstream commit 3ce465e04bfd8de9956d515d6e9587faac3375dc ] > > Export the _save_fp asm function used by the lose_fpu(1) macro to GPL > modules so that KVM can make use of it when it is built as a module. > > This fixes the following build error when

[patch added to the 3.12 stable tree] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-03-05 Thread Jiri Slaby
PS: Don't leak FPU/DSP to guest) Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Paul Burton Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: linux-m...@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9260/ Signed-off-by: Ralf Baechle Signed-off-by: Jiri Slaby --- arch/mips/kernel/m

[patch added to the 3.12 stable tree] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread Jiri Slaby
igned-off-by: James Hogan Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_locore.S | 2 +- arch/mips/kvm/kvm_mips.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S index bbace092ad0a..03a2db58b22d 100644 --- a/

[patch added to the 3.12 stable tree] MIPS: KVM: Deliver guest interrupts after local_irq_disable()

2015-03-01 Thread Jiri Slaby
-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c index 3f3e5b2b2f38..016f163b42da 100644 --- a/arch/mips/kvm/kvm_mips.c

[PATCH 3.12 050/170] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-07-18 Thread Jiri Slaby
/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 12 +++- 1 file changed, 3 insertions

[patch added to the 3.12 stable tree] MIPS: KVM: Remove redundant NULL checks before kfree()

2014-07-18 Thread Jiri Slaby
kfree() calls in arch/mips/kvm/. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 12 +++- 1 file

[PATCH 3.12 057/181] MIPS: KVM: Allocate at least 16KB for exception handlers

2014-06-30 Thread Jiri Slaby
cover the full use of the page. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 2 +- 1 file changed, 1

[patch added to the 3.12 stable tree] MIPS: KVM: Allocate at least 16KB for exception handlers

2014-06-25 Thread Jiri Slaby
from 0x200 to 0x4000 to cover the full use of the page. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: kvm@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: Sanjay Lal Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips.c | 2

[PATCH 3.12 131/182] MIPS: KVM: Pass reserved instruction exceptions to guest

2014-05-13 Thread Jiri Slaby
kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index 4b6274b47f33..e75ef8219caf 100644 --- a/arch/mips/kvm/kvm_m

[patch added to the 3.12 stable tree] MIPS: KVM: Pass reserved instruction exceptions to guest

2014-05-13 Thread Jiri Slaby
ips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/kvm/kvm_mips_emul.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index 4b6274b47f33..e75ef8219caf 100644

KVM: WARNING: at .. kvm_release_pfn_clean

2012-10-05 Thread Jiri Slaby
Hi, I'm getting this warning while running qemu-kvm 1.2.rc1 on the top of 3.6.0-next-20121001: WARNING: at virt/kvm/kvm_main.c:1325 kvm_release_pfn_clean+0x70/0x80() Hardware name: To Be Filled By O.E.M. Modules linked in: nls_cp437 vfat fat dvb_usb_dib0700 dib0090 dib7000p dib7000m dib0070 dib800

Re: qemu-kvm loops after kernel udpate

2012-09-18 Thread Jiri Slaby
On 09/13/2012 11:59 AM, Avi Kivity wrote: On 09/12/2012 09:11 PM, Jiri Slaby wrote: On 09/12/2012 10:18 AM, Avi Kivity wrote: On 09/12/2012 11:13 AM, Jiri Slaby wrote: Please provide the output of vmxcap (http://goo.gl/c5lUO), Unrestricted guest no The big

Re: qemu-kvm loops after kernel udpate

2012-09-13 Thread Jiri Slaby
On 09/13/2012 11:59 AM, Avi Kivity wrote: > On 09/12/2012 09:11 PM, Jiri Slaby wrote: >> On 09/12/2012 10:18 AM, Avi Kivity wrote: >>> On 09/12/2012 11:13 AM, Jiri Slaby wrote: >>>> >>>>> Please provide the output of vmxcap >>>&g

Re: qemu-kvm loops after kernel udpate

2012-09-12 Thread Jiri Slaby
On 09/12/2012 10:18 AM, Avi Kivity wrote: > On 09/12/2012 11:13 AM, Jiri Slaby wrote: >> >>> Please provide the output of vmxcap >>> (http://goo.gl/c5lUO), >> >> Unrestricted guest no > > The big real mode fixes. > > &

Re: qemu-kvm loops after kernel udpate

2012-09-12 Thread Jiri Slaby
On 09/12/2012 10:18 AM, Avi Kivity wrote: > On 09/12/2012 11:13 AM, Jiri Slaby wrote: >> kvm statistics >> >> exits 6778198 615942 >> host_state_reload 1988 187 >> irq_exits

Re: qemu-kvm loops after kernel udpate

2012-09-12 Thread Jiri Slaby
On 09/12/2012 10:06 AM, Avi Kivity wrote: > On 09/11/2012 10:41 PM, Jiri Slaby wrote: >> On 09/11/2012 09:03 PM, Marcelo Tosatti wrote: >>> On Tue, Sep 11, 2012 at 08:11:36PM +0200, Jiri Slaby wrote: >>>> Hi, >>>> >>>> it looks like a

Re: qemu-kvm loops after kernel udpate

2012-09-11 Thread Jiri Slaby
On 09/11/2012 09:03 PM, Marcelo Tosatti wrote: > 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

Re: qemu-kvm defunct due to THP [was: mmotm 2011-01-06-15-41 uploaded]

2011-01-10 Thread Jiri Slaby
On 01/10/2011 04:01 PM, Andrea Arcangeli wrote: > On Mon, Jan 10, 2011 at 03:37:57PM +0100, Jiri Slaby wrote: >> On 01/07/2011 12:41 AM, a...@linux-foundation.org wrote: >>> The mm-of-the-moment snapshot 2011-01-06-15-41 has been uploaded to >> >> Hi, something of

qemu-kvm defunct due to THP [was: mmotm 2011-01-06-15-41 uploaded]

2011-01-10 Thread Jiri Slaby
On 01/07/2011 12:41 AM, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2011-01-06-15-41 has been uploaded to Hi, something of the following breaks qemu-kvm: > thp-add-pmd-mangling-generic-functions.patch > thp-add-pmd-mangling-generic-functions-fix-pgtableh-build-for-um.patch >

Re: [PATCH] x86: KVM, fix lock imbalance

2010-07-07 Thread Jiri Slaby
On 07/07/2010 03:07 PM, Jiri Slaby wrote: >>> --- a/arch/x86/kvm/i8254.c >>> +++ b/arch/x86/kvm/i8254.c >>> @@ -696,6 +696,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 >>> flags) >>> >>> pit->wq = create_s

Re: [PATCH] x86: KVM, fix lock imbalance

2010-07-07 Thread Jiri Slaby
On 07/07/2010 03:05 PM, Ingo Molnar wrote: > > * Jiri Slaby wrote: > >> Stanse found that there is an omitted unlock in kvm_create_pit in one fail >> path. Add proper unlock there. >> >> Signed-off-by: Jiri Slaby >> Cc: Avi Kivity >> Cc: Marcelo

[PATCH] x86: KVM, fix lock imbalance

2010-07-07 Thread Jiri Slaby
Stanse found that there is an omitted unlock in kvm_create_pit in one fail path. Add proper unlock there. Signed-off-by: Jiri Slaby Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Gleb Natapov Cc: "Michael

WARNING: kernel/smp.c:292 smp_call_function_single [Was: mmotm 2009-11-24-16-47 uploaded]

2009-11-27 Thread Jiri Slaby
On 11/25/2009 01:47 AM, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2009-11-24-16-47 has been uploaded to Hi, when executing qemu-kvm I often get following warning and a hard lockup. WARNING: at kernel/smp.c:292 smp_call_function_single+0xbd/0x140() Hardware name: To Be Fille

vga_arb warning [was: mmotm 2009-11-01-10-01 uploaded]

2009-11-01 Thread Jiri Slaby
On 11/01/2009 07:07 PM, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2009-11-01-10-01 has been uploaded to Hi, I got the following warning while booting an image in qemu-kvm: WARNING: at fs/attr.c:158 notify_change+0x2da/0x310() Hardware name: Modules linked in: Pid: 1, comm:

Re: kvm build failure [was: mmotm 2009-10-09-01-07 uploaded]

2009-10-09 Thread Jiri Slaby
On 10/09/2009 05:30 PM, Randy Dunlap wrote: > I submitted a patch for that several days ago, against > linux-next-20091006. (below again) Thanks! -- 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://

[was: mmotm 2009-10-09-01-07 uploaded]

2009-10-09 Thread Jiri Slaby
On 10/09/2009 10:07 AM, a...@linux-foundation.org wrote: > The mm-of-the-moment snapshot 2009-10-09-01-07 has been uploaded to Hi, build fails with: ERROR: "cpufreq_get" [arch/x86/kvm/kvm.ko] undefined! because of CONFIG_KVM=m ... # CONFIG_CPU_FREQ is not set Should cpufreq_get be defined as inli

[PATCH 1/1] KVM: fix lock imbalance

2009-09-25 Thread Jiri Slaby
Stanse found 2 lock imbalances in kvm_request_irq_source_id and kvm_free_irq_source_id. They omit to unlock kvm->irq_lock on fail paths. Fix that by adding unlock labels at the end of the functions and jump there from the fail paths. Signed-off-by: Jiri Slaby Cc: Avi Kivity Cc: Marcelo Tosa

[PATCH] KVM: fix lock imbalance

2009-06-29 Thread Jiri Slaby
There is a missing unlock on one fail path in ioapic_mmio_write, fix that. Signed-off-by: Jiri Slaby --- virt/kvm/ioapic.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index d8b2eca..2b3307b 100644 --- a/virt/kvm/ioapic.c +++ b

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-07 Thread Jiri Slaby
Rusty Russell wrote: >> Fix the virtio bus instead. > > Incoherent? CHECK Sorry, I don't undesratnd here. Incoherent with what? > Rude to bug reporter? CHECK Maybe it's my english. I apologize all, who understood my replies that way, sorry for that, it was not intentional. > Unhelpful? CHECK

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-05 Thread Jiri Slaby
Anthony Liguori napsal(a): > Actually, we should be able to delete this virtio_pci_root entirely. > The device is a dummy one anyway. But the bus is still to be fixed... -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-05 Thread Jiri Slaby
Mark McLoughlin wrote: >> Fix the virtio bus instead. > > Yeah, the patch I posted wasn't meant as a fix for this traceback. So what's the module_get patch needed for? > Here's one that does fix it. ... > From: Mark McLoughlin <[EMAIL PROTECTED]> > Subject: [PATCH] virtio: add device release() f

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-05 Thread Jiri Slaby
Michael Tokarev napsal(a): > Jiri Slaby wrote: >> On 12/04/2008 01:44 PM, Mark McLoughlin wrote: >>> Nothing takes a ref on virtio_pci, so even if you have >>> devices in use, rmmod will attempt to unload the module. >> It unbinds the device properly as any ot

Re: [PATCH] virtio: make PCI devices take a virtio_pci module ref

2008-12-04 Thread Jiri Slaby
On 12/04/2008 01:44 PM, Mark McLoughlin wrote: > Nothing takes a ref on virtio_pci, so even if you have > devices in use, rmmod will attempt to unload the module. It unbinds the device properly as any other driver. So what's the problem here? > Fix by simply making each device take a ref on the m