qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
@ 2007-07-08 12:21 Robert Millan
  2007-07-08 16:35 ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Millan @ 2007-07-08 12:21 UTC (permalink / raw)
  To: qemu-devel

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


Hi,

Shouldn't /usr/bin/qemu be an alias for qemu-system-$(ARCH), where $(ARCH) is
the native architecture?  Defaulting to i386 doesn't make much sense nowadays,
specially since x86_64 is gradually obsoleting it.

See attached patch.

-- 
Robert Millan

My spam trap is honeypot@aybabtu.com.  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

[-- Attachment #2: system.diff --]
[-- Type: text/x-diff, Size: 786 bytes --]

--- qemu-0.8.2.old/Makefile.target	2006-07-22 19:23:34.000000000 +0200
+++ qemu-0.8.2/Makefile.target	2007-07-08 14:05:33.000000000 +0200
@@ -43,11 +43,7 @@
 QEMU_USER=qemu-$(TARGET_ARCH2)
 # system emulator name
 ifdef CONFIG_SOFTMMU
-ifeq ($(TARGET_ARCH), i386)
-QEMU_SYSTEM=qemu$(EXESUF)
-else
 QEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF)
-endif
 else
 QEMU_SYSTEM=qemu-fast
 endif
@@ -531,6 +527,13 @@
 install: all 
 ifneq ($(PROGS),)
 	$(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
+ifeq ($(ARCH), $(TARGET_ARCH2))
+ifdef _WIN32
+	mv "$(DESTDIR)$(bindir)/qemu-system-$(TARGET_ARCH2)$(EXESUF)" "$(DESTDIR)$(bindir)/qemu$(EXESUF)"
+else
+	ln -s qemu-system-$(TARGET_ARCH2)$(EXESUF) "$(DESTDIR)$(bindir)/qemu$(EXESUF)"
+endif
+endif
 endif
 
 ifneq ($(wildcard .depend),)

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

* Re: [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
  2007-07-08 12:21 [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch Robert Millan
@ 2007-07-08 16:35 ` Daniel P. Berrange
  2007-07-08 17:04   ` Ricardo Almeida
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2007-07-08 16:35 UTC (permalink / raw)
  To: qemu-devel

On Sun, Jul 08, 2007 at 02:21:02PM +0200, Robert Millan wrote:
> 
> Hi,
> 
> Shouldn't /usr/bin/qemu be an alias for qemu-system-$(ARCH), where $(ARCH) is
> the native architecture?  Defaulting to i386 doesn't make much sense nowadays,
> specially since x86_64 is gradually obsoleting it.

Management tools for QEMU will have come to rely on existing semantics of
/usr/bin/qemu being i386. Changing this for merely cosmetic reasons would 
cause significant technical complications because tools would then have to
try and detect whether /usr/bin/qemu were native or i386. Thus I see no 
real functional/technical benefit to changing it, and plenty of downside.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

* Re: [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
  2007-07-08 16:35 ` Daniel P. Berrange
@ 2007-07-08 17:04   ` Ricardo Almeida
  2007-07-08 20:16     ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Almeida @ 2007-07-08 17:04 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel

On 7/8/07, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Sun, Jul 08, 2007 at 02:21:02PM +0200, Robert Millan wrote:
> > Shouldn't /usr/bin/qemu be an alias for qemu-system-$(ARCH), where $(ARCH) is
> > the native architecture?  Defaulting to i386 doesn't make much sense nowadays,
> > specially since x86_64 is gradually obsoleting it.
>
> Management tools for QEMU will have come to rely on existing semantics of
> /usr/bin/qemu being i386.

Why?! If they rely on 386 I think they should directly use
qemu-system-i386... If they manage in an architecture independent way
then use the qemu link...

> Changing this for merely cosmetic reasons would

Not cosmetic, logic...

> cause significant technical complications because tools would then have to
> try and detect whether /usr/bin/qemu were native or i386.

See my previous why?! ;)

> Thus I see no
> real functional/technical benefit to changing it, and plenty of downside.

If it's more logic, you have a functional benefit. And for the
downside, I don't see them except for non-logic assumptions ;)

Regards,
Ricardo Almeida

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

* Re: [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
  2007-07-08 17:04   ` Ricardo Almeida
@ 2007-07-08 20:16     ` Daniel P. Berrange
  2007-07-11 18:54       ` andrzej zaborowski
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2007-07-08 20:16 UTC (permalink / raw)
  To: Ricardo Almeida; +Cc: qemu-devel

On Sun, Jul 08, 2007 at 06:04:51PM +0100, Ricardo Almeida wrote:
> On 7/8/07, Daniel P. Berrange <berrange@redhat.com> wrote:
> >On Sun, Jul 08, 2007 at 02:21:02PM +0200, Robert Millan wrote:
> >> Shouldn't /usr/bin/qemu be an alias for qemu-system-$(ARCH), where 
> >$(ARCH) is
> >> the native architecture?  Defaulting to i386 doesn't make much sense 
> >nowadays,
> >> specially since x86_64 is gradually obsoleting it.
> >
> >Management tools for QEMU will have come to rely on existing semantics of
> >/usr/bin/qemu being i386.
> 
> Why?! If they rely on 386 I think they should directly use
> qemu-system-i386... If they manage in an architecture independent way
> then use the qemu link...

Rely on a binary which doesn't currently exist ? A fresh checkout & build 
of qemu cvs  does not produce any qemu-system-i386 binary. So that's not 
really a viable answer to my point, which is that by renaming the binary
there will be added complexity in any tools using qemu, for zero functional
improvement.

> >Changing this for merely cosmetic reasons would
> 
> Not cosmetic, logic...

There was logic with existing naming scheme too, merely different logic
than what is proposed. A rename is merely changing logic for cosmetic
reasons.

> >cause significant technical complications because tools would then have to
> >try and detect whether /usr/bin/qemu were native or i386.
> 
> See my previous why?! ;)

Because there is no qemu-system-i386 binary

> >Thus I see no
> >real functional/technical benefit to changing it, and plenty of downside.
> 
> If it's more logic, you have a functional benefit. And for the
> downside, I don't see them except for non-logic assumptions ;)

If there was no historical precedent with all previous QEMU releases naming
it qemu then it'd not be an issue. Since there is historical precedent, 
changing it will create unneccessary complexity for any tool which wishes to
manage QEMU instances. Changing the logic behind binary name alone is *not* 
a functional benefit, it is merely cosmetic.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

* Re: [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
  2007-07-08 20:16     ` Daniel P. Berrange
@ 2007-07-11 18:54       ` andrzej zaborowski
  0 siblings, 0 replies; 6+ messages in thread
From: andrzej zaborowski @ 2007-07-11 18:54 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel

On 08/07/07, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Sun, Jul 08, 2007 at 06:04:51PM +0100, Ricardo Almeida wrote:
> > On 7/8/07, Daniel P. Berrange <berrange@redhat.com> wrote:
> > >On Sun, Jul 08, 2007 at 02:21:02PM +0200, Robert Millan wrote:
> > >> Shouldn't /usr/bin/qemu be an alias for qemu-system-$(ARCH), where
> > >$(ARCH) is
> > >> the native architecture?  Defaulting to i386 doesn't make much sense
> > >nowadays,
> > >> specially since x86_64 is gradually obsoleting it.
> > >
> > >Management tools for QEMU will have come to rely on existing semantics of
> > >/usr/bin/qemu being i386.
> >
> > Why?! If they rely on 386 I think they should directly use
> > qemu-system-i386... If they manage in an architecture independent way
> > then use the qemu link...
>
> Rely on a binary which doesn't currently exist ? A fresh checkout & build
> of qemu cvs  does not produce any qemu-system-i386 binary. So that's not

Maybe it's a good idea to make qemu-system-i386 a symlink to qemu or
the other way, for now, and after some time do what Ricardo proposed,
which is more logical. After all qemu has already broken commandline
backwards compatibility many times and probably will do more times.

And here's one of my usual strange but fun ideas: make "qemu" a
wrapper that reads a number of first bytes of the
harddisk/cdrom/kernel image or whatever media was given, and applies a
heuristic to decide what architecture the instructions would be best
interpreted as. The "file" program likely already contains a sample of
such heuristic.

(A similar idea with reusing "file" code was for vvfat to detect what
OS is on a given partition and fake an MBR respective to the OS).

Cheers,
Andrzej

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

* Re: [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch
@ 2007-08-01 19:53 Robert Millan
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Millan @ 2007-08-01 19:53 UTC (permalink / raw)
  To: berrange; +Cc: qemu-devel

> Management tools for QEMU will have come to rely on existing semantics
> of /usr/bin/qemu being i386.

How about just deprecating it?  For example, we could make
/usr/bin/qemu  be a script with:

#!/bin/bash
echo "warning: $0 is deprecated, use qemu-system-i386 instead"
exec qemu-system-i386 $@

> Changing this for merely cosmetic reasons [...]

It's not just cosmetic.  I recall you sent me some benchmarks (too bad
they didn't make it to the list, and I somehow lost that mail), but
they were done on i386 (which remains unaffected).  On x86_64, results
are different (specially if you have setup kqemu which only works with
qemu-system-x86_64).

-- 
Robert Millan

My spam trap is honeypot@aybabtu.com.  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

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

end of thread, other threads:[~2007-08-01 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-08 12:21 [Qemu-devel] [PATCH] make /usr/bin/qemu the native arch Robert Millan
2007-07-08 16:35 ` Daniel P. Berrange
2007-07-08 17:04   ` Ricardo Almeida
2007-07-08 20:16     ` Daniel P. Berrange
2007-07-11 18:54       ` andrzej zaborowski
  -- strict thread matches above, loose matches on Subject: below --
2007-08-01 19:53 Robert Millan

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).