David Woodhouse 23e60258ae KVM: x86/xen: Fix lockdep warning on "recursive" gpc locking
In commit 5ec3289b31 ("KVM: x86/xen: Compatibility fixes for shared runstate
area") we declared it safe to obtain two gfn_to_pfn_cache locks at the same
time:
	/*
	 * The guest's runstate_info is split across two pages and we
	 * need to hold and validate both GPCs simultaneously. We can
	 * declare a lock ordering GPC1 > GPC2 because nothing else
	 * takes them more than one at a time.
	 */

However, we forgot to tell lockdep. Do so, by setting a subclass on the
first lock before taking the second.

Fixes: 5ec3289b31 ("KVM: x86/xen: Compatibility fixes for shared runstate area")
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-Id: <20230111180651.14394-1-dwmw2@infradead.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-11 13:32:21 -05:00
..
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2023-01-11 13:31:53 -05:00
2022-12-19 07:51:30 -06:00
2022-12-13 19:29:45 -08:00
2022-12-19 08:23:27 -06:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2023-01-08 06:55:08 -07:00
2022-12-13 19:29:45 -08:00
2022-12-17 14:06:53 -06:00
2022-12-13 19:29:45 -08:00
2022-12-16 13:46:41 -06:00