[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled
From: |
Paolo Bonzini |
Subject: |
[PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled |
Date: |
Thu, 16 Jun 2022 10:32:07 +0200 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
According to spec:
"TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space
only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear
in the appropriate physical address space. Note that once D_LCK is set,
this bit becomes read only."
Changed to match the spec description.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20220615034501.2733802-1-zhenzhong.duan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/pci-host/q35.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index ab5a47aff5..20da121374 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -379,7 +379,8 @@ static void mch_update_smram(MCHPCIState *mch)
memory_region_set_enabled(&mch->high_smram, false);
}
- if (pd->config[MCH_HOST_BRIDGE_ESMRAMC] & MCH_HOST_BRIDGE_ESMRAMC_T_EN) {
+ if ((pd->config[MCH_HOST_BRIDGE_ESMRAMC] & MCH_HOST_BRIDGE_ESMRAMC_T_EN) &&
+ (pd->config[MCH_HOST_BRIDGE_SMRAM] & SMRAM_G_SMRAME)) {
switch (pd->config[MCH_HOST_BRIDGE_ESMRAMC] &
MCH_HOST_BRIDGE_ESMRAMC_TSEG_SZ_MASK) {
case MCH_HOST_BRIDGE_ESMRAMC_TSEG_SZ_1MB:
--
2.36.1
- [PULL 11/21] s390x: simplify virtio_ccw_reset_virtio, (continued)
- [PULL 11/21] s390x: simplify virtio_ccw_reset_virtio, Paolo Bonzini, 2022/06/16
- [PULL 12/21] virtio-mmio: stop ioeventfd on legacy reset, Paolo Bonzini, 2022/06/16
- [PULL 13/21] virtio: stop ioeventfd on reset, Paolo Bonzini, 2022/06/16
- [PULL 15/21] configure: update list of preserved environment variables, Paolo Bonzini, 2022/06/16
- [PULL 18/21] build: fix check for -fsanitize-coverage-allowlist, Paolo Bonzini, 2022/06/16
- [PULL 14/21] virtio-mmio: cleanup reset, Paolo Bonzini, 2022/06/16
- [PULL 16/21] configure: cleanup -fno-pie detection, Paolo Bonzini, 2022/06/16
- [PULL 17/21] tests/vm: allow running tests in an unconfigured source tree, Paolo Bonzini, 2022/06/16
- [PULL 20/21] meson: put cross compiler info in a separate section, Paolo Bonzini, 2022/06/16
- [PULL 21/21] build: include pc-bios/ part in the ROMS variable, Paolo Bonzini, 2022/06/16
- [PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled,
Paolo Bonzini <=
- Re: [PULL 00/21] Statistics, preconfig and cleanup patches for 2022-06-16, Richard Henderson, 2022/06/16