Re: [Qemu-devel] Qemu bug track
Hi.. On Jan 11, 2008 12:28 AM, Lauro Ramos Venancio <[EMAIL PROTECTED]> wrote: > I've set up an experimental bug track for Qemu stable branch. If the > community wants it can be used for qemu head too. > > If the community agrees, I will do the configuration to send an email > to qemu mailing list when a bug is opened. > > Let me know if someone (especially the developers that have write > permission on cvs) wants permission on bug track administration. > > The bug track: > https://launchpad.net/qemu Just wanna say, I think it's really a good idea. Keep up the good work! regards, Mulyadi.
Re: [Qemu-devel] [PATCH] e1000 emulation code
On 11/01/2008, Dor Laor <[EMAIL PROTECTED]> wrote: > andrzej zaborowski wrote: > > Would it be possible to pick only the useful stuff from the header and > > put it into the same file, rather than maintaining a copy of a linux > > header (which is 3.5 bigger than the actual emulation in kLoC)? Qemu > > has avoided that until now. > > > > > I can but then how can you compile qemu for OS's which do not have > Linux/ or linux headers? I don't mean using the Linux header. I mean having all the necessary definitions in e1000.c or a different file but not with 3000 lines of unused definitions. Regards
[Qemu-devel] USB serial device
Hello, I would like to implement support for braille devices, and for this I'd need to first implement a USB serial device (FTDI chip). Has anybody worked on that already? Samuel
Re: [kvm-devel] [Qemu-devel] Re: [PATCH] e1000 emulation code
On Thu, Jan 10, 2008 at 03:36:19PM +, Paul Brook wrote: > > the next step would be to emulate LSI SCSI chips, eh? > > Qemu already does. Quite a different one from vmware, though :)
Re: [Qemu-devel] [PATCH] e1000 emulation code
andrzej zaborowski wrote: Hi, On 09/01/2008, Dor Laor <[EMAIL PROTECTED]> wrote: It which supports TCP/UDP and IP transmit checksum, as well as TSO. It has been tested with Linux (2.6.18|22|23|24)++ and Windows XP (using the driver supplied at the intel download site). Windows Vista recognizes it but there is no traffic. Checksum calculation is currently naïve and unoptimized (the host kernel does it better). But when working in conjuction to tso the performance is drastically better. Some figures: Linux rx 350Mbps, tx 150bps, Windows rx 700mbps, tx 100 mbps. That will be great to have in qemu. The e1000_hw.h is copied from Linux kernel. Would it be possible to pick only the useful stuff from the header and put it into the same file, rather than maintaining a copy of a linux header (which is 3.5 bigger than the actual emulation in kLoC)? Qemu has avoided that until now. I can but then how can you compile qemu for OS's which do not have Linux/ or linux headers? qemu/hw/e1000.c | 1000 +++ qemu/hw/e1000_hw.h | 3411 ++ Regards.
Re: [Qemu-devel] Re: [PATCH] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 10:59 -0800, consul a écrit : > "Avi Kivity" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Johannes Schindelin wrote: > >> Hi, > >> > >> On Thu, 10 Jan 2008, Laurent Vivier wrote: > >> > >> > >>> Perhaps the best solution is to put "file=" option at the end of > >>> aliases, '\0' is marking the end of filename (it is likely the idea of > >>> andrzej about special characters). > >>> > >> > >> Oh, why not just make it a requirement that file= comes last, always? > >> > >> > > > > That's hardly intuitive. I would prefer some sort of escaping for \, and > > \=. It will also break if/when -drive gains another filename argument > > (say, for keeping shapshot data in). > > > > -- > > error compiling committee.c: too many arguments to function > > > > > > > > > > Why not use double quotes around parameter values containing special > characters? It is currently what it is implemented. If you use double quote, you must an escape character to be able to have double-quote inside, for instance: file="my\"file". And backslash has some problems with windows... Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry signature.asc Description: Ceci est une partie de message numériquement signée
Re: [Qemu-devel] Qemu 0.9.1 stable branch
> So, Lauros, seems like all the commits since 0.9.1 (including the two new > ones, "Fix typo which broke MIPS32R2 64-bit FPU support" and "qemu > manpage: describe arguments of usbdevice option, by Aurelien Jarno") are > candidates for the stable branch... applied. Lauro
[Qemu-devel] Re: [PATCH] Fix double backslash problem in Windows
"Avi Kivity" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Johannes Schindelin wrote: >> Hi, >> >> On Thu, 10 Jan 2008, Laurent Vivier wrote: >> >> >>> Perhaps the best solution is to put "file=" option at the end of >>> aliases, '\0' is marking the end of filename (it is likely the idea of >>> andrzej about special characters). >>> >> >> Oh, why not just make it a requirement that file= comes last, always? >> >> > > That's hardly intuitive. I would prefer some sort of escaping for \, and > \=. It will also break if/when -drive gains another filename argument > (say, for keeping shapshot data in). > > -- > error compiling committee.c: too many arguments to function > > > > Why not use double quotes around parameter values containing special characters?
Re: [Qemu-devel] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 16:02 +0100, Laurent Vivier a écrit : > Le jeudi 10 janvier 2008 à 15:18 +0100, Jernej Simončič a écrit : > > On Thursday, January 10, 2008, 14:58:28, Laurent Vivier wrote: > > > > > Do you like '^' ? > > > > Bad idea - this is the escape character in Windows shell :) > > Perhaps this should work: > > - option name must end with '=' > - option value must end with ',' or '\0' (allows '=' in filename) > - if option name must have ',', we double it (allows ',' in filename) > - ' ', '\' and '"' are not separators at this level and are managed at > shell level Here is the patch. All comments are welcome. Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry --- qemu-doc.texi |3 ++- vl.c | 53 +++-- 2 files changed, 33 insertions(+), 23 deletions(-) Index: qemu/vl.c === --- qemu.orig/vl.c 2008-01-10 17:48:08.0 +0100 +++ qemu/vl.c 2008-01-10 19:06:40.0 +0100 @@ -4581,24 +4581,33 @@ static int net_socket_mcast_init(VLANSta } -static const char *get_word(char *buf, int buf_size, const char *p) +static const char *get_opt_name(char *buf, int buf_size, const char *p) +{ +char *q; + +q = buf; +while (*p != '\0' && *p != '=') { +if (q && (q - buf) < buf_size - 1) +*q++ = *p; +p++; +} +if (q) +*q = '\0'; + +return p; +} + +static const char *get_opt_value(char *buf, int buf_size, const char *p) { char *q; -int substring; -substring = 0; q = buf; while (*p != '\0') { -if (*p == '\\') { -p++; -if (*p == '\0') +if (*p == ',') { +if (*(p + 1) != ',') break; -} else if (*p == '\"') { -substring = !substring; p++; -continue; -} else if (!substring && (*p == ',' || *p == '=')) -break; +} if (q && (q - buf) < buf_size - 1) *q++ = *p; p++; @@ -4617,15 +4626,15 @@ static int get_param_value(char *buf, in p = str; for(;;) { -p = get_word(option, sizeof(option), p); +p = get_opt_name(option, sizeof(option), p); if (*p != '=') break; p++; if (!strcmp(tag, option)) { -(void)get_word(buf, buf_size, p); +(void)get_opt_value(buf, buf_size, p); return strlen(buf); } else { -p = get_word(NULL, 0, p); +p = get_opt_value(NULL, 0, p); } if (*p != ',') break; @@ -4642,7 +4651,7 @@ static int check_params(char *buf, int b p = str; for(;;) { -p = get_word(buf, buf_size, p); +p = get_opt_name(buf, buf_size, p); if (*p != '=') return -1; p++; @@ -4651,7 +4660,7 @@ static int check_params(char *buf, int b break; if (params[i] == NULL) return -1; -p = get_word(NULL, 0, p); +p = get_opt_value(NULL, 0, p); if (*p != ',') break; p++; @@ -4810,15 +4819,15 @@ void do_info_network(void) } } -#define HD_ALIAS "file=\"%s\",index=%d,media=disk" +#define HD_ALIAS "file=%s,index=%d,media=disk" #ifdef TARGET_PPC #define CDROM_ALIAS "index=1,media=cdrom" #else #define CDROM_ALIAS "index=2,media=cdrom" #endif #define FD_ALIAS "index=%d,if=floppy" -#define PFLASH_ALIAS "file=\"%s\",if=pflash" -#define MTD_ALIAS "file=\"%s\",if=mtd" +#define PFLASH_ALIAS "file=%s,if=pflash" +#define MTD_ALIAS "file=%s,if=mtd" #define SD_ALIAS "index=0,if=sd" static int drive_add(const char *fmt, ...) @@ -8246,7 +8255,7 @@ int main(int argc, char **argv) drive_add(MTD_ALIAS, optarg); break; case QEMU_OPTION_sd: -drive_add("file=\"%s\"," SD_ALIAS, optarg); +drive_add("file=%s," SD_ALIAS, optarg); break; case QEMU_OPTION_pflash: drive_add(PFLASH_ALIAS, optarg); @@ -8317,7 +8326,7 @@ int main(int argc, char **argv) kernel_cmdline = optarg; break; case QEMU_OPTION_cdrom: - drive_add("file=\"%s\"," CDROM_ALIAS, optarg); + drive_add("file=%s," CDROM_ALIAS, optarg); break; case QEMU_OPTION_boot: boot_devices = optarg; @@ -8352,7 +8361,7 @@ int main(int argc, char **argv) break; case QEMU_OPTION_fda: case QEMU_OPTION_fdb: - drive_add("file=\"%s\"," FD_ALIAS, optarg, + drive_add("file=%s," FD_ALIAS, optarg, popt->index - QEMU_OPTION_fda); break; #ifdef TARGET_I386 Index: qemu/qemu-doc.texi ==
[Qemu-devel] Qemu bug track
I've set up an experimental bug track for Qemu stable branch. If the community wants it can be used for qemu head too. If the community agrees, I will do the configuration to send an email to qemu mailing list when a bug is opened. Let me know if someone (especially the developers that have write permission on cvs) wants permission on bug track administration. The bug track: https://launchpad.net/qemu Lauro
Re: [Qemu-devel] Qemu 0.9.1 stable branch
Hi, On Thu, 10 Jan 2008, Thiemo Seufer wrote: > Johannes Schindelin wrote: > > > AFAICT 727da25d(Fix broken absoluteness check for cabs.d.*) is not > > necessary, as it is for the MIPS target, which is not supposed to work > > right now. But I'm sure if I'm wrong, Thiemo will correct me right > > away. > > Why do you believe it is "not supposed to work"? The Malta emulation > works just fine for me. I thought I remembered you saying something about MIPS binaries... Sorry. So, Lauros, seems like all the commits since 0.9.1 (including the two new ones, "Fix typo which broke MIPS32R2 64-bit FPU support" and "qemu manpage: describe arguments of usbdevice option, by Aurelien Jarno") are candidates for the stable branch... Ciao, Dscho
Re: [Qemu-devel] [PATCH] e1000 emulation code
Hi, On 09/01/2008, Dor Laor <[EMAIL PROTECTED]> wrote: > It which supports TCP/UDP and IP transmit checksum, as well as TSO. > It has been tested with Linux (2.6.18|22|23|24)++ and Windows XP (using > the driver supplied at the intel download site). > Windows Vista recognizes it but there is no traffic. > > Checksum calculation is currently naïve and unoptimized (the host > kernel does it better). But when working in conjuction to tso > the performance is drastically better. > > Some figures: Linux rx 350Mbps, tx 150bps, Windows rx 700mbps, tx 100 mbps. That will be great to have in qemu. > > The e1000_hw.h is copied from Linux kernel. Would it be possible to pick only the useful stuff from the header and put it into the same file, rather than maintaining a copy of a linux header (which is 3.5 bigger than the actual emulation in kLoC)? Qemu has avoided that until now. > qemu/hw/e1000.c | 1000 +++ > qemu/hw/e1000_hw.h | 3411 ++ Regards.
Re: [Qemu-devel] Qemu 0.9.1 stable branch
Johannes Schindelin wrote: > Hi, > > On Wed, 9 Jan 2008, Lauro Ramos Venancio wrote: > > > As discussed yesterday in the qemu irc channel, I've created a stable > > branch for qemu 0.9.1. This branch will follow two basic rules: > > > > 1. Only fixes will be applied. > > 2. Patches will be applied only after they are applied on qemu head. > > > > The repository is > > http://repo.or.cz/w/qemu/qemu_0_9_1_stable.git > > > > Any help (indicating patches that should be applied on this branch) is > > welcomed. > > Cool! > > My take on the patches which should be applied: > > 53f31fe3(Mac OS X build fix, by Andreas Faerber) > 3b9b2ee4(Fix section switching buglet, by Edgar E. Iglesias) > 9aef6b4c(Fix segfault caused by fall through, by Juergen Lock) > > AFAICT 727da25d(Fix broken absoluteness check for cabs.d.*) is not > necessary, as it is for the MIPS target, which is not supposed to work > right now. But I'm sure if I'm wrong, Thiemo will correct me right away. Why do you believe it is "not supposed to work"? The Malta emulation works just fine for me. Thiemo
Re: [Qemu-devel] Re: [kvm-devel] [PATCH] e1000 emulation code
> the next step would be to emulate LSI SCSI chips, eh? Qemu already does. Paul
Re: [Qemu-devel] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 15:18 +0100, Jernej Simončič a écrit : > On Thursday, January 10, 2008, 14:58:28, Laurent Vivier wrote: > > > Do you like '^' ? > > Bad idea - this is the escape character in Windows shell :) Perhaps this should work: - option name must end with '=' - option value must end with ',' or '\0' (allows '=' in filename) - if option name must have ',', we double it (allows ',' in filename) - ' ', '\' and '"' are not separators at this level and are managed at shell level Examples: qemu -drive file=my=file,if=scsi -> filename is "my=file" qemu -drive file=my,,if=ide,if=scsi -> filname is "my,if=ide" Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry signature.asc Description: Ceci est une partie de message numériquement signée
Re: [Qemu-devel] Fix double backslash problem in Windows
On Thursday, January 10, 2008, 14:58:28, Laurent Vivier wrote: > Do you like '^' ? Bad idea - this is the escape character in Windows shell :) -- < Jernej Simončič ><><><><>< http://deepthought.ena.si/ > The chief cause of problems is solutions. -- Sevareid's Law
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 15:30 +0200, Avi Kivity a écrit : > Johannes Schindelin wrote: > > Hi, > > > > On Thu, 10 Jan 2008, Laurent Vivier wrote: > > > > > >> Perhaps the best solution is to put "file=" option at the end of > >> aliases, '\0' is marking the end of filename (it is likely the idea of > >> andrzej about special characters). > >> > > > > Oh, why not just make it a requirement that file= comes last, always? > > > > > > That's hardly intuitive. I would prefer some sort of escaping for \, > and \=. It will also break if/when -drive gains another filename > argument (say, for keeping shapshot data in). I agree with our comments, but this not solves the original issue with windows (double backslash). - we can't use '\' because it force to double it for windows - we must be able to escape characters to be able to use ',' and '=' in filename (in fact ' ' is not an issue). perhaps the solution is to use a different escape character ? Do you like '^' ? qemu -hda "my file" -> filename is "my file" qemu -hda my^,file -> filename is "my,file" qemu -drive file=my^^file -> filename is "my^file" Johannes, I'm sorry, but it seems there is no other way than reparsing (lightly) the string. Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry signature.asc Description: Ceci est une partie de message numériquement signée
Re: [PATCH][Qemu-devel] Single stepping for PPC broken!
On Wed, 9 Jan 2008, Marius Groeger wrote: > On Wed, 9 Jan 2008, Marius Groeger wrote: > > > I'm having problems with qemu's (-M prep, -cpu 604) handling of the > > MSR_SE bit. My gdbstub can successfully step along regular code, but > > qemu chokes when stepping over a branch instruction like "blr". > > (Needless to say, that same gdbstub works fine on real hardware). I > > tried older versions of qemu and found that the code base 8 months ago > > worked fine. > > I have now verified with booting a Linux image into qemu-system-ppc - same > problem. When stepi'ing over the following sequence, the system chokes on a > "bl" instruction: The attached patch fixes the problem, but I have to admit I can't tell for sure if this doesn't break other things (such as qemu's built-in GDB server). Could some QEMU ppc expert please comment on this? Thanks Marius -- Marius Groeger <[EMAIL PROTECTED]> SYSGO AG Embedded and Real-Time Software Voice: +49 6136 9948 0 FAX: +49 6136 9948 10 www.sysgo.com | www.elinos.com | www.osek.de | www.pikeos.comIndex: target-ppc/translate.c === RCS file: /sources/qemu/qemu/target-ppc/translate.c,v retrieving revision 1.115 diff -u -r1.115 translate.c --- target-ppc/translate.c 24 Nov 2007 02:03:55 - 1.115 +++ target-ppc/translate.c 10 Jan 2008 13:54:36 - @@ -2811,8 +2811,6 @@ #endif gen_op_b_T1(); gen_op_set_T0((long)tb + n); -if (ctx->singlestep_enabled) -gen_op_debug(); gen_op_exit_tb(); } else { gen_set_T1(dest); @@ -2823,8 +2821,6 @@ #endif gen_op_b_T1(); gen_op_reset_T0(); -if (ctx->singlestep_enabled) -gen_op_debug(); gen_op_exit_tb(); } } @@ -3007,8 +3003,6 @@ gen_op_btest_T1(ctx->nip); gen_op_reset_T0(); no_test: -if (ctx->singlestep_enabled) -gen_op_debug(); gen_op_exit_tb(); } out:
[Qemu-devel] [PATCH] CRIS: optimize clear insns + other minor updates.
Small CRIS patch to: Optimize clear insns by treating support reg P0 specially. Add missing micro-op RETURN's. Minor cleanup. Best regards -- Edgar E. Iglesias Axis Communications AB diff --git a/target-cris/op.c b/target-cris/op.c index 6e17719..3c50574 100644 --- a/target-cris/op.c +++ b/target-cris/op.c @@ -205,6 +205,7 @@ void OPPROTO op_ccs_lshift (void) ccs = env->pregs[SR_CCS]; ccs = (ccs & 0xc000) | ((ccs << 12) >> 2); env->pregs[SR_CCS] = ccs; + RETURN(); } void OPPROTO op_ccs_rshift (void) { @@ -214,6 +215,7 @@ void OPPROTO op_ccs_rshift (void) ccs = env->pregs[SR_CCS]; ccs = (ccs & 0xc000) | (ccs >> 10); env->pregs[SR_CCS] = ccs; + RETURN(); } void OPPROTO op_setf (void) diff --git a/target-cris/translate.c b/target-cris/translate.c index 44ba804..a05d139 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -110,15 +110,6 @@ typedef struct DisasContext { unsigned int mode; unsigned int postinc; - - struct - { - int op; - int size; - unsigned int mask; - } cc_state[3]; - int cc_i; - int update_cc; int cc_op; int cc_size; @@ -183,6 +174,10 @@ static void gen_vr_read(void) { gen_op_movl_T0_im(32); } +static void gen_movl_T0_p0(void) { + gen_op_movl_T0_im(0); +} + static void gen_ccs_read(void) { gen_op_movl_T0_p13(); } @@ -209,7 +204,7 @@ static GenOpFunc *gen_movl_preg_T0[16] = }; static GenOpFunc *gen_movl_T0_preg[16] = { - gen_op_movl_T0_p0, + gen_movl_T0_p0, gen_vr_read, gen_op_movl_T0_p2, gen_op_movl_T0_p3, gen_op_movl_T0_p4, gen_op_movl_T0_p5, @@ -345,6 +340,8 @@ static void cris_cc_mask(DisasContext *dc, unsigned int mask) { uint32_t ovl; + /* Check if we need to evaluate the condition codes due to + CC overlaying. */ ovl = (dc->cc_mask ^ mask) & ~mask; if (ovl) { /* TODO: optimize this case. It trigs all the time. */ @@ -987,7 +984,6 @@ static unsigned int dec_btstq(DisasContext *dc) { dc->op1 = EXTRACT_FIELD(dc->ir, 0, 4); DIS(fprintf (logfile, "btstq %u, $r%d\n", dc->op1, dc->op2)); - cris_evaluate_flags(dc); cris_cc_mask(dc, CC_MASK_NZ); gen_movl_T0_reg[dc->op2](); gen_op_movl_T1_im(dc->op1); @@ -1333,7 +1329,6 @@ static unsigned int dec_btst_r(DisasContext *dc) { DIS(fprintf (logfile, "btst $r%u, $r%u\n", dc->op1, dc->op2)); - cris_evaluate_flags(dc); cris_cc_mask(dc, CC_MASK_NZ); dec_prep_alu_r(dc, dc->op1, dc->op2, 4, 0); crisv32_alu_op(dc, CC_OP_BTST, dc->op2, 4); @@ -1518,8 +1513,14 @@ static unsigned int dec_move_pr(DisasContext *dc) { DIS(fprintf (logfile, "move $p%u, $r%u\n", dc->op1, dc->op2)); cris_cc_mask(dc, 0); - gen_movl_T0_preg[dc->op2](); - gen_op_movl_T1_T0(); + /* Support register 0 is hardwired to zero. + Treat it specially. */ + if (dc->op2 == 0) + gen_op_movl_T1_im(0); + else { + gen_movl_T0_preg[dc->op2](); + gen_op_movl_T1_T0(); + } crisv32_alu_op(dc, CC_OP_MOVE, dc->op1, preg_sizes[dc->op2]); return 2; } @@ -1846,13 +1847,21 @@ static unsigned int dec_move_pm(DisasContext *dc) memsize = preg_sizes[dc->op2]; - DIS(fprintf (logfile, "move.%d $p%u, [$r%u%s\n", -memsize, dc->op2, dc->op1, dc->postinc ? "+]" : "]")); + DIS(fprintf (logfile, "move.%c $p%u, [$r%u%s\n", +memsize_char(memsize), +dc->op2, dc->op1, dc->postinc ? "+]" : "]")); cris_cc_mask(dc, 0); - /* prepare store. */ - gen_movl_T0_preg[dc->op2](); - gen_op_movl_T1_T0(); + /* prepare store. Address in T0, value in T1. */ + /* Support register 0 is hardwired to zero. + Treat it specially. */ + if (dc->op2 == 0) + gen_op_movl_T1_im(0); + else + { + gen_movl_T0_preg[dc->op2](); + gen_op_movl_T1_T0(); + } gen_movl_T0_reg[dc->op1](); gen_store_T0_T1(dc, memsize); if (dc->postinc)
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Johannes Schindelin wrote: Hi, On Thu, 10 Jan 2008, Laurent Vivier wrote: Perhaps the best solution is to put "file=" option at the end of aliases, '\0' is marking the end of filename (it is likely the idea of andrzej about special characters). Oh, why not just make it a requirement that file= comes last, always? That's hardly intuitive. I would prefer some sort of escaping for \, and \=. It will also break if/when -drive gains another filename argument (say, for keeping shapshot data in). -- error compiling committee.c: too many arguments to function
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 12:15 +, Johannes Schindelin a écrit : > Hi, > > On Thu, 10 Jan 2008, Laurent Vivier wrote: > > > Perhaps the best solution is to put "file=" option at the end of > > aliases, '\0' is marking the end of filename (it is likely the idea of > > andrzej about special characters). > > Oh, why not just make it a requirement that file= comes last, always? Yes, I think it is better, it allows to manage easier strange filenames... for instance: qemu -drive file=if=scsi (interface is "ide", filename is "if=scsi") OK, I make a patch with this idea, you'll comment. Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry signature.asc Description: Ceci est une partie de message numériquement signée
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Hi, On Thu, 10 Jan 2008, Laurent Vivier wrote: > Perhaps the best solution is to put "file=" option at the end of > aliases, '\0' is marking the end of filename (it is likely the idea of > andrzej about special characters). Oh, why not just make it a requirement that file= comes last, always? Ciao, Dscho
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Le jeudi 10 janvier 2008 à 11:53 +, Johannes Schindelin a écrit : > Hi, > > On Thu, 10 Jan 2008, Laurent Vivier wrote: > > > Le mercredi 09 janvier 2008 à 13:27 +, Johannes Schindelin a écrit : > > [...] > > > Besides, it would not be _that_ complicated: > > > > This patch doesn't manage the case where we have comma in filename: > > > > qemu -drive file=my,file,if=scsi > > > > where filename is "my,file". > > Right. But then, my patch only tried to undo the regression. > > As for the "my,file" problem: you _could_ change the parser so that it > picks up on "-drive if=scsi,file=my,file" having no "=" after the last > comma, but that does not help the case where a file name contains both a > comma and an equal sign. Perhaps the best solution is to put "file=" option at the end of aliases, '\0' is marking the end of filename (it is likely the idea of andrzej about special characters). For the case where user uses directly "-drive" perhaps we can just explain in the doc he must put "file=" at the of the parameter when he must use ' ', ',','"' or '=': qemu -drive if=scsi,bus=0,unit=6,file="my scsi disk.img" -hda "my ide0 disk.img" (in this case quotes are managed by the shell) It should ever work. Regards, Laurent -- - [EMAIL PROTECTED] -- "La perfection est atteinte non quand il ne reste rien à ajouter mais quand il ne reste rien à enlever." Saint Exupéry signature.asc Description: Ceci est une partie de message numériquement signée
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Hi, On Thu, 10 Jan 2008, Laurent Vivier wrote: > Le mercredi 09 janvier 2008 à 13:27 +, Johannes Schindelin a écrit : > [...] > > Besides, it would not be _that_ complicated: > > This patch doesn't manage the case where we have comma in filename: > > qemu -drive file=my,file,if=scsi > > where filename is "my,file". Right. But then, my patch only tried to undo the regression. As for the "my,file" problem: you _could_ change the parser so that it picks up on "-drive if=scsi,file=my,file" having no "=" after the last comma, but that does not help the case where a file name contains both a comma and an equal sign. Of course, the easiest way to tackle this problem is to say "you cannot use comma and equal signs in your image file names". Although it would be hard on the users to disallow spaces, since a relatively wide-spread OS decides to put your personal data into a path containing spaces _by default_. Ciao, Dscho
[Qemu-devel] Re: [kvm-devel] [PATCH] e1000 emulation code
On Wed, 2008-01-09 at 23:08 -0500, Javier Guerra Giraldez wrote: > On Wednesday 09 January 2008, Dor Laor wrote: > > Some figures: Linux rx 350Mbps, tx 150bps, Windows rx 700mbps, tx 100 mbps. > > very nice! > > in a related note, the VMWare tools package, which is supposed to 'enhance > performance' by installing 'specially tuned' drivers into a guest, doesn't > include net or HD drivers for linux! i was surprised, but it simply said Vmware has a nice trick to online change an emulated amd nic into a pv mode nic. > that using e1000 emulation on 64bit linux was optimised enough. since i saw > good performance (no hard benchmarks, but definitely not bad); i thought that > they do some paravirtualizification at runtime as part of their software > recompiling (because they're much older than HVM-capable processors). > > now it seems that there are higher-level hardware that can be emulated far > more efficiently than the original set of QEMU hardware. This is just a newer device with some coalescing abilities and tso, pv driver can always be better since they are not bound to any specification. btw: I wonder when qemu will get virtio drivers. > > the next step would be to emulate LSI SCSI chips, eh? >
Re: [Qemu-devel] [PATCH] Fix double backslash problem in Windows
Le mercredi 09 janvier 2008 à 13:27 +, Johannes Schindelin a écrit : [...] > Besides, it would not be _that_ complicated: This patch doesn't manage the case where we have comma in filename: qemu -drive file=my,file,if=scsi where filename is "my,file". Laurent > -- snipsnap -- > [PATCH] make special escaping for -hda parameters unnecessary > > Signed-off-by: Johannes Schindelin <[EMAIL PROTECTED]> > > --- > > vl.c | 64 > 1 files changed, 36 insertions(+), 28 deletions(-) > > diff --git a/vl.c b/vl.c > index 8e346fe..c9966d1 100644 > --- a/vl.c > +++ b/vl.c > @@ -231,7 +231,10 @@ unsigned int nb_prom_envs = 0; > const char *prom_envs[MAX_PROM_ENVS]; > #endif > int nb_drives_opt; > -char drives_opt[MAX_DRIVES][1024]; > +struct drive_opt { > + const char *file; > + char opt[1024]; > +} drives_opt[MAX_DRIVES]; > > static CPUState *cur_cpu; > static CPUState *next_cpu; > @@ -4859,18 +4862,18 @@ void do_info_network(void) > } > } > > -#define HD_ALIAS "file=\"%s\",index=%d,media=disk" > +#define HD_ALIAS "index=%d,media=disk" > #ifdef TARGET_PPC > #define CDROM_ALIAS "index=1,media=cdrom" > #else > #define CDROM_ALIAS "index=2,media=cdrom" > #endif > #define FD_ALIAS "index=%d,if=floppy" > -#define PFLASH_ALIAS "file=\"%s\",if=pflash" > -#define MTD_ALIAS "file=\"%s\",if=mtd" > +#define PFLASH_ALIAS "if=pflash" > +#define MTD_ALIAS "if=mtd" > #define SD_ALIAS "index=0,if=sd" > > -static int drive_add(const char *fmt, ...) > +static int drive_add(const char *file, const char *fmt, ...) > { > va_list ap; > > @@ -4879,8 +4882,9 @@ static int drive_add(const char *fmt, ...) > exit(1); > } > > +drives_opt[nb_drives_opt].file = file; > va_start(ap, fmt); > -vsnprintf(drives_opt[nb_drives_opt], sizeof(drives_opt[0]), fmt, ap); > +vsnprintf(drives_opt[nb_drives_opt].opt, sizeof(drives_opt[0]), fmt, ap); > va_end(ap); > > return nb_drives_opt++; > @@ -4915,12 +4919,13 @@ int drive_get_max_bus(BlockInterfaceType type) > return max_bus; > } > > -static int drive_init(const char *str, int snapshot, QEMUMachine *machine) > +static int drive_init(struct drive_opt *o, int snapshot, QEMUMachine > *machine) > { > char buf[128]; > char file[1024]; > char devname[128]; > const char *mediastr = ""; > +const char *str = o->opt; > BlockInterfaceType type; > enum { MEDIA_DISK, MEDIA_CDROM } media; > int bus_id, unit_id; > @@ -4940,7 +4945,11 @@ static int drive_init(const char *str, int snapshot, > QEMUMachine *machine) > return -1; > } > > -file[0] = 0; > +if (o->file) { > + strncpy(file, o->file, sizeof(file) - 1); > + file[sizeof(file) - 1] = 0; > +} else > +file[0] = 0; > cyls = heads = secs = 0; > bus_id = 0; > unit_id = -1; > @@ -8212,7 +8221,7 @@ int main(int argc, char **argv) > break; > r = argv[optind]; > if (r[0] != '-') { > - hda_index = drive_add(HD_ALIAS, argv[optind++], 0); > + hda_index = drive_add(argv[optind++], HD_ALIAS, 0); > } else { > const QEMUOption *popt; > > @@ -8273,11 +8282,11 @@ int main(int argc, char **argv) > break; > case QEMU_OPTION_hda: > if (cyls == 0) > -hda_index = drive_add(HD_ALIAS, optarg, 0); > +hda_index = drive_add(optarg, HD_ALIAS, 0); > else > -hda_index = drive_add(HD_ALIAS > +hda_index = drive_add(optarg, HD_ALIAS >",cyls=%d,heads=%d,secs=%d%s", > - optarg, 0, cyls, heads, secs, > + 0, cyls, heads, secs, > translation == BIOS_ATA_TRANSLATION_LBA ? > ",trans=lba" : > translation == BIOS_ATA_TRANSLATION_NONE ? > @@ -8286,19 +8295,19 @@ int main(int argc, char **argv) > case QEMU_OPTION_hdb: > case QEMU_OPTION_hdc: > case QEMU_OPTION_hdd: > - drive_add(HD_ALIAS, optarg, popt->index - QEMU_OPTION_hda); > + drive_add(optarg, HD_ALIAS, popt->index - QEMU_OPTION_hda); > break; > case QEMU_OPTION_drive: > -drive_add("%s", optarg); > +drive_add(optarg, ""); > break; > case QEMU_OPTION_mtdblock: > - drive_add(MTD_ALIAS, optarg); > + drive_add(optarg, MTD_ALIAS); > break; > case QEMU_OPTION_sd: > -drive_add("file=\"%s\"," SD_ALIAS, optarg); > +drive_add(optarg, SD_ALIAS); > break; > case QEMU_OPTION_pflash: > - drive_add(PFLASH_ALIAS, optarg); > + drive_add