qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] Fix up pxe boot


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] Fix up pxe boot
Date: Tue, 09 Sep 2008 17:17:32 +0300
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Glauber Costa wrote:
On Sun, Sep 07, 2008 at 09:42:07AM +0300, Avi Kivity wrote:
Glauber Costa wrote:
After a second look, here's what it seems to me:

It's not in a generic place, such as ldl, because in general, we may want to 
grab
a 32-bit value from a 64-bit address. This is perfectly valid.

It's a specifity that the pop instruction, when not in long mode (manual says 
that in 64-bit mode
no 32-bit operand is valid, but then again, qemu should use the POPQ macro), 
that ssp:sp may overflow,
but we don't want it.

It would be possible to do something more generic if we had a 
segment_to_linear() function, that returned
the linear address, but we don't.

Does it make more sense to you?
Yes.

I guess tcg code is mostly safe since it generates 32-bit additions for segment bases, so this is limited to the places you identified. And a helper to add segment bases would be helpful.

--
error compiling committee.c: too many arguments to function


what do you think of the attached version?

Looks fine to me. One can thing of a cleverer helper (that receives the segment number and adds its base to the offset), but there's not reason to do this all at one.

--
error compiling committee.c: too many arguments to function





reply via email to

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