All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linaro-dev@lists.linaro.org" <linaro-dev@lists.linaro.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Pawel Moll <Pawel.Moll@arm.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"android-virt@lists.cs.columbia.edu"
	<android-virt@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"embeddedxen-devel@lists.sourceforge.net"
	<embeddedxen-devel@lists.sourceforge.net>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Android-virt] [Embeddedxen-devel] [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions
Date: Thu, 1 Dec 2011 16:57:18 +0000	[thread overview]
Message-ID: <20111201165718.GJ27394@arm.com> (raw)
In-Reply-To: <201112011644.41101.arnd@arndb.de>

On Thu, Dec 01, 2011 at 04:44:40PM +0000, Arnd Bergmann wrote:
> On Thursday 01 December 2011, Catalin Marinas wrote:
> > On Thu, Dec 01, 2011 at 03:42:19PM +0000, Arnd Bergmann wrote:
> > > On Thursday 01 December 2011, Catalin Marinas wrote:
> > > How do you deal with signed integer arguments passed into SVC or HVC from
> > > a caller? If I understand the architecture correctly, the upper
> > > halves of the argument register end up zero-padded, while the callee
> > > expects sign-extension.
> > 
> > If you treat it as an "int" (32-bit) and function prototype defined
> > accordingly, then the generated code only accesses it as a W (rather
> > than X) register and the top 32-bit part is ignored (no need for
> > sign-extension). If it is defined as a "long" in the 32-bit world, then
> > it indeed needs explicit conversion given the different sizes for long
> > (for example sys_lseek, the second argument is a 'long' and we do
> > explicit sign extension in the wrapper).
...
> What about unsigned long and pointer? Can we always rely on the upper
> half of the register to be zero-filled when we get an exception from 32
> bit into 64 bit state, or do we also have to zero-extend those?

They are also fine, no need for zero-extension.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [Android-virt] [Embeddedxen-devel] [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions
Date: Thu, 1 Dec 2011 16:57:18 +0000	[thread overview]
Message-ID: <20111201165718.GJ27394@arm.com> (raw)
In-Reply-To: <201112011644.41101.arnd@arndb.de>

On Thu, Dec 01, 2011 at 04:44:40PM +0000, Arnd Bergmann wrote:
> On Thursday 01 December 2011, Catalin Marinas wrote:
> > On Thu, Dec 01, 2011 at 03:42:19PM +0000, Arnd Bergmann wrote:
> > > On Thursday 01 December 2011, Catalin Marinas wrote:
> > > How do you deal with signed integer arguments passed into SVC or HVC from
> > > a caller? If I understand the architecture correctly, the upper
> > > halves of the argument register end up zero-padded, while the callee
> > > expects sign-extension.
> > 
> > If you treat it as an "int" (32-bit) and function prototype defined
> > accordingly, then the generated code only accesses it as a W (rather
> > than X) register and the top 32-bit part is ignored (no need for
> > sign-extension). If it is defined as a "long" in the 32-bit world, then
> > it indeed needs explicit conversion given the different sizes for long
> > (for example sys_lseek, the second argument is a 'long' and we do
> > explicit sign extension in the wrapper).
...
> What about unsigned long and pointer? Can we always rely on the upper
> half of the register to be zero-filled when we get an exception from 32
> bit into 64 bit state, or do we also have to zero-extend those?

They are also fine, no need for zero-extension.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linaro-dev@lists.linaro.org" <linaro-dev@lists.linaro.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Pawel Moll <Pawel.Moll@arm.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"android-virt@lists.cs.columbia.edu" 
	<android-virt@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"embeddedxen-devel@lists.sourceforge.net" 
	<embeddedxen-devel@lists.sourceforge.net>
Subject: Re: [Android-virt] [Embeddedxen-devel] [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions
Date: Thu, 1 Dec 2011 16:57:18 +0000	[thread overview]
Message-ID: <20111201165718.GJ27394@arm.com> (raw)
In-Reply-To: <201112011644.41101.arnd@arndb.de>

On Thu, Dec 01, 2011 at 04:44:40PM +0000, Arnd Bergmann wrote:
> On Thursday 01 December 2011, Catalin Marinas wrote:
> > On Thu, Dec 01, 2011 at 03:42:19PM +0000, Arnd Bergmann wrote:
> > > On Thursday 01 December 2011, Catalin Marinas wrote:
> > > How do you deal with signed integer arguments passed into SVC or HVC from
> > > a caller? If I understand the architecture correctly, the upper
> > > halves of the argument register end up zero-padded, while the callee
> > > expects sign-extension.
> > 
> > If you treat it as an "int" (32-bit) and function prototype defined
> > accordingly, then the generated code only accesses it as a W (rather
> > than X) register and the top 32-bit part is ignored (no need for
> > sign-extension). If it is defined as a "long" in the 32-bit world, then
> > it indeed needs explicit conversion given the different sizes for long
> > (for example sys_lseek, the second argument is a 'long' and we do
> > explicit sign extension in the wrapper).
...
> What about unsigned long and pointer? Can we always rely on the upper
> half of the register to be zero-filled when we get an exception from 32
> bit into 64 bit state, or do we also have to zero-extend those?

They are also fine, no need for zero-extension.

-- 
Catalin

  reply	other threads:[~2011-12-01 16:57 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 14:53 [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions Stefano Stabellini
2011-11-29 14:53 ` Stefano Stabellini
2011-11-29 14:53 ` Stefano Stabellini
2011-11-29 14:53 ` Stefano Stabellini
2011-11-29 21:29 ` Arnd Bergmann
2011-11-29 21:29   ` Arnd Bergmann
2011-11-30  4:42   ` Anup Patel
     [not found]   ` <201111292129.20444.arnd-r2nGTMty4D4@public.gmane.org>
2011-11-30  4:42     ` Anup Patel
2011-11-30 11:41       ` Stefano Stabellini
2011-11-30 11:41         ` Stefano Stabellini
2011-11-30 11:41         ` Stefano Stabellini
2011-11-30 11:39   ` Stefano Stabellini
2011-11-30 11:39     ` Stefano Stabellini
2011-11-30 11:39     ` Stefano Stabellini
2011-11-30 13:03     ` Arnd Bergmann
2011-11-30 13:03       ` Arnd Bergmann
2011-11-30 13:25       ` [Xen-devel] " Ian Campbell
2011-11-30 13:25         ` Ian Campbell
2011-11-30 14:32         ` Arnd Bergmann
2011-11-30 14:32         ` Arnd Bergmann
2011-11-30 14:32           ` Arnd Bergmann
2011-11-30 14:32           ` Arnd Bergmann
2011-11-30 14:51           ` Pawel Moll
2011-11-30 14:51           ` Pawel Moll
2011-11-30 14:51             ` Pawel Moll
2011-11-30 16:27           ` Ian Campbell
2011-11-30 16:27             ` Ian Campbell
2011-11-30 16:27             ` Ian Campbell
2011-11-30 18:15             ` Arnd Bergmann
2011-11-30 18:15             ` Arnd Bergmann
2011-11-30 18:15               ` Arnd Bergmann
2011-11-30 18:15               ` Arnd Bergmann
2011-11-30 18:32               ` [Embeddedxen-devel] " Stefano Stabellini
2011-11-30 18:32                 ` Stefano Stabellini
2011-11-30 18:32                 ` Stefano Stabellini
2011-12-01 10:26                 ` Ian Campbell
2011-12-01 10:26                   ` Ian Campbell
2011-12-01 10:26                   ` Ian Campbell
2011-12-01 15:10                   ` [Android-virt] " Catalin Marinas
2011-12-01 15:10                     ` Catalin Marinas
2011-12-01 15:10                     ` Catalin Marinas
2011-12-01 15:42                     ` Arnd Bergmann
2011-12-01 15:42                       ` Arnd Bergmann
2011-12-01 15:42                       ` Arnd Bergmann
2011-12-01 16:02                       ` Catalin Marinas
2011-12-01 16:02                         ` Catalin Marinas
2011-12-01 16:02                         ` Catalin Marinas
2011-12-01 16:44                         ` Arnd Bergmann
2011-12-01 16:44                           ` Arnd Bergmann
2011-12-01 16:44                           ` Arnd Bergmann
2011-12-01 16:57                           ` Catalin Marinas [this message]
2011-12-01 16:57                             ` Catalin Marinas
2011-12-01 16:57                             ` Catalin Marinas
2011-12-01 15:52                     ` Ian Campbell
2011-12-01 15:52                       ` Ian Campbell
2011-12-01 15:52                       ` Ian Campbell
2011-12-01 15:10                   ` Catalin Marinas
2011-12-01 15:12                   ` Stefano Stabellini
2011-12-01 15:12                     ` Stefano Stabellini
2011-12-01 15:12                     ` Stefano Stabellini
2011-12-01 10:34               ` Ian Campbell
2011-12-01 10:34                 ` Ian Campbell
2011-11-30 13:25       ` Ian Campbell
2011-11-30 13:03     ` Arnd Bergmann
2011-11-30 14:11     ` Catalin Marinas
2011-11-30 14:11     ` Catalin Marinas
2011-11-30 14:11       ` Catalin Marinas
2011-11-30 14:20       ` Stefano Stabellini
2011-11-30 14:20         ` Stefano Stabellini
2011-11-30 14:20         ` Stefano Stabellini
2011-12-16 15:43       ` [Xen-devel] " David Vrabel
2011-12-16 15:43         ` David Vrabel
2011-12-16 16:54         ` Catalin Marinas
2011-12-16 16:54           ` Catalin Marinas
2011-12-16 17:38           ` David Vrabel
2011-12-16 17:38             ` David Vrabel
2011-12-16 17:47             ` Catalin Marinas
2011-12-16 17:47               ` Catalin Marinas
2011-11-29 21:29 ` Arnd Bergmann

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=20111201165718.GJ27394@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Pawel.Moll@arm.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=android-virt@lists.cs.columbia.edu \
    --cc=arnd@arndb.de \
    --cc=embeddedxen-devel@lists.sourceforge.net \
    --cc=kvm@vger.kernel.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xen-devel@lists.xensource.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.