diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-23 11:35:55 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-23 11:35:55 +0200 |
commit | 5804c19b80bf625c6a9925317f845e497434d6d3 (patch) | |
tree | ba4a0bf9cac721e2bf898e3be5ab64773da5a9d2 /fs/efivarfs | |
parent | KVM: SVM: Do not use user return MSR support for virtualized TSC_AUX (diff) | |
parent | KVM: riscv: selftests: Selectively filter-out AIA registers (diff) | |
download | linux-5804c19b80bf625c6a9925317f845e497434d6d3.tar.xz linux-5804c19b80bf625c6a9925317f845e497434d6d3.zip |
Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv fixes for 6.6, take #1
- Fix KVM_GET_REG_LIST API for ISA_EXT registers
- Fix reading ISA_EXT register of a missing extension
- Fix ISA_EXT register handling in get-reg-list test
- Fix filtering of AIA registers in get-reg-list test
Diffstat (limited to 'fs/efivarfs')
-rw-r--r-- | fs/efivarfs/super.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index e028fafa04f3..996271473609 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -32,10 +32,16 @@ static int efivarfs_statfs(struct dentry *dentry, struct kstatfs *buf) u64 storage_space, remaining_space, max_variable_size; efi_status_t status; - status = efivar_query_variable_info(attr, &storage_space, &remaining_space, - &max_variable_size); - if (status != EFI_SUCCESS) - return efi_status_to_err(status); + /* Some UEFI firmware does not implement QueryVariableInfo() */ + storage_space = remaining_space = 0; + if (efi_rt_services_supported(EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO)) { + status = efivar_query_variable_info(attr, &storage_space, + &remaining_space, + &max_variable_size); + if (status != EFI_SUCCESS && status != EFI_UNSUPPORTED) + pr_warn_ratelimited("query_variable_info() failed: 0x%lx\n", + status); + } /* * This is not a normal filesystem, so no point in pretending it has a block |