All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] target-i386: x87 exception pointers using TCG.
@ 2014-08-06 20:46 Jaume Martí
  2014-08-06 21:38 ` Eric Blake
  0 siblings, 1 reply; 2+ messages in thread
From: Jaume Martí @ 2014-08-06 20:46 UTC (permalink / raw)
  To: qemu-devel, riku.voipio, mtosatti, pbonzini, afaerber, mst, gleb,
	alex.bennee, anthony, quintela, vrozenfe, Peter Maydell,
	Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

Hello,

I submit a patch to fix bugs 661696 and 1248376.
I already submitted a previous version of this patch, this version requires
less TCG operations to execute.
As mentioned in a previous email, the patch implements, for TCG, the
specifications provided in Intel and AMD programmer's manuals regarding the
x87 exception pointers. That is, when executing instructions
fstenv/fnstenv, fsave and fxsave the values for the instruction pointer,
data pointer and opcode of the last non-control x87 instruction executed,
are correctly saved to the specified memory address. When executing
instructions fldenv, frstor and fxrstor the values that are going to be
considered the instruction pointer, data pointer and opcode of the last
non-control x87 instruction are obtained from the specified memory address.

I divided this patch in 8 parts, this first part involves changes in the
CPUX86State struct to store the exception pointers.

Best regards,
Jaume

Signed-off-by: Jaume Marti Farriol (jaume.martif@gmail.com)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index e634d83..4274ce3 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -819,10 +819,11 @@ typedef struct CPUX86State {
     uint16_t fpuc;
     uint8_t fptags[8];   /* 0 = valid, 1 = empty */
     FPReg fpregs[8];
-    /* KVM-only so far */
-    uint16_t fpop;
+    uint32_t fpop;
     uint64_t fpip;
     uint64_t fpdp;
+    uint32_t fpcs;
+    uint32_t fpds;

     /* emulator internal variables */
     float_status fp_status;
@@ -1067,8 +1068,8 @@ floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper);
 /* the following helpers are only usable in user mode simulation as
    they can trigger unexpected exceptions */
 void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector);
-void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, int data32);
-void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32);
+void cpu_x86_fsave(CPUX86State *s, target_ulong ptr);
+void cpu_x86_frstor(CPUX86State *s, target_ulong ptr);

 /* you can call this signal handler from your SIGBUS and SIGSEGV
    signal handlers to inform the virtual CPU of exceptions. non zero

[-- Attachment #2: Type: text/html, Size: 2444 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH 0/7] target-i386: x87 exception pointers using TCG.
  2014-08-06 20:46 [Qemu-devel] [PATCH 0/7] target-i386: x87 exception pointers using TCG Jaume Martí
@ 2014-08-06 21:38 ` Eric Blake
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2014-08-06 21:38 UTC (permalink / raw)
  To: Jaume Martí,
	qemu-devel, riku.voipio, mtosatti, pbonzini, afaerber, mst, gleb,
	alex.bennee, anthony, quintela, vrozenfe, Peter Maydell,
	Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 2143 bytes --]

On 08/06/2014 02:46 PM, Jaume Martí wrote:
> Hello,
> 
> I submit a patch to fix bugs 661696 and 1248376.
> I already submitted a previous version of this patch, this version requires
> less TCG operations to execute.

If this is a second version of the patch, then you should have v2 in the
subject line ('git send-email -v2' is your friend).

> As mentioned in a previous email, the patch implements, for TCG, the
> specifications provided in Intel and AMD programmer's manuals regarding the
> x87 exception pointers. That is, when executing instructions
> fstenv/fnstenv, fsave and fxsave the values for the instruction pointer,
> data pointer and opcode of the last non-control x87 instruction executed,
> are correctly saved to the specified memory address. When executing
> instructions fldenv, frstor and fxrstor the values that are going to be
> considered the instruction pointer, data pointer and opcode of the last
> non-control x87 instruction are obtained from the specified memory address.
> 
> I divided this patch in 8 parts, this first part involves changes in the
> CPUX86State struct to store the exception pointers.

Huh? This mail is titled 0/7, so I only expect 7 parts.  Oh...

> 
> Best regards,
> Jaume
> 
> Signed-off-by: Jaume Marti Farriol (jaume.martif@gmail.com)
> diff --git a/target-i386/cpu.h b/target-i386/cpu.h
> index e634d83..4274ce3 100644
> --- a/target-i386/cpu.h
> +++ b/target-i386/cpu.h

...reviewers don't expect to see patch contents in the cover letter.  If
you truly have eight parts, then they should be numbered 1/8 through
8/8, and this cover letter 0/8 should contain only a diffstat summary of
those 8 patches.

Furthermore, your threading appears to be wrong - your remaining patches
each start their own thread instead of being in reply to this cover
letter.  Please make sure you set In-Reply-To headers correctly when
sending a series.

http://wiki.qemu.org/Contribute/SubmitAPatch has more hints on how to
send a patch series.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-06 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 20:46 [Qemu-devel] [PATCH 0/7] target-i386: x87 exception pointers using TCG Jaume Martí
2014-08-06 21:38 ` Eric Blake

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.