[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/shadow: sh_type_to_size[] needs L2H entry when HVM+PV32


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Mon, 23 Jan 2023 12:30:36 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o5BpS3JAQgNTbeaqBa9kJtRJ25xvDWQITu5TzmiHT8A=; b=SmMmyhZtN00NHtF2ts83stQRYx5Ev4cOajxMtPVBTJXWzA3Z2Y4IRp38VBuZpy7rqxb25wuy0byAckUGGF9g4aBiMELVIoUw2DZzJjZDFmkc1ji2Ow/S0yo3wrho9fLjJ4+e0Woj4CihGi9u+P5RFigJRH+Mufihd7+Ty5ejmjtt2PxmlxC64/H0V40tDwLCoo+SBE9bfAVc79oxz0gXt+10w5thszuglA1RJhZ5ouGhmodB/Xt0fq7RbYs6d8RZ/GkXhUDWX5vLdbQ0xICC/H67w0meA5LBI9ICr210msEcgJRLwzUka4qYYj3IL6WcDlxzyyoUv0/GXsdw6+inbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cebFiT4XOxgJCV1i2TikX6uAMk8p2Y+o6sEeLv5kjFWzqqLupAuecov+HdpJYnovXXoCNhSKKrNQ+0tUc1AY/lz56MulHYnEIYMCD8Pi7UcjHL5JcYnCYqXQSqFJJ0GT+0k52iPgqo/9Qyq/ig40Qpv6X5ZCU/ZvNvup4V3L7D99cjxpNJCyA1AGhlg9K7eoneGIlFscIxEXhM4Bbb3anQFhF+A3gdw7WP+LMSXebme6s99jc4uaM4+NH1Bvj6JOMbhiK4PadwXyvmqIpDcDS6CuY1ZCR9GJIcKLvf+6pRXYvYkGBJm97SWl98gZTI7hyqw12rwhyH4kFec1cQ1Q9w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "Tim (Xen.org)" <tim@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 23 Jan 2023 12:31:01 +0000
  • Ironport-data: A9a23:jqAqm65J9J6MUbuFzxA6FwxRtAnGchMFZxGqfqrLsTDasY5as4F+v jQeCDiFafaPMTfxKNlxO9++/R9SvMDRydQyQVc+qHwxHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+45wehBtC5gZlPakR5weH/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m6 80XEykSbRe5oaGOnqKcSNlit+YgI5y+VG8fkikIITDxK98DGMmGaIKToNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6Okkooj+GF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNNIS+XlrqMy6LGV7mMIDUcdCWbmncC411y1V456E mxE1DV7+MDe82TuFLERRSaQonSJoxodUNp4CPAh5UeGza+8yxmdLngJSHhGctNOnNM3QBQ62 1nPmMnmbRR/vbvQRX+D+7O8qTKpJTNTPWIEfTUDTwYO/5/kuo5bs/7UZtNqEarwhdqsHzj1m mmOtHJn2OxVitMX3aKm+1yBmyirupXCUg8y4EPQQ36h6QR6IoWiYuRE9GTm0BqJF67BJnHpg ZTOs5H2ADwmZX1VqBGwfQ==
  • Ironport-hdrordr: A9a23:2RY4lqojOS3A63KvYIZGUJUaV5oNeYIsimQD101hICG9JPbo7f xGuM5rrCMc7wxhPk3I+OrwX5VoJEm3yXcb2/hzAV7PZmnbUQiTXeVfBOnZsl/d8nbFh5ZgPM 5bGsAUNDSaNykesS+V2miFOudl6MWb9rulnOLPpk0dNj2CqJsN0+66MGum+4FNKzWuzKBWKK ah
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZLwKEbZ+pvxq41k6VhQDqg2rUMq6r0SKAgAAA54CAABzuAA==
  • Thread-topic: [PATCH] x86/shadow: sh_type_to_size[] needs L2H entry when HVM+PV32

On 23/01/2023 10:47 am, Jan Beulich wrote:
> On 23.01.2023 11:43, Andrew Cooper wrote:
>> On 23/01/2023 8:12 am, Jan Beulich wrote:
>>> While the table is used only when HVM=y, the table entry of course needs
>>> to be properly populated when also PV32=y. Fully removing the table
>>> entry we therefore wrong.
>>>
>>> Fixes: 1894049fa283 ("x86/shadow: L2H shadow type is PV32-only")
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Erm, why?
>>
>> The safety justification for the original patch was that this is HVM
>> only code.  And it really is HVM only code - it's genuinely compiled out
>> for !HVM builds.
> Right, and we have logic taking care of the !HVM case. But that same
> logic uses this "HVM-only" table when HVM=y also for all PV types.

Ok - this is what needs fixing then.

This is a layering violation which has successfully tricked you into
making a buggy patch.

I'm unwilling to bet this will be the final time either...  "this file
is HVM-only, therefore no PV paths enter it" is a reasonable
expectation, and should be true.

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.