[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] x86: optimize loading of GDT at context switch
- To: Juergen Gross <JGross@xxxxxxxx>
- From: Jan Beulich <JBeulich@xxxxxxxx>
- Date: Thu, 25 Jul 2019 10:29:41 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N5EAAgUX3DJZl/hkfvE59RSRlNypwdyAxqbuNhma6A8=; b=P20WwkmYnrD/Ejvi6m/K+ExgBVqtyqB8XvWfz3z5/xsXE6bOvIppJiqYMtBoLRPrBhCE1yTdMtNnfLjtRF5q44UZ7dNP3blk/75C3SUMbd2Mo7xjzHmtotAqW3DL79MU493tLie41a4ZpIilnVQHEoMOp5UfTsnVNwfW7KtYUa24ku4Wopd4uiSdSSNd1DLDuQDrL+iksLpF7XuTN78eALwyabek/fV0Fmtdnoqe4jpnSNfWZpoMoPc5JSvuvBcl6smq1x6yQ5A1XYPbGjcf32Q8u7nsynEjspwJMfgbwAouYH3guv4za3lRedvtOwx24q72vO7pixqdPfosl1bYoA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TfMsb+YL481KHfcusMBmsk6Fk0nbOYUa/cVGj2PlVIZlnu+ZWC4xIVT31uDN+laLLASThEyQ7/O3vahfneRXacRudw/0JI2J3AXMcDpwUsMa7O39s6OPUwXRQgj219BPsrQLQrQgFKhUFV3pfn54HAtk5IWI8vHbqoZEHNzwBqYxGtEaAHLdP4YncIS+nZCBNFoIO5fXY/cmLjP8q+pAO+3yTwk/CGWPf7Z6Y+Y1XYkgVx9LBTTftdBsyoAOiT564gPjxnqdo0k7YafeHHgObWIGAi0fK2/ww6KTAfCVt8E6fq0yfQR+9URjfnid7h6p7y2Z/hEdO14P443dBeM/Vg==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Thu, 25 Jul 2019 10:33:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVQJCXlrwkqC0KdkuIf6brzf0OP6bbJpaA
- Thread-topic: [PATCH] x86: optimize loading of GDT at context switch
On 22.07.2019 15:22, Juergen Gross wrote:
> @@ -756,6 +758,7 @@ void load_system_tables(void)
> offsetof(struct tss_struct, __cacheline_filler) - 1,
> SYS_DESC_tss_busy);
>
> + per_cpu(full_gdt_loaded, cpu) = false;
> lgdt(&gdtr);
> lidt(&idtr);
> ltr(TSS_ENTRY << 3);
As per the surrounding code there should be a hard tab used for
indentation here.
> @@ -1739,8 +1743,7 @@ static void __context_switch(void)
>
> if ( need_full_gdt(nd) )
> update_xen_slot_in_full_gdt(n, cpu);
> -
> - if ( need_full_gdt(pd) &&
> + if ( per_cpu(full_gdt_loaded, cpu) &&
> ((p->vcpu_id != n->vcpu_id) || !need_full_gdt(nd)) )
> load_default_gdt(cpu);
I think it wouldn't be bad if the blank line was kept.
If I end up committing this, I'll try to remember to do both
adjustments, unless you object for some reason.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|