From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: SVM: Can we read back all segment attributes? Date: Wed, 02 Jul 2014 16:13:53 +0200 Message-ID: <53B413A1.30309@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm To: Joerg Roedel Return-path: Received: from goliath.siemens.de ([192.35.17.28]:41430 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753125AbaGBON7 (ORCPT ); Wed, 2 Jul 2014 10:13:59 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Hi J=F6rg, a question about how to interpret the SVM spec popped up because of a problems with running KVM on top of VMware: We currently read the G bit of all segments except CS back from the VMCB (svm_get_segment). VMware does not seem to support this while real hardware is practically fine. So I received some KVM patch from them to apply the CS strategy (use th= e limit to define G) for all segments. Reading section 15.5.1, one could base this on the sentence ("Segment State in the VMCB"): "However, only some of the attribute bits are actually observed by hardware, depending on the segment register in question: ..." Then follows a list that does not include G. That definitely means hardware does not read the G bit - but does it always update it when the guest loads a different segment? And if G is not guaranteed to be updated, what about the other bits we currently read back? Are there some that are affected by these exceptions as well? Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux