qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] Reduce abuse of rtas_st / rtas_ld


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 0/3] Reduce abuse of rtas_st / rtas_ld
Date: Mon, 18 Jan 2016 12:24:41 +1100
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Jan 18, 2016 at 10:51:51AM +1100, Alexey Kardashevskiy wrote:
> On 01/16/2016 12:14 PM, David Gibson wrote:
> >The rtas_ld() and rtas_st() helpers were designed for loading RTAS
> >arguments and storing RTAS returns which are in a simple, common array
> >format.
> >
> >However, a number of RTAS routines - and even non-RTAS routines - have
> >started using these for accessing other memory buffers, where the
> >normal qemu memory access routines would be more appropriate.
> >
> >This series removes some of these abuses of the RTAS accessors.
> 
> imho simple renaming rtas_st to stl_be_phys_real (and so on for other
> rtas_xx) would make more sense as rtas_st&co do not have to do anything with
> RTAS itself, it is all about realmode guest memory accessб RTAS just
> happened to be the first client of it.

Well, no.  They were designed, specifically, to be a concise way to
load RTAS arguments, and store RTAS returns.  Nothing more.

To match other ldl* routines they would need to change to not take the
'n' argument, which would make using them more awkward for the exact
use case they're intended for.

I did consider adding ldXX_real() routines for all the memory access
cases these have been abused for, but they're few enough that it seems
simpler just to open code them in terms of the base memory access
routines.
 
> btw in st_cc_buf(), what does "cc" stand for?

"configure connector" - it's a helper just for that routine.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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