* [PATCH] Tools: Make xen-access test compile in 32 bits mode
@ 2012-02-09 4:53 Andres Lagar-Cavilla
2012-02-09 14:30 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Andres Lagar-Cavilla @ 2012-02-09 4:53 UTC (permalink / raw)
To: xen-devel; +Cc: ian.jackson, andres, ian.campbell
tools/tests/Makefile | 2 --
tools/tests/xen-access/xen-access.c | 12 +++++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/Makefile
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -11,9 +11,7 @@ ifeq ($(XEN_TARGET_ARCH),__fixme__)
SUBDIRS-y += regression
endif
SUBDIRS-y += x86_emulator
-ifneq ($(XEN_TARGET_ARCH),x86_32)
SUBDIRS-y += xen-access
-endif
.PHONY: all clean install distclean
all clean distclean: %: subdirs-%
diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/xen-access/xen-access.c
--- a/tools/tests/xen-access/xen-access.c
+++ b/tools/tests/xen-access/xen-access.c
@@ -600,13 +600,13 @@ int main(int argc, char *argv[])
case MEM_EVENT_REASON_VIOLATION:
rc = xc_hvm_get_mem_access(xch, domain_id, req.gfn, &access);
- printf("PAGE ACCESS: %c%c%c for GFN %lx (offset %06lx) gla %016lx (vcpu %d)\n",
+ printf("PAGE ACCESS: %c%c%c for GFN %llx (offset %06llx) gla %016llx (vcpu %d)\n",
req.access_r ? 'r' : '-',
req.access_w ? 'w' : '-',
req.access_x ? 'x' : '-',
- req.gfn,
- req.offset,
- req.gla,
+ (unsigned long long) req.gfn,
+ (unsigned long long) req.offset,
+ (unsigned long long) req.gla,
req.vcpu_id);
if ( default_access != after_first_access )
@@ -617,7 +617,9 @@ int main(int argc, char *argv[])
rsp.p2mt = req.p2mt;
break;
case MEM_EVENT_REASON_INT3:
- printf("INT3: rip=%016lx, gfn=%lx (vcpu %d)\n", req.gla, req.gfn,
+ printf("INT3: rip=%016llx, gfn=%llx (vcpu %d)\n",
+ (unsigned long long) req.gla,
+ (unsigned long long) req.gfn,
req.vcpu_id);
/* Reinject */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Tools: Make xen-access test compile in 32 bits mode
2012-02-09 4:53 [PATCH] Tools: Make xen-access test compile in 32 bits mode Andres Lagar-Cavilla
@ 2012-02-09 14:30 ` Keir Fraser
2012-02-09 14:43 ` Andres Lagar-Cavilla
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2012-02-09 14:30 UTC (permalink / raw)
To: Andres Lagar-Cavilla, xen-devel; +Cc: ian.jackson, andres, ian.campbell
On 08/02/2012 20:53, "Andres Lagar-Cavilla" <andres@lagarcavilla.org> wrote:
> tools/tests/Makefile | 2 --
> tools/tests/xen-access/xen-access.c | 12 +++++++-----
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
>
> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Please use the proper format macros in inttypes.h rather than casting. I
fixed this up in this case, and have applied the resulting patch.
-- Keir
> diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/Makefile
> --- a/tools/tests/Makefile
> +++ b/tools/tests/Makefile
> @@ -11,9 +11,7 @@ ifeq ($(XEN_TARGET_ARCH),__fixme__)
> SUBDIRS-y += regression
> endif
> SUBDIRS-y += x86_emulator
> -ifneq ($(XEN_TARGET_ARCH),x86_32)
> SUBDIRS-y += xen-access
> -endif
>
> .PHONY: all clean install distclean
> all clean distclean: %: subdirs-%
> diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/xen-access/xen-access.c
> --- a/tools/tests/xen-access/xen-access.c
> +++ b/tools/tests/xen-access/xen-access.c
> @@ -600,13 +600,13 @@ int main(int argc, char *argv[])
> case MEM_EVENT_REASON_VIOLATION:
> rc = xc_hvm_get_mem_access(xch, domain_id, req.gfn, &access);
>
> - printf("PAGE ACCESS: %c%c%c for GFN %lx (offset %06lx) gla
> %016lx (vcpu %d)\n",
> + printf("PAGE ACCESS: %c%c%c for GFN %llx (offset %06llx) gla
> %016llx (vcpu %d)\n",
> req.access_r ? 'r' : '-',
> req.access_w ? 'w' : '-',
> req.access_x ? 'x' : '-',
> - req.gfn,
> - req.offset,
> - req.gla,
> + (unsigned long long) req.gfn,
> + (unsigned long long) req.offset,
> + (unsigned long long) req.gla,
> req.vcpu_id);
>
> if ( default_access != after_first_access )
> @@ -617,7 +617,9 @@ int main(int argc, char *argv[])
> rsp.p2mt = req.p2mt;
> break;
> case MEM_EVENT_REASON_INT3:
> - printf("INT3: rip=%016lx, gfn=%lx (vcpu %d)\n", req.gla,
> req.gfn,
> + printf("INT3: rip=%016llx, gfn=%llx (vcpu %d)\n",
> + (unsigned long long) req.gla,
> + (unsigned long long) req.gfn,
> req.vcpu_id);
>
> /* Reinject */
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Tools: Make xen-access test compile in 32 bits mode
2012-02-09 14:30 ` Keir Fraser
@ 2012-02-09 14:43 ` Andres Lagar-Cavilla
0 siblings, 0 replies; 3+ messages in thread
From: Andres Lagar-Cavilla @ 2012-02-09 14:43 UTC (permalink / raw)
To: Keir Fraser; +Cc: ian.jackson, andres, xen-devel, ian.campbell
> On 08/02/2012 20:53, "Andres Lagar-Cavilla" <andres@lagarcavilla.org>
> wrote:
>
>> tools/tests/Makefile | 2 --
>> tools/tests/xen-access/xen-access.c | 12 +++++++-----
>> 2 files changed, 7 insertions(+), 7 deletions(-)
>>
>>
>> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
>
> Please use the proper format macros in inttypes.h rather than casting. I
> fixed this up in this case, and have applied the resulting patch.
Ok, thanks!
Andres
>
> -- Keir
>
>> diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/Makefile
>> --- a/tools/tests/Makefile
>> +++ b/tools/tests/Makefile
>> @@ -11,9 +11,7 @@ ifeq ($(XEN_TARGET_ARCH),__fixme__)
>> SUBDIRS-y += regression
>> endif
>> SUBDIRS-y += x86_emulator
>> -ifneq ($(XEN_TARGET_ARCH),x86_32)
>> SUBDIRS-y += xen-access
>> -endif
>>
>> .PHONY: all clean install distclean
>> all clean distclean: %: subdirs-%
>> diff -r 78ff0c8a944f -r 5c7986918883 tools/tests/xen-access/xen-access.c
>> --- a/tools/tests/xen-access/xen-access.c
>> +++ b/tools/tests/xen-access/xen-access.c
>> @@ -600,13 +600,13 @@ int main(int argc, char *argv[])
>> case MEM_EVENT_REASON_VIOLATION:
>> rc = xc_hvm_get_mem_access(xch, domain_id, req.gfn,
>> &access);
>>
>> - printf("PAGE ACCESS: %c%c%c for GFN %lx (offset %06lx)
>> gla
>> %016lx (vcpu %d)\n",
>> + printf("PAGE ACCESS: %c%c%c for GFN %llx (offset
>> %06llx) gla
>> %016llx (vcpu %d)\n",
>> req.access_r ? 'r' : '-',
>> req.access_w ? 'w' : '-',
>> req.access_x ? 'x' : '-',
>> - req.gfn,
>> - req.offset,
>> - req.gla,
>> + (unsigned long long) req.gfn,
>> + (unsigned long long) req.offset,
>> + (unsigned long long) req.gla,
>> req.vcpu_id);
>>
>> if ( default_access != after_first_access )
>> @@ -617,7 +617,9 @@ int main(int argc, char *argv[])
>> rsp.p2mt = req.p2mt;
>> break;
>> case MEM_EVENT_REASON_INT3:
>> - printf("INT3: rip=%016lx, gfn=%lx (vcpu %d)\n",
>> req.gla,
>> req.gfn,
>> + printf("INT3: rip=%016llx, gfn=%llx (vcpu %d)\n",
>> + (unsigned long long) req.gla,
>> + (unsigned long long) req.gfn,
>> req.vcpu_id);
>>
>> /* Reinject */
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-09 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 4:53 [PATCH] Tools: Make xen-access test compile in 32 bits mode Andres Lagar-Cavilla
2012-02-09 14:30 ` Keir Fraser
2012-02-09 14:43 ` Andres Lagar-Cavilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).