From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yrp1f-0004KO-3J for qemu-devel@nongnu.org; Mon, 11 May 2015 10:49:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yrp1a-0006Qk-Qf for qemu-devel@nongnu.org; Mon, 11 May 2015 10:49:47 -0400 Received: from e19.ny.us.ibm.com ([129.33.205.209]:34398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yrp1a-0006Q6-Ml for qemu-devel@nongnu.org; Mon, 11 May 2015 10:49:42 -0400 Received: from /spool/local by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 May 2015 10:49:41 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 4D9426E806A for ; Mon, 11 May 2015 10:41:26 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t4BEnbcY54526180 for ; Mon, 11 May 2015 14:49:37 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t4BEnbo1018704 for ; Mon, 11 May 2015 10:49:37 -0400 Message-ID: <5550C180.9060106@linux.vnet.ibm.com> Date: Mon, 11 May 2015 10:49:36 -0400 From: Stefan Berger MIME-Version: 1.0 References: <1430724181-476-1-git-send-email-quan.xu@intel.com> <1430724181-476-4-git-send-email-quan.xu@intel.com> <554791E7.8020008@linux.vnet.ibm.com> <945CA011AD5F084CBEA3E851C0AB28890E8F986D@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <945CA011AD5F084CBEA3E851C0AB28890E8F986D@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Xu, Quan" Cc: "wei.liu2@citrix.com" , "stefano.stabellini@eu.citrix.com" , "qemu-devel@nongnu.org" , "xen-devel@lists.xen.org" , "dgdegra@tycho.nsa.gov" On 05/11/2015 08:56 AM, Xu, Quan wrote: > >> -----Original Message----- >> From: Stefan Berger [mailto:stefanb@linux.vnet.ibm.com] >> Sent: Monday, May 04, 2015 11:36 PM >> To: Xu, Quan; stefano.stabellini@eu.citrix.com; eblake@redhat.com >> Cc: qemu-devel@nongnu.org; wei.liu2@citrix.com; dgdegra@tycho.nsa.gov; >> xen-devel@lists.xen.org >> Subject: Re: [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure >> >> On 05/04/2015 03:22 AM, Quan Xu wrote: >> >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include "hw/hw.h" >> +#include "block/aio.h" >> +#include "hw/xen/xen_backend.h" >> + >> +#ifndef XS_STUBDOM_VTPM_ENABLE >> +#define XS_STUBDOM_VTPM_ENABLE "1" >> +#endif >> + >> +#ifndef PAGE_SIZE >> +#define PAGE_SIZE 4096 >> +#endif >> You should be able to use TARGET_PAGE_SIZE from exec/cpu-all.h I think. >> >> With this change: Reviewed-by: Stefan Berger > > Stefan, > If I add #include "exec/cpu-all.h" in hw/tpm/xen_vtpm_frontend.c, there are some errors as following: > > ++++ error ++++ > In file included from hw/tpm/xen_vtpm_frontend.c:41:0: > /root/qemu2/include/exec/cpu-all.h:42:46: error: attempt to use poisoned "TARGET_WORDS_BIGENDIAN" > /root/qemu2/include/exec/cpu-all.h:46:8: error: attempt to use poisoned "BSWAP_NEEDED" > /root/qemu2/include/exec/cpu-all.h:109:5: error: "TARGET_LONG_SIZE" is not defined [-Werror=undef] > /root/qemu2/include/exec/cpu-all.h:122:13: error: attempt to use poisoned "TARGET_WORDS_BIGENDIAN" > /root/qemu2/include/exec/cpu-all.h:174:9: error: attempt to use poisoned "TARGET_PAGE_SIZE" > /root/qemu2/include/exec/cpu-all.h:174:32: error: attempt to use poisoned "TARGET_PAGE_BITS" > /root/qemu2/include/exec/cpu-all.h:175:9: error: attempt to use poisoned "TARGET_PAGE_MASK" > /root/qemu2/include/exec/cpu-all.h:175:28: error: attempt to use poisoned "TARGET_PAGE_SIZE" > /root/qemu2/include/exec/cpu-all.h:176:9: error: attempt to use poisoned "TARGET_PAGE_ALIGN" > /root/qemu2/include/exec/cpu-all.h:176:44: error: attempt to use poisoned "TARGET_PAGE_SIZE" > /root/qemu2/include/exec/cpu-all.h:176:68: error: attempt to use poisoned "TARGET_PAGE_MASK" > /root/qemu2/include/exec/cpu-all.h:211:1: error: attempt to use poisoned "CPUArchState" > /root/qemu2/include/exec/cpu-all.h:211:1: error: unknown type name 'CPUArchState' > /root/qemu2/include/exec/cpu-all.h:211:24: error: attempt to use poisoned "CPUArchState" > /root/qemu2/include/exec/cpu-all.h:211:24: error: unknown type name 'CPUArchState' > /root/qemu2/include/exec/cpu-all.h:222:9: error: attempt to use poisoned "CPU_INTERRUPT_HARD" > /root/qemu2/include/exec/cpu-all.h:226:9: error: attempt to use poisoned "CPU_INTERRUPT_EXITTB" > /root/qemu2/include/exec/cpu-all.h:229:9: error: attempt to use poisoned "CPU_INTERRUPT_HALT" > /root/qemu2/include/exec/cpu-all.h:232:9: error: attempt to use poisoned "CPU_INTERRUPT_DEBUG" > [....] > +++ error +++ > > > ------ --- > > Could I replace PAGE_SIZE with VTPM_ PAGE_SIZE, instead of TARGET_PAGE_SIZE from exec/cpu-all.h?? > +#ifndef VTPM_PAGE_SIZE > +#define VTPM_PAGE_SIZE 4096 > +#endif Fine by me. Stefan