Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1158486

Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch
Date 2015-06-04 13:40 +0200
Message-ID <pxBF8-7YJ-9@gated-at.bofh.it> (permalink)
References <puN05-1yD-3@gated-at.bofh.it> <puN9M-1Kb-15@gated-at.bofh.it> <pxmd4-1LV-19@gated-at.bofh.it> <pxwFs-mx-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2015-06-04 08:14+0200, Paolo Bonzini:
> On 03/06/2015 21:02, Radim Krčmář wrote:
>>> +	r = kvm_write_guest(vcpu->kvm, vcpu->arch.smbase + 0xfe00, buf, sizeof(buf));
>> 
>> The state is saved in SMRAM, but we are accessing it using the non-SMM
>> address space ... how did it pass testing?
>> (Restore is using SMM address space, so I'm guessing that the mapping
>>  from QEMU wasn't really utilizing two separate address spaces.)
> 
> At this point of the series there are no separate address spaces yet.
> Patch 10 then changes it everywhere:
> 
> @@ -6558,7 +6558,7 @@ static void process_smi(struct kvm_vcpu *vcpu)

My bad, people using jackhammers at 7am are getting the better of me.

> Why did I order it this way?  Because it is already possible to test
> this code with the default SMBASE of 0x30000, and it is already
> possible to run the full firmware if you hack it not to close SMRAM
> (for this I used q35's high SMRAM).  It is not possible to test the
> code partially if you first add the two address spaces, and only
> implement the world switch second.

The ordering makes sense;  I wanted to point out the early return,
noticed this as well and missed that it was fixed later, sorry.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch Radim Krčmář <rkrcmar@redhat.com> - 2015-06-04 13:40 +0200

csiph-web