public inbox for kvmarm@lists.cs.columbia.edu
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Christoffer Dall <christoffer.dall@linaro.org>,
	"Richard W.M. Jones" <rjones@redhat.com>
Cc: "kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: kvm [2087]: load/store instruction decoding not implemented
Date: Tue, 24 Feb 2015 13:12:49 +0000	[thread overview]
Message-ID: <54EC78D1.3030703@arm.com> (raw)
In-Reply-To: <20150224124710.GB21364@cbox>

On 24/02/15 12:47, Christoffer Dall wrote:
> On Tue, Feb 24, 2015 at 12:29:25PM +0000, Richard W.M. Jones wrote:
>> On Tue, Feb 24, 2015 at 09:15:18PM +0900, Peter Maydell wrote:
>>> On 24 February 2015 at 20:59, Richard W.M. Jones <rjones@redhat.com> wrote:
>>>>
>>>> https://bugzilla.redhat.com/show_bug.cgi?id=1194366
>>>>
>>>> Has anyone seen this KVM error?  Or have suggestions how to debug it
>>>> further?
>>>>
>>>>   kvm [2028]: load/store instruction decoding not implemented
>>>
>>> This is a fairly common thing to run into and google is bound
>>> to have references to past discussions. What has happened here
>>> is that the guest has attempted a "complex" load/store instruction
>>> to an area of RAM which is not mapped (ie not guest RAM).
>>> For this class of instructions the hardware doesn't provide
>>> syndrome information to allow us to figure out the address/size
>>> etc of the access, so we would have to actually decode the
>>> offending instruction and emulate it; this emulation isn't
>>> implemented.
>>>
>>> Complex insns are things like load-multiple (there's a complete
>>> list in the ARM ARM somewhere). Generally this indicates a guest
>>> bug because you really shouldn't be accessing devices with
>>> weird instructions like that (and you shouldn't be accessing
>>> unmapped memory at all).
>>
>> I'm not super-familiar with the aarch64 instruction set, but
>> according to qemu the instruction is:
>>
>> b8004403        str     w3, [x0],#4
>>
>> (in __copy_to_user).  My interpretation is this is storing the
>> lower 32 bits of x3 into the storage pointed to by x0 (+ 4 bytes?)
>> Is that one of the complicated ones?
> 
> Shouldn't be, I don't think aarch64 does any register write-back here.
> This is an aarch64 userspace process, right?
> 
> You can try adding some more debugging info to the print to get us the
> IPA it is failing on:
> 
> diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
> index 5d3bfc0..e468937 100644
> --- a/arch/arm/kvm/mmio.c
> +++ b/arch/arm/kvm/mmio.c
> @@ -182,7 +182,8 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
>  		if (ret)
>  			return ret;
>  	} else {
> -		kvm_err("load/store instruction decoding not implemented\n");
> +		kvm_err("load/store instruction decoding not implemented (HSR: 0x%x, IPA: 0x%llx)\n",
> +			kvm_vcpu_get_hsr(vcpu), fault_ipa);
>  		return -ENOSYS;
>  	}
>  
> 
> I wonder why you're faulting on an address that your guest kernel is
> doing __copy_to_user() on in the first place though, hmmm.

Here's my theory: userspace is accessing something it should never
access (outside of RAM, basically), and doing so via a kernel interface.

Is this process accessing /dev/mem by any chance? dmidecode anyone?

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2015-02-24 13:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 11:59 kvm [2087]: load/store instruction decoding not implemented Richard W.M. Jones
2015-02-24 12:15 ` Peter Maydell
2015-02-24 12:29   ` Richard W.M. Jones
2015-02-24 12:47     ` Christoffer Dall
2015-02-24 13:12       ` Marc Zyngier [this message]
2015-02-24 13:45         ` Richard W.M. Jones
2015-02-24 14:10           ` Marc Zyngier
2015-02-24 14:36             ` Richard W.M. Jones
2015-02-24 14:42               ` Marc Zyngier
2015-02-24 14:43                 ` Richard W.M. Jones
2015-02-24 15:03                   ` Marc Zyngier
2015-02-24 15:09                 ` Richard W.M. Jones
2015-02-24 15:20                   ` Marc Zyngier
2015-02-24 16:37                   ` Marc Zyngier
2015-02-24 14:25       ` Richard W.M. Jones
2015-02-24 14:55         ` Christoffer Dall
2015-02-24 15:06           ` Peter Maydell
2015-02-24 15:22           ` Richard W.M. Jones
2015-02-24 12:57     ` Peter Maydell
2015-02-24 12:16 ` Christoffer Dall
2015-02-24 12:27   ` Richard W.M. Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54EC78D1.3030703@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox