You can find the domain and the virtual CPU number within the domain that correspond to a given physical CPU number.
First, generate a long parseable list for all domains by using the following command:
primary# ldm list -l -p
Look for the entry in the list's VCPU sections that has a pid field equal to the physical CPU number.
If you find such an entry, the CPU is in the domain the entry is listed under, and the virtual CPU number within the domain is given by the entry's vid field.
If you do not find such an entry, the CPU is not in any domain.