qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed to execute "SMC" call on Guest OS.


From: Peter Maydell
Subject: Re: Failed to execute "SMC" call on Guest OS.
Date: Thu, 23 Sep 2021 13:44:36 +0100

On Thu, 23 Sept 2021 at 13:22, Chenxu Wang <irakatz51@gmail.com> wrote:
> Since the Guest OS is unable to directly calls the Host OS, I
> design an undirected way, can you help me to check it?
>
> I ask KVM to catch the SMC calls, and modify KVM (really KVM?
> not QEMU?)'s exception handler. In the handler, I route the SMC
> call to the Host OS rather than "Undefined".

The principle is basically that you need KVM to handle and
do something with the SMC, yes. If you just make KVM do an
SMC instruction this is probably not actually going to work for
any non-trivial kind of function, though -- for instance
if the guest has passed what it thinks is a physical address
to the trusted application then it will really be a guest
physical address and the trusted application will then
corrupt host memory by treating it as a host physical address.

For local hacks you can of course do anything you like, but
my guess is that if you wanted any chance of getting this kind
of thing supported by an upstream kernel you should instead
look at a more generic higher-level way of providing the guest
with whatever functionality it wants. (For design discussion
of that kind of thing I would suggest the kvmarm maliing list,
which is where the kernel developers generally are:
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm )

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]