Skip to contentSkip to conversation

qemu/linux-user syscall.c

Qemu-devel Thiemo Seufer 3 participants 5 messages May 28, 2007

lore
Share & tools
lore
#1 lore raw

Review

Quoted 4 lines

Fix do_socketcall argument, by Daniel Jacobowitz.

(quoted diff) +1 -1
-  static long do_socketcall(int num, target_ulong vptr)   
+  static long do_socketcall(int num, target_phys_addr_t vptr) 

What is this supposed to be fixing?
vptr is a target pointer, and is only ever used as an argument to tgetl. I think the original type (target_ulong) is correct.

target_phys_addr_t isn't really meaningful for userspace emulation. We don't have physical addresses, only target (target_ulong) and host (void *) virtual addresses.

Paul

#2 lore raw
Quoted 5 lines · Paul Brook

Review

Quoted 4 lines

Fix do_socketcall argument, by Daniel Jacobowitz.

(quoted diff) +1 -1
-  static long do_socketcall(int num, target_ulong vptr)   
+  static long do_socketcall(int num, target_phys_addr_t vptr) 
Quoted 7 lines

What is this supposed to be fixing?
vptr is a target pointer, and is only ever used as an argument to tgetl. I think the original type (target_ulong) is correct.

target_phys_addr_t isn't really meaningful for userspace emulation. We don't have physical addresses, only target (target_ulong) and host (void *) virtual addresses.

Reverted. I had it for so long in my local tree I forgot its purpose. :-)

Thiemo

#3 lore raw
In reply to Paul Brook
Quoted 3 lines · Paul Brook

target_phys_addr_t isn't really meaningful for userspace emulation. We don't have physical addresses, only target (target_ulong) and host (void *) virtual addresses.

Vice versa, there are a some references in hw/*.c to target_ulong, shouldn't they in general be target_phys_addr_t? PPC CPU register definitions may be an exception.

#4 lore raw
Quoted 8 lines · Blue Swirl
Quoted 3 lines · Paul Brook

target_phys_addr_t isn't really meaningful for userspace emulation. We don't have physical addresses, only target (target_ulong) and host (void *) virtual addresses.

Vice versa, there are a some references in hw/*.c to target_ulong, shouldn't they in general be target_phys_addr_t? PPC CPU register definitions may be an exception.

Probably. I wouldn't be surprised if there are many places that break when guest physical addresses are larger than guest virtual addresses.

Paul