qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Question about Linux user space emulation
@ 2004-06-24 10:47 Laurent DESNOGUES
  2004-06-24 14:03 ` [Qemu-devel] Finally found that savevm bug Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent DESNOGUES @ 2004-06-24 10:47 UTC (permalink / raw)
  To: qemu-devel

I have what may be a stupid question.

In syscall.c, for syscall TARGET_NR_sigprocmask, the code reads
as:

>   sigset_t set, oldset, *set_ptr;
>   target_ulong *pset = (void *)arg2, *poldset = (void *)arg3;
>   if (pset) {
>     ...
>     target_to_host_old_sigset(&set, pset);
>   }

and

>   void target_to_host_old_sigset(sigset_t *sigset,
>                                  const target_ulong *old_sigset)
>   {
>     target_sigset_t d;
>     int i;
>
>     d.sig[0] = *old_sigset;

This translates to:

> d.sig[0] = *arg2;

Where arg2 is coming from the target.

How can this work without translating the arg2 contents to host
address space?


Laurent



*******************************************************************************

This E-mail is from ESTEREL TECHNOLOGIES. The E-mail and any files
transmitted with it are confidential and intended solely for the use of the
individual or entity to whom they are addressed. Any unauthorised
dissemination, copy, use or disclosure of this E-mail or of any of its
attachments is strictly prohibited and may be illegal. If you have received
the E-mail in error please notify disclaimer@esterel-technologies.com and
delete it from your system.

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

* [Qemu-devel] Finally found that savevm bug
  2004-06-24 10:47 [Qemu-devel] Question about Linux user space emulation Laurent DESNOGUES
@ 2004-06-24 14:03 ` Johannes Schindelin
  2004-06-26 18:00   ` Jim C. Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2004-06-24 14:03 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 640 bytes --]

Hi Fabrice,

I finally found that bug preventing loadvm to work with knoppix. It was
the selector of the segments not being saved and restored.

This patch is very short, however, I already have another patch on my hd
to add savevm support for the keyboard, which I need in order to make
loadvm'ing a graphical desktop work.

I still have the preliminary touchpad (AKA absolute mouse coordinates)
support in this version, together with savevm support for it.

Now my questions: Should I make a separate patch for keyboard/mouse savevm
support without the touchpad support? What are the plans according to the
touchpad support?

Ciao,
Dscho

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1327 bytes --]

Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.84
diff -u -r1.84 vl.c
--- vl.c	21 Jun 2004 16:46:10 -0000	1.84
+++ vl.c	24 Jun 2004 13:55:46 -0000
@@ -1570,6 +1570,7 @@
 
 static void cpu_put_seg(QEMUFile *f, SegmentCache *dt)
 {
+    qemu_put_be32(f, dt->selector);
     qemu_put_be32(f, (uint32_t)dt->base);
     qemu_put_be32(f, dt->limit);
     qemu_put_be32(f, dt->flags);
@@ -1577,6 +1578,7 @@
 
 static void cpu_get_seg(QEMUFile *f, SegmentCache *dt)
 {
+    dt->selector = qemu_get_be32(f);
     dt->base = (uint8_t *)qemu_get_be32(f);
     dt->limit = qemu_get_be32(f);
     dt->flags = qemu_get_be32(f);
@@ -1650,7 +1652,7 @@
     uint32_t hflags;
     uint16_t fpus, fpuc, fptag;
 
-    if (version_id != 1)
+    if (version_id != 2)
         return -EINVAL;
     for(i = 0; i < 8; i++)
         qemu_get_be32s(f, &env->regs[i]);
@@ -2683,7 +2685,7 @@
     cpu_single_env = env;
 
     register_savevm("timer", 0, 1, timer_save, timer_load, env);
-    register_savevm("cpu", 0, 1, cpu_save, cpu_load, env);
+    register_savevm("cpu", 0, 2, cpu_save, cpu_load, env);
     register_savevm("ram", 0, 1, ram_save, ram_load, NULL);
     qemu_register_reset(main_cpu_reset, global_env);
 

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

* Re: [Qemu-devel] Finally found that savevm bug
  2004-06-24 14:03 ` [Qemu-devel] Finally found that savevm bug Johannes Schindelin
@ 2004-06-26 18:00   ` Jim C. Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Jim C. Brown @ 2004-06-26 18:00 UTC (permalink / raw)
  To: qemu-devel

On Thu, Jun 24, 2004 at 04:03:25PM +0200, Johannes Schindelin wrote:
> Hi Fabrice,
> I still have the preliminary touchpad (AKA absolute mouse coordinates)
> support in this version, together with savevm support for it.
> 
> Now my questions: Should I make a separate patch for keyboard/mouse savevm
> support without the touchpad support? What are the plans according to the
> touchpad support?

I don't know what Fabrice wants. I've been meaning to finish up the preliminary
version (so that it should work in theory) and test it out. There are a few things
I'd have to fully implement before I can do this. I haven't given myself a
deadline on this however.

After I get pass that step, I'll take a stab at adding support for certain
guestures (so you can have mouse scrolling etc).

> 
> Ciao,
> Dscho

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

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

end of thread, other threads:[~2004-06-26 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-24 10:47 [Qemu-devel] Question about Linux user space emulation Laurent DESNOGUES
2004-06-24 14:03 ` [Qemu-devel] Finally found that savevm bug Johannes Schindelin
2004-06-26 18:00   ` Jim C. Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).