THe cloud image is shipped as a qcow2 file. It has about 3 GB of usable space. I need more.
Continue readingNetwork setup for a custom Qemu Virtual Machine
After building a custome Qemu, rthere are a couple ways to run a VM to get to it. The older approach to VM management is to create a block device, run the vm with a boot device, do a full install and log in to the serial console. However, if you run the Qemu/KVM machine from the command lilne, hitting control C will stop your VM, and this is annoying. I have found it worth while to set up networking and then to SSH in to the machine.
My notes here suck. I am going to try and document what I have here working, and, over time, reverse engineer how I got here.
A PCC driver in Qemu
In order to perform test driven development, you need a way to drive your code that can isolate behavior. Linux Kernel drivers that communicate with hardware devices can be hard to test: you might not have access to the hardware from your test systems, or the hardware may be flakey. I have such a set of issues with the Platform Communication Channel (PCC) drivers I am working with.
My primary work has been with a network driver that only exists on the newest hardware. However, I also need to be able to handle some drivers that would only work against old hardware. There are also PCC based drivers for hardware that my company does not support or have access to. I might want to make a test to ensure that changes to the Linux Kernel PCC driver does not change its behavior against these drivers. There exists no system where all of these drivers would be supported. But I can build one with Qemu.
The Qemu based driver might not completely simulate the hardware exactly as implemented, and that is OK: I want to be able to do things with Qemu I cannot do with current hardware. For example, the MCTP-over-PCC driver should be able to handle a wide array of messages, but the hardware I have access to only supports a very limited subset of message types.
The full code for the device is here.
Here is how I went about building a Qemu based PCC driver.
Continue readingMaintaining a change log in a git commit message
Changes do not always get accepted upon initial submission. My current submission of the MCTP over PCC patch is at revision 37 and will likely have more. Previously, this patch was part of a series, and the change log was displayed in the series header email. However, now that I am down to a single patch, the change log should go in the email message with the patch attached.
It rturns out this is fairly simple to do: Puyt the change log at the =bottom of the commit message, after the Signed-Off-By tag. and after three dashes:
Continue readingSpring in Massachusetts



The Value of Blogging as a programmer
Today at the local Python meetup, I repeated my little speech encouraging the other members to blog. They, in turn, suggested I write a blog post explaining what I just told them. It is entirely possible I have written this before in my 2.5 decods of recording my thoughts in web format, but maybe I still have something new to add.
When talking about software, esepcially that brand of software that is written for internal consumption at a company, I find it valuable to frame things in terms of “Me. Us. Them.” I might write something for my personal use. Later I dscover other people on my team can use it,too. Finally, I might find that it is worthwhile to make it availble to the larger organization. I think the same might be true about blogging.
Continue readingtags for rust
I use tags to navigate source code in vim. Here is how I set things up for generating tags for rust.
Continue readingiced Hello World
Iced looks like a decent toolkit for writing desktop apps. I wanted the bog-simplest program I could start with. I think this is it. Based on a few tutorials I have found around.
Continue readingLimiting What an Agent can do
I do not work with AI tools. This is not advice from experience of working with AI. It is advice from working with access controls in general.
Any agent has responsibility and authority. Responsibility is what it is required to produce. Authority is the set of resources that you provide to that agent. This does not change if the agent is human or automation, and AI agents fall in to that later category.
Stacking Protocols
I find myself writing a program in C that is supposed to handle multiple protocols. At its entry point, the protocol is Platform Communication Channel (extended memory, type 3 and type 4). Embedded in that is an Management Component Transport Protocol (MCTP) message, and embedded in that is one of many different protocols.
I might want to swap out the PCC layer in the future for….something else. MCTP can come over many different protocols, so there is a good be that the tool will be more useful if it can assume that the protocol outside of the MCTP layer is something other than MCTP.
One problem I have is that the MCTP header does not have a length field. We do not not know how long the payload is; all it has is version, source, destination, and flags. Thus, if we want to pass a buffer of type MCTP header along, and we want the length, we need to pass it in a separate field. This goes both for incoming (how many bytes to read) and outgoing (how many bytes to write).