diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2016-01-07 11:00:57 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-01-07 11:00:57 +0100 |
| commit | def840ede34ea1fa47494c62fba06479af2abbc1 (patch) | |
| tree | 89c0dff153508be35ddabb246d96ee8f08d3e90e /drivers/base/memory.c | |
| parent | 774926641d1968a4839da3a6ac79d914742aac2f (diff) | |
| parent | c7da6fa43cb1c5e649da0f478a491feb9208cae7 (diff) | |
Merge tag 'kvm-arm-for-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next
KVM/ARM changes for Linux v4.5
- Complete rewrite of the arm64 world switch in C, hopefully
paving the way for more sharing with the 32bit code, better
maintainability and easier integration of new features.
Also smaller and slightly faster in some cases...
- Support for 16bit VM identifiers
- Various cleanups
Diffstat (limited to 'drivers/base/memory.c')
| -rw-r--r-- | drivers/base/memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 2804aed3f416..25425d3f2575 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -303,6 +303,10 @@ static int memory_subsys_offline(struct device *dev) if (mem->state == MEM_OFFLINE) return 0; + /* Can't offline block with non-present sections */ + if (mem->section_count != sections_per_block) + return -EINVAL; + return memory_block_change_state(mem, MEM_OFFLINE, MEM_ONLINE); } |
