[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 13/13] i386: enable rust hpet for pc when rust is enabled
From: |
Paolo Bonzini |
Subject: |
Re: [RFC 13/13] i386: enable rust hpet for pc when rust is enabled |
Date: |
Thu, 5 Dec 2024 16:20:44 +0100 |
User-agent: |
Mozilla Thunderbird |
On 12/5/24 07:07, Zhao Liu wrote:
Add HPET configuration in PC's Kconfig options, and select HPET device
(Rust version) if Rust is supported.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
hw/i386/Kconfig | 2 ++
hw/timer/Kconfig | 1 -
rust/hw/Kconfig | 1 +
rust/hw/timer/Kconfig | 2 ++
4 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 rust/hw/timer/Kconfig
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 32818480d263..83ab3222c4f0 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -39,6 +39,8 @@ config PC
select PCSPK
select I8257
select MC146818RTC
+ select HPET if !HAVE_RUST
+ select X_HPET_RUST if HAVE_RUST
HPET is optional, so you need to have...
config HPET
bool
- default y if PC
+default y if PC && !HAVE_RUST
with a matching "default y if PC && HAVE_RUST" for X_HPET_RUST.
Paolo
config I8254
bool
diff --git a/rust/hw/Kconfig b/rust/hw/Kconfig
index 4d934f30afe1..36f92ec02874 100644
--- a/rust/hw/Kconfig
+++ b/rust/hw/Kconfig
@@ -1,2 +1,3 @@
# devices Kconfig
source char/Kconfig
+source timer/Kconfig
diff --git a/rust/hw/timer/Kconfig b/rust/hw/timer/Kconfig
new file mode 100644
index 000000000000..afd980335037
--- /dev/null
+++ b/rust/hw/timer/Kconfig
@@ -0,0 +1,2 @@
+config X_HPET_RUST
+ bool
- [RFC 10/13] rust/timer/hpet: define hpet_fw_cfg, (continued)
- [RFC 12/13] rust/timer/hpet: add qdev APIs support, Zhao Liu, 2024/12/05
- [RFC 13/13] i386: enable rust hpet for pc when rust is enabled, Zhao Liu, 2024/12/05
- Re: [RFC 13/13] i386: enable rust hpet for pc when rust is enabled,
Paolo Bonzini <=
- Re: [RFC 00/13] rust: Reinvent the wheel for HPET timer in Rust, Zhao Liu, 2024/12/05
- Re: [RFC 00/13] rust: Reinvent the wheel for HPET timer in Rust, Paolo Bonzini, 2024/12/05