RE: [Qemu-devel] USB EHCI development nearing completion

2007-01-04 Thread Mark B

Paul,

I don't see anything to do with EHCI in Chromium.  I was just referring to
the 3D patch as an example - maybe this is causing confusion.

Did anyone else get a chance to look at the EHCI emulation patch?

Thanks,

Mark

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Brook
Sent: 27 December 2006 21:34
To: qemu-devel@nongnu.org
Cc: Mark B
Subject: Re: [Qemu-devel] USB EHCI development nearing completion

On Wednesday 27 December 2006 21:21, Mark B wrote:
> Thank you Fabrice and co.  LGPL or BSD should be fine - I don't have any
> preference on the license.
>
> I could not find the experimental 3D patch - it seems to have expired.
But
> I uploaded a diff patch anyway to 4shared at this location:
> http://www.4shared.com/file/7986451/d1222873/ehci.html
>
> This is an early proof of concept with a good bit of tidying up yet to be
> done.  It is not yet for public release either.  But of course comments
and
> other feedback are welcome.

Have you looked at Chromium (http://chromium.sourceforge.net/)

It looks like what they've already achieved what you're trying to implement.

It just needs a qemu specific transport implementation. It already has 
multiple transport backends to support TCP/IP and FiberChannel.

Paul


___
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


Re: [Qemu-devel] USB EHCI development nearing completion

2007-01-04 Thread Christian MICHON

I tested it on win32 host.
Apparently a typo mistake (see updated patch)

how to use it ?

diff -Nur ehci.patch ehci-xian.patch
--- ehci.patch  Thu Jan  4 09:50:17 2007
+++ ehci-xian.patch Thu Jan  4 10:40:26 2007
@@ -1722,7 +1722,7 @@
+printf ("buffer is %p (+%d)\n", s->buffer, (uint8_t*)s->buffer -
(uint8_t*)s);
+
+pci_conf = s->dev.config;
-+pci_conf[0x00] = 0x86
++pci_conf[0x00] = 0x86;
+pci_conf[0x01] = 0x80; // Intel VID
+pci_conf[0x02] = 0x55;
+pci_conf[0x03] = 0x55; // Made up product ID


On 1/4/07, Mark B <[EMAIL PROTECTED]> wrote:


Paul,

I don't see anything to do with EHCI in Chromium.  I was just referring to
the 3D patch as an example - maybe this is causing confusion.

Did anyone else get a chance to look at the EHCI emulation patch?

Thanks,

Mark



--
Christian


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


Re: [Qemu-devel] qemu Makefile configure

2007-01-04 Thread Thiemo Seufer
Thiemo Seufer wrote:
> Fabrice Bellard wrote:
> > IMHO, CFLAGS and LDFLAGS overriding should not be allowed for QEMU as it 
> > is almost sure to break the dyngen stuff. If ever it is allowed, it 
> > should be done so that the CFLAGS for the files used by dyngen are not 
> > modified.
> 
> That's why I made OP_CFLAGS a separate set of flags.
> 
> I append the next version of the patch, which incorporates the
> suggestions made by Daniel and Bernhard, and fixes a gcc3 detection
> bug I introduced earlier.

Next iteration, this uses BASE_CFLAGS and BASE_LDFLAGS instead of
gmake's override feature.


Thiemo


Index: Makefile
===
RCS file: /sources/qemu/qemu/Makefile,v
retrieving revision 1.107
diff -u -p -r1.107 Makefile
--- Makefile1 Jan 2007 21:31:01 -   1.107
+++ Makefile4 Jan 2007 11:47:40 -
@@ -5,19 +5,18 @@ include config-host.mak
 .PHONY: all clean distclean dvi info install install-doc tar tarbin \
speed test test2 html dvi info
 
-CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I.
-ifdef CONFIG_DARWIN
-CFLAGS+= -mdynamic-no-pic
-endif
+BASE_CFLAGS=
+BASE_LDFLAGS=
+
+BASE_CFLAGS += $(OS_CFLAGS)
 ifeq ($(ARCH),sparc)
-CFLAGS+=-mcpu=ultrasparc
+BASE_CFLAGS += -mcpu=ultrasparc
 endif
-LDFLAGS+=-g
+CPPFLAGS += -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 LIBS=
-DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 TOOLS=qemu-img$(EXESUF)
 ifdef CONFIG_STATIC
-LDFLAGS+=-static
+BASE_LDFLAGS += -static
 endif
 ifdef BUILD_DOCS
 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
@@ -41,10 +40,10 @@ subdir-%: dyngen$(EXESUF)
 recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
 
 qemu-img$(EXESUF): qemu-img.c block.c block-raw.c block-cow.c block-qcow.c 
aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c 
block-vvfat.c block-qcow2.c
-   $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
+   $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) 
$(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
 
 dyngen$(EXESUF): dyngen.c
-   $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
+   $(HOST_CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -o $@ $^
 
 clean:
 # avoid old build problems by removing potentially incorrect old files
Index: Makefile.target
===
RCS file: /sources/qemu/qemu/Makefile.target,v
retrieving revision 1.134
diff -u -p -r1.134 Makefile.target
--- Makefile.target 7 Dec 2006 18:15:35 -   1.134
+++ Makefile.target 4 Jan 2007 11:47:40 -
@@ -12,14 +12,14 @@ TARGET_BASE_ARCH:=sparc
 endif
 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
-DEFINES=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
+CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
 ifdef CONFIG_USER_ONLY
 VPATH+=:$(SRC_PATH)/linux-user
-DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
+CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
 endif
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+BASE_CFLAGS=
+BASE_LDFLAGS=
 #CFLAGS+=-Werror
-LDFLAGS=-g
 LIBS=
 HELPER_CFLAGS=$(CFLAGS)
 DYNGEN=../dyngen$(EXESUF)
@@ -62,18 +62,20 @@ endif
 endif # !CONFIG_USER_ONLY
 
 ifdef CONFIG_STATIC
-LDFLAGS+=-static
+BASE_LDFLAGS+=-static
 endif
 
+# We require -O2 to avoid the stack setup prologue in EXIT_TB
+OP_CFLAGS = -Wall -O2 -g -fno-strict-aliasing
+
 ifeq ($(ARCH),i386)
-HELPER_CFLAGS:=$(CFLAGS) -fomit-frame-pointer
-OP_CFLAGS:=$(CFLAGS) -mpreferred-stack-boundary=2 -fomit-frame-pointer
+HELPER_CFLAGS+=-fomit-frame-pointer
+OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
 ifeq ($(HAVE_GCC3_OPTIONS),yes)
 OP_CFLAGS+= -falign-functions=0 -fno-gcse
 else
 OP_CFLAGS+= -malign-functions=0
 endif
-
 ifdef TARGET_GPROF
 USE_I386_LD=y
 endif
@@ -81,76 +83,76 @@ ifdef CONFIG_STATIC
 USE_I386_LD=y
 endif
 ifdef USE_I386_LD
-LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld
+BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
 else
 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
 # that the kernel ELF loader considers as an executable. I think this
 # is the simplest way to make it self virtualizable!
-LDFLAGS+=-Wl,-shared
+BASE_LDFLAGS+=-Wl,-shared
 endif
 endif
 
 ifeq ($(ARCH),x86_64)
-OP_CFLAGS=$(CFLAGS) -falign-functions=0
-LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld
+BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
 endif
 
 ifeq ($(ARCH),ppc)
-CFLAGS+= -D__powerpc__
-OP_CFLAGS=$(CFLAGS)
-LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld
+CPPFLAGS+= -D__powerpc__
+BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
 endif
 
 ifeq ($(ARCH),s390)
-OP_CFLAGS=$(CFLAGS)
-LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld
+BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
 endif
 
 ifeq ($(ARCH),sparc)
 ifeq ($(CONFIG_SOLARIS),yes)
-CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3
-LDFLAGS+=-m32
-OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -fno-omit-frame-pointer

[Qemu-devel] [patch] add configure check for working alsa

2007-01-04 Thread Bernhard Fischer
Hi,

This patchlet adds a check to configure that makes sure that we have a
working alsa setup.

Previously, if --enable-alsa was given but the user forgot to install
the alsa libs proper, the build failed later on due to eventually
missing libs. The patch makes sure that the user can spot that alsa
support was turned off after configuration completed.

thanks,
diff --exclude='*.diff' -rduNp ../qemu_trunk.orig/configure ./configure
--- ../qemu_trunk.orig/configure	2007-01-04 14:38:58.0 +0100
+++ ./configure	2007-01-04 14:48:14.0 +0100
@@ -509,6 +509,17 @@ fi # sdl compile test
 fi # cross compilation
 fi # -z $sdl
 
+##
+# sound support libraries
+# alsa
+if test "$alsa" = "yes" ; then
+  cat > $TMPC << EOF
+#include 
+int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
+EOF
+  $cc -o $TMPE $TMPC -lasound 2> /dev/null || alsa="no"
+fi # alsa
+
 # Check if tools are available to build documentation.
 if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
   build_docs="yes"
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] [PATCH] Support fcntl F_GETLK64, F_SETLK64, F_SETLKW64

2007-01-04 Thread Kirill A. Shutemov
In the attachment patch to support three new fcntl. Tested on host x86_64,
target arm.


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


Re: [Qemu-devel] [PATCH] Support fcntl F_GETLK64, F_SETLK64, F_SETLKW64

2007-01-04 Thread Kirill A. Shutemov
On [Thu, 04.01.2007 17:12], Kirill A. Shutemov wrote:
> In the attachment patch to support three new fcntl. Tested on host x86_64,
> target arm.

Attached, sorry.
--- qemu-0.8.2.orig/linux-user/syscall.c2006-12-15 16:47:53 +0200
+++ qemu-0.8.2/linux-user/syscall.c 2006-12-15 19:18:10 +0200
@@ -1687,6 +1687,8 @@
 {
 struct flock fl;
 struct target_flock *target_fl;
+struct flock64 fl64;
+struct target_flock64 *target_fl64;
 long ret;
 
 switch(cmd) {
@@ -1716,10 +1718,27 @@
 break;
 
 case TARGET_F_GETLK64:
+ret = fcntl(fd, cmd >> 1, &fl64);
+if (ret == 0) {
+lock_user_struct(target_fl64, arg, 0);
+target_fl64->l_type = tswap16(fl64.l_type) >> 1;
+target_fl64->l_whence = tswap16(fl64.l_whence);
+target_fl64->l_start = tswapl(fl64.l_start);
+target_fl64->l_len = tswapl(fl64.l_len);
+target_fl64->l_pid = tswapl(fl64.l_pid);
+unlock_user_struct(target_fl64, arg, 1);
+}
+   break;
 case TARGET_F_SETLK64:
 case TARGET_F_SETLKW64:
-ret = -1;
-errno = EINVAL;
+lock_user_struct(target_fl64, arg, 1);
+fl64.l_type = tswap16(target_fl64->l_type) >> 1;
+fl64.l_whence = tswap16(target_fl64->l_whence);
+fl64.l_start = tswapl(target_fl64->l_start);
+fl64.l_len = tswapl(target_fl64->l_len);
+fl64.l_pid = tswap16(target_fl64->l_pid);
+unlock_user_struct(target_fl64, arg, 0);
+   ret = fcntl(fd, cmd >> 1, &fl64);
 break;
 
 case F_GETFL:


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


Re: [Qemu-devel] boot a preinstalled winxp on linux/x86: writing a patch...

2007-01-04 Thread Roberto Polli
Alle 07:48, sabato 30 dicembre 2006, Dirk Behme ha scritto:
> I think parts of this are already in Wiki:
> 
http://kidsquid.com/cgi-bin/moin.cgi/FrequentlyAskedQuestions#head-a1fc78523d7c7d256a29bac4577cd728be70eedd
interesting enough but still not working - yes, my win skill are not 
excellent.

> Do you think this is sufficent? If not, feel free to extend it.
 I'll let you know it something goes well!

Thank you again to everybody!
R.
-- 

Roberto Polli
Babel S.r.l. - http://www.babel.it
Tel. +39.06.91801075 - fax +39.06.91612446
P.zza S.Benedetto da Norcia, 33 - 00040 Pomezia (Roma)


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


[Qemu-devel] [patch] factor out commonly used scancode translation table

2007-01-04 Thread Bernhard Fischer
Hi,

The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
an x_keycode.c. This struct is also used by the GGI backend (that is not
yet merged ¹).

Comments?
Please apply.

¹)
http://members.aon.at/berny_f/qemu/qemu-HEAD.ggi-2.2.x-04c-20070104.diff
diff --exclude='*.diff' -rduNp ../qemu_trunk.orig/Makefile.target ./Makefile.target
--- ../qemu_trunk.orig/Makefile.target	2007-01-04 14:38:58.0 +0100
+++ ./Makefile.target	2007-01-04 14:50:10.0 +0100
@@ -444,7 +444,7 @@ $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
 cocoa.o: cocoa.m
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
 
-sdl.o: sdl.c keymaps.c sdl_keysym.h
+sdl.o: sdl.c keymaps.c sdl_keysym.h x_keymap.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $<
 
 vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h
diff --exclude='*.diff' -rduNp ../qemu_trunk.orig/sdl.c ./sdl.c
--- ../qemu_trunk.orig/sdl.c	2006-12-11 23:33:26.0 +0100
+++ ./sdl.c	2007-01-04 15:45:11.0 +0100
@@ -121,89 +121,7 @@ static uint8_t sdl_keyevent_to_keycode(c
 }
 
 #else
-
-static const uint8_t x_keycode_to_pc_keycode[115] = {
-   0xc7,  /*  97  Home   */
-   0xc8,  /*  98  Up */
-   0xc9,  /*  99  PgUp   */
-   0xcb,  /* 100  Left   */
-   0x4c,/* 101  KP-5   */
-   0xcd,  /* 102  Right  */
-   0xcf,  /* 103  End*/
-   0xd0,  /* 104  Down   */
-   0xd1,  /* 105  PgDn   */
-   0xd2,  /* 106  Ins*/
-   0xd3,  /* 107  Del*/
-   0x9c,  /* 108  Enter  */
-   0x9d,  /* 109  Ctrl-R */
-   0x0,   /* 110  Pause  */
-   0xb7,  /* 111  Print  */
-   0xb5,  /* 112  Divide */
-   0xb8,  /* 113  Alt-R  */
-   0xc6,  /* 114  Break  */   
-   0x0, /* 115 */
-   0x0, /* 116 */
-   0x0, /* 117 */
-   0x0, /* 118 */
-   0x0, /* 119 */
-   0x0, /* 120 */
-   0x0, /* 121 */
-   0x0, /* 122 */
-   0x0, /* 123 */
-   0x0, /* 124 */
-   0x0, /* 125 */
-   0x0, /* 126 */
-   0x0, /* 127 */
-   0x0, /* 128 */
-   0x79, /* 129 Henkan */
-   0x0, /* 130 */
-   0x7b, /* 131 Muhenkan */
-   0x0, /* 132 */
-   0x7d, /* 133 Yen */
-   0x0, /* 134 */
-   0x0, /* 135 */
-   0x47, /* 136 KP_7 */
-   0x48, /* 137 KP_8 */
-   0x49, /* 138 KP_9 */
-   0x4b, /* 139 KP_4 */
-   0x4c, /* 140 KP_5 */
-   0x4d, /* 141 KP_6 */
-   0x4f, /* 142 KP_1 */
-   0x50, /* 143 KP_2 */
-   0x51, /* 144 KP_3 */
-   0x52, /* 145 KP_0 */
-   0x53, /* 146 KP_. */
-   0x47, /* 147 KP_HOME */
-   0x48, /* 148 KP_UP */
-   0x49, /* 149 KP_PgUp */
-   0x4b, /* 150 KP_Left */
-   0x4c, /* 151 KP_ */
-   0x4d, /* 152 KP_Right */
-   0x4f, /* 153 KP_End */
-   0x50, /* 154 KP_Down */
-   0x51, /* 155 KP_PgDn */
-   0x52, /* 156 KP_Ins */
-   0x53, /* 157 KP_Del */
-   0x0, /* 158 */
-   0x0, /* 159 */
-   0x0, /* 160 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 170 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 180 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 190 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 200 */
-   0x0, /* 201 */
-   0x0, /* 202 */
-   0x0, /* 203 */
-   0x0, /* 204 */
-   0x0, /* 205 */
-   0x0, /* 206 */
-   0x0, /* 207 */
-   0x70, /* 208 Hiragana_Katakana */
-   0x0, /* 209 */
-   0x0, /* 210 */
-   0x73, /* 211 backslash */
-};
-
+#include "x_keycode.c"
 static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)
 {
 int keycode;
diff --exclude='*.diff' -rduNp ../qemu_trunk.orig/x_keymap.c ./x_keymap.c
--- ../qemu_trunk.orig/x_keymap.c	1970-01-01 01:00:00.0 +0100
+++ ./x_keymap.c	2007-01-04 15:42:49.0 +0100
@@ -0,0 +1,106 @@
+/*
+ * QEMU SDL display driver
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHAN

Re: [Qemu-devel] [patch] factor out commonly used scancode translation table

2007-01-04 Thread Jonathan Phenix

Bernhard Fischer wrote:

Hi,

The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
an x_keycode.c. This struct is also used by the GGI backend (that is not
yet merged ¹).

Comments?
  
How it is done right now, each time x_keycode.c is included, you will 
end up with an extra copy in the final executable. Perhaps that simply 
keeping the LUT in sdl.c but removing the 'static' keyword from it and 
creating a sdl.h file with the statement:


extern const uint8_t *x_keycode_to_pc_keycode;

would be a better idea. Including a header file is more clean than 
including a C file as well.

Please apply.

¹)
http://members.aon.at/berny_f/qemu/qemu-HEAD.ggi-2.2.x-04c-20070104.diff
___
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


Re: [Qemu-devel] [PATCH] qemu-dm monitor doesn't support the quit command.

2007-01-04 Thread Thiemo Seufer
Kasai Takanori wrote:
> Hi All,
> 
> It is natural that there is quit command in original QEMU. 
> However, I don't think that the HVM domain on Xen is necessary.
> Because there is a possibility of shutting down GuestOS due to the mistake. 
> I think that I should prohibit the quit command of qemu-dm. 

Better #ifdef out the quit command for HVM then, so people aren't
tempted to use it.

(Whatever HVM is, qemu doesn't know about it for now, so this patch is
currently not suitable for the qemu CVS.)


Thiemo


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


Re: [Qemu-devel] [patch] factor out commonly used scancode translation table

2007-01-04 Thread Bernhard Fischer
On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote:
>Bernhard Fischer wrote:
>>Hi,
>>
>>The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
>>an x_keycode.c. This struct is also used by the GGI backend (that is not
>>yet merged ¹).
>>
>>Comments?
>>  
>How it is done right now, each time x_keycode.c is included, you will 
>end up with an extra copy in the final executable. Perhaps that simply 
>keeping the LUT in sdl.c but removing the 'static' keyword from it and 
>creating a sdl.h file with the statement:

Yes, or create one public accessor func (_translate_keycode() or the
like). I don't have SDL installed, so only have the LUT once, but you're
of course right.

What's the preferred method? public LUT or public accessor?


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


Re: [Qemu-devel] [patch] factor out commonly used scancode translation table

2007-01-04 Thread Thiemo Seufer
Bernhard Fischer wrote:
> On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote:
> >Bernhard Fischer wrote:
> >>Hi,
> >>
> >>The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
> >>an x_keycode.c. This struct is also used by the GGI backend (that is not
> >>yet merged ¹).
> >>
> >>Comments?
> >>  
> >How it is done right now, each time x_keycode.c is included, you will 
> >end up with an extra copy in the final executable. Perhaps that simply 
> >keeping the LUT in sdl.c but removing the 'static' keyword from it and 
> >creating a sdl.h file with the statement:
> 
> Yes, or create one public accessor func (_translate_keycode() or the
> like). I don't have SDL installed, so only have the LUT once, but you're
> of course right.
> 
> What's the preferred method? public LUT or public accessor?

Public accessor, I'd say. Keystroke processing isn't performance critical.


Thiemo


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


Re: [Qemu-devel] [patch] factor out commonly used scancode translation table

2007-01-04 Thread Bernhard Fischer
On Thu, Jan 04, 2007 at 06:10:30PM +, Thiemo Seufer wrote:
>Bernhard Fischer wrote:
>> On Thu, Jan 04, 2007 at 12:52:56PM -0500, Jonathan Phenix wrote:
>> >Bernhard Fischer wrote:
>> >>Hi,
>> >>
>> >>The attached patch moves the x_keycode_to_pc_keycode LUT from sdl.c into
>> >>an x_keycode.c. This struct is also used by the GGI backend (that is not
>> >>yet merged ¹).
>> >>
>> >>Comments?
>> >>  
>> >How it is done right now, each time x_keycode.c is included, you will 
>> >end up with an extra copy in the final executable. Perhaps that simply 
>> >keeping the LUT in sdl.c but removing the 'static' keyword from it and 
>> >creating a sdl.h file with the statement:
>> 
>> Yes, or create one public accessor func (_translate_keycode() or the
>> like). I don't have SDL installed, so only have the LUT once, but you're
>> of course right.
>> 
>> What's the preferred method? public LUT or public accessor?
>
>Public accessor, I'd say. Keystroke processing isn't performance critical.

New patch with a public accessor is attached. Couldn't think of a better
name, please feel free to change it..

thanks,
--- ../qemu_trunk.orig/vl.h	2006-12-27 14:17:48.0 +0100
+++ vl.h	2007-01-04 19:27:07.0 +0100
@@ -869,6 +873,9 @@ void cocoa_display_init(DisplayState *ds
 /* vnc.c */
 void vnc_display_init(DisplayState *ds, const char *display);
 
+/* x_keymap.c */
+extern uint8_t _translate_keycode(const int key);
+
 /* ide.c */
 #define MAX_DISKS 4
 
--- ../qemu_trunk.orig/sdl.c	2006-12-11 23:33:26.0 +0100
+++ sdl.c	2007-01-04 19:28:30.0 +0100
@@ -122,88 +122,6 @@ static uint8_t sdl_keyevent_to_keycode(c
 
 #else
 
-static const uint8_t x_keycode_to_pc_keycode[115] = {
-   0xc7,  /*  97  Home   */
-   0xc8,  /*  98  Up */
-   0xc9,  /*  99  PgUp   */
-   0xcb,  /* 100  Left   */
-   0x4c,/* 101  KP-5   */
-   0xcd,  /* 102  Right  */
-   0xcf,  /* 103  End*/
-   0xd0,  /* 104  Down   */
-   0xd1,  /* 105  PgDn   */
-   0xd2,  /* 106  Ins*/
-   0xd3,  /* 107  Del*/
-   0x9c,  /* 108  Enter  */
-   0x9d,  /* 109  Ctrl-R */
-   0x0,   /* 110  Pause  */
-   0xb7,  /* 111  Print  */
-   0xb5,  /* 112  Divide */
-   0xb8,  /* 113  Alt-R  */
-   0xc6,  /* 114  Break  */   
-   0x0, /* 115 */
-   0x0, /* 116 */
-   0x0, /* 117 */
-   0x0, /* 118 */
-   0x0, /* 119 */
-   0x0, /* 120 */
-   0x0, /* 121 */
-   0x0, /* 122 */
-   0x0, /* 123 */
-   0x0, /* 124 */
-   0x0, /* 125 */
-   0x0, /* 126 */
-   0x0, /* 127 */
-   0x0, /* 128 */
-   0x79, /* 129 Henkan */
-   0x0, /* 130 */
-   0x7b, /* 131 Muhenkan */
-   0x0, /* 132 */
-   0x7d, /* 133 Yen */
-   0x0, /* 134 */
-   0x0, /* 135 */
-   0x47, /* 136 KP_7 */
-   0x48, /* 137 KP_8 */
-   0x49, /* 138 KP_9 */
-   0x4b, /* 139 KP_4 */
-   0x4c, /* 140 KP_5 */
-   0x4d, /* 141 KP_6 */
-   0x4f, /* 142 KP_1 */
-   0x50, /* 143 KP_2 */
-   0x51, /* 144 KP_3 */
-   0x52, /* 145 KP_0 */
-   0x53, /* 146 KP_. */
-   0x47, /* 147 KP_HOME */
-   0x48, /* 148 KP_UP */
-   0x49, /* 149 KP_PgUp */
-   0x4b, /* 150 KP_Left */
-   0x4c, /* 151 KP_ */
-   0x4d, /* 152 KP_Right */
-   0x4f, /* 153 KP_End */
-   0x50, /* 154 KP_Down */
-   0x51, /* 155 KP_PgDn */
-   0x52, /* 156 KP_Ins */
-   0x53, /* 157 KP_Del */
-   0x0, /* 158 */
-   0x0, /* 159 */
-   0x0, /* 160 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 170 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 180 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 190 */
-   0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 200 */
-   0x0, /* 201 */
-   0x0, /* 202 */
-   0x0, /* 203 */
-   0x0, /* 204 */
-   0x0, /* 205 */
-   0x0, /* 206 */
-   0x0, /* 207 */
-   0x70, /* 208 Hiragana_Katakana */
-   0x0, /* 209 */
-   0x0, /* 210 */
-   0x73, /* 211 backslash */
-};
-
 static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)
 {
 int keycode;
@@ -216,7 +134,7 @@ static uint8_t sdl_keyevent_to_keycode(c
 keycode -= 8; /* just an offset */
 } else if (keycode < 212) {
 /* use conversion table */
-keycode = x_keycode_to_pc_keycode[keycode - 97];
+keycode = _translate_keycode(keycode - 97);
 } else {
 keycode = 0;
 }
--- ../qemu_trunk.orig/x_keymap.c	1970-01-01 01:00:00.0 +0100
+++ x_keymap.c	2007-01-04 19:25:16.0 +0100
@@ -0,0 +1,110 @@
+/*
+ * QEMU SDL display driver
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * Permissi

Re: [Qemu-devel] [patch] add configure check for working alsa

2007-01-04 Thread Paul Brook
On Thursday 04 January 2007 15:02, Bernhard Fischer wrote:
> Hi,
>
> This patchlet adds a check to configure that makes sure that we have a
> working alsa setup.
>
> Previously, if --enable-alsa was given but the user forgot to install
> the alsa libs proper, the build failed later on due to eventually
> missing libs. The patch makes sure that the user can spot that alsa
> support was turned off after configuration completed.

This is wrong. If the user requests alsa we should honour that request, or 
fail trying. We should never quietly ignore an explicit user decision.

Making configure fail early with an error is acceptable (as it the current 
link failure). Ignoring --enable-alsa is not.

Paul


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


Re: [Qemu-devel] [patch] add configure check for working alsa

2007-01-04 Thread Bernhard Fischer
On Thu, Jan 04, 2007 at 07:21:40PM +, Paul Brook wrote:
>On Thursday 04 January 2007 15:02, Bernhard Fischer wrote:
>> Hi,
>>
>> This patchlet adds a check to configure that makes sure that we have a
>> working alsa setup.
>>
>> Previously, if --enable-alsa was given but the user forgot to install
>> the alsa libs proper, the build failed later on due to eventually
>> missing libs. The patch makes sure that the user can spot that alsa
>> support was turned off after configuration completed.
>
>This is wrong. If the user requests alsa we should honour that request, or 
>fail trying. We should never quietly ignore an explicit user decision.
>
>Making configure fail early with an error is acceptable (as it the current 
>link failure). Ignoring --enable-alsa is not.

Fair enough. Updated variant prints an error if the compile-check
failed.
--- ../qemu_trunk.orig/configure	2007-01-04 14:38:58.0 +0100
+++ configure	2007-01-04 20:46:22.0 +0100
@@ -509,6 +536,25 @@ fi # sdl compile test
 fi # cross compilation
 fi # -z $sdl
 
+##
+# sound support libraries
+# alsa
+if test "$alsa" = "yes" ; then
+  cat > $TMPC << EOF
+#include 
+int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
+EOF
+  if $cc -o $TMPE $TMPC -lasound 2> /dev/null ; then
+:
+  else
+echo
+echo "Error: Could not find alsa"
+echo "Make sure to have the alsa libs and headers installed."
+echo
+exit 1
+  fi
+fi # alsa
+
 # Check if tools are available to build documentation.
 if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
   build_docs="yes"
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


RE: [Qemu-devel] USB EHCI development nearing completion

2007-01-04 Thread Mark B
Apologies for the missed semi-colon - I edited the vendor id after the fact.

Looks like I chopped the call to init as well.  You'll need this:

--- qemu-0.8.2/hw/pc.c  2006-07-22 17:23:34.0 +0100
+++ qemu-dev/hw/pc.c2007-12-04 20:17:16.0 +
@@ -842,6 +842,8 @@
 usb_uhci_init(pci_bus, piix3_devfn + 2);
 }
 
+usb_ehci_init(pci_bus, piix3_devfn + 4);
+ 
 if (pci_enabled && acpi_enabled) {
 piix4_pm_init(pci_bus, piix3_devfn + 3);
 }

After that it should just be a question of adding devices with -usbdevice or
whatever.  Since ehci is initialized after uhci, its ports are top of the
free list and get allocated first.  Ehci *should* hand-off low or full speed
devices to a companion controller but that's TBD for now.

Mark



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian MICHON
Sent: 04 January 2007 09:53
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] USB EHCI development nearing completion

I tested it on win32 host.
Apparently a typo mistake (see updated patch)

how to use it ?

diff -Nur ehci.patch ehci-xian.patch
--- ehci.patch  Thu Jan  4 09:50:17 2007
+++ ehci-xian.patch Thu Jan  4 10:40:26 2007
@@ -1722,7 +1722,7 @@
 +printf ("buffer is %p (+%d)\n", s->buffer, (uint8_t*)s->buffer -
(uint8_t*)s);
 +
 +pci_conf = s->dev.config;
-+pci_conf[0x00] = 0x86
++pci_conf[0x00] = 0x86;
 +pci_conf[0x01] = 0x80; // Intel VID
 +pci_conf[0x02] = 0x55;
 +pci_conf[0x03] = 0x55; // Made up product ID


On 1/4/07, Mark B <[EMAIL PROTECTED]> wrote:
>
> Paul,
>
> I don't see anything to do with EHCI in Chromium.  I was just referring to
> the 3D patch as an example - maybe this is causing confusion.
>
> Did anyone else get a chance to look at the EHCI emulation patch?
>
> Thanks,
>
> Mark
>

--
Christian


___
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


Re: [Qemu-devel] [PATCH] Support fcntl F_GETLK64, F_SETLK64, F_SETLKW64

2007-01-04 Thread Kirill A. Shutemov
On [Thu, 04.01.2007 17:44], Kirill A. Shutemov wrote:
> On [Thu, 04.01.2007 17:12], Kirill A. Shutemov wrote:
> > In the attachment patch to support three new fcntl. Tested on host x86_64,
> > target arm.
> 
> Attached, sorry.

Any comments?


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


[Qemu-devel] Booting Solaris 9 install CD under qemu-system-sparc

2007-01-04 Thread Paul Sheer

Hi. i need to perform software builds on solaris-sparc and i'm trying
to avoid buying a real sparc for this. So qemu would be really helpful.

Be happy to buy something cool for whoever get's this working!

When booting the solaris 9 install CD -

qemu-0.8.2# uname -a
Linux sheerp-laptop 2.6.18 #2 PREEMPT Sat Nov 11 15:35:16 SAST 2006 i686
GNU/Linux
qemu-0.8.2# qemu-system-sparc -hda qemu-Solaris-sparc.img -m 128 -boot d
-cdrom /opt/sol-9-905hw-install-ga-sparc.iso  -nographic


- i get the following:


Nvram id QEMU_BIOS, version 1
CPUs: 1
nvram error detected, zapping pram
Welcome to OpenBIOS v1.0RC1 built on Jun 8 2006 15:14
  Type 'help' for detailed information

[sparc] Booting file 'cdrom' without parameters.
Not a bootable ELF image
Not a Linux kernel image
Not a bootable a.out image
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
device auxio size -1

hangs here with 100% CPU


thanks for any help with this

-paul






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


Re: [Qemu-devel] Booting Solaris 9 install CD under qemu-system-sparc

2007-01-04 Thread Martin Bochnig
Paul Sheer wrote:

>Hi. i need to perform software builds on solaris-sparc and i'm trying
>to avoid buying a real sparc for this. So qemu would be really helpful.
>
>Be happy to buy something cool for whoever get's this working!
>
>When booting the solaris 9 install CD -
>
>qemu-0.8.2# uname -a
>Linux sheerp-laptop 2.6.18 #2 PREEMPT Sat Nov 11 15:35:16 SAST 2006 i686
>GNU/Linux
>qemu-0.8.2# qemu-system-sparc -hda qemu-Solaris-sparc.img -m 128 -boot d
>-cdrom /opt/sol-9-905hw-install-ga-sparc.iso  -nographic
>
>
>- i get the following:
>
>
>Nvram id QEMU_BIOS, version 1
>CPUs: 1
>nvram error detected, zapping pram
>Welcome to OpenBIOS v1.0RC1 built on Jun 8 2006 15:14
>  Type 'help' for detailed information
>
>[sparc] Booting file 'cdrom' without parameters.
>Not a bootable ELF image
>Not a Linux kernel image
>Not a bootable a.out image
>Not a bootable ELF image
>Not a Linux kernel image
>Loading a.out image...
>Loaded 7680 bytes
>entry point is 0x4000
>Jumping to entry point...
>device auxio size -1
>
>hangs here with 100% CPU
>
>
>thanks for any help with this
>
>-paul
>  
>

Booting Solaris_sparc inside qemu??
--->>  Unfortunately not (speaking of SunOS4.x/Solaris1.x and Solaris2.x 32 bit
kernel): Good news is, that it successfully starts booting (a physical
CD, a CD.iso or physical hdd) now.
That is, it can read the vtoc now and starts executing bootblk.
This quantum leap improvement is due to the fact, that qemu-system-sparc
has moved to using openbios last summer.

Bad news: openbios is a pretty good and standards conform implementation
of ieee1275-94 OpenFirmware.
But unfortunately is SUNW's proprietary OBP implementation not so
standards conform, but instead implements certain behaviour differently
(through explicit ifdefs in its sources).
So openbios sets up the qemu-system-sparc machine in a state that is not
expected by the Solaris_32bit guest. And it then dies before any output
would have been sent to the console (i.e. SunOS 5.8 32 bit ...).
Though it actually is quite a lot what it already does do now.
Blue Swirl is working on that front.

There is an opensource version of SUNW's OBP of implementation available
for download on opensparc.org for 3 months now. Licensed under either
BSD or GPL.
It is a version optimized for use with sun4v (not sun4u).
Maybe this can accellerate things.
You should ask Blue Swirl for everything that has to do with
sparc-emulation, please. My field is the HOST sparc support.

If you need it cheap and slow, just get a U5/U10 starting at $10 (final auction 
price) from ebay.
Or a Blade 100 - sometimes someone offers many at once in a multi_auction.
Chances are then, you snipe one for below $30,-


-Martin
p.s. Why not just completely switching to Solaris sparc ?!   :-)
A Blade1000/2000 (via ebay.yourCountry) offers _the_ best price/performance 
ratio of all sparc workstation models.



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


[Qemu-devel] qemu Makefile Makefile.target configure

2007-01-04 Thread Thiemo Seufer
CVSROOT:/sources/qemu
Module name:qemu
Changes by: Thiemo Seufer  07/01/05 01:00:47

Modified files:
.  : Makefile Makefile.target configure 

Log message:
Untangle the various CFLAGS/LDFLAGS flavours. Allow overriding the
optional flags at make time.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile?cvsroot=qemu&r1=1.107&r2=1.108
http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile.target?cvsroot=qemu&r1=1.134&r2=1.135
http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemu&r1=1.115&r2=1.116


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


Re: [Qemu-devel] qemu Makefile configure

2007-01-04 Thread Thiemo Seufer
Thiemo Seufer wrote:
> Thiemo Seufer wrote:
> > Fabrice Bellard wrote:
> > > IMHO, CFLAGS and LDFLAGS overriding should not be allowed for QEMU as it 
> > > is almost sure to break the dyngen stuff. If ever it is allowed, it 
> > > should be done so that the CFLAGS for the files used by dyngen are not 
> > > modified.
> > 
> > That's why I made OP_CFLAGS a separate set of flags.
> > 
> > I append the next version of the patch, which incorporates the
> > suggestions made by Daniel and Bernhard, and fixes a gcc3 detection
> > bug I introduced earlier.
> 
> Next iteration, this uses BASE_CFLAGS and BASE_LDFLAGS instead of
> gmake's override feature.

Comitted, since it held up well for several people.


Thiemo


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


Re: [Qemu-devel] Booting Solaris 9 install CD under qemu-system-sparc

2007-01-04 Thread Paul Sheer

> Booting Solaris_sparc inside qemu??
> --->>  Unfortunately not (speaking of SunOS4.x/Solaris1.x and Solaris2.x 32 
> bit
> kernel): Good news is, that it successfully starts booting (a physical
> CD, a CD.iso or physical hdd) now.
> That is, it can read the vtoc now and starts executing bootblk.
> This quantum leap improvement is due to the fact, that qemu-system-sparc
> has moved to using openbios last summer.
> 
> Bad news: openbios is a pretty good and standards conform implementation
> of ieee1275-94 OpenFirmware.
> But unfortunately is SUNW's proprietary OBP implementation not so
> standards conform, but instead implements certain behaviour differently
> (through explicit ifdefs in its sources).
> So openbios sets up the qemu-system-sparc machine in a state that is not
> expected by the Solaris_32bit guest. And it then dies before any output
> would have been sent to the console (i.e. SunOS 5.8 32 bit ...).
> Though it actually is quite a lot what it already does do now.
> Blue Swirl is working on that front.
> 
> There is an opensource version of SUNW's OBP of implementation available
> for download on opensparc.org for 3 months now. Licensed under either
> BSD or GPL.
> It is a version optimized for use with sun4v (not sun4u).
> Maybe this can accellerate things.
> You should ask Blue Swirl for everything that has to do with
> sparc-emulation, please. My field is the HOST sparc support.
> 
> If you need it cheap and slow, just get a U5/U10 starting at $10 (final 
> auction price) from ebay.
> Or a Blade 100 - sometimes someone offers many at once in a multi_auction.
> Chances are then, you snipe one for below $30,-
> 

actually there is a company ccny.com that builds these
things to spec - they quoted me US$175 for a Sun 5

shipping to cape town, south africa is gonna be pricy - probably
double that!!

but money's not the issue - i don't want to have to deal
with the thing when it breaks :-)

qemu can already boot all the x86 unix platforms imaginable

win98/nt/xp,linux-x86,XXXbsd,solaris-x86

plus all the linux platforms:

linux-*

right?

if it can boot solaris-sparc, i am well on my way to
building for every unix out there! - without having to
get any hardware!!

at the moment i have hp-ux machines available to me. so outstanding
is:

1. solaris-sparc
2. AIX-RS6000

should i offer a reward to get these working? :-)

what is Blue Swirl's email?

Thanks very much for all the info btw

-paul







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