Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Aurelien Jarno
On Fri, Oct 23, 2009 at 01:47:04AM +0200, Alexander Graf wrote: > > On 23.10.2009, at 00:42, Anthony Liguori wrote: > >> Aurelien Jarno wrote: >>> Hi all, >>> >>> I am currently reviewing the S390 patches which extensively use of >>> code like: >>> >>>if (a == 5) printf("a was 5.\n"); >>>el

[Qemu-devel] Re: [PATCH] tcg, tci: Add TCG and interpreter for bytecode (virtual machine)

2009-10-22 Thread TeLeMan
Tested i386-softmmu only. Now tci can run windows xp sp2 and its speed is about 6 times slower than jit. -- SUN OF A BEACH Subject: [PATCH 1/5] tci: fix op_sar_iXX and op_ext16s_iXX --- tcg/tci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c i

Re: [Qemu-devel] [PATCH] target-arm: use clz32() instead of a for loop

2009-10-22 Thread Stuart Brady
On Thu, Oct 15, 2009 at 11:14:52PM +0200, Aurelien Jarno wrote: > @@ -394,10 +395,7 @@ uint32_t HELPER(uxtb16)(uint32_t x) > > uint32_t HELPER(clz)(uint32_t x) > { > -int count; > -for (count = 32; x; count--) > -x >>= 1; > -return count; > +return clz32(x); > } > >

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Alexander Graf
On 23.10.2009, at 00:42, Anthony Liguori wrote: Aurelien Jarno wrote: Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It i

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Natalia Portillo
if (a == 5) { printf("a was 5.\n"); } else if (a == 6) { printf("a was 6.\n"); } else { printf("a was something else entirely.\n"); } Is in my opinion LOT CLEANER to debug. This is my personal preference (comments included): if (a == 5) // Check if it is 5

[Qemu-devel] Re: CODING_STYLE and if blocks

2009-10-22 Thread Måns Rullgård
Aurelien Jarno writes: > Hi all, > > I am currently reviewing the S390 patches which extensively use of > code like: > > if (a == 5) printf("a was 5.\n"); > else if (a == 6) printf("a was 6.\n"); > else printf("a was something else entirely.\n"); > > It is something currently allowed

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Anthony Liguori
Aurelien Jarno wrote: Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It is something currently allowed by the CODING_STYL

Re: [Qemu-devel] [PATCH v2][RESEND] target-arm: cleanup internal resource leaks

2009-10-22 Thread Laurent Desnogues
On Thu, Oct 22, 2009 at 2:17 PM, wrote: > From: Juha Riihimäki > > Revised patch for getting rid of tcg temporary variable leaks in > target-arm/translate.c. This version also includes the leak patch for > gen_set_cpsr macro, now converted as a static inline function, which I > sent earlier as a

[Qemu-devel] Re: [ANNOUNCE] Sheepdog: Distributed Storage System for KVM

2009-10-22 Thread Alexander Graf
Am 22.10.2009 um 18:28 schrieb Anthony Liguori : Avi Kivity wrote: On 10/21/2009 07:13 AM, MORITA Kazutaka wrote: Hi everyone, Sheepdog is a distributed storage system for KVM/QEMU. It provides highly available block level storage volumes to VMs like Amazon EBS. Sheepdog supports advanced vo

[Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Aurelien Jarno
Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It is something currently allowed by the CODING_STYLE document (there is no

Re: [Qemu-devel] [PATCH 02/12] S/390 disassembler fixes

2009-10-22 Thread Aurelien Jarno
On Wed, Oct 21, 2009 at 03:52:23PM +0200, Ulrich Hecht wrote: > enable zArch (64-bit) instructions > enable disassembler for both s390 and s390x > > Signed-off-by: Ulrich Hecht > --- > configure |2 +- > disas.c|3 +++ > s390-dis.c |4 ++-- > 3 files changed, 6 insertions(+), 3

Re: [Qemu-devel] [PATCH 2/9] S/390 CPU emulation

2009-10-22 Thread Aurelien Jarno
On Mon, Oct 19, 2009 at 07:17:18PM +0200, Ulrich Hecht wrote: > On Saturday 17 October 2009, Aurelien Jarno wrote: > > On Fri, Oct 16, 2009 at 02:38:48PM +0200, Ulrich Hecht wrote: > > First of all a few general comments. Note that I know very few things > > about S390/S390X, so I may have dumb com

Re: [Qemu-devel] Re: [PATCH 01/12] TCG "sync" op

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Aurelien Jarno wrote: > On Wed, Oct 21, 2009 at 03:52:22PM +0200, Ulrich Hecht wrote: > > sync allows concurrent accesses to locations in memory through different TCG > > variables. This comes in handy when you are emulating CPU registers that can > > be used as either 32 or 6

[Qemu-devel] [PATCH 1/5] linux-user: remove hardcoded value of _NSIG in signal.c

2009-10-22 Thread Aurelien Jarno
From: Arnaud Patard In a bunch of places, 64 is used as value of _NSIG but it's wrong at least on MIPS were _NSIG is 128. Signed-off-by: Arnaud Patard Signed-off-by: Aurelien Jarno --- linux-user/signal.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linu

[Qemu-devel] [PATCH 2/5] cpu-all.h: fix cpu_get_real_ticks on mips host

2009-10-22 Thread Aurelien Jarno
From: Arnaud Patard Fix cpu_get_real_ticks: - check should be done on __mips and not __mips_isa_rev - linux kernels >= 2.6.25 are emulating the 2 needed rdhwr functions so it's safe to use rdhwr. This is better than what's currently in but it doesn't mean it works nicely Some tests needs to be

[Qemu-devel] [PATCH 3/5] tcg: initial mips support

2009-10-22 Thread Aurelien Jarno
Based on a patch from Arnaud Patard (Rtp) A few words about design choices: * Two registers, at and t0, are reserved for TCG internal use. They are useful for bswap and 64-bit ops. * Most ops supports a constant argument with value 0, which is actually mapped to the zero register. * While the

[Qemu-devel] [PATCH 5/5] tcg/mips: use direct jumps

2009-10-22 Thread Aurelien Jarno
Use direct jumps on MIPS hosts. The jump address has to be written atomically, so a R_MIPS_26 needs to be used. It means the code generation buffer should not be bigger than 256MB, and has to be aligned on a 256MB boundary. Signed-off-by: Aurelien Jarno --- exec-all.h| 13 +

[Qemu-devel] [PATCH 0/5] MIPS(EL) host support

2009-10-22 Thread Aurelien Jarno
This patch series add host MIPS(EL) support to QEMU. It is based on the excellent work from Arnaud Patard [1]. It supports both little and big-endian hosts, and is currently limited to the o32 abi. It has been mainly developped and tested in system mode on a MIPSEL host, but I have verified that

[Qemu-devel] [PATCH 4/5] tcg: increase TCG_MAX_OP_SIZE to 192

2009-10-22 Thread Aurelien Jarno
This is needed on a MIPS host and a 64-bit cross-endian target. Signed-off-by: Aurelien Jarno --- exec-all.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exec-all.h b/exec-all.h index dd134a9..820b59e 100644 --- a/exec-all.h +++ b/exec-all.h @@ -41,10 +41,10 @@ t

[Qemu-devel] Re: [PATCH 01/12] TCG "sync" op

2009-10-22 Thread Aurelien Jarno
On Wed, Oct 21, 2009 at 03:52:22PM +0200, Ulrich Hecht wrote: > sync allows concurrent accesses to locations in memory through different TCG > variables. This comes in handy when you are emulating CPU registers that can > be used as either 32 or 64 bit, as TCG doesn't know anything about aliases. >

[Qemu-devel] Re: qemu-kvm: sigsegv at exit

2009-10-22 Thread Marcelo Tosatti
On Thu, Oct 22, 2009 at 02:00:15PM +0200, Michael S. Tsirkin wrote: > Hi! > I'm sometimes getting segfaults when I kill qemu. > This time I caught it when qemu was under gdb: > > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x411d0940 (LWP 14446)] > 0x0040

Re: [Qemu-devel] [PATCH] target-arm: log instructions start in TCG code

2009-10-22 Thread Aurelien Jarno
On Sun, Oct 18, 2009 at 04:29:52PM +0200, Laurent Desnogues wrote: > On Thu, Oct 15, 2009 at 11:51 PM, Aurelien Jarno wrote: > > Signed-off-by: Aurelien Jarno > > --- > >  target-arm/translate.c |    4 > >  1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/target-arm/tran

Re: [Qemu-devel] [PATCH 00/20] Port audio to vmstate

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: > Hi > > THis patch series port audio to vmstate. > - fix compliation with DEBUG_PLIVE and DEBUG_AC97 > - unfold IO_READ_PROTO/IO_WRITE_PROTO and remove them > - audio.c: the easiest thing to port (nothing inside) > - sb16: port to vmstate, testing shows

Re: [Qemu-devel] [PATCH 03/20] sb16: remove IO_READ_PROTO

2009-10-22 Thread Anthony Liguori
malc wrote: On Thu, 22 Oct 2009, Juan Quintela wrote: No. I was going to say, "Because..." But seeing as the commit message was completely empty, "No." is a pretty reasonable response. Juan, can you explain the justification for removing this a bit more? Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 15/20] gus: remove IO_WRITE_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 14/20] gus: remove IO_READ_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 12/20] c4231a: remove IO_WRITE_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 11/20] c4231a: remove IO_READ_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 00/15] Some networking code re-organization

2009-10-22 Thread Anthony Liguori
Mark McLoughlin wrote: Hey, We've been meaning to split net.c up for quite a while now, so here goes with a first cut at. There shouldn't be anything too controversial here, apart from CONFIG_LINUX maybe. I've build tested this on F11, F12 and mingw and also done some ba

Re: [Qemu-devel] [PATCH 10/20] adlib: remove IO_WRITE_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 09/20] adlib: remove IO_READ_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 07/20] es1370: remove IO_WRITE_PROTO

2009-10-22 Thread malc
+On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 06/20] es1370: remove IO_READ_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 04/20] sb16: remove IO_WRITE_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH 03/20] sb16: remove IO_READ_PROTO

2009-10-22 Thread malc
On Thu, 22 Oct 2009, Juan Quintela wrote: No. [..snip..] -- mailto:av1...@comtv.ru

[Qemu-devel] QEMU Users Forum Error and various QEMU usage for Hardware/Software co-simulation and design.

2009-10-22 Thread Pablo Salinas
Hello qemu-developers, I know this is probably not the right place for these questions, but I have been having a hard time getting feedback on any of the other forums and mailing lists. Starting with the fact that in the last couple of days I haven't been able to acce

[Qemu-devel] [patch 1/2] qemu: block SIGCHLD in vcpu thread(s)

2009-10-22 Thread Marcelo Tosatti
Otherwise a vcpu thread can run the sigchild handler causing waitpid() from iothread to fail. Signed-off-by: Marcelo Tosatti Index: qemu/vl.c === --- qemu.orig/vl.c +++ qemu/vl.c @@ -3722,6 +3722,7 @@ static void block_io_signals(vo

[Qemu-devel] [patch 2/2] qemu: kvm specific wait_io_event

2009-10-22 Thread Marcelo Tosatti
In KVM mode the global mutex is released when vcpus are executing, which means acquiring the fairness mutex is not required. Also for KVM there is one thread per vcpu, so tcg_has_work is meaningless. Add a new qemu_wait_io_event_common function to hold common code between TCG/KVM. Signed-off-by:

[Qemu-devel] [patch 0/2] iothread fixes

2009-10-22 Thread Marcelo Tosatti

Re: [Qemu-devel] [RFC v2] queue_work proposal

2009-10-22 Thread Glauber Costa
On Thu, Oct 22, 2009 at 03:37:05PM -0200, Marcelo Tosatti wrote: > On Thu, Sep 03, 2009 at 02:01:26PM -0400, Glauber Costa wrote: > > Hi guys > > > > In this patch, I am attaching an early version of a new "on_vcpu" mechanism > > (after > > making it generic, I saw no reason to keep its name). It

[Qemu-devel] [PATCH 3/3] eepro100: Use VMSTATE_MACADDR

2009-10-22 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/eepro100.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index 07805b1..ab505bf 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -1612,7 +1612,7 @@ static const VMStateDescription vmstate_eepro100 = {

[Qemu-devel] [PATCH 2/3] rtl8139: Use VMSTATE_MACADDR

2009-10-22 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/rtl8139.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index d11ae3b..62fa3ca 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3155,7 +3155,7 @@ static const VMStateDescription vmstate_rtl8139 = {

[Qemu-devel] [PATCH 1/3] vmstate: Add VMSTATE_MACADDR for the new type

2009-10-22 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/hw.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 428a52d..eb5c639 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -522,6 +522,18 @@ extern const VMStateDescription vmstate_i2c_slave; .offset = vms

[Qemu-devel] [PATCH 0/3] VMSTate & MACADDR

2009-10-22 Thread Juan Quintela
Now that there is a MACAddr type, add a VMSTATE_MACADDR() helper. As my patches are applied after Gerd one, this three patches should be put (in current staging code) as: VMSTATE_MACADDR After this one commit 3ce425f6678881df86fe581318ca37bce50ec924 Author: Juan Quintela Date: Mon Oct 19 15:4

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-22 Thread Anthony Liguori
Luiz Capitulino wrote: On Thu, 22 Oct 2009 10:40:54 -0500 Anthony Liguori wrote: Luiz Capitulino wrote: Yeah, I agree. When testing migration, for example, I have to type 'migrate -d tcp:0:' several times... Maybe there's a smarter way to do this, but the monitor macros idea se

Re: [Qemu-devel] [RFC] in-kernel irqchip : split devices

2009-10-22 Thread Marcelo Tosatti
On Wed, Oct 14, 2009 at 11:30:43AM -0300, Glauber Costa wrote: > Hello people, > > As I promised, I am sending a very brief PoC wrt split devices and in-kernel > irqchip. > In this mail, I am including only the ioapic version for apreciation. I also > have i8259, > and apic will take me a little

[Qemu-devel] [PATCH 11/19] net: add receive_raw parameter to qemu_new_vlan_client()

2009-10-22 Thread Mark McLoughlin
Trivial patch to allow supplying a receive_raw function. A future cleanup should combine this function pointer parameters into a table. Signed-off-by: Mark McLoughlin --- hw/dp8393x.c |2 +- hw/etraxfs_eth.c |2 +- hw/mcf_fec.c |2 +- hw/mipsnet.c |2 +- hw/qdev.c

[Qemu-devel] [PATCH 12/19] net: use qemu_send_packet_raw() in qemu_announce_self()

2009-10-22 Thread Mark McLoughlin
From: Gleb Natapov Use qemu_send_packet_raw to send gratuitous arp. This will ensure that vnet header is handled properly. Also, avoid sending the gratuitous packet to the guest. There doesn't appear to be any reason for doing that and the code will currently just crash if the NIC is not associa

Re: [Qemu-devel] [RFC v2] queue_work proposal

2009-10-22 Thread Marcelo Tosatti
On Thu, Sep 03, 2009 at 02:01:26PM -0400, Glauber Costa wrote: > Hi guys > > In this patch, I am attaching an early version of a new "on_vcpu" mechanism > (after > making it generic, I saw no reason to keep its name). It allows us to > guarantee > that a piece of code will be executed in a certa

[Qemu-devel] [PATCH 15/19] net: add tap_set_offload()

2009-10-22 Thread Mark McLoughlin
This API allows virtio-net to enable various offload features on a tap interface - e.g. to tell the host kernel it can pass up partial checksums to userspace. Signed-off-by: Mark McLoughlin --- net.c | 24 net.h |1 + tap-linux.h |7 +++ 3 files

[Qemu-devel] [PATCH 15/15] net: move UFO support detection to tap-linux.c

2009-10-22 Thread Mark McLoughlin
Only supported on Linux Signed-off-by: Mark McLoughlin --- net/tap-aix.c |5 + net/tap-bsd.c |5 + net/tap-linux.c | 12 net/tap-solaris.c |5 + net/tap.c |7 +-- net/tap.h |1 + 6 files changed, 29 insertions(+), 6 del

[Qemu-devel] [PATCH 11/15] net: move linux code into net/tap-linux.c

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile|1 + net/tap-linux.c | 78 +++ net/tap.c | 47 - 3 files changed, 79 insertions(+), 47 deletions(-) create mode 100644 net/tap-linux.c diff --git

[Qemu-devel] [PATCH 06/19] net: add a vnet_hdr=on|off parameter

2009-10-22 Thread Mark McLoughlin
This allows people to disable the IFF_VNET_HDR flag, e.g. for debugging purposes or if they know they may migrate the guest to a machine without IFF_VNET_HDR support. It also allows making the lack of IFF_VNET_HDR support an error condition, e.g. in the case where a guest is being migrated from a

[Qemu-devel] [PATCH 09/15] net: move AIX code into net/tap-aix.c

2009-10-22 Thread Mark McLoughlin
Okay, this makes the tap options available on AIX even though there's no support, but if we want to do it right we should have not compile the tap code at all on AIX using e.g. CONFIG_TAP. Signed-off-by: Mark McLoughlin --- Makefile |1 + net.c |2 -- net/tap-aix.c | 32 ++

[Qemu-devel] [PATCH 16/19] virtio-net: enable tap offload if guest supports it

2009-10-22 Thread Mark McLoughlin
We query the guest's feature set to see if it supports offload and, if so, we enable those features on the tap interface. Signed-off-by: Mark McLoughlin --- hw/virtio-net.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.

[Qemu-devel] [PATCH 10/15] build: add CONFIG_LINUX

2009-10-22 Thread Mark McLoughlin
So I can add a tap-linux.c and use CONFIG_LINUX to pull it in in Makefile Signed-off-by: Mark McLoughlin --- configure |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 43d87c5..4ccdebe 100755 --- a/configure +++ b/configure @@ -1897,6 +1897,

[Qemu-devel] [PATCH 17/19] Work around dhclient brokenness

2009-10-22 Thread Mark McLoughlin
From: Anthony Liguori With the latest GSO/csum offload patches, any guest using an unpatched version of dhclient (any Ubuntu guest, for instance), will no longer be able to get a DHCP address. dhclient is actually at fault here. It uses AF_PACKET to receive DHCP responses but does not check aux

[Qemu-devel] qemu-i386 -L / /usr/bin/perl -e 'print `perl -v`' doesn't print

2009-10-22 Thread Jay Schulist
Hello, I have an issue with perl and qemu that I'm hoping someone knows what is happening. I'm using qemu-i386 on a fedora 11 intel system and the following command fails: $ qemu-i386 -L / /usr/bin/perl -e 'print `perl -v`' qemu: Unsupported syscall: 240 I've included the strace at the end of the

Re: [Qemu-devel] [PATCH] test for lm capable kernel.

2009-10-22 Thread Glauber Costa
On Thu, Oct 22, 2009 at 06:51:46PM +0200, Avi Kivity wrote: > On 10/14/2009 07:09 PM, Glauber Costa wrote: >> Don't save x86_64-specific msrs if our kernel does not support them. >> Code is already in qemu-kvm.git, but the test function is slightly different. >> It follows what the test for msr_sta

Re: [Qemu-devel] [PATCH] test for lm capable kernel.

2009-10-22 Thread Avi Kivity
On 10/14/2009 07:09 PM, Glauber Costa wrote: Don't save x86_64-specific msrs if our kernel does not support them. Code is already in qemu-kvm.git, but the test function is slightly different. It follows what the test for msr_start does. Can't we use KVM_GET_MSR_LIST to see which msrs are su

[Qemu-devel] [PATCH 12/15] net: move tap_set_sndbuf() to tap-linux.c

2009-10-22 Thread Mark McLoughlin
TUNSETSNDBUF is only available on linux Signed-off-by: Mark McLoughlin --- net/tap-aix.c |6 ++ net/tap-bsd.c |5 + net/tap-linux.c | 23 +++ net/tap-solaris.c |5 + net/tap.c | 25 + net/tap.h |

[Qemu-devel] [PATCH 08/15] net: move solaris code to net/tap-solaris.c

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile |1 + net/tap-solaris.c | 185 + net/tap.c | 168 +--- net/tap.h |2 + 4 files changed, 191 insertions(+), 165 deletions(-

[Qemu-devel] [PATCH 14/15] net: move tap_set_offload() code into tap-linux.c

2009-10-22 Thread Mark McLoughlin
TUNSETOFFLOAD is only available on Linux Signed-off-by: Mark McLoughlin --- net/tap-aix.c |5 + net/tap-bsd.c |5 + net/tap-linux.c | 26 ++ net/tap-solaris.c |5 + net/tap.c | 21 + net/tap.h |

[Qemu-devel] [PATCH 05/15] net: move tap-linux.h under net/

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- net.c |2 +- net/tap-linux.h | 51 +++ tap-linux.h | 51 --- 3 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 net/tap-linu

[Qemu-devel] [PATCH 04/15] net: move more stuff into net/tap-win32.c, add net/tap.h

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- hw/virtio-net.c |1 + net.c | 75 -- net.h |5 --- net/tap-win32.c | 48 +- net/tap.h | 42 ++ sysemu.h

[Qemu-devel] [PATCH 07/15] net: split BSD tap_open() out into net/tap-bsd.c

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile |1 + net/tap-bsd.c | 62 + net/tap.c | 50 +++-- net/tap.h |2 + 4 files changed, 69 insertions(+), 46 deletions(-) create mode 10

[Qemu-devel] [PATCH 02/15] net: move net-checksum.c under net/

2009-10-22 Thread Mark McLoughlin
Also add a new net/checksum.h header Signed-off-by: Mark McLoughlin --- Makefile|4 +- hw/e1000.c |1 + hw/virtio-net.c |1 + hw/xen_nic.c|1 + net-checksum.c | 86 --- net.h |7 net/checks

[Qemu-devel] [PATCH 01/15] net: move net-queue.[ch] under net/

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile|6 +- net-queue.c | 260 --- net-queue.h | 71 net.h |2 +- net/queue.c | 260 +++ net/queue.h | 71

[Qemu-devel] [PATCH 13/15] net: move tap_probe_vnet_hdr() to tap-linux.c

2009-10-22 Thread Mark McLoughlin
Only Linux has support for IFF_VNET_HDR Signed-off-by: Mark McLoughlin --- net/tap-aix.c |4 net/tap-bsd.c |5 + net/tap-linux.c | 12 net/tap-solaris.c |5 + net/tap.c | 12 net/tap.h |1 + 6 files changed, 27

[Qemu-devel] [PATCH 06/15] net: split all the tap code out into net/tap.c

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile |1 + net.c | 692 +--- net.h |2 + net/tap.c | 759 + 4 files changed, 763 insertions(+), 691 deletions(-) create mode 1

[Qemu-devel] [PATCH 03/15] net: move tap-win32.c under net/

2009-10-22 Thread Mark McLoughlin
Signed-off-by: Mark McLoughlin --- Makefile|2 +- net/tap-win32.c | 690 +++ tap-win32.c | 690 --- 3 files changed, 691 insertions(+), 691 deletions(-) create mode 100644 ne

[Qemu-devel] [PATCH 00/15] Some networking code re-organization

2009-10-22 Thread Mark McLoughlin
Hey, We've been meaning to split net.c up for quite a while now, so here goes with a first cut at. There shouldn't be anything too controversial here, apart from CONFIG_LINUX maybe. I've build tested this on F11, F12 and mingw and also done some basic runtime testing.

[Qemu-devel] [PATCH 19/19] virtio-net: add tap_has_ufo flag to saved state

2009-10-22 Thread Mark McLoughlin
If we tell the guest we support UFO and then migrate to host which doesn't support it, we will find ourselves in grave difficulties. Prevent this scenario by adding a flag to virtio-net's savevm format which indicates whether the device requires host UFO support. [v2: - add has_ufo uint8_t fiel

[Qemu-devel] [PATCH 09/19] net: add flags parameter to packet queue interface

2009-10-22 Thread Mark McLoughlin
This allows for the addition of a raw flag, and leaves the way open for other flags too. Signed-off-by: Mark McLoughlin --- net-queue.c | 26 ++ net-queue.h |6 ++ net.c | 14 -- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH 18/19] Enable UFO on virtio-net and tap devices

2009-10-22 Thread Mark McLoughlin
From: Sridhar Samudrala Enable UFO on the host tap device if supported and allow setting UFO on virtio-net in the guest. Signed-off-by: Sridhar Samudrala Signed-off-by: Mark McLoughlin --- hw/virtio-net.c | 11 +-- net.c | 36 net.h

[Qemu-devel] [PATCH 14/19] virtio-net: add vnet_hdr support

2009-10-22 Thread Mark McLoughlin
With '-netdev tap,id=foo -nic model=virtio,netdev=foo' virtio-net can detect that its peer (i.e. the tap backend) supports vnet headers and advertise to the guest that it can send packets with partial checksums and/or TSO packets. One complication is that if we're migrating and the source host sup

[Qemu-devel] [PATCH 05/19] net: refactor tap initialization

2009-10-22 Thread Mark McLoughlin
Re-factor things so that there is only one call site for net_tap_fd_init(). Two concerns about the QemuOpts usage here - firstly, we set the script arguments to their default value and, secondly, we set the ifname value to the name allocated by the kernel if none is supplied. Are we okay with such

[Qemu-devel] [PATCH 08/19] net: add tap_has_vnet_hdr() and tap_using_vnet_hdr() APIs

2009-10-22 Thread Mark McLoughlin
These lamely named functions allow virtio-net to query whether IFF_VNET_HDR is enabled on a tap interface and inform the tap code that virtio-net will supply packets with a vnet header. Signed-off-by: Mark McLoughlin --- net.c | 39 +++ net.h |3 +++ 2 f

[Qemu-devel] [PATCH 10/19] net: add an API for 'raw' packets

2009-10-22 Thread Mark McLoughlin
In the case where a NIC and backend agree on a packet header format, this API allows injecting packets which lack the agreed upon header. We need this for sending our gratuitous ARP. Signed-off-by: Mark McLoughlin --- net-queue.h |1 + net.c | 37 +---

[Qemu-devel] [PATCH 03/19] net: make tap_receive() re-use tap_receive_iov() code

2009-10-22 Thread Mark McLoughlin
In future we will want to prepend a virtio_net header if the NIC didn't supply one but IFF_VNET_HDR is enabled on the interface. This is most easily achived by using writev() in all cases. Signed-off-by: Mark McLoughlin --- net.c | 23 +++ 1 files changed, 15 insertions(+),

[Qemu-devel] [PATCH 00/19 v2] Add virtio-net/tap support for partial csums and GSO

2009-10-22 Thread Mark McLoughlin
Hey, Over a year ago we added some code to qemu-kvm.git which takes advantage of the recent tun/tap IFF_VNET_HDR feature in order to allow virtio-net to send and receive packets with partial checksums and segmentation offloaded: http://article.gmane.org/gmane.comp.emulators.kvm.devel/204

[Qemu-devel] [PATCH 02/19] net: import linux tap ioctl definitions

2009-10-22 Thread Mark McLoughlin
Making features dependent on the availability of newer versions if_tun.h is going to get seriously clumsy, so let's just import the definitions we need. It's only a small handful. If and when we're comfortable depending on 2.6.30 headers, we can remove this again. Signed-off-by: Mark McLoughlin

[Qemu-devel] [PATCH 13/19] net: implement tap support for receive_raw()

2009-10-22 Thread Mark McLoughlin
tap_receive_raw() always prepends a vnet header if IFF_VNET_HDR is enabled. tap_receive() only prepends when the a header is required but the NIC doesn't supply one. Signed-off-by: Mark McLoughlin --- net.c | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH 07/19] net: add a client type code

2009-10-22 Thread Mark McLoughlin
This is so as to allow APIs which operate on specific client types without having to add a function table entry which is only implemented by a single client type. Signed-off-by: Mark McLoughlin --- hw/dp8393x.c |3 ++- hw/etraxfs_eth.c |3 ++- hw/mcf_fec.c |3 ++- hw/mipsnet.

[Qemu-devel] [PATCH 04/19] net: enable IFF_VNET_HDR on tap fds if available

2009-10-22 Thread Mark McLoughlin
For now, we just add an empty header before writing and strip the header after reading. We really only want IFF_VNET_HDR when virtio_net is using it, but it would significantly complicate matters to try and do that. There should be little or no performance impact with always adding headers. Signe

[Qemu-devel] [PATCH 01/19] net: remove unused includes of if_tun.h and if_tap.h

2009-10-22 Thread Mark McLoughlin
Looks like these are just artifacts of vl.c being split up. Signed-off-by: Mark McLoughlin --- qemu-char.c |6 -- savevm.c|6 -- vl.c|6 -- 3 files changed, 0 insertions(+), 18 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 0fd402c..1625703 100644

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-22 Thread Luiz Capitulino
On Thu, 22 Oct 2009 10:40:54 -0500 Anthony Liguori wrote: > Luiz Capitulino wrote: > > Yeah, I agree. > > > > When testing migration, for example, I have to type 'migrate -d tcp:0:' > > several times... Maybe there's a smarter way to do this, but the monitor > > macros idea seems interestin

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-22 Thread Luiz Capitulino
On Thu, 22 Oct 2009 17:02:29 +0200 Kevin Wolf wrote: > Am 22.10.2009 16:40, schrieb Luiz Capitulino: > > On Wed, 21 Oct 2009 19:35:03 +0100 > > Jamie Lokier wrote: > >> If the monitor accepted ";" as a command separator, to put multiple > >> commands on a single line, could just be a quoted > >

[Qemu-devel] Re: [ANNOUNCE] Sheepdog: Distributed Storage System for KVM

2009-10-22 Thread Anthony Liguori
Avi Kivity wrote: On 10/21/2009 07:13 AM, MORITA Kazutaka wrote: Hi everyone, Sheepdog is a distributed storage system for KVM/QEMU. It provides highly available block level storage volumes to VMs like Amazon EBS. Sheepdog supports advanced volume management features such as snapshot, cloning,

Re: [Qemu-devel] [PATCH] test for lm capable kernel.

2009-10-22 Thread Anthony Liguori
Glauber Costa wrote: Don't save x86_64-specific msrs if our kernel does not support them. Code is already in qemu-kvm.git, but the test function is slightly different. It follows what the test for msr_start does. Repeat after me: "I will not use --target-list when submitting qemu patches.

[Qemu-devel] [PATCH 8/8] Revert "qcow2: Bring synchronous read/write back to life"

2009-10-22 Thread Kevin Wolf
It was merely a workaround and the real fix is done now. This reverts commit ef845c3bf421290153154635dc18eaa677cecb43. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c |6 ++-- block/qcow2.c | 51 +--- block/qcow2.h |3 --

[Qemu-devel] [PATCH 5/8] block: Use new AsyncContext for bdrv_read/write emulation

2009-10-22 Thread Kevin Wolf
bdrv_read/write emulation is used as the perfect example why we need something like AsyncContexts. So maybe they better start using it. Signed-off-by: Kevin Wolf --- block.c | 22 ++ 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 33f

[Qemu-devel] [PATCH 7/8] linux-aio: Honour AsyncContext

2009-10-22 Thread Kevin Wolf
Also for Linux AIO, don't call callbacks that don't belong to the active AsyncContext. Signed-off-by: Kevin Wolf --- linux-aio.c | 87 -- 1 files changed, 72 insertions(+), 15 deletions(-) diff --git a/linux-aio.c b/linux-aio.c index 19a

[Qemu-devel] [PATCH 6/8] posix-aio-compat: Honour AsyncContext

2009-10-22 Thread Kevin Wolf
Don't call callbacks that don't belong to the active AsyncContext. Signed-off-by: Kevin Wolf --- posix-aio-compat.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index 4901539..ec58288 100644 --- a/posix-aio-compat.c

[Qemu-devel] [PATCH 4/8] Introduce contexts for asynchronous callbacks

2009-10-22 Thread Kevin Wolf
Add the possibility to use AIO and BHs without allowing foreign callbacks to be run. Basically, you put your own AIOs and BHs in a separate context. For details see the comments in the source. Signed-off-by: Kevin Wolf --- async.c | 100

[Qemu-devel] [PATCH 3/8] Split out bottom halves

2009-10-22 Thread Kevin Wolf
Instead of putting more and more stuff into vl.c, let's have the generic functions that deal with asynchronous callbacks in their own file. Signed-off-by: Kevin Wolf --- Makefile.target |2 +- async.c | 130 +++ qemu-common.h |

[Qemu-devel] [PATCH 2/8] Add qemu_aio_process_queue()

2009-10-22 Thread Kevin Wolf
We'll leave some AIO completions unhandled when we can't call the callback. qemu_aio_process_queue() is used later to run any callbacks that are left and can be run then. Signed-off-by: Kevin Wolf --- aio.c | 30 ++ block/curl.c |8 l

[Qemu-devel] [PATCH 1/8] posix-aio-compat: Split out posix_aio_process_queue

2009-10-22 Thread Kevin Wolf
We need to process the request queue and run callbacks separately from reading out the queue in a later patch, so split it out. Signed-off-by: Kevin Wolf --- posix-aio-compat.c | 43 +++ 1 files changed, 27 insertions(+), 16 deletions(-) diff --git a/po

[Qemu-devel] [PATCH 0/8] Fix bdrv_read/write emulation

2009-10-22 Thread Kevin Wolf
The other day we re-introduced synchronous qcow2 read/write functions to work around the buggy bdrv_read/write emulation, this series implements the proper fix for it. Basically what it's doing is to ensure that the emulation only runs its own AIO callbacks and bottom halves. Callbacks from outsid

Re: [Qemu-devel] [PATCH] new SDL keyboard shortcuts to start and stop VM

2009-10-22 Thread Anthony Liguori
Luiz Capitulino wrote: Yeah, I agree. When testing migration, for example, I have to type 'migrate -d tcp:0:' several times... Maybe there's a smarter way to do this, but the monitor macros idea seems interesting to me. When we have QMP, we can create a QMP socket at a well known loca

  1   2   >