All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Thomas Huth <thuth@redhat.com>, David Gibson <dgibson@redhat.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com,
	pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 5/5] powerpc: Check lswx in little-endian mode.
Date: Tue, 22 Mar 2016 08:25:58 +0000	[thread overview]
Message-ID: <56F10196.3020905@redhat.com> (raw)
In-Reply-To: <56F0FE6F.8010501@redhat.com>



On 22/03/2016 09:12, Thomas Huth wrote:
> On 22.03.2016 00:56, David Gibson wrote:
>> On Mon, 21 Mar 2016 12:33:34 +0100
>> Laurent Vivier <lvivier@redhat.com> wrote:
>>
>>> For lswx in little-endian mode, an alignment interrupt occurs.
>>>
>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>
>> I'm not entirely clear here; will the test fail if the alignment
>> exception doesn't occur in little endian mode?
> 
> I think so, yes.
> 
>> The general trend in Power has been for less and less things to trigger
>> alignment exceptions, so failing to cause an alignment exception
>> shouldn't cause a test failure (as long as the unaligned case is
>> correctly processed, of course).
> 
> According to the PowerISA 2.07, chapter 6.5.8, lswx should always
> trigger an alignment exception in little endian mode. So that's
> architected behavior and the test should be OK, as far as I can see...
> In case this gets changed with a future CPU, I think the test could be
> adapted later, too?

Exactly.

Then in the kernel, the instruction is emulated. It's why I didn't
understand why this test case fails with kvm in little endian mode,
while is was working on a real host or in a guest.

Laurent

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Vivier <lvivier@redhat.com>
To: Thomas Huth <thuth@redhat.com>, David Gibson <dgibson@redhat.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, drjones@redhat.com,
	pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 5/5] powerpc: Check lswx in little-endian mode.
Date: Tue, 22 Mar 2016 09:25:58 +0100	[thread overview]
Message-ID: <56F10196.3020905@redhat.com> (raw)
In-Reply-To: <56F0FE6F.8010501@redhat.com>



On 22/03/2016 09:12, Thomas Huth wrote:
> On 22.03.2016 00:56, David Gibson wrote:
>> On Mon, 21 Mar 2016 12:33:34 +0100
>> Laurent Vivier <lvivier@redhat.com> wrote:
>>
>>> For lswx in little-endian mode, an alignment interrupt occurs.
>>>
>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>
>> I'm not entirely clear here; will the test fail if the alignment
>> exception doesn't occur in little endian mode?
> 
> I think so, yes.
> 
>> The general trend in Power has been for less and less things to trigger
>> alignment exceptions, so failing to cause an alignment exception
>> shouldn't cause a test failure (as long as the unaligned case is
>> correctly processed, of course).
> 
> According to the PowerISA 2.07, chapter 6.5.8, lswx should always
> trigger an alignment exception in little endian mode. So that's
> architected behavior and the test should be OK, as far as I can see...
> In case this gets changed with a future CPU, I think the test could be
> adapted later, too?

Exactly.

Then in the kernel, the instruction is emulated. It's why I didn't
understand why this test case fails with kvm in little endian mode,
while is was working on a real host or in a guest.

Laurent

  reply	other threads:[~2016-03-22  8:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 11:33 [kvm-unit-tests PATCH v2 0/5] Check emulation Laurent Vivier
2016-03-21 11:33 ` Laurent Vivier
2016-03-21 11:33 ` [kvm-unit-tests PATCH v2 1/5] powerpc: add exception handler Laurent Vivier
2016-03-21 11:33   ` Laurent Vivier
2016-03-21 23:47   ` David Gibson
2016-03-21 23:47     ` David Gibson
2016-03-21 11:33 ` [kvm-unit-tests PATCH v2 2/5] powerpc: add test to check invalid instruction trap Laurent Vivier
2016-03-21 11:33   ` Laurent Vivier
2016-03-21 14:57   ` Thomas Huth
2016-03-21 14:57     ` Thomas Huth
2016-03-21 23:49   ` David Gibson
2016-03-21 23:49     ` David Gibson
2016-03-21 11:33 ` [kvm-unit-tests PATCH v2 3/5] powerpc: check 64bit mode Laurent Vivier
2016-03-21 11:33   ` Laurent Vivier
2016-03-21 23:49   ` David Gibson
2016-03-21 23:49     ` David Gibson
2016-03-21 11:33 ` [kvm-unit-tests PATCH v2 4/5] powerpc: check lswx Laurent Vivier
2016-03-21 11:33   ` Laurent Vivier
2016-03-21 12:07   ` Thomas Huth
2016-03-21 12:07     ` Thomas Huth
2016-03-21 14:25     ` Paolo Bonzini
2016-03-21 14:25       ` Paolo Bonzini
2016-03-21 15:59       ` Laurent Vivier
2016-03-21 15:59         ` Laurent Vivier
2016-03-21 23:53   ` David Gibson
2016-03-21 23:53     ` David Gibson
2016-03-21 11:33 ` [kvm-unit-tests PATCH v2 5/5] powerpc: Check lswx in little-endian mode Laurent Vivier
2016-03-21 11:33   ` Laurent Vivier
2016-03-21 23:56   ` David Gibson
2016-03-21 23:56     ` David Gibson
2016-03-22  8:12     ` Thomas Huth
2016-03-22  8:12       ` Thomas Huth
2016-03-22  8:25       ` Laurent Vivier [this message]
2016-03-22  8:25         ` Laurent Vivier
2016-03-23  0:14         ` David Gibson
2016-03-23  0:14           ` David Gibson
2016-03-22  9:50 ` [kvm-unit-tests PATCH v2 0/5] Check emulation Paolo Bonzini
2016-03-22  9:50   ` Paolo Bonzini

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=56F10196.3020905@redhat.com \
    --to=lvivier@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.