Message ID | 20220831125059.170032-2-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | expose host-phys-bits to guest | expand |
On Wed, Aug 31, 2022 at 02:50:58PM +0200, Gerd Hoffmann wrote: > The KVM_HINTS_HOST_PHYS_BITS bit indicates that qemu has host-phys-bits > turned on. This implies the guest can actually work with the full > available physical address space as advertised by CPUID(0x80000008). > > Temporary hack for RfC patch and testing. This change must actually be > done in the linux kernel, then picked up by qemu via header file sync. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > include/standard-headers/asm-x86/kvm_para.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/standard-headers/asm-x86/kvm_para.h b/include/standard-headers/asm-x86/kvm_para.h > index f0235e58a1d3..105b958c0f56 100644 > --- a/include/standard-headers/asm-x86/kvm_para.h > +++ b/include/standard-headers/asm-x86/kvm_para.h > @@ -37,7 +37,8 @@ > #define KVM_FEATURE_HC_MAP_GPA_RANGE 16 > #define KVM_FEATURE_MIGRATION_CONTROL 17 > > -#define KVM_HINTS_REALTIME 0 > +#define KVM_HINTS_REALTIME 0 > +#define KVM_HINTS_HOST_PHYS_BITS 1 > > /* The last 8 bits are used to indicate how to interpret the flags field > * in pvclock structure. If no bits are set, all flags are ignored. Just a clarification. I think what the bit means is that physical address size data in cpuid is valid. Accordingly I would rename it to +#define KVM_HINTS_PHYS_ADDRESS_SIZE_DATA_VALID 1 or some such. > -- > 2.37.2
diff --git a/include/standard-headers/asm-x86/kvm_para.h b/include/standard-headers/asm-x86/kvm_para.h index f0235e58a1d3..105b958c0f56 100644 --- a/include/standard-headers/asm-x86/kvm_para.h +++ b/include/standard-headers/asm-x86/kvm_para.h @@ -37,7 +37,8 @@ #define KVM_FEATURE_HC_MAP_GPA_RANGE 16 #define KVM_FEATURE_MIGRATION_CONTROL 17 -#define KVM_HINTS_REALTIME 0 +#define KVM_HINTS_REALTIME 0 +#define KVM_HINTS_HOST_PHYS_BITS 1 /* The last 8 bits are used to indicate how to interpret the flags field * in pvclock structure. If no bits are set, all flags are ignored.
The KVM_HINTS_HOST_PHYS_BITS bit indicates that qemu has host-phys-bits turned on. This implies the guest can actually work with the full available physical address space as advertised by CPUID(0x80000008). Temporary hack for RfC patch and testing. This change must actually be done in the linux kernel, then picked up by qemu via header file sync. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- include/standard-headers/asm-x86/kvm_para.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)