All of lore.kernel.org
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Stefano Stabellini <stefano.stabellini@amd.com>,
	Jan Beulich <jbeulich@suse.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	Xenia.Ragiadakou@amd.com, alejandro.garciavallejo@amd.com,
	Jason.Andryuk@amd.com
Subject: Re: [PATCH 0/2] Xen real-time x86
Date: Thu, 10 Jul 2025 21:23:28 -0400	[thread overview]
Message-ID: <6309c055-459a-4662-9b26-e4056540ada9@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2507101407500.605088@ubuntu-linux-20-04-desktop>


[-- Attachment #1.1.1: Type: text/plain, Size: 2290 bytes --]

On 7/10/25 17:39, Stefano Stabellini wrote:
> On Thu, 10 Jul 2025, Jan Beulich wrote:
>> On 10.07.2025 09:02, Roger Pau Monné wrote:
>>> On Wed, Jul 09, 2025 at 05:44:33PM -0700, Stefano Stabellini wrote:
>>>> 2) means that the RTOS must be undisturbed when executing the critical
>>>> section, which is typically right after receiving the interrupt and only
>>>> last for less than 1ms. In practice, it means the RTOS should absolutely
>>>> not be descheduled and there should be no (unnecessary) traps into Xen
>>>> while the RTOS is executing the critical section. It is expected that
>>>> the RTOS will run the critical section with interrupts disabled.
>>>
>>> What about other external interrupts?  While the guest runs the
>>> critical interrupt handling section with interrupts disabled, an
>>> external interrupt from a device targeting the pCPU could cause a
>>> vmexit.
>>
>> For interrupts to be handled by the guest, we may need to finally gain AVIC
>> support (albeit I'm not sure how close that is to VMX-es posted interrupts).
>> For interrupts handled in Xen the only way would be to allow the guest to
>> announce such critical sections to Xen. Which, besides being a security
>> concern, may of course itself represent unacceptable overhead.
> 
> In the past, I wrote a patch for an ARM user basically to do what you
> suggested: "announce such critical sections to Xen". It is easy for Xen
> to know when the critical section start: upon receiving the critical
> interrupt. I added an hypercall so that the RTOS could tell Xen when it
> ends. This is the kind of dirty patch that is very effective but
> difficult to generalize. As an example, you can pause all other VMs
> during the critical section to make sure the RTOS has full bandwidth on
> the bus. The critical section is much shorter than a scheduler slot
> anyway. I did not try to upstream the patch.

Curious: why is the RTOS running on an x86 core at all, and not on a
microcontroller dedicated exclusively to real-time tasks?  The
performance impact of isolating the RTOS from other tasks seems huge
compared to the cost of a tiny microcontroller that just runs the RTOS.

Have you considered upstreaming the patch?
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-07-11  1:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  0:06 [PATCH 0/2] Xen real-time x86 Stefano Stabellini
2025-07-08  0:07 ` [PATCH 1/2] xen/x86: don't send IPI to sync TSC when it is reliable Stefano Stabellini
2025-07-08  9:54   ` Alejandro Vallejo
2025-07-08 17:40     ` Stefano Stabellini
2025-07-08 17:53       ` Alejandro Vallejo
2025-07-08 13:24   ` Jan Beulich
2025-07-08 17:40     ` Stefano Stabellini
2025-07-09  7:04       ` Jan Beulich
2025-07-08  0:07 ` [PATCH 2/2] xen/x86: introduce AMD_MCE_NONFATAL Stefano Stabellini
2025-07-08  3:23   ` Demi Marie Obenour
2025-07-08 10:25   ` Alejandro Vallejo
2025-07-08 13:28     ` Jan Beulich
2025-07-08 17:13       ` Stefano Stabellini
2025-07-08 10:11 ` [PATCH 0/2] Xen real-time x86 Roger Pau Monné
2025-07-08 13:31   ` Jan Beulich
2025-07-08 17:11     ` Stefano Stabellini
2025-07-09  5:37       ` Jan Beulich
2025-07-10  0:44         ` Stefano Stabellini
2025-07-10  7:02           ` Roger Pau Monné
2025-07-10  8:02             ` Jan Beulich
2025-07-10 21:39               ` Stefano Stabellini
2025-07-11  1:23                 ` Demi Marie Obenour [this message]
2025-07-09 14:10       ` Roger Pau Monné

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=6309c055-459a-4662-9b26-e4056540ada9@gmail.com \
    --to=demiobenour@gmail.com \
    --cc=Jason.Andryuk@amd.com \
    --cc=Xenia.Ragiadakou@amd.com \
    --cc=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=stefano.stabellini@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.