Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/xen-os.h
Show All 38 Lines | |||||
#endif | #endif | ||||
#include <contrib/xen/xen.h> | #include <contrib/xen/xen.h> | ||||
#ifndef __ASSEMBLY__ | #ifndef __ASSEMBLY__ | ||||
#include <xen/hvm.h> | #include <xen/hvm.h> | ||||
#include <contrib/xen/event_channel.h> | #include <contrib/xen/event_channel.h> | ||||
#define XEN_VCPUID() XEN_CPUID_TO_VCPUID(PCPU_GET(cpuid)) | |||||
mhorne: This should just be `PCPU_GET(vcpu_id)`. Otherwise you are fetching from the PCPU region twice… | |||||
static inline vm_paddr_t | static inline vm_paddr_t | ||||
xen_get_xenstore_mfn(void) | xen_get_xenstore_mfn(void) | ||||
{ | { | ||||
return (hvm_get_parameter(HVM_PARAM_STORE_PFN)); | return (hvm_get_parameter(HVM_PARAM_STORE_PFN)); | ||||
} | } | ||||
static inline evtchn_port_t | static inline evtchn_port_t | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |
This should just be PCPU_GET(vcpu_id). Otherwise you are fetching from the PCPU region twice when you don't need to.
If for ARM cpuid == vcpuid, then you can define XEN_VCPUID separately in each arch's xen-os.h header.