[Qemu-devel] qemu hw/slavio_misc.c cpu-exec.c

2006-09-20 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard06/09/20 20:30:57

Modified files:
hw : slavio_misc.c 
.  : cpu-exec.c 

Log message:
sun4m halt support (Blue Swirl)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_misc.c?cvsroot=qemu&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemu&r1=1.84&r2=1.85


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] qemu qemu-doc.texi

2006-09-20 Thread Fabrice Bellard
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Fabrice Bellard06/09/20 20:28:05

Modified files:
.  : qemu-doc.texi 

Log message:
update

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu-doc.texi?cvsroot=qemu&r1=1.109&r2=1.110


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu-system-sparc uses all host cpu whiletargetsystem is idle

2006-09-20 Thread Blue Swirl

Please find below a patch that "works". It is probably wrong as I wrote it
by copying code from other architectures and trying until it works. Well
I am however convinced of two things:
 - "return EXCP_HALTED;" causes the crash. By removing this line qemu
   doesn't crash anymore, but the patch does not work as expected
   (freeze of the target).
 - The interrupt should be cleared, if not the target freeze.

Now the host CPU is not used at 100% when the Sparc target is idle. I am
using it for about one our with a Debian unstable, and I am writing this
mail from this emulated system.


Great work! I can also confirm that it works and CPU is halted correctly.

Please apply.

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/


slavio_halt.diff.bz2
Description: application/bzip
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: Re[2]: [Qemu-devel] Poor Qemu documentation for Windows host

2006-09-20 Thread Alexey Eremenko
> Next step, I can build an integrated Qemu setup package for Windows,> that has TAP-Win32 drivers in it. (that way I will follow the standard
> rule of Windows to depend *just* on the OS itself)> But I will only do this setup, if you agree to list it on Qemu homesite.  And again, it comes not to doing something, but to maintaining and supporting that. Because otherwise, in a year, only broken links will remind of good intentions, or in the best case, outdated binaries of unknown origin.
  So, however it may seem overcomplicated, more sustained way to get better Windows support is indeed to submit doc patches, cooperate with Win32 maintainer on improving his site/packaging, or start your own
Win32 port project and see if you can do better.  Anyway, I really hope that I'm wrong and your packaging contribution will be accepted without much hassle, to rejoice of all us, Windows users.
 OK, agreed. Where may I find the so-called "Win32 maintainer" to ask about integrating TAP-Win32 drivers and some additions into the package. Does he listens to this list?
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu-system-sparc uses all host cpu while targetsystem is idle

2006-09-20 Thread Aurelien Jarno
On Wed, Sep 20, 2006 at 05:48:48PM +0200, Blue Swirl wrote:
> >CPU suspend is not implemented for sparc guests.
> >Unlike most other targets, suspending the CPU is controlled by the system
> >chipset, not by an instruction on the CPU. See slavio_misc.c
> 
> Suspending is disabled, because it crashes qemu. It can be tested by 
> tweaking slavio_misc.c and renaming the device in OpenBIOS from 
> xxxpower-management to power-management. I can't see why it should crash, 
> the implementation is very straightforward. Or maybe halting the CPU should 
> be delayed until the TB is finished executing and halt only from main loop?
> 

Please find below a patch that "works". It is probably wrong as I wrote it
by copying code from other architectures and trying until it works. Well
I am however convinced of two things:
 - "return EXCP_HALTED;" causes the crash. By removing this line qemu
   doesn't crash anymore, but the patch does not work as expected
   (freeze of the target).
 - The interrupt should be cleared, if not the target freeze.

Now the host CPU is not used at 100% when the Sparc target is idle. I am
using it for about one our with a Debian unstable, and I am writing this
mail from this emulated system.

Ah yes, you aslo need to the trivial patch to openbios.

Bye,
Aurelien


Index: hw/slavio_misc.c
===
RCS file: /sources/qemu/qemu/hw/slavio_misc.c,v
retrieving revision 1.3
diff -u -r1.3 slavio_misc.c
--- hw/slavio_misc.c5 Dec 2005 20:31:52 -   1.3
+++ hw/slavio_misc.c20 Sep 2006 18:16:29 -
@@ -123,7 +123,7 @@
break;
 case 0xa00:
MISC_DPRINTF("Write power management %2.2x\n", val & 0xff);
-#if 0
+#if 1
 // XXX almost works
 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT);
 #endif
Index: cpu-exec.c
===
RCS file: /sources/qemu/qemu/cpu-exec.c,v
retrieving revision 1.84
diff -u -r1.84 cpu-exec.c
--- cpu-exec.c  29 Jul 2006 19:09:31 -  1.84
+++ cpu-exec.c  20 Sep 2006 18:16:30 -
@@ -548,8 +548,10 @@
//do_interrupt(0, 0, 0, 0, 0);
env->interrupt_request &= ~CPU_INTERRUPT_TIMER;
} else if (interrupt_request & CPU_INTERRUPT_HALT) {
-env1->halted = 1;
-return EXCP_HALTED;
+   env->interrupt_request &= ~CPU_INTERRUPT_HALT;
+   env->halted = 1;
+   env->exception_index = EXCP_HLT;
+   cpu_loop_exit();
 }
 #elif defined(TARGET_ARM)
 if (interrupt_request & CPU_INTERRUPT_FIQ



-- 
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: Re[2]: [Qemu-devel] Poor Qemu documentation for Windows host

2006-09-20 Thread Alexey Eremenko
Hi all again!OK, I have updated the docs, and made a patch.Please update the docs on site.

patch attached in this email. (don't know if it's filetered if you have problems with filters let me know.)
--- qemu-doc.html	2006-07-24 23:13:00.0 -0200
+++ qemu-doc-modi02.html	2006-09-20 21:16:52.0 -0200
@@ -11,10 +11,10 @@
 
 -->
 
-QEMU CPU Emulator User Documentation: 
+QEMU System Emulator User Documentation: 
 
-
-
+
+
 
 
 
@@ -46,7 +46,7 @@
 [Index]
 [ ? ]
 
-QEMU CPU Emulator User Documentation
+QEMU System Emulator User Documentation
 
 
 
@@ -1457,7 +1457,7 @@
 a virtual network device on your host (called tapN), and you
 can then configure it as if it was a real ethernet card.
 
-As an example, you can download the `linux-test-xxx.tar.gz'
+[Linux only] As an example, you can download the `linux-test-xxx.tar.gz'
 archive and copy the script `qemu-ifup' in `/etc' and
 configure properly sudo so that the command ifconfig
 contained in `qemu-ifup' can be executed as root. You must verify
@@ -1468,6 +1468,12 @@
 Linux distribution and Invocation to have examples of
 command lines using the TAP network interfaces.
 
+[Windows only] There is a virtual ethernet driver for Windows
+2000/XP systems, called TAP-Win32. But  it is not included in standard
+Qemu for Windows, so you will need to get it separately. It is part of
+OpenVPN package, so download OpenVPN from : http://openvpn.net/";>http://openvpn.net/ .
+
+
 
 
 
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu-system-sparc uses all host cpu while targetsystem is idle

2006-09-20 Thread Blue Swirl

CPU suspend is not implemented for sparc guests.
Unlike most other targets, suspending the CPU is controlled by the system
chipset, not by an instruction on the CPU. See slavio_misc.c


Suspending is disabled, because it crashes qemu. It can be tested by 
tweaking slavio_misc.c and renaming the device in OpenBIOS from 
xxxpower-management to power-management. I can't see why it should crash, 
the implementation is very straightforward. Or maybe halting the CPU should 
be delayed until the TB is finished executing and halt only from main loop?


_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu-system-sparc uses all host cpu while target system is idle

2006-09-20 Thread Paul Brook
On Wednesday 20 September 2006 10:32, Aurelien Jarno wrote:
> Hi all,
>
> I have successully installed a Debian Etch for Sparc under qemu (CVS
> version), and successfully updated it to unstable. Everything seems to
> work correctly, the performances are ok, but I have remarked than
> qemu-system-sparc is using all the CPU on the host system, while the
> sparc target system is idle. Maybe the problem is in the sparc kernel? I
> am using the one from unstable, ie a 2.6.17 kernel.

CPU suspend is not implemented for sparc guests.
Unlike most other targets, suspending the CPU is controlled by the system 
chipset, not by an instruction on the CPU. See slavio_misc.c

Paul


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu-system-sparc uses all host cpu while target system is idle

2006-09-20 Thread WaxDragon

I've seen this same behaviour with 2.4.x and 2.6.x kernels.

On 9/20/06, Aurelien Jarno <[EMAIL PROTECTED]> wrote:

Hi all,

I have successully installed a Debian Etch for Sparc under qemu (CVS
version), and successfully updated it to unstable. Everything seems to
work correctly, the performances are ok, but I have remarked than
qemu-system-sparc is using all the CPU on the host system, while the
sparc target system is idle. Maybe the problem is in the sparc kernel? I
am using the one from unstable, ie a 2.6.17 kernel.

Any idea?

Thanks,
Aurelien

--
   .''`.  Aurelien Jarno| GPG: 1024D/F1BCDB73
  : :' :  Debian developer   | Electrical Engineer
  `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
`-people.debian.org/~aurel32 | www.aurel32.net


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel




--
22:38 <@WaxDragon> false ^ true
22:39 < false> :(
22:39 < false> dont you think you can XOR me and get away with it! I
always return!


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] qemu-system-sparc uses all host cpu while target system is idle

2006-09-20 Thread Aurelien Jarno

Hi all,

I have successully installed a Debian Etch for Sparc under qemu (CVS 
version), and successfully updated it to unstable. Everything seems to 
work correctly, the performances are ok, but I have remarked than 
qemu-system-sparc is using all the CPU on the host system, while the 
sparc target system is idle. Maybe the problem is in the sparc kernel? I 
am using the one from unstable, ie a 2.6.17 kernel.


Any idea?

Thanks,
Aurelien

--
  .''`.  Aurelien Jarno | GPG: 1024D/F1BCDB73
 : :' :  Debian developer   | Electrical Engineer
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Access to QEMU's guest physical memory

2006-09-20 Thread G Portokalidis

Hi, I am actually instrumenting all memory writes in softmmu, so I
shouldn't miss the writes cleaning up pages.
What i have been thinking lately is that it might be the translation
of code that causes the alerts.
I am not very familiar with how that is working, but i was wondering
whether the code to be translated (guest code) is actually written to
guest memory before being translated? If the code is simply picked up
from the disk and translated, it would explain why this is the case.


On 13/09/06, maestro <[EMAIL PROTECTED]> wrote:

Am Mittwoch, den 13.09.2006, 12:05 +0200 schrieb G Portokalidis:
> Hello,
> I have been in the process of porting Argos to Qemu 0.8.2.
> In case you haven't heard of Argos, it's basically Qemu extended to
> track network data entering the emulator to identify their illegal use
> (exploits, etc).
>
> I am using the softmmu to track all accesses to physical memory to
> track which memory addresses are occupied by network data.
>
> I am trying to figure out all the possible ways guest physical memory
> is accessed at runtime. Besides the softmmu, i also identified that
> DMA also access physical memory using cpu_physical_memory_rw(), in
> exec.c.
>
> Do any virtual peripherals access guest physical memory without using
> the above call, or is memory altered by Qemu's dynamic translation (or
> other components)?
>
> I must be missing something, since i have noticed that when memory is
> cluttered with network data  (because of using IE for example),
> starting a new application reports that values used in jmp
> instructions (op_jmp_T0, in op.c) come from the network, while that is
> not the case.
>
> It seems that loading a new executable to guest memory is not tracked,
> and as a result a page previously used by IE is not "cleaned". Another
> thought is that maybe the translation writes data to guest physical
> memory, but from what i understand of Qemu translation seems to only
> touch host memory.
>
> If any of the developers could help, it would be appreciated.
> I have spent many hours going through Qemu's code without result.
>
> Thanks in advance, and I hope this is not immediately discarded as
> being too long. :-P
>
> Cheers,
> George
>
Hello George,

I've read the ARGOS paper - good paper! I'm not familiar with the argos
source code but I've encountered the situation that windows clears pages
with 8byte (64-bit) wide st operations consisting of all 0s. (even on
32bit win2k), and it gave me a lot of the same stuff you're describing
above when I thought that 32bit windows only does 32bit memwrites. (I
instrumented the ld/st macros in softmmu_{header,template}.h for that
purpose)

if you find anything else please let me know since I'm very interested
in that.

cheers
m.



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel




___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel