869b0afa | 26-May-2025 |
Zhao Liu <zhao1.liu@intel.com> |
rust/hpet: Drop BqlCell wrapper for num_timers
Now that the num_timers field is initialized as a property, someone may change its default value using qdev_prop_set_uint8(), but the value is fixed af
rust/hpet: Drop BqlCell wrapper for num_timers
Now that the num_timers field is initialized as a property, someone may change its default value using qdev_prop_set_uint8(), but the value is fixed after the Rust code sees it first. Since there is no need to modify it after realize(), it is not to be necessary to have a BqlCell wrapper.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250520152750.2542612-4-zhao1.liu@intel.com [Remove .into() as well. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
b3bf86b8 | 26-May-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust/hpet: change type of num_timers to usize
Remove the need to convert after every read of the BqlCell. Because the vmstate uses a u8 as the size of the VARRAY, this requires switching the VARRAY
rust/hpet: change type of num_timers to usize
Remove the need to convert after every read of the BqlCell. Because the vmstate uses a u8 as the size of the VARRAY, this requires switching the VARRAY to use num_timers_save; which in turn requires ensuring that the num_timers_save is always there. For simplicity do this by removing support for version 1, which QEMU has not been producing for ~15 years.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
aef5ac86 | 20-May-2025 |
Zhao Liu <zhao1.liu@intel.com> |
rust: Fix the typos in doc
These typos are found by "cargo spellcheck". Though it outputs a lot of noise and false positives, there still are some real typos.
Signed-off-by: Zhao Liu <zhao1.liu@int
rust: Fix the typos in doc
These typos are found by "cargo spellcheck". Though it outputs a lot of noise and false positives, there still are some real typos.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250520152750.2542612-6-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
ac2c4d3a | 08-May-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust: pl011: Really use RX FIFO depth
While we model a 16-elements RX FIFO since the PL011 model was introduced in commit cdbdb648b7c ("ARM Versatile Platform Baseboard emulation"), we only read 1 c
rust: pl011: Really use RX FIFO depth
While we model a 16-elements RX FIFO since the PL011 model was introduced in commit cdbdb648b7c ("ARM Versatile Platform Baseboard emulation"), we only read 1 char at a time!
Have can_receive() return how many elements are available, and use that in receive().
This is the Rust version of commit 3e0f118f825 ("hw/char/pl011: Really use RX FIFO depth"); but it also adds back a comment that is present in commit f576e0733cc ("hw/char/pl011: Add support for loopback") and absent in the Rust code.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
6d8c6dee | 07-Apr-2025 |
Rakesh Jeyasingh <rakeshjb010@gmail.com> |
rust/hw/char/pl011: Extract DR write logic into separate function
- Split `write()` DR case into `write_data_register()`
Signed-off-by: Rakesh Jeyasingh <rakeshjb010@gmail.com> Link: https://lore.k
rust/hw/char/pl011: Extract DR write logic into separate function
- Split `write()` DR case into `write_data_register()`
Signed-off-by: Rakesh Jeyasingh <rakeshjb010@gmail.com> Link: https://lore.kernel.org/r/20250407181327.171563-3-rakeshjb010@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
efc56032 | 07-Apr-2025 |
Rakesh Jeyasingh <rakeshjb010@gmail.com> |
rust/hw/char/pl011: Extract extract DR read logic into separate function
- Split `read()` DR case into `read_data_register()`
Signed-off-by: Rakesh Jeyasingh <rakeshjb010@gmail.com> Link: https://l
rust/hw/char/pl011: Extract extract DR read logic into separate function
- Split `read()` DR case into `read_data_register()`
Signed-off-by: Rakesh Jeyasingh <rakeshjb010@gmail.com> Link: https://lore.kernel.org/r/20250407181327.171563-2-rakeshjb010@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
ad3ab01b | 14-Apr-2025 |
Zhao Liu <zhao1.liu@intel.com> |
rust/hpet: Fix a clippy error
Carge clippy complained about:
error: casts from `u8` to `u32` can be expressed infallibly using `From`
So use `From` to convert `u8` to `u32`.
Signed-off-by: Zhao L
rust/hpet: Fix a clippy error
Carge clippy complained about:
error: casts from `u8` to `u32` can be expressed infallibly using `From`
So use `From` to convert `u8` to `u32`.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250414144943.1112885-10-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
64e1256b | 14-Apr-2025 |
Zhao Liu <zhao1.liu@intel.com> |
rust/hpet: convert HPETTimer index to u8 type
The C version of HPET uses the uint8_t type for timer index ("tn"), and usize type in Rust version will break migration between the C and Rust versions.
rust/hpet: convert HPETTimer index to u8 type
The C version of HPET uses the uint8_t type for timer index ("tn"), and usize type in Rust version will break migration between the C and Rust versions.
So convert HPETTimer index' type to u8 (consistent with the C version of HPET) to make it friendly for vmstate support.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250414144943.1112885-8-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
64acc23c | 21-Mar-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
rust: hpet: fix decoding of timer registers
Due to a missing "& 0x18", timer registers are not decoded correctly. This breaks the tests/functional/test_x86_64_tuxrun.py functional test.
Fixes: 5190
rust: hpet: fix decoding of timer registers
Due to a missing "& 0x18", timer registers are not decoded correctly. This breaks the tests/functional/test_x86_64_tuxrun.py functional test.
Fixes: 519088b7cf6 ("rust: hpet: decode HPET registers into enums", 2025-03-06) Reported-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|