Commit 546d714
committed
KVM: introduce new vendor op for KVM_GET_DEVICE_ATTR
Allow vendor modules to provide their own attributes on /dev/kvm.
To avoid proliferation of vendor ops, implement KVM_HAS_DEVICE_ATTR
and KVM_GET_DEVICE_ATTR in terms of the same function. You're not
supposed to use KVM_GET_DEVICE_ATTR to do complicated computations,
especially on /dev/kvm.
Reviewed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-ID: <20240404121327.3107131-5-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 8d2aec3 commit 546d714
3 files changed
Lines changed: 26 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1778 | 1778 | | |
1779 | 1779 | | |
1780 | 1780 | | |
| 1781 | + | |
1781 | 1782 | | |
1782 | 1783 | | |
1783 | 1784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4842 | 4842 | | |
4843 | 4843 | | |
4844 | 4844 | | |
4845 | | - | |
| 4845 | + | |
4846 | 4846 | | |
4847 | | - | |
4848 | | - | |
4849 | | - | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
4850 | 4850 | | |
| 4851 | + | |
4851 | 4852 | | |
4852 | 4853 | | |
4853 | 4854 | | |
4854 | | - | |
4855 | | - | |
| 4855 | + | |
4856 | 4856 | | |
4857 | 4857 | | |
4858 | 4858 | | |
4859 | 4859 | | |
4860 | 4860 | | |
4861 | 4861 | | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
| 4873 | + | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
4862 | 4878 | | |
4863 | 4879 | | |
4864 | | - | |
4865 | | - | |
| 4880 | + | |
4866 | 4881 | | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
4872 | | - | |
| 4882 | + | |
4873 | 4883 | | |
4874 | 4884 | | |
4875 | 4885 | | |
| |||
0 commit comments