Markus Armbruster | 1 Aug 2009 01:44
Picon
Favicon

Re: [PATCH 1/2] qdev: factor out qdev_print_devinfo.

Gerd Hoffmann <kraxel <at> redhat.com> writes:

> Signed-off-by: Gerd Hoffmann <kraxel <at> redhat.com>
> ---
>  hw/qdev.c |   19 ++++++++++++++++++-
>  1 files changed, 18 insertions(+), 1 deletions(-)
>
> diff --git a/hw/qdev.c b/hw/qdev.c
> index 479eb72..6f05232 100644
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
>  <at>  <at>  -105,6 +105,21  <at>  <at>  DeviceState *qdev_create(BusState *bus, const char *name)
>      return dev;
>  }
>  
> +static int qdev_print_devinfo(DeviceInfo *info, char *dest, int len)
> +{
> +    int pos = 0;
> +
> +    pos += snprintf(dest+pos, len-pos, "name \"%s\", bus %s",
> +                    info->name, info->bus_info->name);
> +    if (info->alias)
> +        pos += snprintf(dest+pos, len-pos, ", alias \"%s\"", info->alias);
> +    if (info->desc)
> +        pos += snprintf(dest+pos, len-pos, ", desc \"%s\"", info->desc);
> +    if (info->no_user)
> +        pos += snprintf(dest+pos, len-pos, ", no-user");
> +    return pos;
> +}
> +
(Continue reading)

Ed Swierk | 1 Aug 2009 03:10
Favicon

[PATCH] slirp: Remove our_addr code

Three problems with our_addr:

- It's determined only once when qemu starts, but the address can change
(just like the DNS configuration can).

- It's supposed to be the IP address of a host network interface, but
there's no guarantee that gethostbyname(gethostname()) actually does
that: the host might be a laptop that has only a loopback interface up,
or the hostname might be localhost.localdomain, etc.

- It's useless: get_dns_addr() calls it, but can't imagine why you would
want to send DNS requests to a different IP address if you're running a
DNS server on the host and resolv.conf points to 127.0.0.1.

These problems are easily solved by removing the code.

Signed-off-by: Ed Swierk <eswierk <at> aristanetworks.com>

---
diff --git a/slirp/main.h b/slirp/main.h
index e87b068..8d09df9 100644
--- a/slirp/main.h
+++ b/slirp/main.h
 <at>  <at>  -30,7 +30,6  <at>  <at>  extern char *slirp_tty;
 extern char *exec_shell;
 extern u_int curtime;
 extern fd_set *global_readfds, *global_writefds, *global_xfds;
-extern struct in_addr our_addr;
 extern struct in_addr loopback_addr;
 extern char *username;
(Continue reading)

Ed Swierk | 1 Aug 2009 03:10
Favicon

[PATCH] slirp: Read host DNS config on demand

Currently the qemu user-mode networking stack reads the host DNS
configuration (/etc/resolv.conf or the Windows equivalent) only once
when qemu starts.  This causes name lookups in the guest to fail if the
host is moved to a different network from which the original DNS servers
are unreachable, a common occurrence when the host is a laptop.

This patch changes the slirp code to read the host DNS configuration on
demand, caching the results for 10 seconds to avoid unnecessary overhead
if name lookups occur in rapid succession.

Signed-off-by: Ed Swierk <eswierk <at> aristanetworks.com>
Acked-by: Jan Kiszka <jan.kiszka <at> siemens.com>

---
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index 95a4b39..751a8e2 100644
--- a/slirp/ip_icmp.c
+++ b/slirp/ip_icmp.c
 <at>  <at>  -127,7 +127,8  <at>  <at>  icmp_input(struct mbuf *m, int hlen)
           slirp->vnetwork_addr.s_addr) {
 	/* It's an alias */
 	if (so->so_faddr.s_addr == slirp->vnameserver_addr.s_addr) {
-	  addr.sin_addr = dns_addr;
+	  if (get_dns_addr(&addr.sin_addr) < 0)
+	    addr.sin_addr = loopback_addr;
 	} else {
 	  addr.sin_addr = loopback_addr;
 	}
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index 93087ed..67c70e3 100644
(Continue reading)

Jeremy Kerr | 1 Aug 2009 08:15
Favicon

Re: tracking qemu-devel at patchwork.ozlabs.org

Michael,

> will do

Got it, thanks. Looks like your list has List-Id headers that look like:

List-Id: qemu-devel.nongnu.org

Where patchwork expects:

list-id-header = "List-ID:" [phrase] "<" list-id ">" CRLF

I've updated the parser to handle this form of headers, based on an 
patch that J.H. had sent me earlier. The changeset:

http://git.ozlabs.org/?p=patchwork;a=commitdiff;h=7d9334e879857f8a380bc9509b6cbf9972cecc25

You should have patches appearing now, let me know how this goes.

Cheers,

Jeremy
george | 1 Aug 2009 06:03
Picon
Picon

DETECTING AND USING USB MEMORY STICKS IN QEMU

PLEASE COULD YOU KINDLY GIVE ME ADVICE ON HOW TO DETECT A USB MEMORY STICK IN QEMU RUNNING LINUX SO THAT THE
LINUX APPLICATION CAN "SEE" AND WRITE TO THE MEMORY STICK

Pantelis Koukousoulas | 1 Aug 2009 10:23
Picon
Gravatar

Re: DETECTING AND USING USB MEMORY STICKS IN QEMU

On Sat, Aug 1, 2009 at 7:03 AM, <george <at> gkopec.freeserve.co.uk> wrote:
> PLEASE COULD YOU KINDLY GIVE ME ADVICE ON HOW TO DETECT A USB MEMORY STICK IN QEMU RUNNING LINUX SO THAT THE
LINUX APPLICATION CAN "SEE" AND WRITE TO THE MEMORY STICK

Please don't write in capitals.

Once you plug your stick to the host computer, you can figure out its
VID:PID by running 'lsusb'.
suppose you find VID=dead and PID=beef

Then you can start qemu with

-usbdevice host:auto:*:*:dead:beef

and qemu will auto-detect the device and assign it to itself.

Cheers,
Pantelis

Alexander Graf | 1 Aug 2009 11:48
Picon

[PATCH] Fix checksum writing in signboot.sh

The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.

This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8.

Spotted and first patch by Glauber Costa <glommer <at> redhat.com>.
Printf idea by Paolo Bonzini <bonzini <at> gnu.org>.

Signed-off-by: Alexander Graf <agraf <at> suse.de>
CC: Glauber Costa <glommer <at> redhat.com>
CC: Paolo Bonzini <bonzini <at> gnu.org>
CC: Jan Ondrej <ondrejj <at> salstar.sk>
---
 pc-bios/optionrom/signrom.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pc-bios/optionrom/signrom.sh b/pc-bios/optionrom/signrom.sh
index 4322811..975b27d 100755
--- a/pc-bios/optionrom/signrom.sh
+++ b/pc-bios/optionrom/signrom.sh
 <at>  <at>  -39,7 +39,8  <at>  <at>  done

 sum=$(( $sum % 256 ))
 sum=$(( 256 - $sum ))
+sum_octal=$( printf "%o" $sum )

 # and write the output file
 cp "$1" "$2"
-printf "\\$sum" | dd of="$2" bs=1 count=1 seek=$size conv=notrunc 2>/dev/null
(Continue reading)

Filip Navara | 1 Aug 2009 13:41
Picon

Win64 host port

Hi,

for anyone interested I have pushed my Win64 host port of QEMU to
git://repo.or.cz/qemu/navara.git. I'm eventually planning to clean it
up and submit it as patches, but I have already way too long patch
queue now. Only i386 and ARM targets were tested and it is as stable
as the Win32 port.

Best regards,
Filip Navara

Picon
Favicon

Re: Qemu in windows... (daniel silva ferreira bruno)

Hi, people.
I know the solution of my problem.
I need the file linux_boot.bin of qemu 0.10.6 because only linux is not running in my qemu for windows, I tested win98se and it was ok.
And, I tried to compile the qemu 0.11.0-rc1 with mingw in windows xp,  but there was an error related with the file multiboot.bin (located at folder pc-bios)!!!
It is enough now.
Bye, people; See you soon.


Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Sebastian Herbszt | 1 Aug 2009 17:54
Picon
Picon

Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile

Juan Quintela wrote:
> 
> Signed-off-by: Juan Quintela <quintela <at> redhat.com>
> ---
> Makefile |   21 +++++----------------
> 1 files changed, 5 insertions(+), 16 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 47e5825..a53b630 100644
> --- a/Makefile
> +++ b/Makefile
>  <at>  <at>  -62,21 +62,13  <at>  <at>  recurse-all: $(SUBDIR_RULES)
> 
> block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
> block-obj-y += nbd.o block.o aio.o aes.o
> +block-obj-$(CONFIG_AIO) += posix-aio-compat.o
> 
> block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
> block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
> block-nested-y += parallels.o nbd.o
> -
> -
> -ifdef CONFIG_WIN32
> -block-nested-y += raw-win32.o
> -else
> -ifdef CONFIG_AIO
> -block-obj-y += posix-aio-compat.o
> -endif
> -block-nested-y += raw-posix.o
> -endif
> -
> +block-nested-$(CONFIG_WIN32) += raw-win32.o
> +block-nested-$(CONFIG_POSIX) += raw-posix.o
> block-nested-$(CONFIG_CURL) += curl.o
> 
> block-obj-y +=  $(addprefix block/, $(block-nested-y))
>  <at>  <at>  -112,11 +104,8  <at>  <at>  ifdef CONFIG_BRLAPI
> LIBS+=-lbrlapi
> endif
> 
> -ifdef CONFIG_WIN32
> -obj-y += tap-win32.o
> -else
> -obj-y += migration-exec.o
> -endif
> +obj-$(CONFIG_WIN32) += tap-win32.o
> +obj-$(CONFIG_POSIX) += migration-exec.o
> 
> ifdef CONFIG_COREAUDIO
> AUDIO_PT = y
> -- 
> 1.6.2.5

I think this patch or a related one breaks MinGW/Win32:

  CC    posix-aio-compat.o
posix-aio-compat.c:14:23: warning: sys/ioctl.h: No such file or directory
posix-aio-compat.c: In function `handle_aiocb_ioctl':
posix-aio-compat.c:90: warning: implicit declaration of function `ioctl'
posix-aio-compat.c: In function `handle_aiocb_rw_linear':
posix-aio-compat.c:182: warning: implicit declaration of function `pwrite'
posix-aio-compat.c:187: warning: implicit declaration of function `pread'
posix-aio-compat.c: In function `aio_thread':
posix-aio-compat.c:284: warning: implicit declaration of function `sigfillset'
posix-aio-compat.c:285: warning: implicit declaration of function `sigprocmask'
posix-aio-compat.c:332: warning: implicit declaration of function `kill'
posix-aio-compat.c: In function `qemu_paio_submit':
posix-aio-compat.c:367: error: `EINPROGRESS' undeclared (first use in this function)
posix-aio-compat.c:367: error: (Each undeclared identifier is reported only once
posix-aio-compat.c:367: error: for each function it appears in.)
posix-aio-compat.c: In function `qemu_paio_cancel':
posix-aio-compat.c:424: error: `ECANCELED' undeclared (first use in this function)
posix-aio-compat.c:426: error: `EINPROGRESS' undeclared (first use in this function)
make: *** [posix-aio-compat.o] Error 1

v0.11.0-rc0-182-g28e738d on gcc version 3.4.5 (mingw32 special)

- Sebastian


Gmane