Skip to contentSkip to conversation

Xen ARM community call - meeting minutes and date for the next one

DISCUSSION Julien Grall 5 participants 14 messages Mar 28, 2017 – Apr 4, 2017

lore
Share & tools
lore
#0 lore raw

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 7 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Works for me.

Quoted 73 lines

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Quoted 11 lines

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

Signature · 1 line
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
In reply to Julien Grall

Hello Julien

5th works for us. We will collect topics internally and send to this thread.

ARTEM MYGAIEV
Director, Technology Solutions

Office: +380 44 390 5457 x 65570 Cell: +380 67 921 1131 Email: [email protected]
Kyiv, Ukraine (GMT+3) epam.com

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.

-----Original Message-----
From: Julien Grall [mailto:[email protected]]
Sent: 28 березня 2017 р. 18:23
To: xen-devel <[email protected]>
Cc: Edgar E. Iglesias <[email protected]>; [email protected]; Stefano Stabellini <[email protected]>; Artem Mygaiev <[email protected]>; Volodymyr Babchuk <[email protected]>; [email protected]; [email protected]
Subject: Xen ARM community call - meeting minutes and date for the next one

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

--
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
In reply to Julien Grall
Quoted 7 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

That works for me, thanks!

Edgar

Quoted 74 lines

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Quoted 10 lines

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

Signature · 1 line
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
In reply to Julien Grall

Hi,

Quoted 7 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Apologize, I forgot that we switched timezone last Sunday. I was meant to say 5pm BST (e.g UTC + 1). Is it fine for everyone to do the meeting one hour later?

Cheers,

--
Julien Grall
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw
Quoted 9 lines · Julien Grall

Hi,

Quoted 6 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

Quoted 5 lines
Quoted 1 line

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Apologize, I forgot that we switched timezone last Sunday. I was meant to say 5pm BST (e.g UTC + 1). Is it fine for everyone to do the meeting one hour later?

I didn't even realize that the timezone was different. Yes, please :-)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw
In reply to Julien Grall

Hi Julien,

5pm UTC+1 will be fine for me.

I just finished my EL0 PoC and want to share benchmark results.

My benchmark setup is primitive, but results are reproducible. I have wrote small driver that calls SMC 10.000.000 times in a loop. So, benchmark looks like this:

root@xenaarch64:~# time cat /proc/smc_test
 Will call SMC 10000000 time(s)
Done!

real 1m51.428s
user 0m0.020s
sys 1m51.240s

I compared three types of SMC "handlers":

1. Right in hypervisor. I lust put advance_pc into the do_trap_smc(). This is the base.
2. Handling in MiniOS, using monitor.c framework.
3. Handling in EL0 XEN application.

In all three cases there was no actual handling. Just variants of return 0;. Results:

1. Hypervisor:

    real 0m10.757s
    user 0m0.000s
    sys 0m10.752s

    10.757s = 1x (base value)
    1.07us per call

2. MiniOs:

    real 1m51.428s
    user 0m0.020s
    sys 1m51.240s

    111.428s = 10.35x slower than hypervisor handler
    11.1us per call

3. EL0:

    real 1m3.525s
    user 0m0.000s
    sys 1m3.516s

    63.525s = 5.9x slower than hypervisor handler
    6.35us par call

As you can see, handling in hypervisor mode is obviously the fastest way. In my first implementation EL0 approach was as slow as MiniOs. Then I simplified context switching (for example we don't need to save/restore GIC context). That gave me 1.7x boost. Now profiler shows that hypervisor spends time in spinlocks and p2m code. But, anyways, 10 000 000 traps in 60 seconds is a good result :)

Testing was done on Renesas H3 board with 4xA57 cores.

Quoted 91 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

--
Julien Grall

Signature · 7 lines
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#7 lore raw
Quoted 28 lines · Volodymyr Babchuk

Hi Julien,

5pm UTC+1 will be fine for me.

I just finished my EL0 PoC and want to share benchmark results.

My benchmark setup is primitive, but results are reproducible. I have wrote small driver that calls SMC 10.000.000 times in a loop. So, benchmark looks like this:

root@xenaarch64:~# time cat /proc/smc_test
 Will call SMC 10000000 time(s)
Done!

real 1m51.428s
user 0m0.020s
sys 1m51.240s

I compared three types of SMC "handlers":

1. Right in hypervisor. I lust put advance_pc into the do_trap_smc(). This is the base.
2. Handling in MiniOS, using monitor.c framework.
3. Handling in EL0 XEN application.

In all three cases there was no actual handling. Just variants of return 0;. Results:

Quoted 7 lines

1. Hypervisor:

    real 0m10.757s
    user 0m0.000s
    sys 0m10.752s

    10.757s = 1x (base value)
    1.07us per call

1u is incredibly good actually

Quoted 16 lines

2. MiniOs:

    real 1m51.428s
    user 0m0.020s
    sys 1m51.240s

    111.428s = 10.35x slower than hypervisor handler
    11.1us per call

3. EL0:

    real 1m3.525s
    user 0m0.000s
    sys 1m3.516s

    63.525s = 5.9x slower than hypervisor handler
    6.35us par call
Quoted 8 lines

As you can see, handling in hypervisor mode is obviously the fastest way. In my first implementation EL0 approach was as slow as MiniOs. Then I simplified context switching (for example we don't need to save/restore GIC context). That gave me 1.7x boost. Now profiler shows that hypervisor spends time in spinlocks and p2m code. But, anyways, 10 000 000 traps in 60 seconds is a good result :)

Testing was done on Renesas H3 board with 4xA57 cores.

This is a very good result! I am also quite happy with your scientific approach. I wish more people started their projects doing experiments like this one, before putting their head down to write thousands of lines of code. I encourage you to submit a talk to Xen Summit about this and/or write a blog post for https://blog.xenproject.org/.

I think that 6u per call is very good. Seeing that in the hypervisor case the time is only 1u per call, it makes me think we might be able to go down a bit more. I also assume that it is quite reliable (having vcpus pinned to pcpus), while in the MiniOs case, unless you have enough free pcpus to guarantee that MiniOs is already running, we should see spikes of latency, right? Because if MiniOs is not running, or it cannot run immediately, it should take much longer? In fact, where was MiniOs running in your setup?

Quoted 85 lines · Julien Grall
Quoted 84 lines

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

Quoted 14 lines
Quoted 7 lines

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

--
Julien Grall

Signature · 2 lines
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#8 lore raw

Hi Stefano,

Quoted 34 lines · Stefano Stabellini
Quoted 33 lines · Volodymyr Babchuk

Hi Julien,

5pm UTC+1 will be fine for me.

I just finished my EL0 PoC and want to share benchmark results.

My benchmark setup is primitive, but results are reproducible. I have wrote small driver that calls SMC 10.000.000 times in a loop. So, benchmark looks like this:

root@xenaarch64:~# time cat /proc/smc_test
 Will call SMC 10000000 time(s)
Done!

real 1m51.428s
user 0m0.020s
sys 1m51.240s

I compared three types of SMC "handlers":

1. Right in hypervisor. I lust put advance_pc into the do_trap_smc(). This is the base.
2. Handling in MiniOS, using monitor.c framework.
3. Handling in EL0 XEN application.

In all three cases there was no actual handling. Just variants of return 0;. Results:

1. Hypervisor:

    real 0m10.757s
    user 0m0.000s
    sys 0m10.752s
Quoted 4 lines
Quoted 2 lines
    10.757s = 1x (base value)
    1.07us per call

1u is incredibly good actually

Yep. But handler was right in the traps.c. There is very short path:
guest_sync (in entry.S) -> do_trap_hypervisor() -> do_trap_smc(). I assume that most of simple traps are handled within 1-2us.

Quoted 24 lines
Quoted 24 lines

2. MiniOs:

    real 1m51.428s
    user 0m0.020s
    sys 1m51.240s

    111.428s = 10.35x slower than hypervisor handler
    11.1us per call

3. EL0:

    real 1m3.525s
    user 0m0.000s
    sys 1m3.516s

    63.525s = 5.9x slower than hypervisor handler
    6.35us par call

As you can see, handling in hypervisor mode is obviously the fastest way. In my first implementation EL0 approach was as slow as MiniOs. Then I simplified context switching (for example we don't need to save/restore GIC context). That gave me 1.7x boost. Now profiler shows that hypervisor spends time in spinlocks and p2m code. But, anyways, 10 000 000 traps in 60 seconds is a good result :)

Quoted 4 lines
Quoted 1 line

Testing was done on Renesas H3 board with 4xA57 cores.

This is a very good result! I am also quite happy with your scientific approach.

Thanks!

Quoted 4 lines

I wish more people started their projects doing experiments like this one, before putting their head down to write thousands of lines of code. I encourage you to submit a talk to Xen Summit about this and/or write a blog post for https://blog.xenproject.org/.

Yep. Actually Artem is pushing me to talk at Xen Summit :)

Quoted 8 lines

I think that 6u per call is very good. Seeing that in the hypervisor case the time is only 1u per call, it makes me think we might be able to go down a bit more. I also assume that it is quite reliable (having vcpus pinned to pcpus), while in the MiniOs case, unless you have enough free pcpus to guarantee that MiniOs is already running, we should see spikes of latency, right? Because if MiniOs is not running, or it cannot run immediately, it should take much longer? In fact, where was MiniOs running in your setup?

Yes, there was MiniOS for aarch64 running. I published links to corresponding patches in the ML some time ago.

I didn't pinned vcpus to cpus because I had only 3 domais running on 4 CPUs:
dom0, domU which I used for benchmarking and MiniOS. I'm sure that at leas two cores were idle. But you are right, under heavy load there will be latency spikes, because we can't guarantee that MiniOs will be scheduled immediately to serve handling request.
My design of EL0 app is better in this case, because for hypervisor it looks like another function call. It still can be preempted, thought. But at least entry to EL0 handler is done immediately.

And yes, my profiler shows that there are ways to further decrease latency. Most obvious way is to get rid of 2nd stage translation and thus eliminate p2m code from the call chain. Currently hypervisor spends 20% of time in spinlocks code and about ~10-15% in p2m. So there definitely are areas to improve :)

Quoted 100 lines
Quoted 100 lines · Julien Grall
Quoted 84 lines

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

Quoted 7 lines

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

--
Julien Grall

--
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: [email protected]

Signature · 7 lines
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#9 lore raw

Hi Volodymyr

Quoted 7 lines · Volodymyr Babchuk
Quoted 1 line · Stefano Stabellini

On Thu, 30 Mar 2017, Volodymyr Babchuk wrote:

And yes, my profiler shows that there are ways to further decrease latency. Most obvious way is to get rid of 2nd stage translation and thus eliminate p2m code from the call chain. Currently hypervisor spends 20% of time in spinlocks code and about ~10-15% in p2m. So there definitely are areas to improve :)

Correct me if I am wrong. You are suggesting to remove stage-2 MMU translation, right? If so, what are the benefits to have some Xen code running at EL0?

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#10 lore raw

Hi Julien,

Quoted 16 lines · Julien Grall

Hi Volodymyr

Quoted 11 lines · Volodymyr Babchuk
Quoted 2 lines · Stefano Stabellini

On Thu, 30 Mar 2017, Volodymyr Babchuk wrote:

And yes, my profiler shows that there are ways to further decrease latency. Most obvious way is to get rid of 2nd stage translation and thus eliminate p2m code from the call chain. Currently hypervisor spends 20% of time in spinlocks code and about ~10-15% in p2m. So there definitely are areas to improve :)

Quoted 3 lines

Correct me if I am wrong. You are suggesting to remove stage-2 MMU translation, right? If so, what are the benefits to have some Xen code running at EL0?

Because that will be loadable code :) Also, this will provide some degree of isolation as this code will communicate with Xen only via SVCs.

Look, we need two stages in the first place because conventional guest wants to control own MMU. But Xen native app (lets call it in this way) should not control MMU. In my hack I had to create stage-1 table with 1:1 mapping to make things work. Actually.... it just came to me that I can try to disable stage 1 MMU and leave only stage 2. Not sure if it is possible, need to check TRM...
But, anyways, my initial idea was to disable second stage MMU (drop VM bit in HCR_EL2) and program only TTBR0_EL1 with friends. With this approach there will be no need to save/restore p2m context when I switch from guest context to app context and back.

Signature · 7 lines
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: [email protected]

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#11 lore raw
Quoted 1 line · Volodymyr Babchuk

Hi Julien,

Hi Volodymyr,

Quoted 24 lines · Julien Grall
Quoted 16 lines

Hi Volodymyr

Quoted 11 lines · Volodymyr Babchuk
Quoted 2 lines · Stefano Stabellini

On Thu, 30 Mar 2017, Volodymyr Babchuk wrote:

And yes, my profiler shows that there are ways to further decrease latency. Most obvious way is to get rid of 2nd stage translation and thus eliminate p2m code from the call chain. Currently hypervisor spends 20% of time in spinlocks code and about ~10-15% in p2m. So there definitely are areas to improve :)

Quoted 3 lines

Correct me if I am wrong. You are suggesting to remove stage-2 MMU translation, right? If so, what are the benefits to have some Xen code running at EL0?

Because that will be loadable code :) Also, this will provide some degree of isolation as this code will communicate with Xen only via SVCs.Hi

Quoted 6 lines

Look, we need two stages in the first place because conventional guest wants to control own MMU. But Xen native app (lets call it in this way) should not control MMU. In my hack I had to create stage-1 table with 1:1 mapping to make things work. Actually.... it just came to me that I can try to disable stage 1 MMU and leave only stage 2. Not sure if it is possible, need to check TRM...

I cannot see why stage-1 page table cannot be disabled.

Quoted 4 lines

But, anyways, my initial idea was to disable second stage MMU (drop VM bit in HCR_EL2) and program only TTBR0_EL1 with friends. With this approach there will be no need to save/restore p2m context when I switch from guest context to app context and back.

Even if you disable stage-2 translation, you still have to program VTTBR_EL2.VMID because, from my understanding the TLBs will still be tagged with the VMID (see the note in page D4-1823 in ARM DDI 0487A.k_iss10775).

If you keep the VMID of the guest, you would need to flush the TLBs at every context switch to avoid TLB conflict.

To prevent that, you would need a specific VMID for the EL0 app, and therefore save/restore a part of the p21m context everytime.

The benefits of using stage-2 page table, is you can leverage the p2m code rather than creating another version to handle stage-1.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#12 lore raw
In reply to Volodymyr Babchuk

Hi Volodymyr

Quoted 7 lines · Volodymyr Babchuk
Quoted 1 line · Stefano Stabellini

On Thu, 30 Mar 2017, Volodymyr Babchuk wrote:

And yes, my profiler shows that there are ways to further decrease latency. Most obvious way is to get rid of 2nd stage translation and thus eliminate p2m code from the call chain. Currently hypervisor spends 20% of time in spinlocks code and about ~10-15% in p2m. So there definitely are areas to improve :)

Correct me if I am wrong. You are suggesting to remove stage-2 MMU translation, right? If so, what are the benefits to have some Xen code running at EL0?

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#13 lore raw
In reply to Julien Grall

Hi,

Quick reminder the community call will be tomorrow at 5pm BST (i.e UTC + 1).

Let me know if you have any specific topic you would like to talk during this call.

For joining the call, please use either:

Call +44 1223 406065 (Local dial in)
and enter the access code below followed by # key. Participant code: 4915191

Mobile Auto Dial:

        VoIP: voip://+441223406065;4915191#
        iOS devices: +44 1223 406065,4915191 and press #
        Other devices: +44 1223 406065x4915191#

Additional Calling Information:

UK +44 1142828002
US CA +1 4085761502
US TX +1 5123141073
JP +81 453455355
DE +49 8945604050
NO +47 73187518
SE +46 46313131
FR +33 497235101
TW +886 35657119
HU +36 13275600
IE +353 91337900

Toll Free

UK 0800 1412084
US +1 8668801148
CN +86 4006782367
IN 0008009868365
IN +918049282778
TW 08000 22065
HU 0680981587
IE 1800800022
KF +972732558877

Regards,

Quoted 89 lines · Julien Grall

Hi all,

Apologies for the late sending, you will find at the end of the e-mail a summary of the discussion from the previous call. Feel free to reply if I missed some parts.

I suggest to have the next call on the 5th April at 5PM UTC. Any opinions?

Also do you have any specific topic you would like to talk during this call?

Cheers,

== Attendees ==

Apologies if I misspelled any name.

Stefano, Aporeto
Julien, ARM
Oleksandr, EPAM
Artem, EPAM
Thanasis, OnApp
Volodymir, EPAM

== Xen on ARM status ==

Over 100 patches in-flight for Xen on ARM:
- PV protocols: Some are already accepted
- NUMA support
- GICv3 ITS support
- Exposing and emulating a PL011 for guest
- guest SMC forwarding for Xilinx platform
- Interrupt latency improvement

== PV protocols ==

* PV protocols written by Stefano was merged after 10 months

Stefano: PV protocols review are moving faster
Attendees agreed

* Audio protocol: close to be accepted
* Display protocol: minor issue, a bit more design is required

Hopefully both will be ready for Xen 4.9

Oleksandr: What to do when the backend die?

(I cannot find any notes on it some I am not sure if we answered the question during the call. I suspect it has been asked to bring up the subject on the ML).

== Interrupt latency ==

Stefano: Some improvement has been done but it is not possible to know whether it is good. Do you have any specific IRQ latency requirements?

Artem: There is no hard latency requirements in automotive, although many requirements depends on latency. For example:
* Scheduling
* GPU (implementation is sentive to interrupt latency)

Automotive is using a set of benchmark to find the virtualization overhead. This should be low.

ACTION: Artem to send a list of benchmark

== SMC/HVC handling in Xen ==

Artem: Please review the proposal on the mailing list. See:

https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00430.html

== Deprivilege mode ==

EPAM are working on adding support for OP-TEE in Xen to allow multiple guest access the trusted firmware.

During the discussion on the design, it was suggested to move the SMC handling in a separate domain. This was tested using the VM event API and Mini-OS (upstream with Chen Baozi's series to support ARM64). The first results shows it is 10 times slower than handling SMC calls directly in the hypervisor.

Volodymir is working on another approach to deprivilege the execution by implementing a Xen EL0.

== big.LITTLE support ==

Thanasis: Document discussed on the ML. Xen will split CPUs at boot time (big vs little). A series will be sent on the on the ML soon.

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel