|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 10/16] libs/guest: add xg_foreignmemory_copy_{from,to}
On Wed, 8 Jul 2026 at 14:32, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote: > > On Fri, Jun 19, 2026 at 02:04:55PM +0100, Frediano Ziglio wrote: > > This change prepare code to use a new "foreign copy" hypercall. > > The new hypercall will copy memory from/to a foreign domain. > > The new hypercall can be emulated with a sequence of: > > - map foreign memory; > > - copy memory; > > - unmap foreign memory. > > I don't understand the point of this patch. The hypercall doesn't exist > so there's nothing to emulate. I think that imitating something else is the definition of "emulate", we know what the hypercall should do so we emulate the wanted behavior. > I've notice there's a patch later in the series which introduce a new > hypercall, but the changes to the library should come after the > hypercall is been introduced, only then can we check if the emulation is > correct, or even needed. There are other changes after the hypercall. In this case the new hypercall is to replace something that is already there. The base idea is that the new hypercall is able to do 3 steps together. The reason to introduce the emulation first is that you can refactor on the emulation without having to introduce the new hypercall. Introducing the hypercall first would make testing more complicated as bugs on the hypercall have to be taken into account and considered. Also it is easier that way to enable or disable new code. For instance you want to test for performance regression (in this case the code emulated should not perform worse). In the beginning the PoC was much more hacky and it was more similar to the idea you have probably in mind. But a big part of the "hack" was removing code, in particular the entire support for PV and the verification code. Obviously that hacks could not be accepted so instead I decided to change the code in a more incremental way not removing things but instead changing to make it easier to use the future hypercall. So I was able to test all cases (like PV) incrementally and keep it working. You are however the second person (after Andrew) to ask this, so a big comment (probably in the commit message) is due. > > Cheers, > Frediano
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |