xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Xen on ARM: Read SP_usr and SP_svc in HYP mode
@ 2015-08-25  4:43 harry
  2015-08-28 16:25 ` Julien Grall
       [not found] ` <55E08B6D.7000205@citrix.com>
  0 siblings, 2 replies; 3+ messages in thread
From: harry @ 2015-08-25  4:43 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 485 bytes --]

Hi,

Now I want to implement some functions in other hypervisor, so I need to read SP_usr and SP_svc in HYP mode. I know Xen has implemented this function. But I use it with regs->sp_usr/svc to achieve this. But I don't know how to achieve it. I have read the entry.S file and get the process to save the regs, but some definition is not clear. I want to know if there is some asm command to achieve this? Or do I need to switch the mode manually to read it?

Thanks and regards,
Harry

[-- Attachment #1.2: Type: text/html, Size: 1128 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Xen on ARM: Read SP_usr and SP_svc in HYP mode
  2015-08-25  4:43 Xen on ARM: Read SP_usr and SP_svc in HYP mode harry
@ 2015-08-28 16:25 ` Julien Grall
       [not found] ` <55E08B6D.7000205@citrix.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Grall @ 2015-08-28 16:25 UTC (permalink / raw)
  To: harry, xen-devel

On 25/08/15 05:43, harry wrote:
> Hi,

Hello,

> Now I want to implement some functions in other hypervisor, so I need to
> read SP_usr and SP_svc in HYP mode. I know Xen has implemented this
> function. But I use it with regs->sp_usr/svc to achieve this. But I
> don't know how to achieve it. I have read the entry.S file and get the
> process to save the regs, but some definition is not clear. I want to
> know if there is some asm command to achieve this? Or do I need to
> switch the mode manually to read it?

Please reach out the mailing list related to the hypervisor you want to
modify to know whether they have handy helpers to access SP_usr/SP_svc.

If not, I would advice you to read the ARM ARM in order to know how to
access banked registers, particularly the section "Encoding and use of
Banked register transfer instructions".

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Xen on ARM: Read SP_usr and SP_svc in HYP mode
       [not found] ` <55E08B6D.7000205@citrix.com>
@ 2015-08-31  4:18   ` harry
  0 siblings, 0 replies; 3+ messages in thread
From: harry @ 2015-08-31  4:18 UTC (permalink / raw)
  To: Julien Grall, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1100 bytes --]

Hi,


Thank you very much! I have got the answer, we can use MSR/MRS instructions to load/save these regs.


Thanks and regards,
Harry

At 2015-08-29 00:25:17, "Julien Grall" <julien.grall@citrix.com> wrote:
>On 25/08/15 05:43, harry wrote:
>> Hi,
>
>Hi,
>
>> Now I want to implement some functions in other hypervisor, so I need to
>> read SP_usr and SP_svc in HYP mode. I know Xen has implemented this
>> function. But I use it with regs->sp_usr/svc to achieve this. But I
>> don't know how to achieve it. I have read the entry.S file and get the
>> process to save the regs, but some definition is not clear. I want to
>> know if there is some asm command to achieve this? Or do I need to
>> switch the mode manually to read it?
>
>Please reach out the mailing list related to the hypervisor you want to
>modify to know whether they have handy helpers to access SP_usr/SP_svc.
>
>If not, I would advice you to read the ARM ARM in order to know how to
>access banked registers, particularly the section "Encoding and use of
>Banked register transfer instructions".
>
>Regards,
>
>-- 
>Julien Grall

[-- Attachment #1.2: Type: text/html, Size: 1712 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-31  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25  4:43 Xen on ARM: Read SP_usr and SP_svc in HYP mode harry
2015-08-28 16:25 ` Julien Grall
     [not found] ` <55E08B6D.7000205@citrix.com>
2015-08-31  4:18   ` harry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).