From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MD2rZ-0003uO-Uy for qemu-devel@nongnu.org; Sat, 06 Jun 2009 16:51:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MD2rV-0003qx-6A for qemu-devel@nongnu.org; Sat, 06 Jun 2009 16:51:37 -0400 Received: from [199.232.76.173] (port=58731 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MD2rV-0003qm-3I for qemu-devel@nongnu.org; Sat, 06 Jun 2009 16:51:33 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:37407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MD2rU-00055R-Fw for qemu-devel@nongnu.org; Sat, 06 Jun 2009 16:51:32 -0400 Message-Id: <1DB8C28C-ECE6-459C-B9BE-D4747CA4C9CF@web.de> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <28EBEC28-6D03-4321-8629-1F54EA30C634@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: [Qemu-devel] [PATCH] xen: net backend doesn't need linux headers. Date: Sat, 6 Jun 2009 22:51:09 +0200 References: <1243926324-13133-1-git-send-email-kraxel@redhat.com> <28EBEC28-6D03-4321-8629-1F54EA30C634@web.de> Sender: andreas.faerber@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Blue Swirl , xen-devel@lists.xensource.com, xen-discuss@opensolaris.org, qemu-devel@nongnu.org Am 06.06.2009 um 21:43 schrieb Andreas F=E4rber: > > Am 06.06.2009 um 17:52 schrieb Blue Swirl: > >> On 6/2/09, Gerd Hoffmann wrote: >>> Drop them to make qemu build on OpenSolaris. >>> >>> Cc: Andreas F=E4rber >>> Signed-off-by: Gerd Hoffmann >> >> Thanks, applied. > > Thanks, the patch helps, but doesn't fully fix the build: > > CC xen_backend.o > CC xen_devconfig.o > CC xen_console.o > CC xenfb.o > CC xen_disk.o > In file included from /export/home/andreas/QEMU/qemu/hw/xen_disk.c:43: > /export/home/andreas/QEMU/qemu/hw/xen_blkif.h:20: warning: #pragma =20 > pack(push[, id], ) is not supported on this target > /export/home/andreas/QEMU/qemu/hw/xen_blkif.h:36: warning: #pragma =20 > pack(pop[, id], ) is not supported on this target > CC xen_nic.o > /export/home/andreas/QEMU/qemu/hw/xen_nic.c: In function =20 > `net_tx_packets': > /export/home/andreas/QEMU/qemu/hw/xen_nic.c:179: error: `PAGE_SIZE' =20= > undeclared (first use in this function) > /export/home/andreas/QEMU/qemu/hw/xen_nic.c:179: error: (Each =20 > undeclared identifier is reported only once > /export/home/andreas/QEMU/qemu/hw/xen_nic.c:179: error: for each =20 > function it appears in.) > make: *** [xen_nic.o] Error 1 > > A quick search for PAGE_SIZE revealed some posts saying that =20 > PAGE_SIZE shouldn't be used in userland and be replaced with =20 > getpagesize(). Looking at the code though I see a number of =20 > XC_PAGE_SIZE that don't result in errors. Might PAGE_SIZE be a typo =20= > then? With this patch xen_nic.c compiles: diff --git a/hw/xen_nic.c b/hw/xen_nic.c index 048d865..3615c8c 100644 --- a/hw/xen_nic.c +++ b/hw/xen_nic.c @@ -176,7 +176,7 @@ static void net_tx_packets(struct XenNetDev *netdev) if (txreq.flags & NETTXF_csum_blank) { /* have read-only mapping -> can't fill checksum in-=20 place */ if (!tmpbuf) - tmpbuf =3D malloc(PAGE_SIZE); + tmpbuf =3D malloc(XC_PAGE_SIZE); memcpy(tmpbuf, page + txreq.offset, txreq.size); net_checksum_calculate(tmpbuf, txreq.size); qemu_send_packet(netdev->vs, tmpbuf, txreq.size); If then goes on to compile Xen stuff into sparc-softmmu and fails: CC sparc-softmmu/xen_machine_pv.o /export/home/andreas/QEMU/qemu/hw/xen_machine_pv.c:116: warning: =20 initialization from incompatible pointer type CC sparc-softmmu/xen_domainbuild.o [...] LINK sparc-softmmu/qemu-system-sparc Undefined first referenced symbol in file xc_gnttab_map_grant_refs ../libqemu_common.a(xen_disk.o) xc_gnttab_map_grant_ref ../libqemu_common.a(xen_disk.o) xc_gnttab_munmap ../libqemu_common.a(xen_disk.o) xc_gnttab_open ../libqemu_common.a(xen_backend.o) ld: fatal: symbol referencing errors. No output written to qemu-system-=20= sparc collect2: ld returned 1 exit status gmake[1]: *** [qemu-system-sparc] Error 1 make: *** [subdir-sparc-softmmu] Error 2 Same errors when linking i386-softmmu. OpenSolaris 2009.06 has SUNWxvm@3.1,5.11-111, I interpret this as =20 being Xen 3.1 - is that maybe too old? Perhaps it's easier to just have QEMU's configure disable Xen support =20= on Solaris for now then? Andreas