Li, Xin B
2005-Jul-11 14:35 UTC
[Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
We need this patch to make shadow code compile ok on FC4 which is using gcc4. -Xin Signed-off-by: Xin Li <xin.b.li@intel.com> diff -r a29b4174d39c xen/arch/x86/shadow.c --- a/xen/arch/x86/shadow.c Mon Jul 11 10:23:19 2005 +++ b/xen/arch/x86/shadow.c Mon Jul 11 20:19:03 2005 @@ -2623,7 +2623,7 @@ struct vcpu *v = current; struct domain *d = v->domain; pgentry_64_t sle; - pgentry_64_t sle_up; + pgentry_64_t sle_up = {0}; l1_pgentry_t old_spte; l1_pgentry_t sl1e = *(l1_pgentry_t *)sl1e_p; int i; diff -r a29b4174d39c xen/include/asm-x86/shadow_64.h --- a/xen/include/asm-x86/shadow_64.h Mon Jul 11 10:23:19 2005 +++ b/xen/include/asm-x86/shadow_64.h Mon Jul 11 20:19:03 2005 @@ -485,8 +485,8 @@ static inline unsigned long gva_to_gpa(unsigned long gva) { struct vcpu *v = current; - pgentry_64_t gl1e; - pgentry_64_t gl2e; + pgentry_64_t gl1e = {0}; + pgentry_64_t gl2e = {0}; unsigned long gpa; if (guest_page_fault(v, gva, 0, &gl2e, &gl1e)) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
David Hopwood
2005-Jul-11 19:19 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
Li, Xin B wrote:> We need this patch to make shadow code compile ok on FC4 which is using > gcc4.Given gcc4''s propensity to warn about things that are often harmless, is it still a good idea to be compiling with -Werror? -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Jul-11 19:58 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
On 11 Jul 2005, at 20:19, David Hopwood wrote:>> We need this patch to make shadow code compile ok on FC4 which is >> using >> gcc4. > > Given gcc4''s propensity to warn about things that are often harmless, > is it > still a good idea to be compiling with -Werror?It''s been slightly annoying but not too much of a pain to keep things working with gcc4, and using -Werror does mean that genuine warnings don''t get lost in the noise. Anyway, we have more serious problems with gcc4 (I can''t boot dom0 as far as a login prompt when I build xen+xenlinux with gcc4). Currently gcc 3.2.x and 3.3.x are the main supported compilers. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rik van Riel
2005-Jul-11 20:01 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
On Mon, 11 Jul 2005, David Hopwood wrote:> Li, Xin B wrote: > > We need this patch to make shadow code compile ok on FC4 which is using > > gcc4. > > Given gcc4''s propensity to warn about things that are often harmless, is > it still a good idea to be compiling with -Werror?Fixing a compile warning is very little effort, but hunting the occasional (1 in 50?) real bug can be extremely time consuming. I certainly don''t mind fixing an error when I run into one... -- The Theory of Escalating Commitment: "The cost of continuing mistakes is borne by others, while the cost of admitting mistakes is borne by yourself." -- Joseph Stiglitz, Nobel Laureate in Economics _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jerone Young
2005-Jul-11 20:11 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
On Mon, 2005-07-11 at 20:58 +0100, Keir Fraser wrote:> On 11 Jul 2005, at 20:19, David Hopwood wrote: > > >> We need this patch to make shadow code compile ok on FC4 which is > >> using > >> gcc4. > > > > Given gcc4''s propensity to warn about things that are often harmless, > > is it > > still a good idea to be compiling with -Werror? > > It''s been slightly annoying but not too much of a pain to keep things > working with gcc4, and using -Werror does mean that genuine warnings > don''t get lost in the noise. > > Anyway, we have more serious problems with gcc4 (I can''t boot dom0 as > far as a login prompt when I build xen+xenlinux with gcc4). Currently > gcc 3.2.x and 3.3.x are the main supported compilers.That''s odd. I''m booting and running xen+xenlinux fine with gcc4 under FC4...with the 2.6.12 patch ...under x86-64 no less.> > -- Keir > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- Jerone Young IBM Linux Technology Center jyoung5@us.ibm.com 512-838-1157 (T/L: 678-1157) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Jul-11 20:15 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
On 11 Jul 2005, at 21:11, Jerone Young wrote:>> Anyway, we have more serious problems with gcc4 (I can''t boot dom0 as >> far as a login prompt when I build xen+xenlinux with gcc4). Currently >> gcc 3.2.x and 3.3.x are the main supported compilers. > > That''s odd. I''m booting and running xen+xenlinux fine with gcc4 under > FC4...with the 2.6.12 patch ...under x86-64 no less.It''s a while since I tried (maybe a couple of months) so maybe the problems have gone away. Or perhaps it depends on the specific gcc4 version you use -- I used vanilla 4.0.0, with no vendor patches. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
David Hopwood
2005-Jul-11 23:32 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
Rik van Riel wrote:> On Mon, 11 Jul 2005, David Hopwood wrote: >>Li, Xin B wrote: >> >>>We need this patch to make shadow code compile ok on FC4 which is using >>>gcc4. >> >>Given gcc4''s propensity to warn about things that are often harmless, is >>it still a good idea to be compiling with -Werror? > > Fixing a compile warning is very little effort, but hunting > the occasional (1 in 50?) real bug can be extremely time > consuming.I''m not suggesting that compiler warnings shouldn''t be fixed; I''m suggesting that they shouldn''t break the build. -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Rik van Riel
2005-Jul-12 02:29 UTC
Re: [Xen-devel] [PATCH] make shadow code compile ok on FC4 which is using gcc4
On Tue, 12 Jul 2005, David Hopwood wrote:> I''m not suggesting that compiler warnings shouldn''t be fixed; I''m > suggesting that they shouldn''t break the build.My experience is they won''t get fixed unless they break something ;) -- The Theory of Escalating Commitment: "The cost of continuing mistakes is borne by others, while the cost of admitting mistakes is borne by yourself." -- Joseph Stiglitz, Nobel Laureate in Economics _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel