mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
KVM: selftests: Make sparsebit structs const where appropriate
Make all sparsebit struct pointers "const" where appropriate. This will allow adding a bitmap to track protected/encrypted physical memory that tests can access in a read-only fashion. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <seanjc@google.com> Cc: Vishal Annapurve <vannapurve@google.com> Cc: Ackerley Tng <ackerleytng@google.com> Cc: Andrew Jones <andrew.jones@linux.dev> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Tested-by: Carlos Bilbao <carlos.bilbao@amd.com> Signed-off-by: Michael Roth <michael.roth@amd.com> Signed-off-by: Peter Gonda <pgonda@google.com> [sean: massage changelog] Link: https://lore.kernel.org/r/20240223004258.3104051-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
committed by
Sean Christopherson
parent
126190379c
commit
35f50c91c4
@@ -30,26 +30,26 @@ typedef uint64_t sparsebit_num_t;
|
||||
|
||||
struct sparsebit *sparsebit_alloc(void);
|
||||
void sparsebit_free(struct sparsebit **sbitp);
|
||||
void sparsebit_copy(struct sparsebit *dstp, struct sparsebit *src);
|
||||
void sparsebit_copy(struct sparsebit *dstp, const struct sparsebit *src);
|
||||
|
||||
bool sparsebit_is_set(struct sparsebit *sbit, sparsebit_idx_t idx);
|
||||
bool sparsebit_is_set_num(struct sparsebit *sbit,
|
||||
bool sparsebit_is_set(const struct sparsebit *sbit, sparsebit_idx_t idx);
|
||||
bool sparsebit_is_set_num(const struct sparsebit *sbit,
|
||||
sparsebit_idx_t idx, sparsebit_num_t num);
|
||||
bool sparsebit_is_clear(struct sparsebit *sbit, sparsebit_idx_t idx);
|
||||
bool sparsebit_is_clear_num(struct sparsebit *sbit,
|
||||
bool sparsebit_is_clear(const struct sparsebit *sbit, sparsebit_idx_t idx);
|
||||
bool sparsebit_is_clear_num(const struct sparsebit *sbit,
|
||||
sparsebit_idx_t idx, sparsebit_num_t num);
|
||||
sparsebit_num_t sparsebit_num_set(struct sparsebit *sbit);
|
||||
bool sparsebit_any_set(struct sparsebit *sbit);
|
||||
bool sparsebit_any_clear(struct sparsebit *sbit);
|
||||
bool sparsebit_all_set(struct sparsebit *sbit);
|
||||
bool sparsebit_all_clear(struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_first_set(struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_first_clear(struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_next_set(struct sparsebit *sbit, sparsebit_idx_t prev);
|
||||
sparsebit_idx_t sparsebit_next_clear(struct sparsebit *sbit, sparsebit_idx_t prev);
|
||||
sparsebit_idx_t sparsebit_next_set_num(struct sparsebit *sbit,
|
||||
sparsebit_num_t sparsebit_num_set(const struct sparsebit *sbit);
|
||||
bool sparsebit_any_set(const struct sparsebit *sbit);
|
||||
bool sparsebit_any_clear(const struct sparsebit *sbit);
|
||||
bool sparsebit_all_set(const struct sparsebit *sbit);
|
||||
bool sparsebit_all_clear(const struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_first_set(const struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_first_clear(const struct sparsebit *sbit);
|
||||
sparsebit_idx_t sparsebit_next_set(const struct sparsebit *sbit, sparsebit_idx_t prev);
|
||||
sparsebit_idx_t sparsebit_next_clear(const struct sparsebit *sbit, sparsebit_idx_t prev);
|
||||
sparsebit_idx_t sparsebit_next_set_num(const struct sparsebit *sbit,
|
||||
sparsebit_idx_t start, sparsebit_num_t num);
|
||||
sparsebit_idx_t sparsebit_next_clear_num(struct sparsebit *sbit,
|
||||
sparsebit_idx_t sparsebit_next_clear_num(const struct sparsebit *sbit,
|
||||
sparsebit_idx_t start, sparsebit_num_t num);
|
||||
|
||||
void sparsebit_set(struct sparsebit *sbitp, sparsebit_idx_t idx);
|
||||
@@ -62,9 +62,9 @@ void sparsebit_clear_num(struct sparsebit *sbitp,
|
||||
sparsebit_idx_t start, sparsebit_num_t num);
|
||||
void sparsebit_clear_all(struct sparsebit *sbitp);
|
||||
|
||||
void sparsebit_dump(FILE *stream, struct sparsebit *sbit,
|
||||
void sparsebit_dump(FILE *stream, const struct sparsebit *sbit,
|
||||
unsigned int indent);
|
||||
void sparsebit_validate_internal(struct sparsebit *sbit);
|
||||
void sparsebit_validate_internal(const struct sparsebit *sbit);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user