Re: [PATCH kvm-unit-tests 2/2] replace tss_descr global with a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+Jim again

On Wed, Oct 20, 2021, Paolo Bonzini wrote:
> @@ -255,4 +255,16 @@ static inline void *get_idt_addr(idt_entry_t *entry)
>  	return (void *)addr;
>  }
>  
> +extern gdt_desc_entry_t *get_tss_descr(void);
> +
> +static inline unsigned long get_gdt_entry_base(gdt_desc_entry_t *entry)

Bad naming again, base4 doesn't exist for segment descriptors.  It's a bit
wordy, but maybe this?

static inline unsigned long get_system_desc_base(gdt_system_desc_entry_t *entry)

> +{
> +	unsigned long base;
> +	base = entry->base1 | ((u32)entry->base2 << 16) | ((u32)entry->base3 << 24);
> +#ifdef __x86_64__
> +	base |= (u64)entry->base4 << 32;
> +#endif
> +	return base;
> +}
> +
>  #endif



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux